From 91ac952a724490c9c06b4f577f08656be93e15b7 Mon Sep 17 00:00:00 2001 From: Manpreet Singh Date: Tue, 17 Oct 2023 05:02:35 -0400 Subject: [PATCH] feat: Adds missing bookingId to Cancel Webhook payload (#11906) Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com> --- packages/features/bookings/lib/handleCancelBooking.ts | 2 ++ packages/types/Calendar.d.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/features/bookings/lib/handleCancelBooking.ts b/packages/features/bookings/lib/handleCancelBooking.ts index 924ae49436..b4fb989203 100644 --- a/packages/features/bookings/lib/handleCancelBooking.ts +++ b/packages/features/bookings/lib/handleCancelBooking.ts @@ -102,6 +102,7 @@ async function getBookingToDelete(id: number | undefined, uid: string | undefine }, }, uid: true, + id: true, eventTypeId: true, destinationCalendar: true, smsReminderNumber: true, @@ -245,6 +246,7 @@ async function handler(req: CustomRequest) { }, attendees: attendeesList, uid: bookingToDelete?.uid, + bookingId: bookingToDelete?.id, /* Include recurringEvent information only when cancelling all bookings */ recurringEvent: allRemainingBookings ? parseRecurringEvent(bookingToDelete.eventType?.recurringEvent) diff --git a/packages/types/Calendar.d.ts b/packages/types/Calendar.d.ts index 1be997282b..b8e3989f71 100644 --- a/packages/types/Calendar.d.ts +++ b/packages/types/Calendar.d.ts @@ -166,6 +166,7 @@ export interface CalendarEvent { conferenceData?: ConferenceData; additionalInformation?: AdditionalInformation; uid?: string | null; + bookingId?: number; videoCallData?: VideoCallData; paymentInfo?: PaymentInfo | null; requiresConfirmation?: boolean | null;