Objetivo: Cadastrar regras de atendimento, para gerenciamento do atendimento aos clientes de uma clínica, com intervalos de atendimentos por: dias específicos, atendimento diário e semanal
Documentação Open API: https://app.swaggerhub.com/apis/mlaguardia/customer-service/1.0.0
- Copy
.env.exampleto.envand change environment variables accordingly - Run
docker-compose up --buildfor development- Changes made to
server/are live reloaded
- Changes made to
- For running tests, run
npm test - For running tests in watch mode, run
npm run watch-test
- Testes de Integração com Exemplo do Desafio
- Validação de regras colidentes
- Validação de campos
- GraphQL externo para consumo
Parameters:
| Name | Type |
|---|---|
| type | string (query), Available values : specific_day, daily, weekly |
| specific_day | string (query), Date Format (DD-MM-YYYY) |
| start_time | string (query), Time Format(HH:MM) |
| end_time | string (query), Time Format(HH:MM) |
| rule_name | string (query) |
Parameters:
| Name | Type | Required |
|---|---|---|
| x-validate-intervals | string (header), - Available values : true, empty | false |
| type | string (body), - Available values : specific_day, daily, weekly | true |
| week_days | array (body), - Values: ['monday','tuesday','wednesday' ..] | required if type is weekly |
| specific_day | string (body), Date Format (DD-MM-YYYY) | required if type is specific_day |
| intervals.start_time | string (body), Time Format(HH:MM) | true |
| intervals.end_time | string (body), Time Format(HH:MM) | true |
| rule_name | string (body), Min 3 characters | true |
Parameters:
| Name | Type | Required |
|---|---|---|
| id | string (path) | true |
Parameters:
| Name | Type | Required |
|---|---|---|
| start_date | string (query), Date Format (DD-MM-YYYY) | true |
| end_date | string (query), Date Format (DD-MM-YYYY) | true |