... | ... | @@ -26,6 +26,8 @@ Envios para o back podem ser de três tipos, não se limitando a usar somente um |
|
|
- [Teachers](#teachers)
|
|
|
- [Degrees](#degrees)
|
|
|
- [Genders](#genders)
|
|
|
- [Projects](#projects)
|
|
|
- [Opportunities](#opportunities)
|
|
|
|
|
|
---
|
|
|
<a name="login"></a>
|
... | ... | @@ -688,3 +690,458 @@ Nenhum payload esperado |
|
|
]
|
|
|
}
|
|
|
```
|
|
|
---
|
|
|
<a name="projects"></a>
|
|
|
### GET /projects/
|
|
|
|
|
|
### Params
|
|
|
|
|
|
Nenhum parâmetro esperado
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
projects: [
|
|
|
{
|
|
|
id: 1,
|
|
|
name: "Projeto Javascript",
|
|
|
description: "Descrição do projeto Projeto Javascript",
|
|
|
open: true,
|
|
|
teacherUserId: 1
|
|
|
},
|
|
|
...
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
### GET /projects/{id}/
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
project: {
|
|
|
id: 1,
|
|
|
name: "Projeto Javascript",
|
|
|
description: "Descrição do projeto Projeto Javascript",
|
|
|
open: true,
|
|
|
teacherUserId: 1
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
---
|
|
|
|
|
|
### GET /projects/{id}/candidates/
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
candidates: [
|
|
|
{
|
|
|
id: 2,
|
|
|
name: "student",
|
|
|
description: "Test student",
|
|
|
birthday: "2001-03-27T00:00:00.000Z",
|
|
|
semester: 6,
|
|
|
email: "[email protected]",
|
|
|
lattesURL: "http://lattes.cnpq.br/54321",
|
|
|
course: "Engenharia de Software",
|
|
|
gender: "Masculino",
|
|
|
institution: "PUCRS",
|
|
|
appliedOpportunities: [
|
|
|
{
|
|
|
matchId: 3,
|
|
|
id: 1,
|
|
|
type: "junior",
|
|
|
description: "Oportunidade de nivel junior no projeto 1",
|
|
|
semesterStart: 1,
|
|
|
semesterEnd: 2,
|
|
|
open: true,
|
|
|
projectId: 1
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
---
|
|
|
|
|
|
---
|
|
|
|
|
|
### GET /projects/{projectId}/accept/{matchId}
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto e do match que está pendente
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
match: {
|
|
|
id: 3,
|
|
|
from: "STUDENT",
|
|
|
status: "DONE",
|
|
|
createdAt: "2022-05-19T01:23:00.410Z",
|
|
|
updatedAt: "2022-05-19T01:28:28.794Z",
|
|
|
userId: 2,
|
|
|
opportunityId: 1
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
<a name="opportunities"></a>
|
|
|
### GET /projects/{projectId}/opportunities/
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto que possui a oportunidade
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
opportunities: [
|
|
|
{
|
|
|
id: 1,
|
|
|
type: "junior",
|
|
|
description: "Oportunidade de nivel junior no projeto 1",
|
|
|
semesterStart: 1,
|
|
|
semesterEnd: 2,
|
|
|
open: true,
|
|
|
projectId: 1
|
|
|
}
|
|
|
...
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
### GET /projects/{projectId}/opportunities/{opportunityId}
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto que possui a oportunidade e o ID da oportunidade
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 200,
|
|
|
msg: "Success",
|
|
|
opportunity: {
|
|
|
id: 1,
|
|
|
type: "junior",
|
|
|
description: "Oportunidade de nivel junior no projeto 1",
|
|
|
semesterStart: 1,
|
|
|
semesterEnd: 2,
|
|
|
open: true,
|
|
|
projectId: 1
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
---
|
|
|
|
|
|
### POST /projects/{projectId}/opportunities/apply
|
|
|
|
|
|
### Params
|
|
|
|
|
|
ID do projeto que possui a oportunidade
|
|
|
|
|
|
### Query string
|
|
|
|
|
|
Nenhuma query string esperada
|
|
|
|
|
|
### Payload
|
|
|
|
|
|
Nenhum payload esperado
|
|
|
|
|
|
### Responses
|
|
|
|
|
|
- 200:
|
|
|
```
|
|
|
{
|
|
|
status: 201,
|
|
|
msg: "Success",
|
|
|
match: {
|
|
|
status: "PENDING",
|
|
|
id: 1,
|
|
|
from: "STUDENT",
|
|
|
userId: 1,
|
|
|
opportunityId: 1,
|
|
|
updatedAt: "2022-05-19T01:20:33.821Z",
|
|
|
createdAt: "2022-05-19T01:20:33.821Z"
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
- 422:
|
|
|
```
|
|
|
{
|
|
|
status: 422,
|
|
|
msg: "Bad request",
|
|
|
errors: [
|
|
|
{
|
|
|
value: "string",
|
|
|
msg: "Invalid value"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
- 500:
|
|
|
```
|
|
|
{
|
|
|
status: 500,
|
|
|
msg: "Internal error occurred",
|
|
|
errors: [
|
|
|
{
|
|
|
value: Any,
|
|
|
msg: "str"
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|