* add new trigger with first simple job scheduling * fix DB update * use array to save scheduled jobs in booking * cancel scheduled jobs when zap disabled or zapier disconnected * schedule jobs only for confirmed bookings * schedule jobs for already existing bookings * fix bug to create workflow reminders when confirming recurring events * delete remove all zapier webhooks when api key is deleted * schedule job for all confirmed recurring bookings * fix zapier trigger and workflow reminders when cancelling recurring events * code clean up * code clean up * add migration * add type package for node-schedule * remove nodescheduler * add updated nodescheduler * move code to app-store * add meeting ended to webhook constants * udpate zapier README.md * implement QA suggestions * add default handler and fix imports * Type fix Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López <zomars@me.com>
19 lines
637 B
TypeScript
19 lines
637 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;
|