@setluca/mcp 0.5.1 → 0.6.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.
@@ -6,7 +6,7 @@ import * as Schema from "effect/Schema";
6
6
  */
7
7
  export const OPENAPI_INPUT_FIELDS = {
8
8
  "GET /api/capabilities": Schema.Struct({}).fields,
9
- "GET /api/leads": 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"])), "q": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
9
+ "GET /api/leads": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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"])), "q": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
10
10
  "GET /api/leads/field-definitions": Schema.Struct({}).fields,
11
11
  "POST /api/leads/field-definitions": Schema.Struct({ "body": Schema.Struct({ "key": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isPattern(new RegExp("^[a-z][a-z0-9_]*$", "u")).annotate({ "expected": "a string matching the RegExp ^[a-z][a-z0-9_]*$" })), "label": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "type": Schema.optionalKey(Schema.Literals(["text", "number", "boolean", "date", "select"]).annotate({ "default": "text" })), "options": Schema.optionalKey(Schema.Record(Schema.String, Schema.Json.annotate({ "expected": "JSON value" }))) }) }).fields,
12
12
  "POST /api/leads/imports/preview": Schema.Struct({ "body": Schema.Struct({ "source": Schema.optionalKey(Schema.String.annotate({ "default": "csv_import" }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "rows": Schema.Array(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(1000).annotate({ "expected": "a value with a length of at most 1000" })), "mapping": Schema.Struct({ "identity": Schema.Struct({ "channelColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channelDefault": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "externalUserIdColumn": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "displayNameColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) }), "tagsColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "tagsDelimiter": Schema.optionalKey(Schema.String.annotate({ "default": "," }).check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4).annotate({ "expected": "a string with at most 4 code points" }))), "stageColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "customFields": Schema.optionalKey(Schema.Record(Schema.String, Schema.String)), "identities": Schema.optionalKey(Schema.Array(Schema.Struct({ "channelColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channelDefault": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "externalUserIdColumn": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "displayNameColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "verificationStatus": Schema.optionalKey(Schema.Literals(["inferred", "claimed", "verified", "rejected"]).annotate({ "default": "claimed" })), "source": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })).annotate({ "default": [] }).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" }))), "consents": Schema.optionalKey(Schema.Array(Schema.Struct({ "channelColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "channelDefault": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "purpose": Schema.Literals(["booking_reminders", "marketing", "sales_follow_up", "support"]), "grantedColumn": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "evidenceColumn": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "source": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })).annotate({ "default": [] }).check(Schema.isMaxLength(20).annotate({ "expected": "a value with a length of at most 20" }))) }) }) }).fields,
@@ -23,21 +23,21 @@ export const OPENAPI_INPUT_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
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
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,
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.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,
27
27
  "GET /api/conversations/summary": Schema.Struct({}).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,
28
+ "GET /api/conversations": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
29
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,
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,
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.Int.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,
31
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,
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,
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.Int.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.Int.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.Int.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.Int.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,
33
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
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
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
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,
37
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,
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,
38
+ "GET /api/review-queue": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
39
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,
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,
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.Int.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.Int.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.Int.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.Int.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
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
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,
43
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,
@@ -52,9 +52,9 @@ export const OPENAPI_INPUT_FIELDS = {
52
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
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
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,
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,
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,
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,
55
+ "GET /api/bookings": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
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({ "description": "Start of the time range, inclusive. Defaults to now.", "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({ "description": "End of the time range, exclusive. Defaults to 7 days after start.", "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,
57
+ "GET /api/bookings/managed-availability": Schema.Struct({ "query": 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({ "description": "Start of the time range, inclusive. Defaults to now.", "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({ "description": "End of the time range, exclusive. Defaults to 7 days after start.", "format": "date-time" })) }) }).fields,
58
58
  "GET /api/bookings/types": Schema.Struct({}).fields,
59
59
  "GET /api/bookings/types/{id}/schedule": 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,
60
60
  "GET /api/bookings/types/{id}/attendees": 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,
@@ -67,7 +67,7 @@ export const OPENAPI_INPUT_FIELDS = {
67
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,
68
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
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,
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.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })) }) }).fields,
71
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,
72
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,
73
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,
@@ -75,17 +75,17 @@ export const OPENAPI_INPUT_FIELDS = {
75
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
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
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,
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,
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,
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,
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.Int.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.Int.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.Int.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.Int.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,
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.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))) }) }).fields,
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.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))) }) }).fields,
81
81
  "POST /api/bookings/{id}/lifecycle-resolution": 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({ "status": Schema.Literals(["confirmed", "cancelled", "completed", "no_show"]), "reason": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) }), Schema.Struct({ "action": Schema.Literal("dismiss_duplicate"), "reason": Schema.optionalKey(Schema.String.check(Schema.isMaxCodePoints(2000).annotate({ "expected": "a string with at most 2000 code points" }))) })]) }).fields,
82
82
  "POST /api/bookings/{id}/provider-sync/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}$" })) }).fields,
83
- "POST /api/bookings/{id}/guest-links": 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({ "expiresInHours": Schema.optionalKey(Schema.Number.annotate({ "default": 168 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(720).annotate({ "expected": "a value less than or equal to 720" }))) }) }).fields,
83
+ "POST /api/bookings/{id}/guest-links": 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({ "expiresInHours": Schema.optionalKey(Schema.Finite.annotate({ "default": 168 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(720).annotate({ "expected": "a value less than or equal to 720" }))) }) }).fields,
84
84
  "DELETE /api/bookings/{id}/guest-links": 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,
85
- "POST /api/bookings/types": Schema.Struct({ "body": Schema.Struct({ "provider": Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"]), "externalId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "name": 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.annotate({ "default": true })), "isDefault": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })), "durationMinutes": Schema.optionalKey(Schema.Number.annotate({ "default": 30 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(5).annotate({ "expected": "a value greater than or equal to 5" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "minimumNoticeMinutes": Schema.optionalKey(Schema.Number.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(525600).annotate({ "expected": "a value less than or equal to 525600" }))), "bookingHorizonDays": Schema.optionalKey(Schema.Number.annotate({ "default": 60 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(730).annotate({ "expected": "a value less than or equal to 730" }))), "bufferBeforeMinutes": Schema.optionalKey(Schema.Number.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "bufferAfterMinutes": Schema.optionalKey(Schema.Number.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "location": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("google_meet") }), Schema.Struct({ "type": Schema.Literal("phone"), "phoneNumber": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("in_person"), "address": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("custom"), "instructions": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "default": { "type": "google_meet" } })), "destinationCalendarId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "guestPolicy": Schema.optionalKey(Schema.Struct({ "allowCancellation": Schema.optionalKey(Schema.Boolean) }).annotate({ "default": {} })), "agentPolicy": Schema.optionalKey(Schema.Struct({ "leadCanCancel": Schema.optionalKey(Schema.Boolean), "leadCanReschedule": Schema.optionalKey(Schema.Boolean), "cancelMinimumNoticeMinutes": 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" }))), "rescheduleMinimumNoticeMinutes": 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" }))), "reminderOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryEnabled": Schema.optionalKey(Schema.Boolean), "noShowRecoveryMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "cancellationReasonMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])) }).annotate({ "default": {} })) }) }).fields,
86
- "PATCH /api/bookings/types/{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({ "provider": Schema.optionalKey(Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"])), "externalId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "name": 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), "isDefault": Schema.optionalKey(Schema.Boolean), "durationMinutes": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(5).annotate({ "expected": "a value greater than or equal to 5" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "timezone": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "minimumNoticeMinutes": 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" })).check(Schema.isLessThanOrEqualTo(525600).annotate({ "expected": "a value less than or equal to 525600" }))), "bookingHorizonDays": 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(730).annotate({ "expected": "a value less than or equal to 730" }))), "bufferBeforeMinutes": 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" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "bufferAfterMinutes": 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" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "location": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("google_meet") }), Schema.Struct({ "type": Schema.Literal("phone"), "phoneNumber": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("in_person"), "address": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("custom"), "instructions": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })])), "destinationCalendarId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "guestPolicy": Schema.optionalKey(Schema.Struct({ "allowCancellation": Schema.optionalKey(Schema.Boolean) })), "agentPolicy": Schema.optionalKey(Schema.Struct({ "leadCanCancel": Schema.optionalKey(Schema.Boolean), "leadCanReschedule": Schema.optionalKey(Schema.Boolean), "cancelMinimumNoticeMinutes": 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" }))), "rescheduleMinimumNoticeMinutes": 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" }))), "reminderOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryEnabled": Schema.optionalKey(Schema.Boolean), "noShowRecoveryMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "cancellationReasonMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])) })) }) }).fields,
85
+ "POST /api/bookings/types": Schema.Struct({ "body": Schema.Struct({ "provider": Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"]), "externalId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "name": 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.annotate({ "default": true })), "isDefault": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })), "durationMinutes": Schema.optionalKey(Schema.Finite.annotate({ "default": 30 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(5).annotate({ "expected": "a value greater than or equal to 5" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "minimumNoticeMinutes": Schema.optionalKey(Schema.Finite.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(525600).annotate({ "expected": "a value less than or equal to 525600" }))), "bookingHorizonDays": Schema.optionalKey(Schema.Finite.annotate({ "default": 60 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(730).annotate({ "expected": "a value less than or equal to 730" }))), "bufferBeforeMinutes": Schema.optionalKey(Schema.Finite.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "bufferAfterMinutes": Schema.optionalKey(Schema.Finite.annotate({ "default": 0 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "location": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("google_meet") }), Schema.Struct({ "type": Schema.Literal("phone"), "phoneNumber": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("in_person"), "address": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("custom"), "instructions": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })]).annotate({ "default": { "type": "google_meet" } })), "destinationCalendarId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "guestPolicy": Schema.optionalKey(Schema.Struct({ "allowCancellation": Schema.optionalKey(Schema.Boolean) }).annotate({ "default": {} })), "agentPolicy": Schema.optionalKey(Schema.Struct({ "leadCanCancel": Schema.optionalKey(Schema.Boolean), "leadCanReschedule": Schema.optionalKey(Schema.Boolean), "cancelMinimumNoticeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "rescheduleMinimumNoticeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "reminderOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryEnabled": Schema.optionalKey(Schema.Boolean), "noShowRecoveryMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "cancellationReasonMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])) }).annotate({ "default": {} })) }) }).fields,
86
+ "PATCH /api/bookings/types/{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({ "provider": Schema.optionalKey(Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"])), "externalId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "name": 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), "isDefault": Schema.optionalKey(Schema.Boolean), "durationMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(5).annotate({ "expected": "a value greater than or equal to 5" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "timezone": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "minimumNoticeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(525600).annotate({ "expected": "a value less than or equal to 525600" }))), "bookingHorizonDays": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(730).annotate({ "expected": "a value less than or equal to 730" }))), "bufferBeforeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "bufferAfterMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" }))), "location": Schema.optionalKey(Schema.Union([Schema.Struct({ "type": Schema.Literal("google_meet") }), Schema.Struct({ "type": Schema.Literal("phone"), "phoneNumber": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("in_person"), "address": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) }), Schema.Struct({ "type": Schema.Literal("custom"), "instructions": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })) })])), "destinationCalendarId": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "guestPolicy": Schema.optionalKey(Schema.Struct({ "allowCancellation": Schema.optionalKey(Schema.Boolean) })), "agentPolicy": Schema.optionalKey(Schema.Struct({ "leadCanCancel": Schema.optionalKey(Schema.Boolean), "leadCanReschedule": Schema.optionalKey(Schema.Boolean), "cancelMinimumNoticeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "rescheduleMinimumNoticeMinutes": Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" }))), "reminderOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "bookingLinkFollowUpMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryEnabled": Schema.optionalKey(Schema.Boolean), "noShowRecoveryMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])), "noShowRecoveryOffsetsMinutes": Schema.optionalKey(Schema.Array(Schema.Int.check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" })))), "cancellationReasonMode": Schema.optionalKey(Schema.Literals(["off", "review_first", "auto_send"])) })) }) }).fields,
87
87
  "DELETE /api/bookings/types/{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,
88
- "PUT /api/bookings/types/{id}/schedule": 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({ "rules": Schema.Array(Schema.Struct({ "weekday": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(6).annotate({ "expected": "a value less than or equal to 6" })), "startMinute": Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1439).annotate({ "expected": "a value less than or equal to 1439" })), "endMinute": 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(1440).annotate({ "expected": "a value less than or equal to 1440" })) })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "overrides": Schema.Array(Schema.Struct({ "localDate": Schema.String.annotate({ "format": "date" }), "available": Schema.Boolean, "startMinute": 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" })).check(Schema.isLessThanOrEqualTo(1439).annotate({ "expected": "a value less than or equal to 1439" })), Schema.Null])), "endMinute": 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(1440).annotate({ "expected": "a value less than or equal to 1440" })), Schema.Null])) })).check(Schema.isMaxLength(366).annotate({ "expected": "a value with a length of at most 366" })) }) }).fields,
88
+ "PUT /api/bookings/types/{id}/schedule": 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({ "rules": Schema.Array(Schema.Struct({ "weekday": Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(6).annotate({ "expected": "a value less than or equal to 6" })), "startMinute": Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1439).annotate({ "expected": "a value less than or equal to 1439" })), "endMinute": Schema.Int.check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" })) })).check(Schema.isMaxLength(100).annotate({ "expected": "a value with a length of at most 100" })), "overrides": Schema.Array(Schema.Struct({ "localDate": Schema.String.annotate({ "format": "date" }), "available": Schema.Boolean, "startMinute": Schema.optionalKey(Schema.Union([Schema.Int.check(Schema.isGreaterThanOrEqualTo(0).annotate({ "expected": "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(1439).annotate({ "expected": "a value less than or equal to 1439" })), Schema.Null])), "endMinute": Schema.optionalKey(Schema.Union([Schema.Int.check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(1440).annotate({ "expected": "a value less than or equal to 1440" })), Schema.Null])) })).check(Schema.isMaxLength(366).annotate({ "expected": "a value with a length of at most 366" })) }) }).fields,
89
89
  "POST /api/bookings/types/{id}/attendees": 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({ "email": Schema.String.annotate({ "format": "email" }), "name": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), Schema.Null])), "optional": Schema.optionalKey(Schema.Boolean.annotate({ "default": false })) }) }).fields,
90
90
  "DELETE /api/bookings/types/{id}/attendees/{attendeeId}": 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}$" })), "attendeeId": 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
91
  "PUT /api/bookings/calendars": Schema.Struct({ "body": Schema.Struct({ "provider": Schema.Literals(["manual", "calendly", "cal_com", "google_calendar", "iclosed", "gohighlevel"]), "calendarId": 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" })), "timezone": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "accessRole": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })), "conflictEnabled": Schema.Boolean, "defaultDestination": Schema.Boolean }) }).fields,
@@ -95,50 +95,50 @@ export const OPENAPI_INPUT_FIELDS = {
95
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,
96
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,
97
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,
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,
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.Int.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,
99
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,
100
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,
101
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,
102
102
  "PUT /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}$" })), "body": Schema.Struct({ "summary": Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(8000).annotate({ "expected": "a string with at most 8000 code points" })) }) }).fields,
103
- "GET /api/campaigns": 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", "published", "paused", "archived"])) })) }).fields,
104
- "GET /api/campaigns/comment-events": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "campaignId": 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}$" }))), "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(["matched", "suppressed", "blocked", "pending_review", "sent", "failed", "enrolled", "replayed", "resolved"])), "sourceType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "tokenState": Schema.optionalKey(Schema.Literals(["valid", "expired", "missing_scope", "unknown"])), "providerHealth": Schema.optionalKey(Schema.Literals(["green", "yellow", "red", "unknown"])), "repairState": 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" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))), "limit": 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,
103
+ "GET /api/campaigns": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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", "published", "paused", "archived"])) })) }).fields,
104
+ "GET /api/campaigns/comment-events": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "campaignId": 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}$" }))), "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(["matched", "suppressed", "blocked", "pending_review", "sent", "failed", "enrolled", "replayed", "resolved"])), "sourceType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "tokenState": Schema.optionalKey(Schema.Literals(["valid", "expired", "missing_scope", "unknown"])), "providerHealth": Schema.optionalKey(Schema.Literals(["green", "yellow", "red", "unknown"])), "repairState": 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" })).check(Schema.isMaxCodePoints(120).annotate({ "expected": "a string with at most 120 code points" }))), "limit": Schema.optionalKey(Schema.Finite.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,
105
105
  "GET /api/campaigns/{id}/provider-capabilities": 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,
106
106
  "GET /api/campaigns/{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,
107
107
  "GET /api/campaigns/{id}/analytics": 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({ "since": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "until": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
108
- "GET /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}$" })), "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,
108
+ "GET /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}$" })), "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
109
109
  "GET /api/campaigns/{id}/simulations/{simulationId}": 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}$" })), "simulationId": 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,
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,
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,
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,
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,
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.Finite.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,
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.Finite.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,
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.Finite.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,
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.Finite.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,
114
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,
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,
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.Int.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,
116
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,
117
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,
118
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,
119
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,
120
120
  "GET /api/campaigns/{id}/versions": 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,
121
121
  "GET /api/campaigns/{id}/enrollments/{enrollmentId}/timeline": 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}$" })), "enrollmentId": 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
- "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,
122
+ "GET /api/broadcasts": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
123
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,
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,
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,
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.Int), "maxScore": Schema.optionalKey(Schema.Int), "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.Int.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.Finite.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.Finite.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,
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.Finite.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,
126
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,
127
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,
128
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
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
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,
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,
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,
131
+ "GET /api/webhook-events": Schema.Struct({ "query": 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.Finite.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,
132
+ "GET /api/webhook-subscriptions": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
133
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,
134
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,
135
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,
136
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,
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,
137
+ "GET /api/webhook-subscriptions/deliveries": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
138
138
  "GET /api/webhook-subscriptions/signature-guide": Schema.Struct({}).fields,
139
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,
140
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,
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.Finite.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,
142
142
  "GET /api/integrations/connectors": Schema.Struct({}).fields,
143
143
  "GET /api/integrations/crm/connections": Schema.Struct({}).fields,
144
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,
@@ -153,7 +153,7 @@ export const OPENAPI_INPUT_FIELDS = {
153
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,
154
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,
155
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,
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,
156
+ "GET /api/integrations/events": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
157
157
  "GET /api/voice/profile": Schema.Struct({}).fields,
158
158
  "GET /api/voice": Schema.Struct({}).fields,
159
159
  "GET /api/coaches/me": Schema.Struct({}).fields,
@@ -163,7 +163,7 @@ export const OPENAPI_INPUT_FIELDS = {
163
163
  "GET /api/coaches/post-call-settings": Schema.Struct({}).fields,
164
164
  "GET /api/coaches/post-call-crm-mapping": Schema.Struct({}).fields,
165
165
  "GET /api/coaches/post-call-deal-sync": Schema.Struct({}).fields,
166
- "GET /api/audit-log": 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" }))), "actorType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "action": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "actionPrefix": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "targetType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "targetId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
166
+ "GET /api/audit-log": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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" }))), "actorType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "action": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "actionPrefix": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "targetType": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "targetId": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
167
167
  "GET /api/usage": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "since": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))) })) }).fields,
168
168
  "GET /api/usage/messages": Schema.Struct({}).fields,
169
169
  "GET /api/account-safety": Schema.Struct({}).fields,
@@ -179,21 +179,20 @@ export const OPENAPI_INPUT_FIELDS = {
179
179
  "POST /api/insights/{id}/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}$" })) }).fields,
180
180
  "POST /api/insights/{id}/action": 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,
181
181
  "GET /api/insights/settings": Schema.Struct({}).fields,
182
- "PUT /api/insights/settings": Schema.Struct({ "body": Schema.Struct({ "feedEnabled": Schema.optionalKey(Schema.Boolean), "digestEnabled": Schema.optionalKey(Schema.Boolean), "pushEnabled": Schema.optionalKey(Schema.Boolean), "toggles": Schema.optionalKey(Schema.Struct({ "metric_drop": Schema.optionalKey(Schema.Boolean), "metric_spike": Schema.optionalKey(Schema.Boolean), "opportunity": Schema.optionalKey(Schema.Boolean), "milestone": Schema.optionalKey(Schema.Boolean), "risk": Schema.optionalKey(Schema.Boolean) })), "thresholds": Schema.optionalKey(Schema.Struct({ "show_rate_drop": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-1).annotate({ "expected": "a value greater than or equal to -1" })).check(Schema.isLessThan(0).annotate({ "expected": "a value less than 0" }))), "revenue_drop": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-1).annotate({ "expected": "a value greater than or equal to -1" })).check(Schema.isLessThan(0).annotate({ "expected": "a value less than 0" }))), "reply_speed_regression": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "ghost_rate_spike": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "hot_leads_silent": Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isLessThanOrEqualTo(1000).annotate({ "expected": "a value less than or equal to 1000" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "bookings_spike": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "trust_graduation": Schema.optionalKey(Schema.Number.check(Schema.isFinite().annotate({ "expected": "a finite number" })).check(Schema.isLessThanOrEqualTo(1).annotate({ "expected": "a value less than or equal to 1" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))) })) }) }).fields,
182
+ "PUT /api/insights/settings": Schema.Struct({ "body": Schema.Struct({ "feedEnabled": Schema.optionalKey(Schema.Boolean), "digestEnabled": Schema.optionalKey(Schema.Boolean), "pushEnabled": Schema.optionalKey(Schema.Boolean), "toggles": Schema.optionalKey(Schema.Struct({ "metric_drop": Schema.optionalKey(Schema.Boolean), "metric_spike": Schema.optionalKey(Schema.Boolean), "opportunity": Schema.optionalKey(Schema.Boolean), "milestone": Schema.optionalKey(Schema.Boolean), "risk": Schema.optionalKey(Schema.Boolean) })), "thresholds": Schema.optionalKey(Schema.Struct({ "show_rate_drop": Schema.optionalKey(Schema.Finite.check(Schema.isGreaterThanOrEqualTo(-1).annotate({ "expected": "a value greater than or equal to -1" })).check(Schema.isLessThan(0).annotate({ "expected": "a value less than 0" }))), "revenue_drop": Schema.optionalKey(Schema.Finite.check(Schema.isGreaterThanOrEqualTo(-1).annotate({ "expected": "a value greater than or equal to -1" })).check(Schema.isLessThan(0).annotate({ "expected": "a value less than 0" }))), "reply_speed_regression": Schema.optionalKey(Schema.Finite.check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "ghost_rate_spike": Schema.optionalKey(Schema.Finite.check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "hot_leads_silent": Schema.optionalKey(Schema.Int.check(Schema.isLessThanOrEqualTo(1000).annotate({ "expected": "a value less than or equal to 1000" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "bookings_spike": Schema.optionalKey(Schema.Finite.check(Schema.isLessThanOrEqualTo(50).annotate({ "expected": "a value less than or equal to 50" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))), "trust_graduation": Schema.optionalKey(Schema.Finite.check(Schema.isLessThanOrEqualTo(1).annotate({ "expected": "a value less than or equal to 1" })).check(Schema.isGreaterThan(0).annotate({ "expected": "a value greater than 0" }))) })) }) }).fields,
183
183
  "GET /api/teach-luca": Schema.Struct({}).fields,
184
- "GET /api/framework-performance": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "windowDays": Schema.optionalKey(Schema.Number.annotate({ "default": 30 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(90).annotate({ "expected": "a value less than or equal to 90" }))) })) }).fields,
184
+ "GET /api/framework-performance": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "windowDays": Schema.optionalKey(Schema.Finite.annotate({ "default": 30 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(90).annotate({ "expected": "a value less than or equal to 90" }))) })) }).fields,
185
185
  "GET /api/ab-tests": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["draft", "running", "paused", "completed", "archived"])) })) }).fields,
186
186
  "GET /api/ab-tests/{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,
187
187
  "GET /api/learning-proposals": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "eventTypes": Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ "expected": "a value with a length of at least 1" }))), "activeOnly": Schema.optionalKey(Schema.Literals(["true", "false"]).annotate({ "default": "true" })) })) }).fields,
188
188
  "POST /api/learning-proposals/{id}/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}$" })) }).fields,
189
189
  "GET /api/knowledge/suggestions": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["pending", "approved", "rejected"])) })) }).fields,
190
- "POST /api/knowledge/suggestions/{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}$" })) }).fields,
191
190
  "POST /api/knowledge/suggestions/{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,
192
191
  "GET /api/knowledge/sources": Schema.Struct({}).fields,
193
192
  "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,
194
193
  "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,
195
194
  "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,
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,
195
+ "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.Finite.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,
197
196
  "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,
198
197
  "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,
199
198
  "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,
@@ -203,14 +202,14 @@ export const OPENAPI_INPUT_FIELDS = {
203
202
  "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,
204
203
  "GET /api/analytics/forecast": Schema.Struct({}).fields,
205
204
  "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,
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,
205
+ "GET /api/analytics/call-intelligence/calls": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "limit": Schema.optionalKey(Schema.Int.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,
207
206
  "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,
208
207
  "GET /api/analytics/crm-sync-health": Schema.Struct({}).fields,
209
208
  "GET /api/analytics/objections": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["7d", "30d", "90d"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])) })) }).fields,
210
- "GET /api/analytics/objections/{type}": Schema.Struct({ "type": Schema.Literals(["price", "timing", "trust", "fit", "authority", "smokescreen"]), "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["7d", "30d", "90d"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "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,
209
+ "GET /api/analytics/objections/{type}": Schema.Struct({ "type": Schema.Literals(["price", "timing", "trust", "fit", "authority", "smokescreen"]), "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["7d", "30d", "90d"])), "channel": Schema.optionalKey(Schema.Literals(["telegram", "instagram", "messenger", "whatsapp"])), "limit": Schema.optionalKey(Schema.Int.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,
211
210
  "GET /api/analytics/ghosted-leads": 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,
212
211
  "GET /api/analytics/trust-score": 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,
213
- "GET /api/analytics/trends": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "weeks": Schema.optionalKey(Schema.Number.annotate({ "default": 12 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(52).annotate({ "expected": "a value less than or equal to 52" }))) })) }).fields,
212
+ "GET /api/analytics/trends": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "weeks": Schema.optionalKey(Schema.Finite.annotate({ "default": 12 }).check(Schema.isInt().annotate({ "expected": "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ "expected": "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(52).annotate({ "expected": "a value less than or equal to 52" }))) })) }).fields,
214
213
  "GET /api/analytics/loss-reasons": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])) })) }).fields,
215
214
  "GET /api/analytics/recommendations": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "weekStart": Schema.optionalKey(Schema.String.annotate({ "format": "date" })), "includeDismissed": Schema.optionalKey(Schema.Literals(["true", "false"])) })) }).fields,
216
215
  "GET /api/analytics/content-attribution": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "period": Schema.optionalKey(Schema.Literals(["this_week", "this_month", "last_week", "last_month", "last_30_days"])) })) }).fields,
@@ -218,7 +217,7 @@ export const OPENAPI_INPUT_FIELDS = {
218
217
  "GET /api/analytics/topic-performance": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "weekStart": Schema.optionalKey(Schema.String.annotate({ "format": "date" })) })) }).fields,
219
218
  "GET /api/analytics/benchmarks": Schema.Struct({}).fields,
220
219
  "GET /api/analytics/benchmark-consent": Schema.Struct({}).fields,
221
- "GET /api/insights": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["unread", "read", "dismissed", "actioned", "expired"])), "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,
220
+ "GET /api/insights": Schema.Struct({ "query": Schema.optionalKey(Schema.Struct({ "status": Schema.optionalKey(Schema.Literals(["unread", "read", "dismissed", "actioned", "expired"])), "limit": Schema.optionalKey(Schema.Int.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,
222
221
  };
223
222
  /** The query field each paginated route takes its page cursor in. */
224
223
  export const OPENAPI_CURSOR_QUERY_PARAMS = {