2021-10-28 22:52:39 +00:00
|
|
|
import { WebhookTriggerEvents } from "@prisma/client";
|
|
|
|
|
|
|
|
// this is exported as we can't use `WebhookTriggerEvents` in the frontend straight-off
|
2022-07-20 18:30:57 +00:00
|
|
|
|
|
|
|
export const WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP = {
|
|
|
|
core: [
|
|
|
|
WebhookTriggerEvents.BOOKING_CANCELLED,
|
|
|
|
WebhookTriggerEvents.BOOKING_CREATED,
|
|
|
|
WebhookTriggerEvents.BOOKING_RESCHEDULED,
|
2022-08-15 20:18:41 +00:00
|
|
|
WebhookTriggerEvents.MEETING_ENDED,
|
|
|
|
] as const,
|
2022-09-22 17:23:43 +00:00
|
|
|
"routing-forms": [WebhookTriggerEvents.FORM_SUBMITTED] as ["FORM_SUBMITTED"],
|
2022-07-20 18:30:57 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 22:52:39 +00:00
|
|
|
export const WEBHOOK_TRIGGER_EVENTS = [
|
2022-07-20 18:30:57 +00:00
|
|
|
...WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP.core,
|
2022-09-22 17:23:43 +00:00
|
|
|
...WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP["routing-forms"],
|
2022-08-15 20:18:41 +00:00
|
|
|
] as const;
|