From c246ec017f7ff2e07948508a687472f311bf790e Mon Sep 17 00:00:00 2001 From: Italo Amaral Date: Mon, 22 Apr 2024 09:20:34 -0300 Subject: [PATCH] adjust(CC-119): folder project structure refactor --- .../controllers/{api => }/api.module.ts | 80 +++++++++---------- .../decorators/current-user.decorator.ts | 2 +- .../{api => }/guards/api-key.guard.ts | 0 .../create-appointment.controller.ts | 0 .../create-appointment.e2e-spec.ts | 0 .../create-appointment/input.dto.ts | 0 .../nestjs-create-appointment.service.ts | 0 .../create-appointment/output.dto.ts | 0 .../delete-appointment.controller.ts | 0 .../delete-appointment.e2e-spec.ts | 0 .../delete-appointment/input.dto.ts | 0 .../nestjs-delete-appointment.service.ts | 0 .../delete-appointment/output.dto.ts | 0 .../update-appointment/input.dto.ts | 0 .../nestjs-update-appointment.service.ts | 0 .../update-appointment/output.dto.ts | 0 .../update-appointment.controller.ts | 5 +- .../update-appointment.e2e-spec.ts | 0 .../create-clinic/create-clinic.controller.ts | 0 .../create-clinic/create-clinic.e2e-spec.ts | 0 .../v1}/clinic/create-clinic/input.dto.ts | 0 .../nestjs-create-clinic.service.ts | 0 .../v1}/clinic/create-clinic/output.dto.ts | 0 .../delete-clinic/delete-clinic.controller.ts | 0 .../delete-clinic/delete-clinic.e2e-spec.ts | 0 .../v1}/clinic/delete-clinic/input.dto.ts | 0 .../nestjs-delete-clinic.service.ts | 0 .../v1}/clinic/delete-clinic/output.dto.ts | 0 .../v1}/clinic/update-clinic/input.dto.ts | 0 .../nestjs-update-clinic.service.ts | 0 .../v1}/clinic/update-clinic/output.dto.ts | 0 .../update-clinic/update-clinic.controller.ts | 0 .../update-clinic/update-clinic.e2e-spec.ts | 0 ...patient-appointment-registry.controller.ts | 0 ...e-patient-appointment-registry.e2e-spec.ts | 0 .../input.dto.ts | 0 ...te-patient-appointment-registry.service.ts | 0 .../output.dto.ts | 0 ...patient-appointment-registry.controller.ts | 0 ...e-patient-appointment-registry.e2e-spec.ts | 0 .../input.dto.ts | 0 ...te-patient-appointment-registry.service.ts | 0 .../output.dto.ts | 0 .../input.dto.ts | 0 ...te-patient-appointment-registry.service.ts | 0 .../output.dto.ts | 0 ...patient-appointment-registry.controller.ts | 0 ...e-patient-appointment-registry.e2e-spec.ts | 0 .../create-patient.controller.ts | 0 .../create-patient/create-patient.e2e-spec.ts | 0 .../v1}/patient/create-patient/docs.ts | 0 .../v1}/patient/create-patient/input.dto.ts | 0 .../nestjs-create-patient.service.ts | 0 .../v1}/patient/create-patient/output.dto.ts | 0 .../delete-patient.controller.ts | 2 +- .../delete-patient/delete-patient.e2e-spec.ts | 0 .../v1}/patient/delete-patient/docs.ts | 0 .../v1}/patient/delete-patient/input.dto.ts | 0 .../nestjs-delete-patient.service.ts | 0 .../v1}/patient/delete-patient/output.dto.ts | 0 .../v1}/patient/update-patient/docs.ts | 0 .../v1}/patient/update-patient/input-dto.ts | 0 .../nestjs-update-patient.service.ts | 0 .../v1}/patient/update-patient/output.dto.ts | 0 .../update-patient.controller.ts | 0 .../update-patient/update-patient.e2e-spec.ts | 0 .../authenticate-psychologist.controller.ts | 0 .../authenticate-psychologist.e2e-spec.ts | 0 .../authenticate-psychologist/docs.ts | 0 .../authenticate-psychologist/input.dto.ts | 0 ...estjs-authenticate-psychologist.service.ts | 0 .../authenticate-psychologist/output.dto.ts | 0 .../create-psychologist.controller.ts | 2 +- .../create-psychologist.e2e-spec.ts | 0 .../psychologist/create-psychologist/docs.ts | 0 .../create-psychologist/input.dto.ts | 0 .../nestjs-create-psychologist.service.ts | 0 .../create-psychologist/output.dto.ts | 0 .../delete-psychologist.controller.ts | 2 +- .../delete-psychologist.e2e-spec.ts | 0 .../psychologist/delete-psychologist/docs.ts | 0 .../delete-psychologist/input.dto.ts | 0 .../nestjs-delete-psychologist.service.ts | 0 .../delete-psychologist/output.dto.ts | 0 .../psychologist/update-psychologist/docs.ts | 0 .../update-psychologist/input.dto.ts | 0 .../nestjs-update-psychologist.service.ts | 0 .../update-psychologist/output.dto.ts | 0 .../update-psychologist.controller.ts | 0 .../update-psychologist.e2e-spec.ts | 0 apps/core-rest-api/src/main.ts | 4 +- .../tests/utils/e2e-tests-initial-setup.ts | 2 +- apps/core-rest-api/tsconfig.app.json | 7 +- 93 files changed, 57 insertions(+), 49 deletions(-) rename apps/core-rest-api/src/app/adapters/controllers/{api => }/api.module.ts (54%) rename apps/core-rest-api/src/app/adapters/controllers/{api => }/decorators/current-user.decorator.ts (94%) rename apps/core-rest-api/src/app/adapters/controllers/{api => }/guards/api-key.guard.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/create-appointment/create-appointment.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/create-appointment/create-appointment.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/create-appointment/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/create-appointment/nestjs-create-appointment.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/create-appointment/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/delete-appointment/delete-appointment.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/delete-appointment/delete-appointment.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/delete-appointment/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/delete-appointment/nestjs-delete-appointment.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/delete-appointment/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/update-appointment/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/update-appointment/nestjs-update-appointment.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/update-appointment/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/update-appointment/update-appointment.controller.ts (95%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/appointment/update-appointment/update-appointment.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/create-clinic/create-clinic.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/create-clinic/create-clinic.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/create-clinic/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/create-clinic/nestjs-create-clinic.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/create-clinic/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/delete-clinic/delete-clinic.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/delete-clinic/delete-clinic.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/delete-clinic/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/delete-clinic/nestjs-delete-clinic.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/delete-clinic/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/update-clinic/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/update-clinic/nestjs-update-clinic.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/update-clinic/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/update-clinic/update-clinic.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/clinic/update-clinic/update-clinic.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/create-patient-appointment-registry/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/create-patient-appointment-registry/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/delete-patient-appointment-registry/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/delete-patient-appointment-registry/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/update-patient-appointment-registry/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/update-patient-appointment-registry/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/create-patient.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/create-patient.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/nestjs-create-patient.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/create-patient/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/delete-patient.controller.ts (94%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/delete-patient.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/nestjs-delete-patient.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/delete-patient/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/input-dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/nestjs-update-patient.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/update-patient.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/patient/update-patient/update-patient.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/authenticate-psychologist.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/authenticate-psychologist/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/create-psychologist.controller.ts (96%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/create-psychologist.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/nestjs-create-psychologist.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/create-psychologist/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/delete-psychologist.controller.ts (94%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/delete-psychologist.e2e-spec.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/nestjs-delete-psychologist.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/delete-psychologist/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/docs.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/input.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/nestjs-update-psychologist.service.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/output.dto.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/update-psychologist.controller.ts (100%) rename apps/core-rest-api/src/app/adapters/controllers/{api/use-cases => routes/v1}/psychologist/update-psychologist/update-psychologist.e2e-spec.ts (100%) diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/api.module.ts b/apps/core-rest-api/src/app/adapters/controllers/api.module.ts similarity index 54% rename from apps/core-rest-api/src/app/adapters/controllers/api/api.module.ts rename to apps/core-rest-api/src/app/adapters/controllers/api.module.ts index 3d457a10..606cd2ae 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/api.module.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/api.module.ts @@ -1,48 +1,48 @@ import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; -import { AuthModule } from '../../auth/auth.module'; -import { CryptographyModule } from '../../cryptography/cryptography.module'; -import { envSchema } from '../../env/env'; -import { EnvModule } from '../../env/env.module'; -import { UpdatePsychologistController } from './use-cases/psychologist/update-psychologist/update-psychologist.controller'; +import { AuthModule } from '../auth/auth.module'; +import { CryptographyModule } from '../cryptography/cryptography.module'; +import { envSchema } from '../env/env'; +import { EnvModule } from '../env/env.module'; -import { BcryptHasherService } from '../../../core/shared/cryptography/use-cases/bcrypt-hasher.service'; -import { PostgreSqlPrismaOrmService } from '../../database/infra/prisma/prisma.service'; -import { DatabaseRepositoriesModule } from '../../database/repositories/repositories.module'; +import { BcryptHasherService } from '../../core/shared/cryptography/use-cases/bcrypt-hasher.service'; +import { PostgreSqlPrismaOrmService } from '../database/infra/prisma/prisma.service'; +import { DatabaseRepositoriesModule } from '../database/repositories/repositories.module'; -import { NestjsCreateAppointmentService } from './use-cases/appointment/create-appointment/nestjs-create-appointment.service'; -import { DeleteAppointmentController } from './use-cases/appointment/delete-appointment/delete-appointment.controller'; -import { NestjsDeleteAppointmentService } from './use-cases/appointment/delete-appointment/nestjs-delete-appointment.service'; -import { NestjsCreateClinicService } from './use-cases/clinic/create-clinic/nestjs-create-clinic.service'; -import { NestjsDeleteClinicService } from './use-cases/clinic/delete-clinic/nestjs-delete-clinic.service'; -import { NestjsUpdateClinicService } from './use-cases/clinic/update-clinic/nestjs-update-clinic.service'; -import { NestjsCreatePatientService } from './use-cases/patient/create-patient/nestjs-create-patient.service'; -import { NestjsDeletePatientService } from './use-cases/patient/delete-patient/nestjs-delete-patient.service'; -import { NestjsUpdatePatientService } from './use-cases/patient/update-patient/nestjs-update-patient.service'; -import { NestjsAuthenticatePsychologistService } from './use-cases/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service'; -import { NestjsCreatePsychologistService } from './use-cases/psychologist/create-psychologist/nestjs-create-psychologist.service'; -import { NestjsDeletePsychologistService } from './use-cases/psychologist/delete-psychologist/nestjs-delete-psychologist.service'; -import { NestjsUpdatePsychologistService } from './use-cases/psychologist/update-psychologist/nestjs-update-psychologist.service'; +import { NestjsCreateAppointmentService } from './routes/v1/appointment/create-appointment/nestjs-create-appointment.service'; +import { DeleteAppointmentController } from './routes/v1/appointment/delete-appointment/delete-appointment.controller'; +import { NestjsDeleteAppointmentService } from './routes/v1/appointment/delete-appointment/nestjs-delete-appointment.service'; +import { NestjsCreateClinicService } from './routes/v1/clinic/create-clinic/nestjs-create-clinic.service'; +import { NestjsDeleteClinicService } from './routes/v1/clinic/delete-clinic/nestjs-delete-clinic.service'; +import { NestjsUpdateClinicService } from './routes/v1/clinic/update-clinic/nestjs-update-clinic.service'; +import { NestjsCreatePatientService } from './routes/v1/patient/create-patient/nestjs-create-patient.service'; +import { NestjsDeletePatientService } from './routes/v1/patient/delete-patient/nestjs-delete-patient.service'; +import { NestjsUpdatePatientService } from './routes/v1/patient/update-patient/nestjs-update-patient.service'; +import { NestjsAuthenticatePsychologistService } from './routes/v1/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service'; +import { NestjsCreatePsychologistService } from './routes/v1/psychologist/create-psychologist/nestjs-create-psychologist.service'; +import { NestjsDeletePsychologistService } from './routes/v1/psychologist/delete-psychologist/nestjs-delete-psychologist.service'; +import { NestjsUpdatePsychologistService } from './routes/v1/psychologist/update-psychologist/nestjs-update-psychologist.service'; -import { CreateAppointmentController } from './use-cases/appointment/create-appointment/create-appointment.controller'; -import { NestjsUpdateAppointmentService } from './use-cases/appointment/update-appointment/nestjs-update-appointment.service'; -import { UpdateAppointmentController } from './use-cases/appointment/update-appointment/update-appointment.controller'; -import { CreateClinicController } from './use-cases/clinic/create-clinic/create-clinic.controller'; -import { DeleteClinicController } from './use-cases/clinic/delete-clinic/delete-clinic.controller'; -import { UpdateClinicController } from './use-cases/clinic/update-clinic/update-clinic.controller'; -import { CreatePatientAppointmentRegistryController } from './use-cases/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller'; -import { NestjsCreatePatientAppointmentRegistryService } from './use-cases/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service'; -import { DeletePatientAppointmentRegistryController } from './use-cases/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller'; -import { NestjsDeletePatientAppointmentRegistryService } from './use-cases/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service'; -import { NestjsUpdatePatientAppointmentRegistryService } from './use-cases/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service'; -import { UpdatePatientAppointmentRegistryController } from './use-cases/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller'; -import { CreatePatientController } from './use-cases/patient/create-patient/create-patient.controller'; -import { DeletePatientController } from './use-cases/patient/delete-patient/delete-patient.controller'; -import { UpdatePatientController } from './use-cases/patient/update-patient/update-patient.controller'; -import { AuthenticatePsychologistController } from './use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller'; -import { CreatePsychologistController } from './use-cases/psychologist/create-psychologist/create-psychologist.controller'; -import { DeletePsychologistController } from './use-cases/psychologist/delete-psychologist/delete-psychologist.controller'; +import { CreateAppointmentController } from './routes/v1/appointment/create-appointment/create-appointment.controller'; +import { NestjsUpdateAppointmentService } from './routes/v1/appointment/update-appointment/nestjs-update-appointment.service'; +import { UpdateAppointmentController } from './routes/v1/appointment/update-appointment/update-appointment.controller'; +import { CreateClinicController } from './routes/v1/clinic/create-clinic/create-clinic.controller'; +import { DeleteClinicController } from './routes/v1/clinic/delete-clinic/delete-clinic.controller'; +import { UpdateClinicController } from './routes/v1/clinic/update-clinic/update-clinic.controller'; +import { CreatePatientAppointmentRegistryController } from './routes/v1/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller'; +import { NestjsCreatePatientAppointmentRegistryService } from './routes/v1/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service'; +import { DeletePatientAppointmentRegistryController } from './routes/v1/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller'; +import { NestjsDeletePatientAppointmentRegistryService } from './routes/v1/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service'; +import { NestjsUpdatePatientAppointmentRegistryService } from './routes/v1/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service'; +import { UpdatePatientAppointmentRegistryController } from './routes/v1/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller'; +import { CreatePatientController } from './routes/v1/patient/create-patient/create-patient.controller'; +import { DeletePatientController } from './routes/v1/patient/delete-patient/delete-patient.controller'; +import { UpdatePatientController } from './routes/v1/patient/update-patient/update-patient.controller'; +import { AuthenticatePsychologistController } from './routes/v1/psychologist/authenticate-psychologist/authenticate-psychologist.controller'; +import { CreatePsychologistController } from './routes/v1/psychologist/create-psychologist/create-psychologist.controller'; +import { DeletePsychologistController } from './routes/v1/psychologist/delete-psychologist/delete-psychologist.controller'; +import { UpdatePsychologistController } from './routes/v1/psychologist/update-psychologist/update-psychologist.controller'; @Module({ imports: [ @@ -91,7 +91,7 @@ import { DeletePsychologistController } from './use-cases/psychologist/delete-ps NestjsDeletePatientAppointmentRegistryService, NestjsUpdatePatientAppointmentRegistryService, NestjsUpdatePatientService, - NestjsUpdateAppointmentService + NestjsUpdateAppointmentService, ], }) export class ApiModule {} diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/decorators/current-user.decorator.ts b/apps/core-rest-api/src/app/adapters/controllers/decorators/current-user.decorator.ts similarity index 94% rename from apps/core-rest-api/src/app/adapters/controllers/api/decorators/current-user.decorator.ts rename to apps/core-rest-api/src/app/adapters/controllers/decorators/current-user.decorator.ts index 3241d733..5d462e09 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/decorators/current-user.decorator.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/decorators/current-user.decorator.ts @@ -9,7 +9,7 @@ */ import { ExecutionContext, createParamDecorator } from '@nestjs/common'; -import { TokenPayload } from '../../../auth/jwt.strategy'; +import { TokenPayload } from '../../auth/jwt.strategy'; export const CurrentUser = createParamDecorator((_: never, context: ExecutionContext) => { const request = context.switchToHttp().getRequest(); // usamos o switchToHttp para ter acesso ao request da requisição, e getRequest() para pegar o request (o request é um objeto que tem várias informações da requisição) diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/guards/api-key.guard.ts b/apps/core-rest-api/src/app/adapters/controllers/guards/api-key.guard.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/guards/api-key.guard.ts rename to apps/core-rest-api/src/app/adapters/controllers/guards/api-key.guard.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/create-appointment.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/create-appointment.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/create-appointment.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/create-appointment.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/create-appointment.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/create-appointment.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/create-appointment.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/create-appointment.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/nestjs-create-appointment.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/nestjs-create-appointment.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/nestjs-create-appointment.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/nestjs-create-appointment.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/create-appointment/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/create-appointment/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/delete-appointment.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/delete-appointment.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/delete-appointment.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/delete-appointment.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/delete-appointment.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/delete-appointment.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/delete-appointment.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/delete-appointment.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/nestjs-delete-appointment.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/nestjs-delete-appointment.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/nestjs-delete-appointment.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/nestjs-delete-appointment.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/delete-appointment/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/delete-appointment/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/nestjs-update-appointment.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/nestjs-update-appointment.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/nestjs-update-appointment.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/nestjs-update-appointment.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/update-appointment.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/update-appointment.controller.ts similarity index 95% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/update-appointment.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/update-appointment.controller.ts index 65a93226..df701628 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/update-appointment.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/update-appointment.controller.ts @@ -28,7 +28,10 @@ export class UpdateAppointmentController { throw new BadRequestException('Must provide at least one field to update'); } - const updatedApointment = await this.updateAppointmentService.execute({ ...updateAppointmentDto, id }); + const updatedApointment = await this.updateAppointmentService.execute({ + ...updateAppointmentDto, + id, + }); return { message: 'Appointment updated successfully', updatedApointment }; } catch (error) { diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/update-appointment.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/update-appointment.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/appointment/update-appointment/update-appointment.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/appointment/update-appointment/update-appointment.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/create-clinic.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/create-clinic.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/create-clinic.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/create-clinic.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/create-clinic.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/create-clinic.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/create-clinic.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/create-clinic.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/nestjs-create-clinic.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/nestjs-create-clinic.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/nestjs-create-clinic.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/nestjs-create-clinic.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/create-clinic/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/create-clinic/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/delete-clinic.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/delete-clinic.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/delete-clinic.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/delete-clinic.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/delete-clinic.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/delete-clinic.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/delete-clinic.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/delete-clinic.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/nestjs-delete-clinic.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/nestjs-delete-clinic.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/nestjs-delete-clinic.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/nestjs-delete-clinic.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/delete-clinic/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/delete-clinic/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/nestjs-update-clinic.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/nestjs-update-clinic.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/nestjs-update-clinic.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/nestjs-update-clinic.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/update-clinic.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/update-clinic.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/update-clinic.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/update-clinic.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/update-clinic.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/update-clinic.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/clinic/update-clinic/update-clinic.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/clinic/update-clinic/update-clinic.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/create-patient-appointment-registry.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/nestjs-create-patient-appointment-registry.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/create-patient-appointment-registry/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/create-patient-appointment-registry/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/delete-patient-appointment-registry.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/nestjs-delete-patient-appointment-registry.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/delete-patient-appointment-registry/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/delete-patient-appointment-registry/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/nestjs-update-patient-appointment-registry.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient-appointment-registry/update-patient-appointment-registry/update-patient-appointment-registry.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/create-patient.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/create-patient.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/create-patient.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/create-patient.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/create-patient.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/create-patient.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/create-patient.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/create-patient.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/nestjs-create-patient.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/nestjs-create-patient.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/nestjs-create-patient.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/nestjs-create-patient.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/create-patient/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/create-patient/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/delete-patient.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/delete-patient.controller.ts similarity index 94% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/delete-patient.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/delete-patient.controller.ts index a204248b..d1ec901c 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/delete-patient.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/delete-patient.controller.ts @@ -5,7 +5,7 @@ import { deleteMethodDocs } from './docs'; import { GlobalAppHttpException } from '../../../../../../shared/errors/globalAppHttpException'; import { TokenPayload } from '../../../../../auth/jwt.strategy'; -import { CurrentUser } from '../../../decorators/current-user.decorator'; +import { CurrentUser } from '../../../../decorators/current-user.decorator'; import { DeletePatientControllerParamsInputDto } from './input.dto'; import { NestjsDeletePatientService } from './nestjs-delete-patient.service'; import { DeletePatientControllerOutputDto } from './output.dto'; diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/delete-patient.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/delete-patient.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/delete-patient.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/delete-patient.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/nestjs-delete-patient.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/nestjs-delete-patient.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/nestjs-delete-patient.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/nestjs-delete-patient.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/delete-patient/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/delete-patient/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/input-dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/input-dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/nestjs-update-patient.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/nestjs-update-patient.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/nestjs-update-patient.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/nestjs-update-patient.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/update-patient.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/update-patient.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/update-patient.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/patient/update-patient/update-patient.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/authenticate-psychologist.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/authenticate-psychologist.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/nestjs-authenticate-psychologist.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/authenticate-psychologist/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/create-psychologist.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/create-psychologist.controller.ts similarity index 96% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/create-psychologist.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/create-psychologist.controller.ts index e5612bb1..3a17b933 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/create-psychologist.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/create-psychologist.controller.ts @@ -5,7 +5,7 @@ import { plainToInstance } from 'class-transformer'; import { GlobalAppHttpException } from '../../../../../../shared/errors/globalAppHttpException'; import { applicationValidateOrReject } from '../../../../../../shared/validators/validate-or-reject'; import { Public } from '../../../../../auth/public'; -import { ApiKeyGuard } from '../../../guards/api-key.guard'; +import { ApiKeyGuard } from '../../../../guards/api-key.guard'; import { CreatePsychologistControllerBodyInputDto } from './input.dto'; import { NestjsCreatePsychologistService } from './nestjs-create-psychologist.service'; import { CreatePsychologistControllerOutputDto } from './output.dto'; diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/create-psychologist.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/create-psychologist.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/create-psychologist.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/create-psychologist.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/nestjs-create-psychologist.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/nestjs-create-psychologist.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/nestjs-create-psychologist.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/nestjs-create-psychologist.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/create-psychologist/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/create-psychologist/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/delete-psychologist.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/delete-psychologist.controller.ts similarity index 94% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/delete-psychologist.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/delete-psychologist.controller.ts index cc4673ea..70898f21 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/delete-psychologist.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/delete-psychologist.controller.ts @@ -5,7 +5,7 @@ import { patchMethodDocs } from './docs'; import { GlobalAppHttpException } from '../../../../../../shared/errors/globalAppHttpException'; import { TokenPayload } from '../../../../../auth/jwt.strategy'; -import { CurrentUser } from '../../../decorators/current-user.decorator'; +import { CurrentUser } from '../../../../decorators/current-user.decorator'; import { DeletePsychologistParamsInputDto } from './input.dto'; import { NestjsDeletePsychologistService } from './nestjs-delete-psychologist.service'; import { DeletePsychologistControllerOutputDto } from './output.dto'; diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/delete-psychologist.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/delete-psychologist.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/delete-psychologist.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/delete-psychologist.e2e-spec.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/nestjs-delete-psychologist.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/nestjs-delete-psychologist.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/nestjs-delete-psychologist.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/nestjs-delete-psychologist.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/delete-psychologist/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/delete-psychologist/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/docs.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/docs.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/docs.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/docs.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/input.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/input.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/input.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/nestjs-update-psychologist.service.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/nestjs-update-psychologist.service.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/nestjs-update-psychologist.service.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/nestjs-update-psychologist.service.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/output.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/output.dto.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/output.dto.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/output.dto.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/update-psychologist.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/update-psychologist.controller.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/update-psychologist.controller.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/update-psychologist.controller.ts diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/update-psychologist.e2e-spec.ts b/apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/update-psychologist.e2e-spec.ts similarity index 100% rename from apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/update-psychologist/update-psychologist.e2e-spec.ts rename to apps/core-rest-api/src/app/adapters/controllers/routes/v1/psychologist/update-psychologist/update-psychologist.e2e-spec.ts diff --git a/apps/core-rest-api/src/main.ts b/apps/core-rest-api/src/main.ts index 1e9db062..1e72f252 100644 --- a/apps/core-rest-api/src/main.ts +++ b/apps/core-rest-api/src/main.ts @@ -7,7 +7,7 @@ import { NestFactory } from '@nestjs/core'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { version } from '../package.json'; -import { ApiModule } from './app/adapters/controllers/api/api.module'; +import { ApiModule } from './app/adapters/controllers/api.module'; import { EnvService } from './app/adapters/env/env.service'; import { mainDescriptionMarkdown } from './main.docs'; @@ -36,7 +36,7 @@ async function bootstrap() { transformOptions: { enableImplicitConversion: true, // With this option set to true, we no longer need to specify types with the @Type decorator; }, - }) + }), ); // Enable version diff --git a/apps/core-rest-api/tests/utils/e2e-tests-initial-setup.ts b/apps/core-rest-api/tests/utils/e2e-tests-initial-setup.ts index f1f78373..4c69a0e8 100644 --- a/apps/core-rest-api/tests/utils/e2e-tests-initial-setup.ts +++ b/apps/core-rest-api/tests/utils/e2e-tests-initial-setup.ts @@ -4,7 +4,7 @@ import { JwtService } from '@nestjs/jwt'; import { Test, TestingModule } from '@nestjs/testing'; import { BcryptHasherService } from '../../src/app/core/shared/cryptography/use-cases/bcrypt-hasher.service'; -import { ApiModule } from '../../src/app/adapters/controllers/api/api.module'; +import { ApiModule } from '../../src/app/adapters/controllers/api.module'; import { PostgreSqlPrismaOrmService } from '../../src/app/adapters/database/infra/prisma/prisma.service'; import { DatabaseRepositoriesModule } from '../../src/app/adapters/database/repositories/repositories.module'; diff --git a/apps/core-rest-api/tsconfig.app.json b/apps/core-rest-api/tsconfig.app.json index 6a0463ae..8927a792 100644 --- a/apps/core-rest-api/tsconfig.app.json +++ b/apps/core-rest-api/tsconfig.app.json @@ -12,6 +12,11 @@ "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true }, - "exclude": ["src/**/*.spec.ts", "src/**/*.e2e-spec.ts", "tests/**/*.ts", "vitest.config.e2e.ts"], + "exclude": [ + "src/**/*.spec.ts", + "src/**/*.e2e-spec.ts", + "tests/**/*.ts", + "vitest.config.e2e.ts" + ], "include": ["src/**/*.ts"] }