@setluca/mcp 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,24 +19,39 @@ export const OPENAPI_INPUT_FIELDS = {
19
19
  "POST /api/leads/{id}/consents": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "channel": Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"]), "purpose": Schema.Literals(["booking_reminders", "marketing", "sales_follow_up", "support"]), "source": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "evidenceId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "grantedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) }) }).fields,
20
20
  "POST /api/leads/{id}/consents/revoke": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "channel": Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"]), "purpose": Schema.Literals(["booking_reminders", "marketing", "sales_follow_up", "support"]) }) }).fields,
21
21
  "POST /api/leads/{id}/notes": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "body": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }) }).fields,
22
- "POST /api/leads/{id}/draft": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "guidance": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) }) }).fields,
22
+ "POST /api/leads/{id}/draft": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "guidance": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })) }).fields,
23
23
  "DELETE /api/leads/{id}/notes/{noteId}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "noteId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
24
+ "POST /api/leads/{id}/drafting/pause": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "duration": Schema.Literals(["1h", "24h", "7d", "30d", "until_resumed"]) }) }).fields,
25
+ "POST /api/leads/{id}/drafting/resume": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
26
+ "GET /api/conversations/{id}/send-status": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "query": Schema.optionalKey(Schema.Struct({ "idempotencyKey": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" })) })) }).fields,
24
27
  "GET /api/conversations/summary": Schema.Struct({}).fields,
25
- "GET /api/conversations": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "channelAccountId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "externalAccountId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "q": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
28
+ "GET /api/conversations": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "channelAccountId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "externalAccountId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "q": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "leadId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) })) }).fields,
26
29
  "GET /api/conversations/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
27
30
  "GET /api/conversations/{id}/messages": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "query": Schema.optionalKey(Schema.Struct({ "before": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) })) }).fields,
28
31
  "POST /api/conversations/{id}/profile-refresh": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
29
- "POST /api/conversations/{id}/send": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "body": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "outboundContent": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "parts": Schema.Array(Schema.Union([Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("text"), "text": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("media"), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaKind": Schema.Literals(["image", "video", "audio", "voice", "document"]), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))), "caption": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" }))), "altText": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1000).annotate({ "expected": "a string with at most 1000 code points" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("interactive"), "interactionKind": Schema.Literals(["buttons", "list", "quick_replies", "inline_buttons"]), "prompt": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" })), "options": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "title": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "description": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "action": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("booking.select_slot"), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "inviteeEmail": Schema.String.annotate({ "format": "email" }), "inviteeName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))) }), Schema.Struct({ "type": Schema.Literal("booking.reschedule"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })) }), Schema.Struct({ "type": Schema.Literal("booking.cancel"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })])) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" })), "expiresAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("template"), "templateId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "language": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "versionHash": Schema.String.check(Schema.isPattern(new RegExp("^sha256:[a-f0-9]{64}$", "u")).annotate({ "expected": "a string matching the RegExp ^sha256:[a-f0-9]{64}$" })), "parameters": Schema.Array(Schema.Union([Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literals(["header", "body", "button"]), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literal("text"), "value": Schema.String.check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })) }), Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literal("header"), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literals(["image", "video", "document"]), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))) })])).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "renderedPreview": Schema.String.check(Schema.isMaxCodePoints(16000).annotate({ "expected": "a string with at most 16000 code points" })), "providerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(12).annotate({ "expected": "a value with a length of at most 12" })) })) }) }).fields,
32
+ "POST /api/conversations/{id}/send": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "body": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "outboundContent": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "parts": Schema.Array(Schema.Union([Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("text"), "text": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "textGroupId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("media"), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaKind": Schema.Literals(["image", "video", "audio", "voice", "document"]), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))), "caption": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" }))), "altText": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1000).annotate({ "expected": "a string with at most 1000 code points" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("interactive"), "interactionKind": Schema.Literals(["buttons", "list", "quick_replies", "inline_buttons"]), "prompt": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" })), "options": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "title": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "description": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "action": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("booking.select_slot"), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "inviteeEmail": Schema.String.annotate({ "format": "email" }), "inviteeName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))) }), Schema.Struct({ "type": Schema.Literal("booking.reschedule"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })) }), Schema.Struct({ "type": Schema.Literal("booking.cancel"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })])) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" })), "expiresAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("template"), "templateId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "language": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "versionHash": Schema.String.check(Schema.isPattern(new RegExp("^sha256:[a-f0-9]{64}$", "u")).annotate({ "expected": "a string matching the RegExp ^sha256:[a-f0-9]{64}$" })), "parameters": Schema.Array(Schema.Union([Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literals(["header", "body", "button"]), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literal("text"), "value": Schema.String.check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })) }), Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literal("header"), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literals(["image", "video", "document"]), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))) })])).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "renderedPreview": Schema.String.check(Schema.isMaxCodePoints(16000).annotate({ "expected": "a string with at most 16000 code points" })), "providerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(12).annotate({ "expected": "a value with a length of at most 12" })) })), "replacesReplyFailureId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) }) }).fields,
30
33
  "POST /api/conversations/{id}/messages/{messageId}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "messageId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
34
+ "POST /api/conversations/{id}/reply-failures/{failureId}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "failureId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
35
+ "POST /api/conversations/{id}/reply-failures/{failureId}/dismiss": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "failureId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
36
+ "POST /api/conversations/{id}/messages/{messageId}/media/{mediaId}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "messageId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
31
37
  "GET /api/review-queue/{id}/composer": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
32
- "GET /api/review-queue": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "category": Schema.optionalKey(Schema.Literals(["faq", "qualification", "objection", "scheduling", "pricing-adjacent", "other"])), "order": Schema.optionalKey(Schema.Literals(["priority", "fifo"])) })) }).fields,
38
+ "GET /api/review-queue": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.Literals(["pending", "approved", "rejected", "sent", "superseded", "stale"])), "category": Schema.optionalKey(Schema.Literals(["faq", "qualification", "objection", "scheduling", "pricing-adjacent", "other"])), "leadId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "order": Schema.optionalKey(Schema.Literals(["priority", "fifo"])) })) }).fields,
33
39
  "GET /api/review-queue/{id}/explain": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
34
- "POST /api/review-queue/{id}/approve": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "finalBody": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "finalParts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(4).annotate({ "expected": "a value with a length of at most 4" }))), "outboundContent": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "parts": Schema.Array(Schema.Union([Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("text"), "text": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("media"), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaKind": Schema.Literals(["image", "video", "audio", "voice", "document"]), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))), "caption": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" }))), "altText": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1000).annotate({ "expected": "a string with at most 1000 code points" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("interactive"), "interactionKind": Schema.Literals(["buttons", "list", "quick_replies", "inline_buttons"]), "prompt": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" })), "options": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "title": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "description": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "action": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("booking.select_slot"), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "inviteeEmail": Schema.String.annotate({ "format": "email" }), "inviteeName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))) }), Schema.Struct({ "type": Schema.Literal("booking.reschedule"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })) }), Schema.Struct({ "type": Schema.Literal("booking.cancel"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })])) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" })), "expiresAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("template"), "templateId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "language": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "versionHash": Schema.String.check(Schema.isPattern(new RegExp("^sha256:[a-f0-9]{64}$", "u")).annotate({ "expected": "a string matching the RegExp ^sha256:[a-f0-9]{64}$" })), "parameters": Schema.Array(Schema.Union([Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literals(["header", "body", "button"]), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literal("text"), "value": Schema.String.check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })) }), Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literal("header"), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literals(["image", "video", "document"]), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))) })])).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "renderedPreview": Schema.String.check(Schema.isMaxCodePoints(16000).annotate({ "expected": "a string with at most 16000 code points" })), "providerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(12).annotate({ "expected": "a value with a length of at most 12" })) })) }) }).fields,
40
+ "POST /api/review-queue/{id}/approve": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "finalBody": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "finalParts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(4).annotate({ "expected": "a value with a length of at most 4" }))), "outboundContent": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "parts": Schema.Array(Schema.Union([Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("text"), "text": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "textGroupId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("media"), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaKind": Schema.Literals(["image", "video", "audio", "voice", "document"]), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))), "caption": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" }))), "altText": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1000).annotate({ "expected": "a string with at most 1000 code points" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("interactive"), "interactionKind": Schema.Literals(["buttons", "list", "quick_replies", "inline_buttons"]), "prompt": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ "expected": "a string with at most 1024 code points" })), "options": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "title": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "description": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "action": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("booking.select_slot"), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "inviteeEmail": Schema.String.annotate({ "format": "email" }), "inviteeName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))) }), Schema.Struct({ "type": Schema.Literal("booking.reschedule"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })) }), Schema.Struct({ "type": Schema.Literal("booking.cancel"), "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })])) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" })), "expiresAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }), Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "type": Schema.Literal("template"), "templateId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "language": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "versionHash": Schema.String.check(Schema.isPattern(new RegExp("^sha256:[a-f0-9]{64}$", "u")).annotate({ "expected": "a string matching the RegExp ^sha256:[a-f0-9]{64}$" })), "parameters": Schema.Array(Schema.Union([Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literals(["header", "body", "button"]), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literal("text"), "value": Schema.String.check(Schema.isMaxCodePoints(4096).annotate({ "expected": "a string with at most 4096 code points" })) }), Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), "component": Schema.Literal("header"), "index": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), "parameterName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "buttonIndex": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "kind": Schema.Literals(["image", "video", "document"]), "uploadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "fileName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ "expected": "a string with at most 255 code points" }))) })])).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "renderedPreview": Schema.String.check(Schema.isMaxCodePoints(16000).annotate({ "expected": "a string with at most 16000 code points" })), "providerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(12).annotate({ "expected": "a value with a length of at most 12" })) })) })) }).fields,
41
+ "POST /api/review-queue/bulk-approve": Schema.Struct({ "body": Schema.Struct({ "ids": Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })) }) }).fields,
42
+ "POST /api/review-queue/bulk-reject": Schema.Struct({ "body": Schema.Struct({ "ids": Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })) }) }).fields,
35
43
  "POST /api/review-queue/{id}/media/{mediaId}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "mediaId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
36
- "POST /api/review-queue/{id}/reject": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
44
+ "POST /api/review-queue/{id}/reject": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "reasonCode": Schema.optionalKey(Schema.Literals(["wrong_facts", "wrong_tone", "too_long", "too_pushy", "should_not_reply", "other"])), "note": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(280).annotate({ "expected": "a string with at most 280 code points" }))) })) }).fields,
37
45
  "POST /api/review-queue/{id}/restore": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
38
46
  "GET /api/review-queue/sla": Schema.Struct({}).fields,
47
+ "GET /api/review-queue/summary": Schema.Struct({}).fields,
48
+ "GET /api/review-queue/changes": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "since": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) })) }).fields,
49
+ "GET /api/review-queue/drafting": Schema.Struct({}).fields,
39
50
  "POST /api/review-queue/{id}/objection-variant": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "label": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }) }).fields,
51
+ "POST /api/review-queue/drafting/{turnId}/cancel": Schema.Struct({ "turnId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
52
+ "POST /api/review-queue/drafting/{turnId}/retry": Schema.Struct({ "turnId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
53
+ "POST /api/review-queue/drafting/{turnId}/dismiss": Schema.Struct({ "turnId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
54
+ "POST /api/review-queue/{id}/regenerate": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "hint": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })) }).fields,
40
55
  "GET /api/bookings": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "upcoming": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "leadId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) })) }).fields,
41
56
  "GET /api/bookings/availability": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "provider": Schema.optionalKey(Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"]).annotate({ "default": "calendly" })), "eventTypeId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "calendarId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "timezone": Schema.optionalKey(Schema.String.annotate({ "default": "UTC" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "start": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "end": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "leadId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) })) }).fields,
42
57
  "GET /api/bookings/managed-availability": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "start": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "end": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) })) }).fields,
@@ -51,11 +66,15 @@ export const OPENAPI_INPUT_FIELDS = {
51
66
  "GET /api/bookings/outcome-reasons": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "kind": Schema.optionalKey(Schema.Literals(["lost_sale", "cancelled_call", "no_show"]).annotate({ "default": "lost_sale" })) })) }).fields,
52
67
  "GET /api/bookings/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
53
68
  "GET /api/bookings/{id}/brief": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
69
+ "GET /api/bookings/{id}/recovery": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
70
+ "POST /api/bookings/{id}/recovery/stop": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "recoveryCaseId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "outcomeVersion": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })) }) }).fields,
54
71
  "GET /api/bookings/{id}/outcome": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
55
72
  "GET /api/bookings/{id}/outcome/history": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
56
73
  "POST /api/bookings": Schema.Struct({ "body": Schema.Struct({ "leadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotAt": Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" }), "endAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "bookingTypeId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), Schema.Null]).annotate({ "format": "uuid" })), "status": Schema.optionalKey(Schema.Literals(["held", "confirmed", "cancelled", "completed", "no_show"])), "provider": Schema.optionalKey(Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"]).annotate({ "default": "manual" })), "providerEventId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "providerInviteeId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "providerVersion": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "timezone": Schema.optionalKey(Schema.String.annotate({ "default": "UTC" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "locationType": Schema.optionalKey(Schema.Union([Schema.Literals(["google_meet", "phone", "in_person", "custom"]), Schema.Null])), "locationDetails": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "rawPayload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "calendlyEventId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "calendlyInviteeId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) }).fields,
57
74
  "PATCH /api/bookings/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "slotAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "endAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "status": Schema.optionalKey(Schema.Literals(["held", "confirmed", "cancelled", "completed", "no_show"])), "provider": Schema.optionalKey(Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"])), "providerEventId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "providerInviteeId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "timezone": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "rawPayload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "calendlyEventId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])), "calendlyInviteeId": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])) }) }).fields,
58
75
  "DELETE /api/bookings/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
76
+ "POST /api/bookings/provider-requests": Schema.Struct({ "body": Schema.Struct({ "leadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "bookingTypeId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "slotId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "startsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "endsAt": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "inviteeEmail": Schema.String.annotate({ "format": "email" }), "inviteeName": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))) }) }).fields,
77
+ "GET /api/bookings/provider-requests/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
59
78
  "POST /api/bookings/{id}/outcome": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Union([Schema.Struct({ "expectedVersion": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "note": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(5000).annotate({ "expected": "a string with at most 5000 code points" })), Schema.Null])), "reportedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "status": Schema.Literal("open"), "nextFollowUpAt": Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" }), "followUpTimezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ "expected": "a string with at most 100 code points" })) }), Schema.Struct({ "expectedVersion": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "note": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(5000).annotate({ "expected": "a string with at most 5000 code points" })), Schema.Null])), "reportedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "status": Schema.Literal("won"), "amountMinor": Schema.optionalKey(Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })), Schema.Null])), "currency": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^[A-Z]{3}$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Z]{3}$" })), Schema.Null])), "closedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) }), Schema.Struct({ "expectedVersion": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "note": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(5000).annotate({ "expected": "a string with at most 5000 code points" })), Schema.Null])), "reportedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "status": Schema.Literal("lost"), "lossReasonDefinitionId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "closedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) })]) }).fields,
60
79
  "POST /api/bookings/outcome-reasons": Schema.Struct({ "body": Schema.Struct({ "bookingTypeId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), Schema.Null]).annotate({ "format": "uuid" })), "kind": Schema.Literals(["lost_sale", "cancelled_call", "no_show"]), "code": Schema.String.check(Schema.isPattern(new RegExp("^[a-z][a-z0-9_]{0,63}$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z][a-z0-9_]{0,63}$" })), "label": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" })), "displayOrder": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))) }) }).fields,
61
80
  "PATCH /api/bookings/outcome-reasons/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))), "active": Schema.optionalKey(Schema.Boolean), "displayOrder": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))) }) }).fields,
@@ -76,7 +95,7 @@ export const OPENAPI_INPUT_FIELDS = {
76
95
  "GET /api/call-events/by-lead/{leadId}": Schema.Struct({ "leadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
77
96
  "GET /api/call-events/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
78
97
  "POST /api/call-events/backfill/{bookingId}": Schema.Struct({ "bookingId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
79
- "POST /api/call-events/{id}/feedback": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "outcome": Schema.Literals(["completed", "no_show", "rescheduled", "cancelled"]), "rating": Schema.optionalKey(Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(5).annotate({ "expected": "a value less than or equal to 5" })), Schema.Null])), "notes": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(4000).annotate({ "expected": "a string with at most 4000 code points" })), Schema.Null])), "fields": Schema.optionalKey(Schema.Struct({ "wasQualified": Schema.optionalKey(Schema.Literals(["yes", "kinda", "no"])), "surprise": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "objectionHandlingAccurate": Schema.optionalKey(Schema.Boolean), "followUpNeeded": Schema.optionalKey(Schema.Boolean), "followUpNote": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) }).annotate({ "default": {} })), "rescheduledTo": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) }) }).fields,
98
+ "POST /api/call-events/{id}/feedback": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "expectedOutcomeUpdatedAt": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })), "outcome": Schema.Literals(["completed", "no_show", "rescheduled", "cancelled"]), "rating": Schema.optionalKey(Schema.Union([Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(5).annotate({ "expected": "a value less than or equal to 5" })), Schema.Null])), "notes": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(4000).annotate({ "expected": "a string with at most 4000 code points" })), Schema.Null])), "fields": Schema.optionalKey(Schema.Struct({ "wasQualified": Schema.optionalKey(Schema.Literals(["yes", "kinda", "no"])), "surprise": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "objectionHandlingAccurate": Schema.optionalKey(Schema.Boolean), "followUpNeeded": Schema.optionalKey(Schema.Boolean), "followUpNote": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) }).annotate({ "default": {} })), "rescheduledTo": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })), Schema.Null]).annotate({ "format": "date-time" })) }) }).fields,
80
99
  "POST /api/call-events/{id}/summary": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
81
100
  "POST /api/call-events/{id}/push-to-crm": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
82
101
  "POST /api/call-events/{id}/undo-outcome": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
@@ -91,10 +110,10 @@ export const OPENAPI_INPUT_FIELDS = {
91
110
  "POST /api/campaigns": Schema.Struct({ "body": Schema.Struct({ "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "description": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "graph": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "startNodeId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "nodes": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "type": Schema.Literals(["trigger", "condition", "action", "message", "booking", "wait_duration", "wait_until_time", "wait_for_event", "wait_for_reply", "wait_for_condition", "branch", "control", "stop", "handoff", "split", "exit_on"]), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "config": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "edges": Schema.optionalKey(Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "source": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "target": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "condition": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })).annotate({ "default": [] }).check(Schema.isMaxLength(200).annotate({ "expected": "a value with a length of at most 200" }))), "knowledge": Schema.optionalKey(Schema.Struct({ "offerDescription": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "priceAndPaymentFacts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "programStructure": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "bookingRules": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "faqsAndObjections": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disallowedClaims": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "resourceLinks": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "uri" }).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" })).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "exampleGoodReplies": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "sourceNotes": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "qualification": Schema.optionalKey(Schema.Struct({ "requiredFields": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disqualifiers": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "minimumScore": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "requireExplicitConsentBeforeBooking": Schema.optionalKey(Schema.Boolean), "bookingCtaLogic": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "outcomes": Schema.optionalKey(Schema.Array(Schema.Literals(["qualified", "nurture", "disqualified", "needs_human"])).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "analyticsGoal": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) })) }) }).fields,
92
111
  "POST /api/campaigns/generate": Schema.Struct({ "body": Schema.Struct({ "mode": Schema.optionalKey(Schema.Literals(["new", "guided_improvement", "improve_existing"]).annotate({ "default": "new" })), "prompt": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" })), "targetAudience": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "goal": Schema.optionalKey(Schema.Literals(["book_call", "qualify", "nurture", "recover", "reactivation", "event_webinar", "promo"])), "primaryChannel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "fallbackChannels": Schema.optionalKey(Schema.Array(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "source": Schema.optionalKey(Schema.Literals(["instagram_comments", "instagram_dm", "whatsapp", "csv_import", "webhook_crm", "broadcast"])), "sampleMessages": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "faqsAndObjections": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "pricingAndPaymentFacts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "bookingConstraints": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "complianceDisallowedClaims": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "toneExamples": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).annotate({ "default": [] }).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "existingGraph": Schema.optionalKey(Schema.Struct({ "version": Schema.Literal(1), "startNodeId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "nodes": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "type": Schema.Literals(["trigger", "condition", "action", "message", "booking", "wait_duration", "wait_until_time", "wait_for_event", "wait_for_reply", "wait_for_condition", "branch", "control", "stop", "handoff", "split", "exit_on"]), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "config": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "edges": Schema.optionalKey(Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "source": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "target": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "condition": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })).annotate({ "default": [] }).check(Schema.isMaxLength(200).annotate({ "expected": "a value with a length of at most 200" }))), "knowledge": Schema.optionalKey(Schema.Struct({ "offerDescription": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "priceAndPaymentFacts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "programStructure": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "bookingRules": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "faqsAndObjections": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disallowedClaims": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "resourceLinks": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "uri" }).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" })).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "exampleGoodReplies": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "sourceNotes": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "qualification": Schema.optionalKey(Schema.Struct({ "requiredFields": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disqualifiers": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "minimumScore": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "requireExplicitConsentBeforeBooking": Schema.optionalKey(Schema.Boolean), "bookingCtaLogic": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "outcomes": Schema.optionalKey(Schema.Array(Schema.Literals(["qualified", "nurture", "disqualified", "needs_human"])).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "analyticsGoal": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) })), "guidance": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) }) }).fields,
93
112
  "PATCH /api/campaigns/{id}/draft": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "name": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "description": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "graph": Schema.Struct({ "version": Schema.Literal(1), "startNodeId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "nodes": Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "type": Schema.Literals(["trigger", "condition", "action", "message", "booking", "wait_duration", "wait_until_time", "wait_for_event", "wait_for_reply", "wait_for_condition", "branch", "control", "stop", "handoff", "split", "exit_on"]), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "config": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) })).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "edges": Schema.optionalKey(Schema.Array(Schema.Struct({ "id": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "source": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "target": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ "expected": "a string with at most 128 code points" })), "label": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ "expected": "a string with at most 256 code points" }))), "condition": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })).annotate({ "default": [] }).check(Schema.isMaxLength(200).annotate({ "expected": "a value with a length of at most 200" }))), "knowledge": Schema.optionalKey(Schema.Struct({ "offerDescription": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "priceAndPaymentFacts": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "programStructure": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "bookingRules": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "faqsAndObjections": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disallowedClaims": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "resourceLinks": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "uri" }).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" })).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "exampleGoodReplies": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "sourceNotes": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "qualification": Schema.optionalKey(Schema.Struct({ "requiredFields": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "disqualifiers": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))), "minimumScore": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "requireExplicitConsentBeforeBooking": Schema.optionalKey(Schema.Boolean), "bookingCtaLogic": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "outcomes": Schema.optionalKey(Schema.Array(Schema.Literals(["qualified", "nurture", "disqualified", "needs_human"])).check(Schema.isMaxLength(50).annotate({ "expected": "a value with a length of at most 50" }))) })), "analyticsGoal": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) }), "expectedDraftUpdatedAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }) }).fields,
94
- "POST /api/campaigns/{id}/simulations": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "sourceKind": Schema.optionalKey(Schema.Literals(["fake_input", "seed_case", "replayed_enrollment"]).annotate({ "default": "fake_input" })), "eventType": Schema.optionalKey(Schema.Literals(["instagram_comment", "instagram_dm", "whatsapp_reply", "booking_event", "crm_event", "webhook_event", "csv_import", "manual_enrollment"]).annotate({ "default": "manual_enrollment" })), "startNodeId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "lead": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "eventPayload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "context": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "replayedEnrollmentId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "maxSteps": Schema.optionalKey(Schema.Number.annotate({ "default": 50 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) }) }).fields,
113
+ "POST /api/campaigns/{id}/simulations": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "sourceKind": Schema.optionalKey(Schema.Literals(["fake_input", "seed_case", "replayed_enrollment"]).annotate({ "default": "fake_input" })), "eventType": Schema.optionalKey(Schema.Literals(["instagram_comment", "instagram_dm", "whatsapp_reply", "booking_event", "crm_event", "webhook_event", "csv_import", "manual_enrollment"]).annotate({ "default": "manual_enrollment" })), "startNodeId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "lead": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "eventPayload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "context": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "replayedEnrollmentId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "maxSteps": Schema.optionalKey(Schema.Number.annotate({ "default": 50 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) })) }).fields,
95
114
  "POST /api/campaigns/{id}/enrollments": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "leadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }) }).fields,
96
115
  "GET /api/campaigns/{id}/enrollments": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
97
- "POST /api/campaigns/{id}/comment-simulation-suite": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "autoSend": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })) }) }).fields,
116
+ "POST /api/campaigns/{id}/comment-simulation-suite": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "autoSend": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })) })) }).fields,
98
117
  "POST /api/campaigns/{id}/publish": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
99
118
  "POST /api/campaigns/{id}/status": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "status": Schema.Literals(["archived", "paused", "published"]) }) }).fields,
100
119
  "POST /api/campaigns/{id}/duplicate": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
@@ -103,36 +122,37 @@ export const OPENAPI_INPUT_FIELDS = {
103
122
  "GET /api/broadcasts": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.Literals(["draft", "previewed", "approved", "running", "paused", "cancelled", "completed", "failed"])) })) }).fields,
104
123
  "GET /api/broadcasts/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
105
124
  "POST /api/broadcasts": Schema.Struct({ "body": Schema.Struct({ "campaignId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "name": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "segment": Schema.optionalKey(Schema.Struct({ "mode": Schema.optionalKey(Schema.Literals(["all", "any"]).annotate({ "default": "all" })), "rules": Schema.optionalKey(Schema.Array(Schema.Struct({ "field": Schema.Literals(["channel", "tags", "stage", "score", "sourceCampaignId", "sourceTrigger", "lastMessageAt", "lastReplyAt", "bookingStatus", "crmField", "consent", "timezone", "localTime", "blacklisted"]), "operator": Schema.Literals(["equals", "not_equals", "contains", "not_contains", "in", "not_in", "greater_than", "less_than", "before", "after", "exists", "missing"]), "value": Schema.optionalKey(Schema.Json.annotate({ "expected": "JSON value" })), "path": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) }))), "groups": Schema.optionalKey(Schema.Array(Schema.Struct({ "mode": Schema.optionalKey(Schema.Literals(["all", "any"]).annotate({ "default": "all" })), "rules": Schema.optionalKey(Schema.Array(Schema.Struct({ "field": Schema.Literals(["channel", "tags", "stage", "score", "sourceCampaignId", "sourceTrigger", "lastMessageAt", "lastReplyAt", "bookingStatus", "crmField", "consent", "timezone", "localTime", "blacklisted"]), "operator": Schema.Literals(["equals", "not_equals", "contains", "not_contains", "in", "not_in", "greater_than", "less_than", "before", "after", "exists", "missing"]), "value": Schema.optionalKey(Schema.Json.annotate({ "expected": "JSON value" })), "path": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })).annotate({ "default": [] })) }))), "channel": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channels": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })))), "stage": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "stages": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })))), "tagsAny": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })))), "tagsAll": Schema.optionalKey(Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })))), "minScore": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" }))), "maxScore": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" }))), "includeLeadIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })))), "excludeLeadIds": Schema.optionalKey(Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })))), "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(5000).annotate({ "expected": "a value less than or equal to 5000" }))) }).annotate({ "default": {} })), "personalizationMode": Schema.optionalKey(Schema.Literals(["same_message", "personalized_light", "personalized_ai"]).annotate({ "default": "personalized_light" })), "canarySize": Schema.optionalKey(Schema.Number.annotate({ "default": 10 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "batchSize": Schema.optionalKey(Schema.Number.annotate({ "default": 100 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(500).annotate({ "expected": "a value less than or equal to 500" }))) }) }).fields,
106
- "POST /api/broadcasts/{id}/preview": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "sampleSize": Schema.optionalKey(Schema.Number.annotate({ "default": 3 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(20).annotate({ "expected": "a value less than or equal to 20" }))) }) }).fields,
125
+ "POST /api/broadcasts/{id}/preview": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "sampleSize": Schema.optionalKey(Schema.Number.annotate({ "default": 3 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(20).annotate({ "expected": "a value less than or equal to 20" }))) })) }).fields,
107
126
  "POST /api/broadcasts/{id}/approve": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "previewVersion": Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" })) }) }).fields,
108
127
  "POST /api/broadcasts/{id}/launch": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
109
- "POST /api/broadcasts/{id}/pause": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) }) }).fields,
110
- "POST /api/broadcasts/{id}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "failedOnly": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })) }) }).fields,
111
- "POST /api/broadcasts/{id}/cancel": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) }) }).fields,
128
+ "POST /api/broadcasts/{id}/pause": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
129
+ "POST /api/broadcasts/{id}/retry": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "failedOnly": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })) })) }).fields,
130
+ "POST /api/broadcasts/{id}/cancel": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
112
131
  "GET /api/webhook-events": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "type": Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"]), "limit": Schema.optionalKey(Schema.Number.annotate({ "default": 3 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(25).annotate({ "expected": "a value less than or equal to 25" }))) })) }).fields,
113
132
  "GET /api/webhook-subscriptions": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "includeHealth": Schema.optionalKey(Schema.Literals(["true", "false"]).annotate({ "default": "true" })) })) }).fields,
114
133
  "POST /api/webhook-subscriptions": Schema.Struct({ "body": Schema.Struct({ "targetUrl": Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" })), "eventTypes": Schema.Array(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "workspaceScoped": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })), "consumerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "expiresAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }) }).fields,
115
- "PATCH /api/webhook-subscriptions/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "targetUrl": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))), "eventTypes": Schema.optionalKey(Schema.Array(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.Literals(["active", "paused", "disabled"])), "consumerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) }) }).fields,
134
+ "PATCH /api/webhook-subscriptions/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "targetUrl": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))), "eventTypes": Schema.optionalKey(Schema.Array(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "status": Schema.optionalKey(Schema.Literals(["active", "paused", "disabled"])), "consumerMetadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) })) }).fields,
116
135
  "DELETE /api/webhook-subscriptions/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
117
- "POST /api/webhook-subscriptions/test-delivery": Schema.Struct({ "body": Schema.Struct({ "type": Schema.optionalKey(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"]).annotate({ "default": "lead.created" })), "data": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) }) }).fields,
136
+ "POST /api/webhook-subscriptions/test-delivery": Schema.Struct({ "body": Schema.optionalKey(Schema.Struct({ "type": Schema.optionalKey(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"]).annotate({ "default": "lead.created" })), "data": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) })) }).fields,
118
137
  "GET /api/webhook-subscriptions/deliveries": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) })) }).fields,
119
138
  "GET /api/webhook-subscriptions/signature-guide": Schema.Struct({}).fields,
120
139
  "POST /api/webhook-subscriptions/deliveries/{deliveryId}/replay": Schema.Struct({ "deliveryId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
121
- "POST /api/webhook-subscriptions/events/{eventId}/replay": Schema.Struct({ "eventId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "body": Schema.Struct({ "subscriptionId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) }) }).fields,
122
- "POST /api/webhook-subscriptions/events/replay": Schema.Struct({ "body": Schema.Struct({ "eventTypes": Schema.optionalKey(Schema.Array(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "from": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "to": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "limit": Schema.optionalKey(Schema.Number.annotate({ "default": 100 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) }) }).fields,
140
+ "POST /api/webhook-subscriptions/events/{eventId}/replay": Schema.Struct({ "eventId": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "body": Schema.optionalKey(Schema.Struct({ "subscriptionId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))) })) }).fields,
141
+ "POST /api/webhook-subscriptions/events/replay": Schema.Struct({ "body": Schema.optionalKey(Schema.Struct({ "eventTypes": Schema.optionalKey(Schema.Array(Schema.Literals(["lead.created", "lead.updated", "lead.qualified", "lead.stage_changed", "message.received", "message.draft_created", "message.sent", "review.created", "review.approved", "review.rejected", "booking.created", "booking.updated", "booking.cancelled", "campaign.enrolled", "campaign.completed", "campaign.failed", "broadcast.started", "broadcast.completed", "broadcast.paused", "broadcast.failed", "crm.sync_failed", "integration.connection_health_changed"])).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "from": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "to": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "limit": Schema.optionalKey(Schema.Number.annotate({ "default": 100 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))) })) }).fields,
123
142
  "GET /api/integrations/connectors": Schema.Struct({}).fields,
124
143
  "GET /api/integrations/crm/connections": Schema.Struct({}).fields,
125
144
  "GET /api/integrations/crm/providers/{provider}/oauth-url": Schema.Struct({ "provider": Schema.Literals(["gohighlevel", "hubspot", "activecampaign", "salesforce", "pipedrive"]), "query": Schema.optionalKey(Schema.Struct({ "redirectUri": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))), "locationId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
126
145
  "POST /api/integrations/crm/oauth/callback": Schema.Struct({ "body": Schema.Struct({ "provider": Schema.Literals(["gohighlevel", "hubspot", "activecampaign", "salesforce", "pipedrive"]), "code": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "state": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "redirectUri": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))) }) }).fields,
127
146
  "POST /api/integrations/crm/connections": Schema.Struct({ "body": Schema.Struct({ "provider": Schema.Literals(["gohighlevel", "hubspot", "activecampaign", "salesforce", "pipedrive"]), "credentialsRef": Schema.String.check(Schema.isPattern(new RegExp("^v1\\.[A-Za-z0-9+/]{16}\\.[A-Za-z0-9+/]{22,}={0,2}$", "u")).annotate({ "expected": "a string matching the RegExp ^v1\\.[A-Za-z0-9+/]{16}\\.[A-Za-z0-9+/]{22,}={0,2}$" })), "settings": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) }) }).fields,
128
147
  "GET /api/integrations/crm/connections/{id}/schema": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
148
+ "POST /api/integrations/crm/connections/{id}/disconnect": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
129
149
  "POST /api/integrations/crm/connections/{id}/health": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
130
- "POST /api/integrations/crm/connections/{id}/webhooks/setup": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "enabled": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })), "targetUrl": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))) }) }).fields,
150
+ "POST /api/integrations/crm/connections/{id}/webhooks/setup": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "enabled": Schema.optionalKey(Schema.Boolean.annotate({ "default": true })), "targetUrl": Schema.optionalKey(Schema.String.annotate({ "format": "uri" }).check(Schema.isPattern(new RegExp("^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$", "u")).annotate({ "expected": "a string matching the RegExp ^[A-Za-z][A-Za-z0-9+.-]*:[^\\s]+$" }))) })) }).fields,
131
151
  "POST /api/integrations/crm/connections/{id}/mappings/suggest": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
132
152
  "PUT /api/integrations/crm/connections/{id}/mappings": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "mappings": Schema.Array(Schema.Struct({ "lucaField": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "providerField": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "direction": Schema.Literals(["luca_to_crm", "crm_to_luca", "bidirectional"]), "transform": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })), "dangerous": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })) })) }) }).fields,
133
- "POST /api/integrations/crm/connections/{id}/sync-runs": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "mode": Schema.optionalKey(Schema.Literals(["dry_run", "live"]).annotate({ "default": "dry_run" })), "direction": Schema.optionalKey(Schema.Literals(["luca_to_crm", "crm_to_luca", "bidirectional"]).annotate({ "default": "bidirectional" })) }) }).fields,
153
+ "POST /api/integrations/crm/connections/{id}/sync-runs": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "mode": Schema.optionalKey(Schema.Literals(["dry_run", "live"]).annotate({ "default": "dry_run" })), "direction": Schema.optionalKey(Schema.Literals(["luca_to_crm", "crm_to_luca", "bidirectional"]).annotate({ "default": "bidirectional" })) })) }).fields,
134
154
  "GET /api/integrations/crm/connections/{id}/sync-runs": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
135
- "POST /api/integrations/crm/webhooks/{provider}": Schema.Struct({ "provider": Schema.Literals(["gohighlevel", "hubspot", "activecampaign", "salesforce", "pipedrive"]), "body": Schema.Struct({ "eventId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "eventType": Schema.optionalKey(Schema.String.annotate({ "default": "crm.contact.updated" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "resourceType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "resourceId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "payload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) }) }).fields,
155
+ "POST /api/integrations/crm/webhooks/{provider}": Schema.Struct({ "provider": Schema.Literals(["gohighlevel", "hubspot", "activecampaign", "salesforce", "pipedrive"]), "body": Schema.optionalKey(Schema.Struct({ "eventId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "eventType": Schema.optionalKey(Schema.String.annotate({ "default": "crm.contact.updated" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "resourceType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "resourceId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "payload": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" })).annotate({ "default": {} })) })) }).fields,
136
156
  "GET /api/integrations/events": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(100).annotate({ "expected": "a value less than or equal to 100" }))), "cursor": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "source": Schema.optionalKey(Schema.Literals(["webhook", "zapier", "make", "crm", "api", "worker"])) })) }).fields,
137
157
  "GET /api/voice/profile": Schema.Struct({}).fields,
138
158
  "GET /api/voice": Schema.Struct({}).fields,
@@ -151,6 +171,7 @@ export const OPENAPI_INPUT_FIELDS = {
151
171
  "GET /api/channels/catalog": Schema.Struct({}).fields,
152
172
  "GET /api/channels/features": Schema.Struct({}).fields,
153
173
  "GET /api/channels/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
174
+ "PATCH /api/channels/{id}/auto-send": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "enabled": Schema.Boolean }) }).fields,
154
175
  "GET /api/reports/morning": Schema.Struct({}).fields,
155
176
  "GET /api/reports/scorecard": Schema.Struct({}).fields,
156
177
  "GET /api/insights/unread-count": Schema.Struct({}).fields,
@@ -172,16 +193,16 @@ export const OPENAPI_INPUT_FIELDS = {
172
193
  "POST /api/knowledge/sources/{id}/sync": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
173
194
  "DELETE /api/knowledge/sources/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
174
195
  "GET /api/memory": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "scope": Schema.optionalKey(Schema.Literals(["all", "coach", "lead"]).annotate({ "default": "all" })), "source": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ "expected": "a string with at most 80 code points" }))), "q": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" }))), "leadId": Schema.optionalKey(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))), "archived": Schema.optionalKey(Schema.Literals(["all", "active", "archived"])), "state": Schema.optionalKey(Schema.Literals(["active", "archived", "disputed", "superseded", "all"]).annotate({ "default": "active" })), "trustLevel": Schema.optionalKey(Schema.Literals(["manual", "trusted_pipeline", "inferred", "disputed"])) })) }).fields,
175
- "PATCH /api/memory/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "content": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "source": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ "expected": "a string with at most 80 code points" }))), "sourceRefId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), Schema.Null])), "confidence": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1).annotate({ "expected": "a value less than or equal to 1" }))), "metadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "createdByType": Schema.optionalKey(Schema.Literals(["coach", "agent", "system"])), "createdById": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), Schema.Null])), "evidence": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "trustLevel": Schema.optionalKey(Schema.Literals(["manual", "trusted_pipeline", "inferred", "disputed"])), "restore": Schema.optionalKey(Schema.Boolean), "disputed": Schema.optionalKey(Schema.Boolean), "disputedReason": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), Schema.Null])), "preferred": Schema.optionalKey(Schema.Boolean), "expectedUpdatedAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) }) }).fields,
196
+ "PATCH /api/memory/{id}": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "content": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))), "source": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ "expected": "a string with at most 80 code points" }))), "sourceRefId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), Schema.Null])), "confidence": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1).annotate({ "expected": "a value less than or equal to 1" }))), "metadata": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "createdByType": Schema.optionalKey(Schema.Literals(["coach", "agent", "system"])), "createdById": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ "expected": "a string with at most 200 code points" })), Schema.Null])), "reason": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), Schema.Null])), "evidence": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))), "trustLevel": Schema.optionalKey(Schema.Literals(["manual", "trusted_pipeline", "inferred", "disputed"])), "restore": Schema.optionalKey(Schema.Boolean), "disputed": Schema.optionalKey(Schema.Boolean), "disputedReason": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" })), Schema.Null])), "preferred": Schema.optionalKey(Schema.Boolean), "expectedUpdatedAt": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) })) }).fields,
176
197
  "POST /api/memory/bulk": Schema.Struct({ "body": Schema.Struct({ "action": Schema.Literals(["archive", "restore"]), "ids": Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })) }) }).fields,
177
198
  "POST /api/cadences/rescue": Schema.Struct({ "body": Schema.Struct({ "leadIds": Schema.Array(Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" }))).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "cadenceTemplate": Schema.optionalKey(Schema.Literals(["light", "standard", "aggressive"])) }) }).fields,
178
- "POST /api/leads/{id}/cadence/pause": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) }) }).fields,
199
+ "POST /api/leads/{id}/cadence/pause": Schema.Struct({ "id": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })), "body": Schema.optionalKey(Schema.Struct({ "reason": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(500).annotate({ "expected": "a string with at most 500 code points" }))) })) }).fields,
179
200
  "GET /api/analytics/lead-score/{leadId}": Schema.Struct({ "leadId": Schema.String.annotate({ "format": "uuid" }).check(Schema.isPattern(new RegExp("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", "u")).annotate({ "expected": "a string matching the RegExp ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" })) }).fields,
180
201
  "GET /api/analytics/funnel": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])) })) }).fields,
181
202
  "GET /api/analytics/revenue": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])) })) }).fields,
182
203
  "GET /api/analytics/speed-impact": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])) })) }).fields,
183
204
  "GET /api/analytics/forecast": Schema.Struct({}).fields,
184
- "GET /api/analytics/call-intelligence": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "start": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "end": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) })) }).fields,
205
+ "GET /api/analytics/call-intelligence": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "start": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "end": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])) })) }).fields,
185
206
  "GET /api/analytics/call-intelligence/calls": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" }))) })) }).fields,
186
207
  "GET /api/analytics/learning-insights": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "start": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))), "end": Schema.optionalKey(Schema.String.annotate({ "format": "date-time" }).check(Schema.isPattern(new RegExp("^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$", "u")).annotate({ "expected": "a string matching the RegExp ^(?:\\d{4}-(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|\\d{4}-(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|\\d{4}-02-(?:0[1-9]|1\\d|2[0-8])|(?:\\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00)-02-29)T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$" }))) })) }).fields,
187
208
  "GET /api/analytics/crm-sync-health": Schema.Struct({}).fields,