Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: v2 bookings #16200

Merged
merged 109 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
3519e6b
chore: version existing bookings as 2024-04-15
supalarry Aug 13, 2024
2c90331
feat: initialize bookings version 2024-08-13
supalarry Aug 13, 2024
90386fd
feat: Create and reschedule booking inputs logic
supalarry Aug 14, 2024
d31440a
feat: create booking
supalarry Aug 14, 2024
b2259b9
refactor: create booking response
supalarry Aug 14, 2024
82cc884
feat: reschedule booking
supalarry Aug 15, 2024
e702c9e
chore: update language input
supalarry Aug 15, 2024
2560939
feat: recurring booking
supalarry Aug 15, 2024
1c44dcc
refactor: add booking status in response
supalarry Aug 15, 2024
dd4959d
refactor: recurring bookings
supalarry Aug 15, 2024
c59295d
feat: get booking by uid
supalarry Aug 16, 2024
1bce4d8
wip: get event types
supalarry Aug 19, 2024
0286d50
feat: fetch by multiple status filters and sort
supalarry Aug 21, 2024
246af06
feat: fetch by teamId, teamIds, eventTypeId, eventTypeIds
supalarry Aug 21, 2024
3a3848e
wip: filter by attendee email
supalarry Aug 21, 2024
5a26593
feat: filter by attendee email
supalarry Aug 22, 2024
729bde4
feat: filter by attendee name
supalarry Aug 22, 2024
6af7b96
feat: date range filter
supalarry Aug 22, 2024
329b6a5
chore: format get bookings output
supalarry Aug 22, 2024
3e16538
Merge branch 'main' into v2-refactor-bookings
supalarry Aug 22, 2024
7a92f9a
chore: finish main merge
supalarry Aug 22, 2024
145e07c
feat: handle instant bookings
supalarry Aug 23, 2024
d071829
refactor: separate reschedule endpoint
supalarry Aug 23, 2024
481b8d0
feat: cancel endpoint
supalarry Aug 23, 2024
8baaa45
feat: mark absent host or attendees
supalarry Aug 23, 2024
ec29995
chore: dont expose metadata for now
supalarry Aug 26, 2024
6e5e4d0
chore: add hostId to response
supalarry Aug 26, 2024
4ab73d0
fix: metadata
supalarry Aug 26, 2024
86c1563
feat: bill bookings
supalarry Aug 26, 2024
7704a28
feat: cancellationReason
supalarry Aug 26, 2024
3ce4d9b
Merge branch 'main' into v2-refactor-bookings
supalarry Aug 26, 2024
62b91da
feat: rescheduling reason
supalarry Aug 26, 2024
593f574
handle already busy booking error
supalarry Aug 26, 2024
85ee892
test: create new booking
supalarry Aug 27, 2024
e76e082
fix: handleNewRecurringBooking ignoring noEmail
supalarry Aug 28, 2024
0b541e1
test: recurring bookings
supalarry Aug 28, 2024
985f703
test: get individual bookings
supalarry Aug 28, 2024
65f159a
fix: cancel email sent if arePlatformEmailsEnabled=false but platform…
supalarry Aug 28, 2024
6a0b82c
tests: cancel, reschedule, mark absent
supalarry Aug 28, 2024
b02bf75
fix: generateIcsFile null pointer exception
supalarry Aug 28, 2024
80684a7
cancel test
supalarry Aug 28, 2024
940ba3c
error msg improve
supalarry Aug 28, 2024
ae73003
tests: team event type creation and teamId, teamIds filters
supalarry Aug 29, 2024
e8ee649
test: cancel recurring booking
supalarry Aug 29, 2024
d3b9981
refactor: make hosts and attendees an array
supalarry Sep 2, 2024
c35c945
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 2, 2024
2fd41a2
sort by asc start
supalarry Sep 2, 2024
f3a9762
simplify
supalarry Sep 2, 2024
7dbd4b3
refactor: absent
supalarry Sep 2, 2024
1584e13
fix: make work with api key
supalarry Sep 2, 2024
9359f01
test
supalarry Sep 2, 2024
927b669
ts remove any
supalarry Sep 3, 2024
45b593b
feat: BookingUidGuard
supalarry Sep 9, 2024
7f8ba49
fix: recurring booking no email
supalarry Sep 9, 2024
ea80523
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 9, 2024
958fd5c
fix: legacy bookings recurring noEmail
supalarry Sep 9, 2024
53a73d0
add swagger
supalarry Sep 9, 2024
f4712bc
retrigger build
supalarry Sep 9, 2024
27a50f7
fix: atom booker work with v2
supalarry Sep 9, 2024
2023233
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 10, 2024
8d25a22
docs: exclude old controller from docs
supalarry Sep 10, 2024
549b6b0
refactor: make eventTypeIds and teamIds getBookings query params comm…
supalarry Sep 10, 2024
36f2920
docs: swagger for get bookings query
supalarry Sep 10, 2024
49729e5
swagger docs
supalarry Sep 10, 2024
31956a4
swagger docs
supalarry Sep 11, 2024
db299a4
docs: document authorization header
supalarry Sep 12, 2024
7c99e0f
refactor: remove unused attendee variable
supalarry Sep 12, 2024
f9944a0
refactor: remove unused check
supalarry Sep 12, 2024
441ac83
refactor: remove unused attendee variable
supalarry Sep 12, 2024
f20d834
refactor: spelling
supalarry Sep 12, 2024
2e65f64
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 12, 2024
3046d1a
use published platform libraries
supalarry Sep 12, 2024
a580d52
fix: ci
supalarry Sep 12, 2024
31c8458
fix: ci
supalarry Sep 12, 2024
7dd755e
fix: ci
supalarry Sep 12, 2024
360b4f2
fix: ci
supalarry Sep 12, 2024
1860086
cleanup script platform types
supalarry Sep 12, 2024
cdb7cc9
fix: use libraries from npm
supalarry Sep 13, 2024
49efa8e
chore: set test env vapid keys
ThyMinimalDev Sep 13, 2024
41c4540
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 13, 2024
fab1cb0
fix: event type tests
supalarry Sep 13, 2024
bee9a15
fix: remove location from system fields
supalarry Sep 13, 2024
e64b473
fix legacy event types
supalarry Sep 13, 2024
7e285af
Revert "fix legacy event types"
supalarry Sep 13, 2024
98925de
Revert "fix: remove location from system fields"
supalarry Sep 13, 2024
76008be
Revert "fix: event type tests"
supalarry Sep 13, 2024
c663085
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 18, 2024
76bca42
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 18, 2024
073e326
update libraries
supalarry Sep 18, 2024
d344f27
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 18, 2024
01b6e9a
fix: increase node space for ci runner
supalarry Sep 18, 2024
4b103f3
fix: increase node space for ci runner
supalarry Sep 19, 2024
445cfda
fix: increase node space for ci runner
supalarry Sep 19, 2024
f40ae39
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 19, 2024
e93d118
readd swagger
supalarry Sep 19, 2024
68d4dbf
ci
supalarry Sep 19, 2024
f0603ed
ci
supalarry Sep 20, 2024
fb224f0
refactor: increase idle worker memory jest e2e
supalarry Sep 20, 2024
f53b1b3
fixup! refactor: increase idle worker memory jest e2e
ThyMinimalDev Sep 20, 2024
5f4cb45
fixup! fixup! refactor: increase idle worker memory jest e2e
ThyMinimalDev Sep 20, 2024
d28b0ce
refactor: split bookings e2e into smaller e2e files
supalarry Sep 20, 2024
87fb4f0
fixup! refactor: split bookings e2e into smaller e2e files
ThyMinimalDev Sep 20, 2024
6ddac90
Merge branch 'main' into v2-refactor-bookings
ThyMinimalDev Sep 20, 2024
58b9a85
fixup! fixup! refactor: split bookings e2e into smaller e2e files
ThyMinimalDev Sep 20, 2024
17e149d
fixup! fixup! fixup! refactor: split bookings e2e into smaller e2e files
ThyMinimalDev Sep 20, 2024
27a519a
Merge branch 'main' into v2-refactor-bookings
supalarry Sep 21, 2024
53bb49d
fixup! Merge branch 'main' into v2-refactor-bookings
ThyMinimalDev Sep 23, 2024
69ba3cd
revert event types service
supalarry Sep 23, 2024
5ddcf31
fix: remove resetModule, maxWorker 2 jest e2e config
ThyMinimalDev Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-api-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
IS_E2E: true
NEXTAUTH_SECRET: ${{ secrets.CI_NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.CI_NEXTAUTH_URL }}
NODE_OPTIONS: --max-old-space-size=4096
NODE_OPTIONS: --max-old-space-size=29000
REDIS_URL: "redis://localhost:6379"
STRIPE_PRIVATE_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
STRIPE_API_KEY: ${{ secrets.CI_STRIPE_PRIVATE_KEY }}
Expand Down
4 changes: 3 additions & 1 deletion apps/api/v2/jest-e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
"^.+\\.(t|j)s$": "ts-jest"
},
"setupFiles": ["<rootDir>/test/setEnvVars.ts"],
"reporters": ["default", "jest-summarizing-reporter"]
"reporters": ["default", "jest-summarizing-reporter"],
"workerIdleMemoryLimit": "512MB",
"maxWorkers": 2
}
4 changes: 2 additions & 2 deletions apps/api/v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:watch": "yarn dev:build && jest --watch",
"test:cov": "yarn dev:build && jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.json",
"test:e2e": "yarn dev:build && NODE_OPTIONS='--max_old_space_size=8192' jest --ci --forceExit --config ./jest-e2e.json",
"test:e2e:watch": "yarn dev:build && jest --runInBand --detectOpenHandles --forceExit --config ./jest-e2e.json --watch",
"prisma": "yarn workspace @calcom/prisma prisma",
"generate-schemas": "yarn prisma generate && yarn prisma format",
Expand All @@ -28,7 +28,7 @@
"dependencies": {
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.36",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.37",
"@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BookingsController } from "@/ee/bookings/controllers/bookings.controller";
import { BookingsController_2024_04_15 } from "@/ee/bookings/2024-04-15/controllers/bookings.controller";
import { ApiKeyRepository } from "@/modules/api-key/api-key-repository";
import { BillingModule } from "@/modules/billing/billing.module";
import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository";
Expand All @@ -12,6 +12,6 @@ import { Module } from "@nestjs/common";
@Module({
imports: [PrismaModule, RedisModule, TokensModule, BillingModule],
providers: [TokensRepository, OAuthFlowService, OAuthClientRepository, ApiKeyRepository],
controllers: [BookingsController],
controllers: [BookingsController_2024_04_15],
})
export class BookingsModule {}
export class BookingsModule_2024_04_15 {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { bootstrap } from "@/app";
import { AppModule } from "@/app.module";
import { CreateBookingInput } from "@/ee/bookings/inputs/create-booking.input";
import { GetBookingOutput } from "@/ee/bookings/outputs/get-booking.output";
import { GetBookingsOutput } from "@/ee/bookings/outputs/get-bookings.output";
import { CreateBookingInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/create-booking.input";
import { GetBookingOutput_2024_04_15 } from "@/ee/bookings/2024-04-15/outputs/get-booking.output";
import { GetBookingsOutput_2024_04_15 } from "@/ee/bookings/2024-04-15/outputs/get-bookings.output";
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";
import { SchedulesService_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/services/schedules.service";
Expand All @@ -24,7 +24,7 @@ import { SUCCESS_STATUS, ERROR_STATUS } from "@calcom/platform-constants";
import { handleNewBooking } from "@calcom/platform-libraries";
import { ApiSuccessResponse, ApiResponse, ApiErrorResponse } from "@calcom/platform-types";

describe("Bookings Endpoints", () => {
describe("Bookings Endpoints 2024-04-15", () => {
describe("User Authenticated", () => {
let app: INestApplication;

Expand Down Expand Up @@ -111,7 +111,7 @@ describe("Bookings Endpoints", () => {
guests: [],
};

const body: CreateBookingInput = {
const body: CreateBookingInput_2024_04_15 = {
start: bookingStart,
end: bookingEnd,
eventTypeId: bookingEventTypeId,
Expand Down Expand Up @@ -166,7 +166,7 @@ describe("Bookings Endpoints", () => {
guests: [],
};

const body: CreateBookingInput = {
const body: CreateBookingInput_2024_04_15 = {
start: bookingStart,
end: bookingEnd,
eventTypeId: bookingEventTypeId,
Expand Down Expand Up @@ -209,7 +209,7 @@ describe("Bookings Endpoints", () => {
guests: [],
};

const body: CreateBookingInput = {
const body: CreateBookingInput_2024_04_15 = {
start: bookingStart,
end: bookingEnd,
eventTypeId: bookingEventTypeId,
Expand Down Expand Up @@ -266,7 +266,7 @@ describe("Bookings Endpoints", () => {
guests: [],
};

const body: CreateBookingInput = {
const body: CreateBookingInput_2024_04_15 = {
rescheduleUid: createdBooking.uid,
start: newBookingStart,
end: newBookingEnd,
Expand Down Expand Up @@ -305,7 +305,7 @@ describe("Bookings Endpoints", () => {
return request(app.getHttpServer())
.get("/v2/bookings?filters[status]=upcoming")
.then((response) => {
const responseBody: GetBookingsOutput = response.body;
const responseBody: GetBookingsOutput_2024_04_15 = response.body;

expect(responseBody.data.bookings.length).toEqual(2);
const fetchedBooking = responseBody.data.bookings.find(
Expand All @@ -329,7 +329,7 @@ describe("Bookings Endpoints", () => {
return request(app.getHttpServer())
.get(`/v2/bookings/${createdBooking.uid}`)
.then((response) => {
const responseBody: GetBookingOutput = response.body;
const responseBody: GetBookingOutput_2024_04_15 = response.body;
const bookingInfo = responseBody.data;

expect(responseBody.status).toEqual(SUCCESS_STATUS);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { CreateBookingInput } from "@/ee/bookings/inputs/create-booking.input";
import { CreateRecurringBookingInput } from "@/ee/bookings/inputs/create-recurring-booking.input";
import { MarkNoShowInput } from "@/ee/bookings/inputs/mark-no-show.input";
import { GetBookingOutput } from "@/ee/bookings/outputs/get-booking.output";
import { GetBookingsOutput } from "@/ee/bookings/outputs/get-bookings.output";
import { MarkNoShowOutput } from "@/ee/bookings/outputs/mark-no-show.output";
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";
import { MarkNoShowInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/mark-no-show.input";
import { GetBookingOutput_2024_04_15 } from "@/ee/bookings/2024-04-15/outputs/get-booking.output";
import { GetBookingsOutput_2024_04_15 } from "@/ee/bookings/2024-04-15/outputs/get-bookings.output";
import { MarkNoShowOutput_2024_04_15 } from "@/ee/bookings/2024-04-15/outputs/mark-no-show.output";
import { hashAPIKey, isApiKey, stripApiKey } from "@/lib/api-key";
import { API_VERSIONS_VALUES } from "@/lib/api-versions";
import { VERSION_2024_04_15, VERSION_2024_06_11, VERSION_2024_06_14 } from "@/lib/api-versions";
import { ApiKeyRepository } from "@/modules/api-key/api-key-repository";
import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator";
import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator";
Expand All @@ -31,7 +31,7 @@ import {
UseGuards,
} from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { ApiQuery, ApiTags as DocsTags } from "@nestjs/swagger";
import { ApiQuery, ApiExcludeController as DocsExcludeController } from "@nestjs/swagger";
import { User } from "@prisma/client";
import { Request } from "express";
import { NextApiRequest } from "next/types";
Expand All @@ -40,10 +40,10 @@ import { v4 as uuidv4 } from "uuid";
import { X_CAL_CLIENT_ID } from "@calcom/platform-constants";
import { BOOKING_READ, SUCCESS_STATUS, BOOKING_WRITE } from "@calcom/platform-constants";
import {
handleNewRecurringBooking,
handleNewBooking,
BookingResponse,
HttpError,
handleNewRecurringBooking,
handleInstantMeeting,
handleMarkNoShow,
getAllUserBookings,
Expand All @@ -52,7 +52,11 @@ import {
getBookingForReschedule,
ErrorCode,
} from "@calcom/platform-libraries";
import { GetBookingsInput, CancelBookingInput, Status } from "@calcom/platform-types";
import {
GetBookingsInput_2024_04_15,
CancelBookingInput_2024_04_15,
Status_2024_04_15,
} from "@calcom/platform-types";
import { ApiResponse } from "@calcom/platform-types";
import { PrismaClient } from "@calcom/prisma";

Expand Down Expand Up @@ -80,11 +84,11 @@ const DEFAULT_PLATFORM_PARAMS = {

@Controller({
path: "/v2/bookings",
version: API_VERSIONS_VALUES,
version: [VERSION_2024_04_15, VERSION_2024_06_11, VERSION_2024_06_14],
})
@UseGuards(PermissionsGuard)
@DocsTags("Bookings")
export class BookingsController {
@DocsExcludeController(true)
export class BookingsController_2024_04_15 {
private readonly logger = new Logger("BookingsController");

constructor(
Expand All @@ -99,16 +103,16 @@ export class BookingsController {
@Get("/")
@UseGuards(ApiAuthGuard)
@Permissions([BOOKING_READ])
@ApiQuery({ name: "filters[status]", enum: Status, required: true })
@ApiQuery({ name: "filters[status]", enum: Status_2024_04_15, required: true })
@ApiQuery({ name: "limit", type: "number", required: false })
@ApiQuery({ name: "cursor", type: "number", required: false })
async getBookings(
@GetUser() user: User,
@Query() queryParams: GetBookingsInput
): Promise<GetBookingsOutput> {
@Query() queryParams: GetBookingsInput_2024_04_15
): Promise<GetBookingsOutput_2024_04_15> {
const { filters, cursor, limit } = queryParams;
const bookings = await getAllUserBookings({
bookingListingByStatus: filters.status,
bookingListingByStatus: [filters.status],
skip: cursor ?? 0,
take: limit ?? 10,
filters,
Expand All @@ -125,7 +129,7 @@ export class BookingsController {
}

@Get("/:bookingUid")
async getBooking(@Param("bookingUid") bookingUid: string): Promise<GetBookingOutput> {
async getBooking(@Param("bookingUid") bookingUid: string): Promise<GetBookingOutput_2024_04_15> {
const { bookingInfo } = await getBookingInfo(bookingUid);

if (!bookingInfo) {
Expand Down Expand Up @@ -155,7 +159,7 @@ export class BookingsController {
@Post("/")
async createBooking(
@Req() req: BookingRequest,
@Body() body: CreateBookingInput,
@Body() body: CreateBookingInput_2024_04_15,
@Headers(X_CAL_CLIENT_ID) clientId?: string
): Promise<ApiResponse<Partial<BookingResponse>>> {
const oAuthClientId = clientId?.toString();
Expand Down Expand Up @@ -186,7 +190,7 @@ export class BookingsController {
async cancelBooking(
@Req() req: BookingRequest,
@Param("bookingId") bookingId: string,
@Body() _: CancelBookingInput,
@Body() _: CancelBookingInput_2024_04_15,
@Headers(X_CAL_CLIENT_ID) clientId?: string
): Promise<ApiResponse<{ bookingId: number; bookingUid: string; onlyRemovedAttendee: boolean }>> {
const oAuthClientId = clientId?.toString();
Expand Down Expand Up @@ -219,9 +223,9 @@ export class BookingsController {
@UseGuards(ApiAuthGuard)
async markNoShow(
@GetUser("id") userId: number,
@Body() body: MarkNoShowInput,
@Body() body: MarkNoShowInput_2024_04_15,
@Param("bookingUid") bookingUid: string
): Promise<MarkNoShowOutput> {
): Promise<MarkNoShowOutput_2024_04_15> {
try {
const markNoShowResponse = await handleMarkNoShow({
bookingUid: bookingUid,
Expand All @@ -240,7 +244,7 @@ export class BookingsController {
@Post("/recurring")
async createRecurringBooking(
@Req() req: BookingRequest,
@Body() _: CreateRecurringBookingInput[],
@Body() _: CreateRecurringBookingInput_2024_04_15[],
@Headers(X_CAL_CLIENT_ID) clientId?: string
): Promise<ApiResponse<BookingResponse[]>> {
const oAuthClientId = clientId?.toString();
Expand Down Expand Up @@ -278,7 +282,7 @@ export class BookingsController {
@Post("/instant")
async createInstantBooking(
@Req() req: BookingRequest,
@Body() _: CreateBookingInput,
@Body() _: CreateBookingInput_2024_04_15,
@Headers(X_CAL_CLIENT_ID) clientId?: string
): Promise<ApiResponse<Awaited<ReturnType<typeof handleInstantMeeting>>>> {
const oAuthClientId = clientId?.toString();
Expand Down Expand Up @@ -369,7 +373,12 @@ export class BookingsController {
const oAuthParams = oAuthClientId
? await this.getOAuthClientsParams(oAuthClientId)
: DEFAULT_PLATFORM_PARAMS;
Object.assign(req, { userId, ...oAuthParams, platformBookingLocation });
Object.assign(req, {
userId,
...oAuthParams,
platformBookingLocation,
noEmail: !oAuthParams.arePlatformEmailsEnabled,
});
return req as unknown as NextApiRequest & { userId?: number } & OAuthRequestParams;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Response {
notes?: string;
}

export class CreateBookingInput {
export class CreateBookingInput_2024_04_15 {
@IsString()
@IsOptional()
end?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CreateBookingInput } from "@/ee/bookings/inputs/create-booking.input";
import { CreateBookingInput_2024_04_15 } from "@/ee/bookings/2024-04-15/inputs/create-booking.input";
import { IsBoolean, IsString, IsNumber, IsOptional } from "class-validator";

import type { AppsStatus } from "@calcom/platform-libraries";

export class CreateRecurringBookingInput extends CreateBookingInput {
export class CreateRecurringBookingInput_2024_04_15 extends CreateBookingInput_2024_04_15 {
@IsBoolean()
@IsOptional()
noEmail?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Attendee {
noShow!: boolean;
}

export class MarkNoShowInput {
export class MarkNoShowInput_2024_04_15 {
@IsBoolean()
@IsOptional()
noShowHost?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class EventType {
timeZone!: string | null;
}

class GetBookingData {
class GetBookingData_2024_04_15 {
@IsString()
title!: string;

Expand Down Expand Up @@ -159,15 +159,15 @@ class GetBookingData {
eventType!: EventType | null;
}

export class GetBookingOutput {
export class GetBookingOutput_2024_04_15 {
@ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
@IsEnum([SUCCESS_STATUS, ERROR_STATUS])
status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;

@ApiProperty({
type: GetBookingData,
type: GetBookingData_2024_04_15,
})
@ValidateNested()
@Type(() => GetBookingData)
data!: GetBookingData;
@Type(() => GetBookingData_2024_04_15)
data!: GetBookingData_2024_04_15;
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class GetBookingsDataEntry {
rescheduled?: any;
}

class GetBookingsData {
class GetBookingsData_2024_04_15 {
@ValidateNested()
@Type(() => GetBookingsDataEntry)
@IsArray()
Expand All @@ -215,15 +215,15 @@ class GetBookingsData {
nextCursor!: number | null;
}

export class GetBookingsOutput {
export class GetBookingsOutput_2024_04_15 {
@ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
@IsEnum([SUCCESS_STATUS, ERROR_STATUS])
status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;

@ApiProperty({
type: GetBookingsData,
type: GetBookingsData_2024_04_15,
})
@ValidateNested()
@Type(() => GetBookingsData)
data!: GetBookingsData;
@Type(() => GetBookingsData_2024_04_15)
data!: GetBookingsData_2024_04_15;
}
Loading
Loading