Files
calendar/packages/features/ee/workflows/lib/constants.ts
T
02c86d0268 feat: cal ai self serve architecture #1 (#22919)
* feat: cal ai self serve architecture

* chore: add package

* chore: update evnet controller

* refactor: improvements

* chore: rename

* chore: type error and naming

* chore: just set it to nul

* chore: just set it to nul

* chore: some more improvements

* chore: packate version

* fix: API v2

* chore: change name of files

* chore: add select

* chore: add missing teamId

* chore: save progress

* refactor: split into multiple services

* refactor: make schema provider agonistic

* chore: improvements

* chore:

* chore: remove duplicate files

* chore: semicolon

* chore: formatting

* refactor: logging and error handling

* chore: rename variable

* refactor: use trpc error

* chore: replace with HttpError

* chore: remove from option

* We need the enum and not just the type

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
2025-08-08 15:57:13 +00:00

82 lines
2.2 KiB
TypeScript

import { WorkflowTriggerEvents, TimeUnit, WorkflowActions, WorkflowTemplates } from "@calcom/prisma/enums";
export const WORKFLOW_TRIGGER_EVENTS = [
WorkflowTriggerEvents.BEFORE_EVENT,
WorkflowTriggerEvents.EVENT_CANCELLED,
WorkflowTriggerEvents.NEW_EVENT,
WorkflowTriggerEvents.AFTER_EVENT,
WorkflowTriggerEvents.RESCHEDULE_EVENT,
WorkflowTriggerEvents.AFTER_HOSTS_CAL_VIDEO_NO_SHOW,
WorkflowTriggerEvents.AFTER_GUESTS_CAL_VIDEO_NO_SHOW,
] as const;
export const WORKFLOW_ACTIONS = [
WorkflowActions.EMAIL_HOST,
WorkflowActions.EMAIL_ATTENDEE,
WorkflowActions.EMAIL_ADDRESS,
WorkflowActions.SMS_ATTENDEE,
WorkflowActions.SMS_NUMBER,
WorkflowActions.WHATSAPP_ATTENDEE,
WorkflowActions.WHATSAPP_NUMBER,
WorkflowActions.CAL_AI_PHONE_CALL,
] as const;
export const TIME_UNIT = [TimeUnit.DAY, TimeUnit.HOUR, TimeUnit.MINUTE] as const;
export const WORKFLOW_TEMPLATES = [
WorkflowTemplates.CUSTOM,
WorkflowTemplates.REMINDER,
WorkflowTemplates.RATING,
WorkflowTemplates.CANCELLED,
WorkflowTemplates.COMPLETED,
WorkflowTemplates.RESCHEDULED,
] as const;
export const BASIC_WORKFLOW_TEMPLATES = [WorkflowTemplates.CUSTOM, WorkflowTemplates.REMINDER] as const;
export const ATTENDEE_WORKFLOW_TEMPLATES = [
WorkflowTemplates.CUSTOM,
WorkflowTemplates.REMINDER,
WorkflowTemplates.RATING,
] as const;
export const WHATSAPP_WORKFLOW_TEMPLATES = [
WorkflowTemplates.REMINDER,
WorkflowTemplates.COMPLETED,
WorkflowTemplates.CANCELLED,
WorkflowTemplates.RESCHEDULED,
] as const;
export const DYNAMIC_TEXT_VARIABLES = [
"event_name",
"event_date",
"event_time",
"event_end_time",
"timezone",
"location",
"organizer_name",
"attendee_name",
"attendee_first_name",
"attendee_last_name",
"attendee_email",
"additional_notes",
"meeting_url",
"cancel_url",
"cancel_reason",
"reschedule_url",
"reschedule_reason",
"rating_url",
"no_show_url",
"attendee_timezone",
"event_start_time_in_attendee_timezone",
"event_end_time_in_attendee_timezone",
];
export const FORMATTED_DYNAMIC_TEXT_VARIABLES = [
"event_date_",
"event_time_",
"event_end_time_",
"event_start_time_in_attendee_timezone_",
"event_end_time_in_attendee_timezone_",
];