Skip to content

Scheduling infrastructure for absolutely everyone.

chore: pass metadata (#19712)

Udit Takkar2f9a853023f7
diff --git a/packages/embeds/embed-core/src/sdk-action-manager.ts b/packages/embeds/embed-core/src/sdk-action-manager.ts
index 28d3b709247..c4ffce1d003 100644
--- a/packages/embeds/embed-core/src/sdk-action-manager.ts
+++ b/packages/embeds/embed-core/src/sdk-action-manager.ts
@@ -35,6 +35,7 @@ export type EventDataMap = {
* This is only used for recurring bookings
*/
allBookings?: { startTime: string; endTime: string }[];
+ videoCallUrl?: string;
};
/**
diff --git a/packages/features/bookings/Booker/components/hooks/useBookings.ts b/packages/features/bookings/Booker/components/hooks/useBookings.ts
index 23e1ed98ab8..a3b89eaa228 100644
--- a/packages/features/bookings/Booker/components/hooks/useBookings.ts
+++ b/packages/features/bookings/Booker/components/hooks/useBookings.ts
@@ -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
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts
index d6874e55ac8..4977e6926a0 100644
--- a/packages/features/bookings/lib/handleNewBooking.ts
+++ b/packages/features/bookings/lib/handleNewBooking.ts
@@ -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,
};
}