ce41397517
* Animate fields list and routes list * Rename routing_forms slug to routing-forms * Add comments * Fixtypo * Add dropdown separator for consistency * Fix missing occurences of routing_forms and improve types for webhooks * Fix weird error about title child is an array * Fix webhook issues * Fix webhook tests and issues found during fixing them * Fix lint errors and warnings Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
19 lines
642 B
TypeScript
19 lines
642 B
TypeScript
import { WebhookTriggerEvents } from "@prisma/client";
|
|
|
|
// this is exported as we can't use `WebhookTriggerEvents` in the frontend straight-off
|
|
|
|
export const WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP = {
|
|
core: [
|
|
WebhookTriggerEvents.BOOKING_CANCELLED,
|
|
WebhookTriggerEvents.BOOKING_CREATED,
|
|
WebhookTriggerEvents.BOOKING_RESCHEDULED,
|
|
WebhookTriggerEvents.MEETING_ENDED,
|
|
] as const,
|
|
"routing-forms": [WebhookTriggerEvents.FORM_SUBMITTED] as ["FORM_SUBMITTED"],
|
|
};
|
|
|
|
export const WEBHOOK_TRIGGER_EVENTS = [
|
|
...WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP.core,
|
|
...WEBHOOK_TRIGGER_EVENTS_GROUPED_BY_APP["routing-forms"],
|
|
] as const;
|