feat: add hashedLink to BOOKING_REQUESTED webhook payload (#25274)
- Add hashedLink field to CalendarEvent type definition - Add withHashedLink method to CalendarEventBuilder - Pass hashedLink from booking request to CalendarEvent in RegularBookingService - hashedLink will now be included in webhook payloads when booking via private API links Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
fbfa27735b
commit
342e5baca2
3 files changed
+10
No files matched your search
@@ -479,6 +479,14 @@ export class CalendarEventBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
withHashedLink(hashedLink?: string | null) {
|
||||
this.event = {
|
||||
...this.event,
|
||||
hashedLink,
|
||||
};
|
||||
return this;
|
||||
}
|
||||
|
||||
build(): CalendarEvent | null {
|
||||
// Validate required fields
|
||||
if (
|
||||
|
||||
@@ -1387,6 +1387,7 @@ async function handler(
|
||||
platformCancelUrl,
|
||||
platformBookingUrl,
|
||||
})
|
||||
.withHashedLink(hasHashedBookingLink ? reqBody.hashedLink ?? null : null)
|
||||
.build();
|
||||
|
||||
if (!builtEvt) {
|
||||
|
||||
Vendored
+1
@@ -163,6 +163,7 @@ export interface CalendarEvent {
|
||||
// Instead of sending this per event.
|
||||
// TODO: Links sent in email should be validated and automatically redirected to org domain or regular app. It would be a much cleaner way. Maybe use existing /api/link endpoint
|
||||
bookerUrl?: string;
|
||||
hashedLink?: string | null;
|
||||
type: string;
|
||||
title: string;
|
||||
startTime: string;
|
||||
|
||||
Reference in new issue
Block a user