Skip to content

Commit 342e5ba

Browse files
feat: add hashedLink to BOOKING_REQUESTED webhook payload (calcom#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>
1 parent fbfa277 commit 342e5ba

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

packages/features/CalendarEventBuilder.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,14 @@ export class CalendarEventBuilder {
479479
return this;
480480
}
481481

482+
withHashedLink(hashedLink?: string | null) {
483+
this.event = {
484+
...this.event,
485+
hashedLink,
486+
};
487+
return this;
488+
}
489+
482490
build(): CalendarEvent | null {
483491
// Validate required fields
484492
if (

packages/features/bookings/lib/service/RegularBookingService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,7 @@ async function handler(
13871387
platformCancelUrl,
13881388
platformBookingUrl,
13891389
})
1390+
.withHashedLink(hasHashedBookingLink ? reqBody.hashedLink ?? null : null)
13901391
.build();
13911392

13921393
if (!builtEvt) {

packages/types/Calendar.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export interface CalendarEvent {
163163
// Instead of sending this per event.
164164
// 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
165165
bookerUrl?: string;
166+
hashedLink?: string | null;
166167
type: string;
167168
title: string;
168169
startTime: string;

0 commit comments

Comments
 (0)