diff --git a/apps/api/v2/src/app.ts b/apps/api/v2/src/bootstrap.ts similarity index 93% rename from apps/api/v2/src/app.ts rename to apps/api/v2/src/bootstrap.ts index 806e4bb78b..a7bc78c9a2 100644 --- a/apps/api/v2/src/app.ts +++ b/apps/api/v2/src/bootstrap.ts @@ -1,32 +1,29 @@ import "./instrument"; -import { HttpExceptionFilter } from "@/filters/http-exception.filter"; -import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; -import { ZodExceptionFilter } from "@/filters/zod-exception.filter"; +import process from "node:process"; +import { + API_VERSIONS, + API_VERSIONS_ENUM, + CAL_API_VERSION_HEADER, + VERSION_2024_04_15, + X_CAL_CLIENT_ID, + X_CAL_PLATFORM_EMBED, + X_CAL_SECRET_KEY, +} from "@calcom/platform-constants"; import type { ValidationError } from "@nestjs/common"; import { BadRequestException, ValidationPipe, VersioningType } from "@nestjs/common"; -import { BaseExceptionFilter, HttpAdapterHost } from "@nestjs/core"; import type { NestExpressApplication } from "@nestjs/platform-express"; import * as cookieParser from "cookie-parser"; import { Request } from "express"; import helmet from "helmet"; - -import { - API_VERSIONS, - VERSION_2024_04_15, - API_VERSIONS_ENUM, - CAL_API_VERSION_HEADER, - X_CAL_CLIENT_ID, - X_CAL_SECRET_KEY, - X_CAL_PLATFORM_EMBED, -} from "@calcom/platform-constants"; - +import { HttpExceptionFilter } from "@/filters/http-exception.filter"; +import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; +import { ZodExceptionFilter } from "@/filters/zod-exception.filter"; import { CalendarServiceExceptionFilter } from "./filters/calendar-service-exception.filter"; import { TRPCExceptionFilter } from "./filters/trpc-exception.filter"; export const bootstrap = (app: NestExpressApplication): NestExpressApplication => { app.enableShutdownHooks(); - app.enableVersioning({ type: VersioningType.CUSTOM, extractor: (request: unknown) => { @@ -38,9 +35,7 @@ export const bootstrap = (app: NestExpressApplication): NestExpressApplication = }, defaultVersion: VERSION_2024_04_15, }); - app.use(helmet()); - app.enableCors({ origin: "*", methods: ["GET", "PATCH", "DELETE", "HEAD", "POST", "PUT", "OPTIONS"], @@ -65,14 +60,13 @@ export const bootstrap = (app: NestExpressApplication): NestExpressApplication = target: true, value: true, }, - exceptionFactory(errors: ValidationError[]) { + exceptionFactory(errors: ValidationError[]): BadRequestException { return new BadRequestException({ errors }); }, }) ); // Exception filters, new filters go at the bottom, keep the order - const { httpAdapter } = app.get(HttpAdapterHost); app.useGlobalFilters(new PrismaExceptionFilter()); app.useGlobalFilters(new ZodExceptionFilter()); app.useGlobalFilters(new HttpExceptionFilter()); diff --git a/apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.e2e-spec.ts index cea8a2e195..5ff0a3d9d2 100644 --- a/apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-04-15/controllers/bookings.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/create-booking.input"; import { CreateRecurringBookingInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/create-recurring-booking.input"; diff --git a/apps/api/v2/src/ee/bookings/2024-04-15/controllers/managed-user-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-04-15/controllers/managed-user-bookings.e2e-spec.ts index 583625108b..4f9efed5aa 100644 --- a/apps/api/v2/src/ee/bookings/2024-04-15/controllers/managed-user-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-04-15/controllers/managed-user-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/create-booking.input"; import { diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/add-guests.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/add-guests.e2e-spec.ts index 829597612e..f85368a3df 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/add-guests.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/add-guests.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { AddGuestsOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/add-guests.output"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/api-key-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/api-key-bookings.e2e-spec.ts index fe92a07b3b..c24648dce4 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/api-key-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/api-key-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CancelBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/cancel-booking.output"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts index c14d06b1e5..3c5d6a97ed 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-access-auth.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CalVideoService } from "@/ee/bookings/2024-08-13/services/cal-video.service"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-fields.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-fields.e2e-spec.ts index a9ce338506..21e894270d 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-fields.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/booking-fields.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; @@ -20,7 +20,11 @@ import { randomString } from "test/utils/randomString"; import { withApiAuth } from "test/utils/withApiAuth"; import { CAL_API_VERSION_HEADER, SUCCESS_STATUS, VERSION_2024_08_13 } from "@calcom/platform-constants"; -import { CreateBookingInput_2024_08_13, GetBookingOutput_2024_08_13, GetSeatedBookingOutput_2024_08_13 } from "@calcom/platform-types"; +import { + CreateBookingInput_2024_08_13, + GetBookingOutput_2024_08_13, + GetSeatedBookingOutput_2024_08_13, +} from "@calcom/platform-types"; import { BookingOutput_2024_08_13 } from "@calcom/platform-types"; import type { Booking, PlatformOAuthClient, Team, User, EventType } from "@calcom/prisma/client"; @@ -1197,4 +1201,4 @@ describe("Bookings Endpoints 2024-08-13", () => { function responseDataIsBooking(data: any): data is BookingOutput_2024_08_13 { return !Array.isArray(data) && typeof data === "object" && data && "id" in data; } -}); \ No newline at end of file +}); diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/calendar-links.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/calendar-links.e2e-spec.ts index d99f770cfb..ec4c4da3f3 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/calendar-links.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/calendar-links.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; import { SchedulesModule_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/schedules.module"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/confirm-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/confirm-bookings.e2e-spec.ts index 5989898383..6d01633802 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/confirm-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/confirm-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; import { SchedulesModule_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/schedules.module"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/confirm-emails.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/confirm-emails.e2e-spec.ts index 7c36d4b6ee..ec7356da5a 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/confirm-emails.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/confirm-emails.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/team-emails.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/team-emails.e2e-spec.ts index dc704baf9e..4aaa1322d4 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/team-emails.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/team-emails.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/user-emails.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/user-emails.e2e-spec.ts index 423c9ebae0..40964a8e69 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/user-emails.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/emails/user-emails.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CancelBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/cancel-booking.output"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/managed-user-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/managed-user-bookings.e2e-spec.ts index d1ed2103f7..5d4903b077 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/managed-user-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/managed-user-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reassign-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reassign-bookings.e2e-spec.ts index 68f877b124..ec615650be 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reassign-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reassign-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { ReassignBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reassign-booking.output"; import { BOOKING_REASSIGN_PERMISSION_ERROR } from "@/ee/bookings/2024-08-13/services/bookings.service"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/recurring-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/recurring-bookings.e2e-spec.ts index dee0fae552..5b45927471 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/recurring-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/recurring-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reschedule-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reschedule-bookings.e2e-spec.ts index d94ec64948..c291a7a101 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reschedule-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/reschedule-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/seated-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/seated-bookings.e2e-spec.ts index 503b3bab6f..88a446e3d7 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/seated-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/seated-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/team-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/team-bookings.e2e-spec.ts index db99061edf..4221ddfbe9 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/team-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/team-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts index e2f50e80e5..daedd7eb5f 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { UpdateBookingLocationOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/update-location.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts index 15d7fea3c3..5a5a6e0e94 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/user-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CancelBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/cancel-booking.output"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; @@ -3131,24 +3131,22 @@ describe("Bookings Endpoints 2024-08-13", () => { }); const calVideoService = app.get(CalVideoService); - jest - .spyOn(calVideoService, "getVideoSessions") - .mockResolvedValue([ - { - id: mockSessions[0].id, - room: mockSessions[0].room, - startTime: mockSessions[0].start_time, - duration: mockSessions[0].duration, - ongoing: mockSessions[0].ongoing, - maxParticipants: mockSessions[0].max_participants, - participants: mockSessions[0].participants.map((p) => ({ - userId: p.user_id, - userName: p.user_name, - joinTime: p.join_time, - duration: p.duration, - })), - }, - ]); + jest.spyOn(calVideoService, "getVideoSessions").mockResolvedValue([ + { + id: mockSessions[0].id, + room: mockSessions[0].room, + startTime: mockSessions[0].start_time, + duration: mockSessions[0].duration, + ongoing: mockSessions[0].ongoing, + maxParticipants: mockSessions[0].max_participants, + participants: mockSessions[0].participants.map((p) => ({ + userId: p.user_id, + userName: p.user_name, + joinTime: p.join_time, + duration: p.duration, + })), + }, + ]); const response = await request(app.getHttpServer()) .get(`/v2/bookings/${booking.uid}/conferencing-sessions`) diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/variable-length-bookings.e2e-spec.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/variable-length-bookings.e2e-spec.ts index 5a54bc0c52..dfd7804b4c 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/variable-length-bookings.e2e-spec.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/variable-length-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.e2e-spec.ts b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.e2e-spec.ts index b6538ce71e..4dd8ce1cd1 100644 --- a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateIcsFeedOutput, CreateIcsFeedOutputResponseDto } from "@/ee/calendars/input/create-ics.output"; import { ConnectedCalendarsData } from "@/ee/calendars/outputs/connected-calendars.output"; diff --git a/apps/api/v2/src/ee/event-types-private-links/controllers/event-types-private-links.controller.e2e-spec.ts b/apps/api/v2/src/ee/event-types-private-links/controllers/event-types-private-links.controller.e2e-spec.ts index ab91f87c58..fad42d57f2 100644 --- a/apps/api/v2/src/ee/event-types-private-links/controllers/event-types-private-links.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/event-types-private-links/controllers/event-types-private-links.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; @@ -174,5 +174,3 @@ describe("Event Types Private Links Endpoints", () => { await app.close(); }); }); - - diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.e2e-spec.ts b/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.e2e-spec.ts index 2368391678..9ed0b0e230 100644 --- a/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { Editable } from "@/ee/event-types/event-types_2024_04_15//inputs/enums/editable"; import { EventTypesModule_2024_04_15 } from "@/ee/event-types/event-types_2024_04_15/event-types.module"; diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts index bd3a48bcd3..a2143a70fb 100644 --- a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateEventTypeInput_2024_04_15 } from "@/ee/event-types/event-types_2024_04_15/inputs/create-event-type.input"; import { EventTypesModule_2024_06_14 } from "@/ee/event-types/event-types_2024_06_14/event-types.module"; diff --git a/apps/api/v2/src/ee/gcal/gcal.controller.e2e-spec.ts b/apps/api/v2/src/ee/gcal/gcal.controller.e2e-spec.ts index 23d512148b..cc47a5735b 100644 --- a/apps/api/v2/src/ee/gcal/gcal.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/gcal/gcal.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CalendarsService } from "@/ee/calendars/services/calendars.service"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; diff --git a/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts b/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts index a4e2520fdb..1d3c53813e 100644 --- a/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/me/me.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/schedules.module"; import { PermissionsGuard } from "@/modules/auth/guards/permissions/permissions.guard"; diff --git a/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.e2e-spec.ts b/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.e2e-spec.ts index 66ca81c2e8..e05f8018e2 100644 --- a/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; import { CreateScheduleOutput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/outputs/create-schedule.output"; diff --git a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.e2e-spec.ts b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.e2e-spec.ts index a186e66fcc..5c61517482 100644 --- a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.e2e-spec.ts +++ b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { PermissionsGuard } from "@/modules/auth/guards/permissions/permissions.guard"; diff --git a/apps/api/v2/src/main.ts b/apps/api/v2/src/main.ts index 4e12fd4b8e..0a8ed8dc64 100644 --- a/apps/api/v2/src/main.ts +++ b/apps/api/v2/src/main.ts @@ -1,4 +1,7 @@ -import type { AppConfig } from "@/config/type"; +import "dotenv/config"; + +import { IncomingMessage, Server, ServerResponse } from "node:http"; +import process from "node:process"; import { Logger } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { NestFactory } from "@nestjs/core"; @@ -7,8 +10,10 @@ import "dotenv/config"; import { WinstonModule } from "nest-winston"; import * as qs from "qs"; -import { bootstrap } from "./app"; +import type { AppConfig } from "@/config/type"; + import { AppModule } from "./app.module"; +import { bootstrap } from "./bootstrap"; import { loggerConfig } from "./lib/logger"; import { generateSwaggerForApp } from "./swagger/generate-swagger"; @@ -17,7 +22,7 @@ run().catch((error: Error) => { process.exit(1); }); -async function run() { +async function run(): Promise { const app = await createNestApp(); const logger = new Logger("App"); @@ -35,7 +40,9 @@ async function run() { } } -export async function createNestApp() { +export async function createNestApp(): Promise< + NestExpressApplication> +> { const app = await NestFactory.create(AppModule, { logger: WinstonModule.createLogger(loggerConfig()), bodyParser: false, diff --git a/apps/api/v2/src/modules/auth/oauth2/controllers/oauth2.controller.e2e-spec.ts b/apps/api/v2/src/modules/auth/oauth2/controllers/oauth2.controller.e2e-spec.ts index ab79e6ab33..69dfa5bee7 100644 --- a/apps/api/v2/src/modules/auth/oauth2/controllers/oauth2.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/auth/oauth2/controllers/oauth2.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; @@ -140,12 +140,12 @@ describe("OAuth2 Controller Endpoints", () => { .get(`/api/v2/auth/oauth2/clients/${testClientId}`) .expect(200); - expect(response.body.status).toBe("success"); - expect(response.body.data.id).toBe(testClientId); - expect(response.body.data.name).toBe("Test OAuth Client"); - expect(response.body.data.redirectUri).toBe(testRedirectUri); - expect(response.body.data.type).toBe(OAuthClientType.CONFIDENTIAL); - expect(response.body.data.clientSecret).toBeUndefined(); + expect(response.body.status).toBe("success"); + expect(response.body.data.id).toBe(testClientId); + expect(response.body.data.name).toBe("Test OAuth Client"); + expect(response.body.data.redirectUri).toBe(testRedirectUri); + expect(response.body.data.type).toBe(OAuthClientType.CONFIDENTIAL); + expect(response.body.data.clientSecret).toBeUndefined(); }); it("should return 404 for non-existent client ID", async () => { diff --git a/apps/api/v2/src/modules/billing/controllers/billing.controller.e2e-spec.ts b/apps/api/v2/src/modules/billing/controllers/billing.controller.e2e-spec.ts index 73d95298ed..230effd27d 100644 --- a/apps/api/v2/src/modules/billing/controllers/billing.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/billing/controllers/billing.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CheckPlatformBillingResponseDto } from "@/modules/billing/controllers/outputs/CheckPlatformBillingResponse.dto"; import { PrismaModule } from "@/modules/prisma/prisma.module"; @@ -126,7 +126,7 @@ describe("Platform Billing Controller (e2e)", () => { }; }, }, - } as unknown as Stripe) + }) as unknown as Stripe ); return request(app.getHttpServer()) @@ -170,7 +170,7 @@ describe("Platform Billing Controller (e2e)", () => { }; }, }, - } as unknown as Stripe) + }) as unknown as Stripe ); return request(app.getHttpServer()) .post("/v2/billing/webhook") @@ -199,7 +199,7 @@ describe("Platform Billing Controller (e2e)", () => { }; }, }, - } as unknown as Stripe) + }) as unknown as Stripe ); return request(app.getHttpServer()) @@ -232,7 +232,7 @@ describe("Platform Billing Controller (e2e)", () => { }; }, }, - } as unknown as Stripe) + }) as unknown as Stripe ); return request(app.getHttpServer()) diff --git a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.e2e-spec.ts b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.e2e-spec.ts index e82d5b9ae0..2ba4053167 100644 --- a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { ConferencingAppsOutputDto } from "@/modules/conferencing/outputs/get-conferencing-apps.output"; import { PrismaModule } from "@/modules/prisma/prisma.module"; diff --git a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.e2e-spec.ts b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.e2e-spec.ts index b298df5453..473d12771a 100644 --- a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CalendarsService } from "@/ee/calendars/services/calendars.service"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; diff --git a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.e2e-spec.ts b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.e2e-spec.ts index 5ee7b8d2af..c45a3a2632 100644 --- a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.e2e-spec.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.e2e-spec.ts index 85c65d2b3f..c7758a2812 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { DEFAULT_EVENT_TYPES } from "@/ee/event-types/event-types_2024_04_15/constants/constants"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.e2e-spec.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.e2e-spec.ts index 039c364f68..7d79708c26 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.e2e-spec.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.e2e-spec.ts index 03472f31df..97da8b41cd 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.e2e-spec.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.e2e-spec.ts index 04ff32488d..d93d574d11 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-flow/oauth-flow.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; diff --git a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organization-attributes.e2e-spec.ts b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organization-attributes.e2e-spec.ts index 566f7aa7f1..be95dfee7d 100644 --- a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organization-attributes.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organization-attributes.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateOrganizationAttributeInput } from "@/modules/organizations/attributes/index/inputs/create-organization-attribute.input"; import { UpdateOrganizationAttributeInput } from "@/modules/organizations/attributes/index/inputs/update-organization-attribute.input"; diff --git a/apps/api/v2/src/modules/organizations/attributes/options/organization-attributes-options.e2e-spec.ts b/apps/api/v2/src/modules/organizations/attributes/options/organization-attributes-options.e2e-spec.ts index df9bfcfe93..543ee1d5e7 100644 --- a/apps/api/v2/src/modules/organizations/attributes/options/organization-attributes-options.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/attributes/options/organization-attributes-options.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateOrganizationAttributeOptionInput } from "@/modules/organizations/attributes/options/inputs/create-organization-attribute-option.input"; import { AssignOrganizationAttributeOptionToUserInput } from "@/modules/organizations/attributes/options/inputs/organizations-attributes-options-assign.input"; diff --git a/apps/api/v2/src/modules/organizations/bookings/managed-organizations-bookings.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/bookings/managed-organizations-bookings.controller.e2e-spec.ts index 64cdeadb33..f063233f85 100644 --- a/apps/api/v2/src/modules/organizations/bookings/managed-organizations-bookings.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/bookings/managed-organizations-bookings.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; import { SchedulesService_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/services/schedules.service"; diff --git a/apps/api/v2/src/modules/organizations/bookings/organizations-bookings.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/bookings/organizations-bookings.controller.e2e-spec.ts index 10c4876b3f..60fa7b181c 100644 --- a/apps/api/v2/src/modules/organizations/bookings/organizations-bookings.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/bookings/organizations-bookings.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/modules/organizations/event-types/assign-all-team-members.e2e-spec.ts b/apps/api/v2/src/modules/organizations/event-types/assign-all-team-members.e2e-spec.ts index d0a60b49e2..5bc769c6a0 100644 --- a/apps/api/v2/src/modules/organizations/event-types/assign-all-team-members.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/event-types/assign-all-team-members.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-admin-not-team-member-event-types.e2e-spec.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-admin-not-team-member-event-types.e2e-spec.ts index 441adab5c8..9df613b9f2 100644 --- a/apps/api/v2/src/modules/organizations/event-types/organizations-admin-not-team-member-event-types.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/event-types/organizations-admin-not-team-member-event-types.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types-private-links.e2e-spec.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types-private-links.e2e-spec.ts index 838854231c..b953a6d635 100644 --- a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types-private-links.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types-private-links.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; import { PrismaExceptionFilter } from "@/filters/prisma-exception.filter"; diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-member-team-admin-event-types.e2e-spec.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-member-team-admin-event-types.e2e-spec.ts index 9de4a96b04..7c4d90d805 100644 --- a/apps/api/v2/src/modules/organizations/event-types/organizations-member-team-admin-event-types.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/event-types/organizations-member-team-admin-event-types.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.e2e-spec.ts index 15d6c42a00..afb96ea36a 100644 --- a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateOrgMembershipDto } from "@/modules/organizations/memberships/inputs/create-organization-membership.input"; import { UpdateOrgMembershipDto } from "@/modules/organizations/memberships/inputs/update-organization-membership.input"; diff --git a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.e2e-spec.ts index e10760bc1b..d8e094400c 100644 --- a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { getEnv } from "@/env"; import { sha256Hash, stripApiKey } from "@/lib/api-key"; diff --git a/apps/api/v2/src/modules/organizations/roles/organizations-roles.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/roles/organizations-roles.controller.e2e-spec.ts index 5c6a236374..3c454b74d4 100644 --- a/apps/api/v2/src/modules/organizations/roles/organizations-roles.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/roles/organizations-roles.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PbacGuard } from "@/modules/auth/guards/pbac/pbac.guard"; import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard"; diff --git a/apps/api/v2/src/modules/organizations/roles/permissions/organizations-roles-permissions.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/roles/permissions/organizations-roles-permissions.controller.e2e-spec.ts index 382d8aa3ea..3c58d07379 100644 --- a/apps/api/v2/src/modules/organizations/roles/permissions/organizations-roles-permissions.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/roles/permissions/organizations-roles-permissions.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateTeamRoleInput } from "@/modules/organizations/teams/roles/inputs/create-team-role.input"; import type { CreateTeamRoleOutput } from "@/modules/organizations/teams/roles/outputs/create-team-role.output"; diff --git a/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms-responses.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms-responses.controller.e2e-spec.ts index f48a583a5c..391c9e5c09 100644 --- a/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms-responses.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms-responses.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaWriteService } from "@/modules/prisma/prisma-write.service"; import { PrismaModule } from "@/modules/prisma/prisma.module"; diff --git a/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms.controller.e2e-spec.ts index ba9866affc..1b084104c3 100644 --- a/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/routing-forms/controllers/organizations-routing-forms.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { GetRoutingFormsOutput } from "@/modules/organizations/routing-forms/outputs/get-routing-forms.output"; import { PrismaWriteService } from "@/modules/prisma/prisma-write.service"; diff --git a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.e2e-spec.ts b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.e2e-spec.ts index 3698972022..0c686c3228 100644 --- a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.e2e-spec.ts index 2e17ed90e4..6813792eb4 100644 --- a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.e2e-spec.ts index 7eeb90810b..c01a0c5619 100644 --- a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateOrgTeamDto } from "@/modules/organizations/teams/index/inputs/create-organization-team.input"; import { OrgMeTeamOutputDto } from "@/modules/organizations/teams/index/outputs/organization-team.output"; diff --git a/apps/api/v2/src/modules/organizations/teams/invite/organizations-teams-invite.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/invite/organizations-teams-invite.controller.e2e-spec.ts index 0506a3f94a..05eaff98e4 100644 --- a/apps/api/v2/src/modules/organizations/teams/invite/organizations-teams-invite.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/invite/organizations-teams-invite.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships-guard.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships-guard.controller.e2e-spec.ts index b2c4b9a38c..a0b85ac0b9 100644 --- a/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships-guard.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships-guard.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { EmailService } from "@/modules/email/email.service"; import { diff --git a/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships.controller.e2e-spec.ts index 315e8a5f08..a602f2e59b 100644 --- a/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/memberships/e2e/organizations-teams-memberships.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateOrgTeamMembershipDto } from "@/modules/organizations/teams/memberships/inputs/create-organization-team-membership.input"; import { UpdateOrgTeamMembershipDto } from "@/modules/organizations/teams/memberships/inputs/update-organization-team-membership.input"; @@ -527,7 +527,8 @@ describe("Organizations Teams Memberships Endpoints", () => { await profileRepositoryFixture.create({ uid: `usr-${userWithMatchingEmailForOverride.id}`, - username: userWithMatchingEmailForOverride.username || `user-${userWithMatchingEmailForOverride.id}`, + username: + userWithMatchingEmailForOverride.username || `user-${userWithMatchingEmailForOverride.id}`, organization: { connect: { id: orgWithAutoAccept.id } }, user: { connect: { id: userWithMatchingEmailForOverride.id } }, }); @@ -561,9 +562,7 @@ describe("Organizations Teams Memberships Endpoints", () => { expect(responseBody.data.accepted).toBe(true); // Verify EventTypes assignment - const eventTypes = await eventTypesRepositoryFixture.getAllTeamEventTypes( - subteamWithAutoAccept.id - ); + const eventTypes = await eventTypesRepositoryFixture.getAllTeamEventTypes(subteamWithAutoAccept.id); const eventTypeWithAssignAll = eventTypes.find((et) => et.assignAllTeamMembers); expect(eventTypeWithAssignAll).toBeTruthy(); const userIsHost = eventTypeWithAssignAll?.hosts.some((h) => h.userId === userWithMatchingEmail.id); diff --git a/apps/api/v2/src/modules/organizations/teams/roles/organizations-teams-roles.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/roles/organizations-teams-roles.controller.e2e-spec.ts index 64bb8ba950..35d67d9fb8 100644 --- a/apps/api/v2/src/modules/organizations/teams/roles/organizations-teams-roles.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/roles/organizations-teams-roles.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateTeamRoleInput } from "@/modules/organizations/teams/roles/inputs/create-team-role.input"; import { UpdateTeamRoleInput } from "@/modules/organizations/teams/roles/inputs/update-team-role.input"; diff --git a/apps/api/v2/src/modules/organizations/teams/roles/permissions/organizations-teams-roles-permissions.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/roles/permissions/organizations-teams-roles-permissions.controller.e2e-spec.ts index a3d6774715..aee79a3d14 100644 --- a/apps/api/v2/src/modules/organizations/teams/roles/permissions/organizations-teams-roles-permissions.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/roles/permissions/organizations-teams-roles-permissions.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateTeamRoleInput } from "@/modules/organizations/teams/roles/inputs/create-team-role.input"; import type { CreateTeamRoleOutput } from "@/modules/organizations/teams/roles/outputs/create-team-role.output"; diff --git a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.e2e-spec.ts index 97472cc782..b10537ef1f 100644 --- a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { GetRoutingFormResponsesOutput } from "@/modules/organizations/teams/routing-forms/outputs/get-routing-form-responses.output"; import { PrismaWriteService } from "@/modules/prisma/prisma-write.service"; diff --git a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms.controller.e2e-spec.ts index 877431a147..902ff1fa65 100644 --- a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { GetRoutingFormsOutput } from "@/modules/organizations/routing-forms/outputs/get-routing-forms.output"; import { PrismaWriteService } from "@/modules/prisma/prisma-write.service"; diff --git a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.e2e-spec.ts index c2fe19aed6..7d08065487 100644 --- a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/teams/verified-resources/org-teams-verified-resources.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/verified-resources/org-teams-verified-resources.controller.e2e-spec.ts index 1f4513e19f..8d628f22e2 100644 --- a/apps/api/v2/src/modules/organizations/teams/verified-resources/org-teams-verified-resources.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/verified-resources/org-teams-verified-resources.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/organizations/teams/workflows/controllers/org-team-workflows.controller.e2e-spec.ts b/apps/api/v2/src/modules/organizations/teams/workflows/controllers/org-team-workflows.controller.e2e-spec.ts index feb56635b8..b9acab95a5 100644 --- a/apps/api/v2/src/modules/organizations/teams/workflows/controllers/org-team-workflows.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/teams/workflows/controllers/org-team-workflows.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; // Assuming this is your main app bootstrapper import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; diff --git a/apps/api/v2/src/modules/organizations/users/bookings/controllers/organizations-users-bookings.e2e-spec.ts b/apps/api/v2/src/modules/organizations/users/bookings/controllers/organizations-users-bookings.e2e-spec.ts index 36ba9554ff..dd6b1041d4 100644 --- a/apps/api/v2/src/modules/organizations/users/bookings/controllers/organizations-users-bookings.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/users/bookings/controllers/organizations-users-bookings.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CreateBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/create-booking.output"; import { CreateScheduleInput_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/inputs/create-schedule.input"; diff --git a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.e2e-spec.ts b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.e2e-spec.ts index 5cfd8ad55a..0bbeda071d 100644 --- a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { EmailService } from "@/modules/email/email.service"; import { GetOrganizationsUsersInput } from "@/modules/organizations/users/index/inputs/get-organization-users.input"; diff --git a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo.e2e-spec.ts b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo.e2e-spec.ts index d6d874fbd2..afaeba97ce 100644 --- a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { UserOooOutputDto } from "@/modules/ooo/outputs/ooo.output"; import { PrismaModule } from "@/modules/prisma/prisma.module"; diff --git a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.e2e-spec.ts b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.e2e-spec.ts index ab99ec58cd..14ae9cc088 100644 --- a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.e2e-spec.ts +++ b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/routing-forms/controllers/routing-forms.e2e-spec.ts b/apps/api/v2/src/modules/routing-forms/controllers/routing-forms.e2e-spec.ts index 31baa3a68e..fd04188c42 100644 --- a/apps/api/v2/src/modules/routing-forms/controllers/routing-forms.e2e-spec.ts +++ b/apps/api/v2/src/modules/routing-forms/controllers/routing-forms.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { PermissionsGuard } from "@/modules/auth/guards/permissions/permissions.guard"; diff --git a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.e2e-spec.ts b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.e2e-spec.ts index b55614dbdf..c89291166e 100644 --- a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { CalendarsService } from "@/ee/calendars/services/calendars.service"; import { HttpExceptionFilter } from "@/filters/http-exception.filter"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts index 7dc12b7b5b..764d0a1252 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-04-15/controllers/slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/dynamic-event-type-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/dynamic-event-type-slots.controller.e2e-spec.ts index abc0bbbdca..78f842d915 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/dynamic-event-type-slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/dynamic-event-type-slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/org-team-event-type-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/org-team-event-type-slots.controller.e2e-spec.ts index 2a1608c796..24d760c725 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/org-team-event-type-slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/org-team-event-type-slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/reschedule-uid-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/reschedule-uid-slots.controller.e2e-spec.ts index b90a3b9d3e..f2a18d5e0f 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/reschedule-uid-slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/reschedule-uid-slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/team-event-type-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/team-event-type-slots.controller.e2e-spec.ts index b91853a9a3..e1364ba685 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/team-event-type-slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/team-event-type-slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts index dd03812cf3..a5340144fe 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/e2e/user-event-type-slots.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { SchedulesModule_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/schedules.module"; import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; diff --git a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types-webhooks.controller.e2e-spec.ts b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types-webhooks.controller.e2e-spec.ts index 6b937d28f0..9f5bc0b23d 100644 --- a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types-webhooks.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types-webhooks.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.e2e-spec.ts b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.e2e-spec.ts index 73d104615a..8235ef75d9 100644 --- a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { HOSTS_REQUIRED_WHEN_SWITCHING_SCHEDULING_TYPE_ERROR } from "@/modules/organizations/event-types/services/input.service"; import { PrismaModule } from "@/modules/prisma/prisma.module"; diff --git a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.e2e-spec.ts b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.e2e-spec.ts index 631a8d343e..736074252b 100644 --- a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { CreateTeamMembershipInput } from "@/modules/teams/memberships/inputs/create-team-membership.input"; @@ -334,7 +334,9 @@ describe("Teams Memberships Endpoints", () => { const collectiveEventBeforePatch = teamEventTypesBeforePatch?.find( (eventType) => eventType.slug === teamEventType.slug ); - const userHostBeforePatch = collectiveEventBeforePatch?.hosts.find((host) => host.userId === pendingUser.id); + const userHostBeforePatch = collectiveEventBeforePatch?.hosts.find( + (host) => host.userId === pendingUser.id + ); expect(userHostBeforePatch).toBeFalsy(); const updateToAcceptedBody: UpdateTeamMembershipInput = { diff --git a/apps/api/v2/src/modules/teams/schedules/controllers/teams-schedules.e2e-spec.ts b/apps/api/v2/src/modules/teams/schedules/controllers/teams-schedules.e2e-spec.ts index 52de4034d3..acdf6964be 100644 --- a/apps/api/v2/src/modules/teams/schedules/controllers/teams-schedules.e2e-spec.ts +++ b/apps/api/v2/src/modules/teams/schedules/controllers/teams-schedules.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.e2e-spec.ts b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.e2e-spec.ts index 7a73f4ac35..45a2ac515d 100644 --- a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { StripeService } from "@/modules/stripe/stripe.service"; import { CreateTeamInput } from "@/modules/teams/teams/inputs/create-team.input"; @@ -47,7 +47,7 @@ describe("Teams endpoint", () => { imports: [AppModule, TeamsModule], }).compile(); - jest.spyOn(StripeService.prototype, "getStripe").mockImplementation(() => ({} as unknown as Stripe)); + jest.spyOn(StripeService.prototype, "getStripe").mockImplementation(() => ({}) as unknown as Stripe); userRepositoryFixture = new UserRepositoryFixture(moduleRef); teamRepositoryFixture = new TeamRepositoryFixture(moduleRef); diff --git a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.e2e-spec.ts b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.e2e-spec.ts index 4abd65b33a..5a840b5cc5 100644 --- a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.e2e-spec.ts +++ b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.e2e-spec.ts @@ -1,4 +1,4 @@ -import { bootstrap } from "@/app"; +import { bootstrap } from "@/bootstrap"; import { AppModule } from "@/app.module"; import { PrismaModule } from "@/modules/prisma/prisma.module"; import { TokensModule } from "@/modules/tokens/tokens.module"; diff --git a/apps/api/v2/src/swagger/generate-swagger-script.ts b/apps/api/v2/src/swagger/generate-swagger-script.ts index 3dbb64dae1..14b9b6fa47 100644 --- a/apps/api/v2/src/swagger/generate-swagger-script.ts +++ b/apps/api/v2/src/swagger/generate-swagger-script.ts @@ -1,6 +1,7 @@ import "dotenv/config"; +import process from "node:process"; -import { bootstrap } from "../app"; +import { bootstrap } from "../bootstrap"; import { createNestApp } from "../main"; import { generateSwaggerForApp } from "../swagger/generate-swagger"; @@ -14,7 +15,7 @@ generateSwagger() process.exit(1); }); -async function generateSwagger() { +async function generateSwagger(): Promise { const app = await createNestApp(); try {