This commit is contained in:
Syed Ali Shahbaz authored and GitHub committed 2026-01-13 12:51:24 +00:00
1 parent 3aa6499cd4
commit d381c2c2cb
13 files changed
+110 -53

No files matched your search

@@ -50,9 +50,11 @@ export interface BookingCancelledDTO extends BaseEventDTO {
eventTypeId: number | null;
userId: number | null;
smsReminderNumber?: string | null;
iCalSequence?: number | null;
};
cancelledBy?: string;
cancellationReason?: string;
requestReschedule?: boolean;
}
export interface BookingRejectedDTO extends BaseEventDTO {
@@ -582,6 +584,7 @@ export type EventPayloadType = CalendarEvent &
rescheduledBy?: string;
cancelledBy?: string;
paymentData?: Record<string, unknown>;
requestReschedule?: boolean;
};
// dto/types.ts
@@ -11,7 +11,11 @@ import type { IBookingPayloadBuilder } from "../versioned/PayloadBuilderFactory"
*/
export type BookingExtraDataMap = {
[WebhookTriggerEvents.BOOKING_CREATED]: null;
[WebhookTriggerEvents.BOOKING_CANCELLED]: { cancelledBy?: string; cancellationReason?: string };
[WebhookTriggerEvents.BOOKING_CANCELLED]: {
cancelledBy?: string;
cancellationReason?: string;
requestReschedule?: boolean;
};
[WebhookTriggerEvents.BOOKING_REQUESTED]: null;
[WebhookTriggerEvents.BOOKING_REJECTED]: null;
[WebhookTriggerEvents.BOOKING_RESCHEDULED]: {
@@ -45,6 +45,7 @@ export class BookingPayloadBuilder extends BaseBookingPayloadBuilder {
extra: {
cancelledBy: dto.cancelledBy,
cancellationReason: dto.cancellationReason,
requestReschedule: dto.requestReschedule ?? false,
},
});
@@ -96,6 +96,7 @@ export type EventPayloadType = CalendarEvent &
rescheduledBy?: string;
cancelledBy?: string;
paymentData?: PaymentData;
requestReschedule?: boolean;
};
export type WebhookPayloadType =
@@ -116,6 +116,7 @@ export class BookingWebhookService implements IBookingWebhookService {
booking: params.booking,
cancelledBy: params.cancelledBy,
cancellationReason: params.cancellationReason,
requestReschedule: params.requestReschedule,
};
await this.webhookNotifier.emitWebhook(dto, params.isDryRun);
@@ -44,6 +44,7 @@ export interface BookingCancelledParams {
eventTypeId: number | null;
userId: number | null;
smsReminderNumber?: string | null;
iCalSequence?: number | null;
};
eventType: {
id: number;
@@ -57,6 +58,7 @@ export interface BookingCancelledParams {
};
cancelledBy?: string;
cancellationReason?: string;
requestReschedule?: boolean;
teamId?: number | null;
orgId?: number | null;
platformClientId?: string;