Skip to content

Commit d8e0d47

Browse files
committed
handle it in api v2
1 parent 6355bc2 commit d8e0d47

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

apps/api/v2/src/ee/bookings/2024-08-13/services/input.service.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export class InputBookingsService_2024_08_13 {
176176
metadata: inputBooking.metadata || {},
177177
hasHashedBookingLink: false,
178178
guests,
179+
verificationCode: inputBooking.emailVerificationCode,
179180
// note(Lauris): responses with name and email are required by the handleNewBooking
180181
responses: {
181182
...(inputBooking.bookingFieldsResponses || {}),
@@ -471,6 +472,7 @@ export class InputBookingsService_2024_08_13 {
471472
metadata: inputBooking.metadata || {},
472473
hasHashedBookingLink: false,
473474
guests,
475+
verificationCode: inputBooking.emailVerificationCode,
474476
// note(Lauris): responses with name and email are required by the handleNewBooking
475477
responses: {
476478
...(inputBooking.bookingFieldsResponses || {}),
@@ -600,6 +602,7 @@ export class InputBookingsService_2024_08_13 {
600602
guests: [],
601603
responses: { ...bookingResponses },
602604
rescheduleUid: inputBooking.seatUid,
605+
verificationCode: inputBooking.emailVerificationCode,
603606
};
604607
}
605608

@@ -661,6 +664,7 @@ export class InputBookingsService_2024_08_13 {
661664
guests: bookingResponses.guests,
662665
responses: { ...bookingResponses, rescheduledReason: inputBooking.reschedulingReason },
663666
rescheduleUid: bookingUid,
667+
verificationCode: inputBooking.emailVerificationCode,
664668
};
665669
}
666670

packages/platform/types/bookings/2024-08-13/inputs/create-booking.input.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,15 @@ export class CreateBookingInput_2024_08_13 {
371371
@ValidateNested()
372372
@Type(() => Routing)
373373
routing?: Routing;
374+
375+
@ApiPropertyOptional({
376+
type: String,
377+
description: "Email verification code required when event type has email verification enabled.",
378+
example: "123456",
379+
})
380+
@IsOptional()
381+
@IsString()
382+
emailVerificationCode?: string;
374383
}
375384

376385
export class CreateInstantBookingInput_2024_08_13 extends CreateBookingInput_2024_08_13 {

packages/platform/types/bookings/2024-08-13/inputs/reschedule-booking.input.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ export class RescheduleBookingInput_2024_08_13 {
2727
description: "Reason for rescheduling the booking",
2828
})
2929
reschedulingReason?: string;
30+
31+
@IsString()
32+
@IsOptional()
33+
@ApiPropertyOptional({
34+
type: String,
35+
description: "Email verification code required when event type has email verification enabled.",
36+
example: "123456",
37+
})
38+
emailVerificationCode?: string;
3039
}
3140

3241
export class RescheduleSeatedBookingInput_2024_08_13 {
@@ -51,4 +60,13 @@ export class RescheduleSeatedBookingInput_2024_08_13 {
5160
})
5261
@IsString()
5362
seatUid!: string;
63+
64+
@IsString()
65+
@IsOptional()
66+
@ApiPropertyOptional({
67+
type: String,
68+
description: "Email verification code required when event type has email verification enabled.",
69+
example: "123456",
70+
})
71+
emailVerificationCode?: string;
5472
}

0 commit comments

Comments
 (0)