feat: add availabilityLoaded embed event (#21350)

* feat: add availabiityLoaded embed event

* chore

* fix

---------

Co-authored-by: Volnei Munhoz <[email protected]>
Co-authored-by: Anik Dhabal Babu <[email protected]>
Co-authored-by: Devanshu Sharma <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-10-27 06:22:09 +00:00
1 parent a9e14b9816
commit c3a5158a53
4 files changed
+68

No files matched your search

+18
View File
@@ -50,6 +50,24 @@ function App() {
callback,
});
const availabilityLoadedCallback = (e: EmbedEvent<"availabilityLoaded">) => {
const data = e.detail.data;
console.log("availabilityLoaded", {
eventId: data.eventId,
eventSlug: data.eventSlug,
});
api("off", {
action: "availabilityLoaded",
callback: availabilityLoadedCallback,
});
};
api("on", {
action: "availabilityLoaded",
callback: availabilityLoadedCallback,
});
// Also, validates the type of e.detail.data as TS runs on this file
const bookingSuccessfulV2Callback = (e: EmbedEvent<"bookingSuccessfulV2">) => {
const data = e.detail.data;