fix: typefix for webhook and rename oldBookingid to rescheduleId (#12084)

* add rescheduleId to type

* update oldBookingId to rescheduleId

* Remove old remnant
pull/11958/merge
Syed Ali Shahbaz 2023-10-25 21:26:22 +04:00 committed by GitHub
parent 1929b23ea8
commit 9364055283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1851,6 +1851,7 @@ async function handler(
...eventTypeInfo, ...eventTypeInfo,
uid: resultBooking?.uid || uid, uid: resultBooking?.uid || uid,
bookingId: booking?.id, bookingId: booking?.id,
rescheduleId: originalRescheduledBooking?.id || undefined,
rescheduleUid, rescheduleUid,
rescheduleStartTime: originalRescheduledBooking?.startTime rescheduleStartTime: originalRescheduledBooking?.startTime
? dayjs(originalRescheduledBooking?.startTime).utc().format() ? dayjs(originalRescheduledBooking?.startTime).utc().format()
@ -2377,8 +2378,8 @@ async function handler(
...evt, ...evt,
...eventTypeInfo, ...eventTypeInfo,
bookingId: booking?.id, bookingId: booking?.id,
rescheduleId: originalRescheduledBooking?.id || undefined,
rescheduleUid, rescheduleUid,
oldBookingId: originalRescheduledBooking?.id || undefined,
rescheduleStartTime: originalRescheduledBooking?.startTime rescheduleStartTime: originalRescheduledBooking?.startTime
? dayjs(originalRescheduledBooking?.startTime).utc().format() ? dayjs(originalRescheduledBooking?.startTime).utc().format()
: undefined, : undefined,

View File

@ -22,6 +22,7 @@ export type WebhookDataType = CalendarEvent &
bookingId?: number; bookingId?: number;
status?: string; status?: string;
smsReminderNumber?: string; smsReminderNumber?: string;
rescheduleId?: number;
rescheduleUid?: string; rescheduleUid?: string;
rescheduleStartTime?: string; rescheduleStartTime?: string;
rescheduleEndTime?: string; rescheduleEndTime?: string;