chore: pass metadata (#19712)

* chore: pass metadata

* fix: type error

* chore: pass videoCallUrl
This commit is contained in:
Udit Takkar authored and GitHub committed 2025-03-11 04:34:14 -03:00
1 parent b0125e1a05
commit 2f9a853023
3 files changed
+8 -1

No files matched your search

@@ -35,6 +35,7 @@ export type EventDataMap = {
* This is only used for recurring bookings
*/
allBookings?: { startTime: string; endTime: string }[];
videoCallUrl?: string;
};
/**
@@ -60,6 +60,7 @@ const getBookingSuccessfulEventPayload = (booking: {
paymentRequired: boolean;
uid?: string;
isRecurring: boolean;
videoCallUrl?: string;
}) => {
return {
uid: booking.uid,
@@ -70,6 +71,7 @@ const getBookingSuccessfulEventPayload = (booking: {
status: booking.status,
paymentRequired: booking.paymentRequired,
isRecurring: booking.isRecurring,
videoCallUrl: booking.videoCallUrl,
};
};
@@ -262,7 +264,7 @@ export const useBookings = ({ event, hashedLink, bookingForm, metadata, teamMemb
isSuccessBookingPage: true,
email: bookingForm.getValues("responses.email"),
eventTypeSlug: eventSlug,
seatReferenceUid: "seatReferenceUid" in booking ? booking.seatReferenceUid : null,
seatReferenceUid: "seatReferenceUid" in booking ? (booking.seatReferenceUid as string) : null,
formerTime:
isRescheduling && bookingData?.startTime ? dayjs(bookingData.startTime).toString() : undefined,
rescheduledBy, // ensure further reschedules performed on the success page are recorded correctly
@@ -1838,6 +1838,9 @@ async function handler(
...booking.user,
email: null,
},
videoCallUrl: metadata?.videoCallUrl,
// Ensure seatReferenceUid is properly typed as string | null
seatReferenceUid: evt.attendeeSeatId,
};
return {
@@ -2038,6 +2041,7 @@ async function handler(
...(isDryRun ? { troubleshooterData } : {}),
references: referencesToCreate,
seatReferenceUid: evt.attendeeSeatId,
videoCallUrl: metadata?.videoCallUrl,
};
}