chore: rename app.ts to bootstrap.ts on api-v2 (#26604)
This commit is contained in:
@@ -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());
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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`)
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-3
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+11
-4
@@ -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<void> {
|
||||
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<Server<typeof IncomingMessage, typeof ServerResponse>>
|
||||
> {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
||||
logger: WinstonModule.createLogger(loggerConfig()),
|
||||
bodyParser: false,
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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())
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
+4
-5
@@ -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);
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+1
-1
@@ -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";
|
||||
|
||||
+4
-2
@@ -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 = {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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<void> {
|
||||
const app = await createNestApp();
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user