/** Customer role within a conference call. */ export const CONFERENCE_ROLE_CUSTOMER = "customer" as const; /** Supervisor role within a conference call. */ export const CONFERENCE_ROLE_SUPERVISOR = "supervisor" as const; /** Live call — «בשיחה». Excludes Twilio `busy` (line busy / «תפוס»). */ export const IN_CALL_STATUSES = ["in-progress", "answered"] as const; /** Terminal Twilio call statuses — no further status callbacks expected. */ export const FINAL_STATUSES = [ "no-answer", "completed", "busy", "failed", "canceled", ] as const; /** Hours in a single day. */ export const HOURS_PER_DAY = 24; /** Max execution time (ms) for calls statistics aggregations. */ export const STATS_MAX_TIME_MS = 30_000; /** * When the client calls bar chart should group by week or month instead of day: * > MONTH threshold -> one bar per month * > WEEK threshold -> one bar per week * otherwise -> one bar per day */ export const TREND_MONTH_BUCKET_MIN_MONTHS = 6; export const TREND_WEEK_BUCKET_MIN_MONTHS = 3; export const TOOL_EXECUTIONS_DEFAULT_SKIP = 0; export const TOOL_EXECUTIONS_DEFAULT_LIMIT = 50; export const CallStatusValues = { Initiated: "initiated", Ringing: "ringing", InProgress: "in-progress", Answered: "answered", Completed: "completed", Busy: "busy", NoAnswer: "no-answer", Failed: "failed", Canceled: "canceled", } as const; export const ALL_CALL_STATUSES = Object.values(CallStatusValues);