{
	"components": {
		"examples": {},
		"headers": {},
		"parameters": {},
		"requestBodies": {},
		"responses": {},
		"schemas": {
			"FacebookPageFromAccountDto": {
				"description": "Body of `POST /channels/facebook/from-account`: a page the connected login can access.",
				"properties": {
					"channelId": {
						"type": "string",
						"description": "The Facebook channel entry whose login lists the page."
					},
					"pageId": {
						"type": "string"
					},
					"name": {
						"type": "string",
						"description": "The page's name, as the page list showed it."
					}
				},
				"required": [
					"channelId",
					"pageId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhatsappNumberFromAccountDto": {
				"description": "Body of `POST /channels/whatsapp/from-account`: a number on a connected business account.",
				"properties": {
					"channelId": {
						"type": "string",
						"description": "The WhatsApp channel entry whose token reaches the number."
					},
					"waBusinessAccountId": {
						"type": "string"
					},
					"phoneNumberId": {
						"type": "string"
					}
				},
				"required": [
					"channelId",
					"waBusinessAccountId",
					"phoneNumberId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhatsappChannelCreateDto": {
				"description": "Body of `POST /channels/whatsapp` — the raw result of Meta's Embedded Signup\nflow. The dashboard forwards every id the `WA_EMBEDDED_SIGNUP` message\ncarried, so the channel row knows which business account it belongs to before\nthe user has touched a dropdown.",
				"properties": {
					"code": {
						"type": "string",
						"description": "OAuth `code` from Embedded Signup. Exchanged server-side for the system-user token."
					},
					"wabaId": {
						"type": "string",
						"description": "WhatsApp Business Account id. Also the dedupe key for retried signups."
					},
					"phoneNumberId": {
						"type": "string",
						"description": "Phone number id, present unless the user finished with `FINISH_ONLY_WABA`."
					},
					"businessId": {
						"type": "string",
						"description": "Meta business portfolio id. Accepted for diagnostics; the WhatsApp sub-schema has no field for it."
					}
				},
				"required": [
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TimeBasedRuleDto": {
				"properties": {
					"isActive": {
						"type": "boolean"
					},
					"timeBetweenTickets": {
						"type": "number",
						"format": "double"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ClosedTicketReplyRuleDto": {
				"properties": {
					"isActive": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TicketCreationRulesDto": {
				"properties": {
					"timeBased": {
						"$ref": "#/components/schemas/TimeBasedRuleDto"
					},
					"replyAfterClosure": {
						"$ref": "#/components/schemas/ClosedTicketReplyRuleDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"MessageSettingsDto": {
				"properties": {
					"attachSenderName": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ChannelCreateDto": {
				"description": "Body of `POST /channels`.\n\nKeeps the credential fields: connecting a channel is the one moment they legitimately\ntravel inbound — WhatsApp and Facebook both hand their OAuth credential over in\n`accessToken` (WhatsApp sends the Embedded Signup `code`, which the service exchanges\nfor a token), Telegram sends `botToken`/`webhookSecret`, widgets send `apiKey`.\nTSOA runs with `silently-remove-extras`, so a field missing from the DTO is stripped\nfrom the body with no validation error at all.",
				"properties": {
					"kaiAnswers": {
						"type": "boolean",
						"description": "Connect question (kai-channels): Kai Support answers this channel's new conversations first, or\nnot. Applied once the channel is enabled; not stored on the channel. Left out: the project's\nmode decides (api/kaiSupportChannels applyConnectAnswer)."
					},
					"name": {
						"type": "string"
					},
					"isEnabled": {
						"type": "boolean"
					},
					"widgetId": {
						"type": "string"
					},
					"apiKey": {
						"type": "string"
					},
					"phoneNumberId": {
						"type": "string"
					},
					"displayPhoneNumber": {
						"type": "string"
					},
					"fbBusinessAccountId": {
						"type": "string"
					},
					"waBusinessAccountId": {
						"type": "string"
					},
					"instagramBusinessId": {
						"type": "string"
					},
					"accessToken": {
						"type": "string"
					},
					"pageId": {
						"type": "string"
					},
					"slackChannelId": {
						"type": "string"
					},
					"botToken": {
						"type": "string"
					},
					"botUsername": {
						"type": "string"
					},
					"webhookSecret": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"ticketCreationRules": {
						"$ref": "#/components/schemas/TicketCreationRulesDto"
					},
					"messageSettings": {
						"$ref": "#/components/schemas/MessageSettingsDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ChannelUpdateDto": {
				"description": "Body of `PUT /channels/{channelId}`.\n\nDeliberately carries no credential field (`accessToken`, `botToken`, `webhookSecret`,\n`apiKey`, `pageAccessToken`, `userAccessToken`). Settings saves have never needed to\nwrite one, and the update path now `$set`s exactly the keys it receives — so a stale\ncredential echoed back by the browser would otherwise overwrite a fresher one the\nserver refreshed in the meantime.",
				"properties": {
					"kaiAnswers": {
						"type": "boolean",
						"description": "Connect question (kai-channels): Kai Support answers this channel's new conversations first, or\nnot. Applied once the channel is enabled; not stored on the channel. Left out: the project's\nmode decides (api/kaiSupportChannels applyConnectAnswer)."
					},
					"name": {
						"type": "string"
					},
					"isEnabled": {
						"type": "boolean"
					},
					"widgetId": {
						"type": "string"
					},
					"phoneNumberId": {
						"type": "string"
					},
					"displayPhoneNumber": {
						"type": "string"
					},
					"fbBusinessAccountId": {
						"type": "string"
					},
					"waBusinessAccountId": {
						"type": "string"
					},
					"instagramBusinessId": {
						"type": "string"
					},
					"pageId": {
						"type": "string"
					},
					"slackChannelId": {
						"type": "string"
					},
					"discordChannelId": {
						"type": "string"
					},
					"botUsername": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"ticketCreationRules": {
						"$ref": "#/components/schemas/TicketCreationRulesDto"
					},
					"messageSettings": {
						"$ref": "#/components/schemas/MessageSettingsDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"WhatsappCodeMethod": {
				"description": "`code_method` accepted by POST /{phoneNumberId}/request_code.",
				"enum": [
					"SMS",
					"VOICE"
				],
				"type": "string"
			},
			"WhatsappRequestCodeDto": {
				"description": "Body of the `request-code` route.",
				"properties": {
					"codeMethod": {
						"$ref": "#/components/schemas/WhatsappCodeMethod",
						"description": "How Meta should deliver the verification code. The service defaults to VOICE."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"WhatsappVerifyCodeDto": {
				"description": "Body of the `verify-code` route.",
				"properties": {
					"code": {
						"type": "string",
						"description": "The verification code Meta sent to the number. Constrained so a pasted\nphone number can never reach Graph.",
						"pattern": "^[0-9]{6}$"
					}
				},
				"required": [
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhatsappRegisterDto": {
				"description": "Body of the `register` route.",
				"properties": {
					"pin": {
						"type": "string",
						"description": "The customer's existing WhatsApp two-step verification PIN. Only sent on a\nretry, after Meta rejected the PIN-less registration. Never generated by us.",
						"pattern": "^[0-9]{6}$"
					},
					"waBusinessAccountId": {
						"type": "string",
						"description": "WhatsApp Business Account the number belongs to; persisted together with the registration."
					},
					"kaiAnswers": {
						"type": "boolean",
						"description": "Connect question: Kai Support answers this number's new conversations first, or not (left out: the mode decides)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"Record_string.string_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"NativeDate": {
				"type": "string"
			},
			"ObjectId": {
				"type": "string"
			},
			"IfAny_typeofcontactViewSchema.any.ObtainSchemaGeneric_typeofcontactViewSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"conditions": {},
							"name": {
								"type": "string"
							},
							"targetAudience": {
								"type": "string"
							}
						},
						"required": [
							"targetAudience"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofcontactViewSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofcontactViewSchema.any.ObtainSchemaGeneric_typeofcontactViewSchema.DocType__"
			},
			"ContactView": {
				"$ref": "#/components/schemas/InferSchemaType_typeofcontactViewSchema_"
			},
			"FlattenMaps_T_": {
				"properties": {},
				"type": "object"
			},
			"Document": {
				"$ref": "#/components/schemas/FlattenMaps_T_",
				"description": "Generic types for Document:\n*  T - the type of _id\n*  TQueryHelpers - Object with any helpers that should be mixed into the Query type\n*  DocType - the type of the actual Document created"
			},
			"ContactViewDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/ContactView"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateContactViewDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"targetAudience": {
						"type": "string"
					},
					"conditions": {}
				},
				"required": [
					"name",
					"targetAudience",
					"conditions"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofemailTemplateSchema.any.ObtainSchemaGeneric_typeofemailTemplateSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"lastEditedBy": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"htmlContent": {},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"organisation": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"title": {
								"type": "string"
							}
						},
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofemailTemplateSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofemailTemplateSchema.any.ObtainSchemaGeneric_typeofemailTemplateSchema.DocType__"
			},
			"EmailTemplateI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofemailTemplateSchema_"
			},
			"EmailTemplateDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/EmailTemplateI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"Translatable": {
				"properties": {
					"localized": {}
				},
				"required": [
					"localized"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EmailTemplateDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"htmlContent": {
						"$ref": "#/components/schemas/Translatable"
					}
				},
				"required": [
					"title",
					"htmlContent"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofmessageTemplateSchema.any.ObtainSchemaGeneric_typeofmessageTemplateSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"lexorank": {
								"type": "string"
							},
							"searchContent": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"content": {},
							"title": {
								"type": "string"
							},
							"ticketTypes": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"teams": {
								"items": {
									"$ref": "#/components/schemas/ObjectId"
								},
								"type": "array"
							},
							"actions": {
								"items": {},
								"type": "array"
							},
							"attachments": {
								"items": {},
								"type": "array"
							},
							"isPublic": {
								"type": "boolean"
							},
							"users": {
								"items": {
									"$ref": "#/components/schemas/ObjectId"
								},
								"type": "array"
							},
							"tags": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"required": [
							"ticketTypes",
							"teams",
							"actions",
							"attachments",
							"isPublic",
							"users",
							"tags"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofmessageTemplateSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofmessageTemplateSchema.any.ObtainSchemaGeneric_typeofmessageTemplateSchema.DocType__"
			},
			"MessageTemplate": {
				"$ref": "#/components/schemas/InferSchemaType_typeofmessageTemplateSchema_"
			},
			"MessageTemplateDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/MessageTemplate"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"MessageTemplateDTO": {
				"properties": {
					"title": {
						"type": "string"
					},
					"content": {},
					"lexorank": {
						"type": "string",
						"description": "Ordering rank. Ignored when creating a template; the server appends new templates at the end.\nSet it when updating a template to reorder."
					},
					"isPublic": {
						"type": "boolean"
					},
					"users": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"attachments": {
						"items": {},
						"type": "array"
					},
					"actions": {
						"items": {
							"properties": {
								"data": {},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"type"
							],
							"type": "object"
						},
						"type": "array"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"teams": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"ticketTypes": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"title",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofnotificationActivitySchema.any.ObtainSchemaGeneric_typeofnotificationActivitySchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"needsYouDoneAt": {
								"type": "string",
								"format": "date-time"
							},
							"alert": {},
							"previewData": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"sender": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"isRead": {
								"type": "boolean"
							},
							"metaData": {},
							"previewDataType": {
								"type": "string"
							},
							"messageParams": {},
							"notificationType": {
								"type": "string"
							},
							"category": {
								"type": "string"
							},
							"receiver": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"senderUserType": {
								"type": "string"
							},
							"actions": {
								"items": {
									"properties": {
										"label": {
											"type": "string"
										},
										"type": {
											"type": "string",
											"enum": [
												"link",
												"modal",
												"callback"
											]
										},
										"payload": {}
									},
									"required": [
										"payload"
									],
									"type": "object"
								},
								"type": "array"
							}
						},
						"required": [
							"isRead",
							"metaData",
							"previewDataType",
							"messageParams",
							"notificationType",
							"category",
							"receiver",
							"senderUserType",
							"actions"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofnotificationActivitySchema_": {
				"$ref": "#/components/schemas/IfAny_typeofnotificationActivitySchema.any.ObtainSchemaGeneric_typeofnotificationActivitySchema.DocType__"
			},
			"NotificationActivityI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofnotificationActivitySchema_"
			},
			"NotificationActivityDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/NotificationActivityI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"NeedsYouKind": {
				"type": "string",
				"enum": [
					"agent_task",
					"mention",
					"assignment",
					"team_assignment",
					"handoff"
				]
			},
			"NeedsYouItem": {
				"properties": {
					"key": {
						"type": "string"
					},
					"kind": {
						"$ref": "#/components/schemas/NeedsYouKind"
					},
					"notificationIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Every notification of the source: \"done\" and \"read\" act on all of them."
					},
					"notification": {
						"description": "The newest notification, in the list's populated shape (routing, sender, preview)."
					},
					"count": {
						"type": "number",
						"format": "double"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"ticket": {
						"properties": {
							"title": {
								"type": "string"
							},
							"bugId": {
								"type": "number",
								"format": "double"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"id"
						],
						"type": "object"
					},
					"task": {
						"properties": {
							"pullRequest": {
								"properties": {
									"label": {
										"type": "string",
										"nullable": true
									},
									"url": {
										"type": "string"
									}
								},
								"required": [
									"label",
									"url"
								],
								"type": "object"
							},
							"agent": {
								"properties": {
									"color": {
										"type": "string"
									},
									"icon": {
										"type": "string"
									},
									"name": {
										"type": "string"
									}
								},
								"type": "object"
							},
							"kaiCodeSessionId": {
								"type": "string"
							},
							"quote": {
								"type": "string"
							},
							"title": {
								"type": "string"
							},
							"type": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"type",
							"id"
						],
						"type": "object"
					},
					"merge": {
						"properties": {
							"headSha": {
								"type": "string"
							},
							"prUrl": {
								"type": "string"
							},
							"projectId": {
								"type": "string"
							},
							"sessionId": {
								"type": "string"
							}
						},
						"required": [
							"prUrl",
							"projectId",
							"sessionId"
						],
						"type": "object",
						"description": "Only when this person may merge the PR from Gleap right now (project admin, project allows it, GitHub says ready)."
					}
				},
				"required": [
					"key",
					"kind",
					"notificationIds",
					"notification",
					"count",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofprojectActionSchema.any.ObtainSchemaGeneric_typeofprojectActionSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"excludeData": {
								"properties": {
									"replays": {
										"type": "boolean"
									},
									"screenshot": {
										"type": "boolean"
									},
									"customEventLog": {
										"type": "boolean"
									},
									"networkLogs": {
										"type": "boolean"
									},
									"consoleLog": {
										"type": "boolean"
									},
									"customData": {
										"type": "boolean"
									},
									"metaData": {
										"type": "boolean"
									}
								},
								"type": "object"
							},
							"collectEmail": {
								"type": "boolean"
							},
							"feedbackType": {
								"type": "string"
							},
							"singlePageForm": {
								"type": "boolean"
							},
							"enableUserScreenRecording": {
								"type": "boolean"
							},
							"disableUserScreenshot": {
								"type": "boolean"
							},
							"showConversation": {
								"type": "boolean"
							},
							"chatStyle": {
								"type": "boolean"
							},
							"screenshotTitle": {},
							"thanksMessage": {},
							"captureTitle": {},
							"introMessage": {},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"title": {},
							"alwaysCollectScreenshot": {
								"type": "boolean"
							},
							"form": {
								"items": {},
								"type": "array"
							},
							"actionId": {
								"type": "string"
							},
							"default": {
								"type": "boolean"
							}
						},
						"required": [
							"alwaysCollectScreenshot",
							"form",
							"actionId",
							"default"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofprojectActionSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofprojectActionSchema.any.ObtainSchemaGeneric_typeofprojectActionSchema.DocType__"
			},
			"ProjectActionI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofprojectActionSchema_"
			},
			"ProjectActionDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/ProjectActionI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"IfAny_typeofpropertySchema.any.ObtainSchemaGeneric_typeofpropertySchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"visability": {
								"properties": {
									"sharedDetail": {
										"type": "boolean"
									},
									"sharedSidebar": {
										"type": "boolean"
									},
									"card": {
										"type": "boolean"
									},
									"detail": {
										"type": "boolean"
									},
									"sidebar": {
										"type": "boolean"
									},
									"create": {
										"type": "boolean"
									}
								},
								"required": [
									"sharedDetail",
									"sharedSidebar",
									"card",
									"detail",
									"sidebar",
									"create"
								],
								"type": "object"
							},
							"pipeline": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"isSystem": {
								"type": "boolean"
							},
							"pinnedOrder": {
								"type": "number",
								"format": "double"
							},
							"pinned": {
								"type": "boolean"
							},
							"onlyShowWhenDataIsSet": {
								"type": "boolean"
							},
							"collectedUnverifiedAt": {
								"type": "string",
								"format": "date-time"
							},
							"readOnly": {
								"type": "boolean"
							},
							"restrictions": {
								"type": "string"
							},
							"labelIcon": {
								"type": "string"
							},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"path": {
								"type": "string"
							},
							"placeholder": {},
							"validation": {
								"type": "string"
							},
							"required": {
								"type": "boolean"
							},
							"options": {
								"items": {
									"properties": {
										"type": {
											"properties": {
												"icon": {
													"type": "string"
												},
												"value": {
													"type": "string"
												},
												"label": {}
											},
											"type": "object"
										}
									},
									"type": "object"
								},
								"type": "array"
							},
							"targetSource": {
								"type": "string"
							},
							"fieldId": {
								"type": "string"
							},
							"label": {
								"type": "string"
							},
							"type": {
								"type": "string"
							}
						},
						"required": [
							"options",
							"targetSource",
							"fieldId",
							"label",
							"type"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofpropertySchema_": {
				"$ref": "#/components/schemas/IfAny_typeofpropertySchema.any.ObtainSchemaGeneric_typeofpropertySchema.DocType__"
			},
			"PropertyI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofpropertySchema_"
			},
			"PropertyDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/PropertyI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"OptionDto": {
				"properties": {
					"label": {},
					"value": {
						"type": "string"
					},
					"icon": {
						"type": "string"
					}
				},
				"required": [
					"label",
					"value"
				],
				"type": "object",
				"additionalProperties": false
			},
			"VisabilityDto": {
				"properties": {
					"sidebar": {
						"type": "boolean"
					},
					"detail": {
						"type": "boolean"
					},
					"create": {
						"type": "boolean"
					},
					"card": {
						"type": "boolean"
					},
					"sharedSidebar": {
						"type": "boolean"
					},
					"sharedDetail": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"PropertyDto": {
				"properties": {
					"type": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"placeholder": {},
					"fieldId": {
						"type": "string"
					},
					"validation": {
						"type": "string"
					},
					"restrictions": {
						"type": "string"
					},
					"targetSource": {
						"type": "string"
					},
					"pipeline": {
						"type": "string"
					},
					"required": {
						"type": "boolean"
					},
					"readOnly": {
						"type": "boolean"
					},
					"onlyShowWhenDataIsSet": {
						"type": "boolean"
					},
					"pinned": {
						"type": "boolean",
						"description": "Kept in the record rail's always-visible set. Unset on every property that\npredates this, so the dashboard falls back to schema order and a workspace\nthat has never chosen a pinned set still gets a short rail rather than an\nempty one."
					},
					"pinnedOrder": {
						"type": "number",
						"format": "double",
						"description": "Order within the pinned set. Unset sorts after everything that has one."
					},
					"options": {
						"items": {
							"$ref": "#/components/schemas/OptionDto"
						},
						"type": "array"
					},
					"visability": {
						"$ref": "#/components/schemas/VisabilityDto"
					},
					"path": {
						"type": "string"
					}
				},
				"required": [
					"type",
					"label",
					"fieldId",
					"targetSource"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Types.ObjectId": {
				"type": "string"
			},
			"SessionDto": {
				"properties": {
					"gleapId": {
						"type": "string",
						"description": "Read-only; generated by the server, ignored on create/update."
					},
					"gleapHash": {
						"type": "string",
						"description": "Read-only; generated by the server, ignored on create/update."
					},
					"lang": {
						"type": "string",
						"description": "Contact language. Ignored by POST /sessions for new email/guest sessions (created with \"en\");\nsettable via the SDK identify call or session update."
					},
					"firstActivity": {},
					"lastHeardFrom": {},
					"lastActivity": {},
					"lastFeedbackReport": {},
					"project": {
						"$ref": "#/components/schemas/Types.ObjectId",
						"description": "Read-only; derived from the `project` header, ignored if sent."
					},
					"organisation": {
						"$ref": "#/components/schemas/Types.ObjectId",
						"description": "Read-only; derived from the `project` header, ignored if sent."
					},
					"unsubscribed": {
						"type": "boolean"
					},
					"unsubscribedAt": {},
					"unsubscribeReason": {
						"type": "string"
					},
					"lastPageView": {},
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"location": {},
					"email": {
						"type": "string"
					},
					"avatar": {
						"type": "string"
					},
					"companyId": {
						"type": "string"
					},
					"emailOnly": {
						"type": "boolean"
					},
					"companyName": {
						"type": "string"
					},
					"deviceType": {
						"type": "string"
					},
					"platform": {
						"type": "string"
					},
					"sla": {
						"type": "number",
						"format": "double"
					},
					"phone": {
						"type": "string"
					},
					"blocked": {
						"type": "boolean"
					},
					"plan": {
						"type": "string"
					},
					"value": {
						"type": "number",
						"format": "double"
					},
					"sessions": {
						"type": "number",
						"format": "double",
						"description": "Read-only; server-maintained counter."
					},
					"facebookId": {
						"type": "string"
					},
					"instagramId": {
						"type": "string"
					},
					"instagramUsername": {
						"type": "string"
					},
					"telegramChatId": {
						"type": "string"
					},
					"telegramUsername": {
						"type": "string"
					},
					"discordId": {
						"type": "string"
					},
					"discordUsername": {
						"type": "string"
					},
					"outboundHistory": {},
					"countFeedbackReports": {
						"type": "number",
						"format": "double"
					},
					"countFeedbackComments": {
						"type": "number",
						"format": "double"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"checklistTasks": {},
					"customData": {},
					"eventData": {}
				},
				"type": "object",
				"additionalProperties": false
			},
			"Document_any.any.any_": {
				"$ref": "#/components/schemas/FlattenMaps_T_",
				"description": "Generic types for Document:\n*  T - the type of _id\n*  TQueryHelpers - Object with any helpers that should be mixed into the Query type\n*  DocType - the type of the actual Document created"
			},
			"ImportIntercomSessionDto": {
				"properties": {
					"endpoint": {
						"type": "string"
					},
					"apiKey": {
						"type": "string"
					}
				},
				"required": [
					"endpoint",
					"apiKey"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommerceProviderKey": {
				"type": "string",
				"description": "A shop platform's key (`shopify`, `woocommerce`, `custom`, `shopware`, …).\nThe keys and where each platform keeps its connections come from the\nplatform registry (platforms/registry.ts): `commerceProviderKeys()`,\n`commerceIntegrationKey(provider)`."
			},
			"ReturnType_typeofpanelLineOf_": {
				"properties": {
					"inReturn": {
						"type": "string"
					},
					"returnableQuantity": {
						"type": "number",
						"format": "double"
					},
					"refundableQuantity": {
						"type": "number",
						"format": "double"
					},
					"variantId": {
						"type": "string"
					},
					"price": {
						"type": "string"
					},
					"image": {
						"type": "string"
					},
					"quantity": {
						"type": "number",
						"format": "double"
					},
					"variant": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"inReturn",
					"returnableQuantity",
					"refundableQuantity",
					"variantId",
					"price",
					"image",
					"quantity",
					"variant",
					"title",
					"id"
				],
				"type": "object",
				"description": "Obtain the return type of a function type"
			},
			"OrderOwnership": {
				"type": "string",
				"enum": [
					"verified",
					"email",
					"none"
				]
			},
			"OrderAction": {
				"type": "string",
				"enum": [
					"refund",
					"cancel_order",
					"create_return",
					"update_shipping_address",
					"send_status_link",
					"send_discount",
					"send_cart_link"
				]
			},
			"CommercePanelOrder": {
				"properties": {
					"id": {
						"type": "string"
					},
					"number": {
						"type": "string"
					},
					"status": {
						"type": "string"
					},
					"statusTone": {
						"type": "string"
					},
					"date": {
						"type": "string"
					},
					"total": {
						"type": "string"
					},
					"items": {
						"type": "number",
						"format": "double"
					},
					"carrier": {
						"type": "string"
					},
					"trackingNumber": {
						"type": "string"
					},
					"trackingUrl": {
						"type": "string"
					},
					"adminUrl": {
						"type": "string"
					},
					"lines": {
						"items": {
							"$ref": "#/components/schemas/ReturnType_typeofpanelLineOf_"
						},
						"type": "array",
						"description": "Shopify panel (the Gleap Shopify app): lines, totals, returns and the actions a teammate may run."
					},
					"subtotal": {
						"type": "string"
					},
					"shippingTotal": {
						"type": "string"
					},
					"discountTotal": {
						"type": "string"
					},
					"statusUrl": {
						"type": "string"
					},
					"returns": {
						"items": {
							"properties": {
								"status": {
									"type": "string"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"status"
							],
							"type": "object"
						},
						"type": "array"
					},
					"ownership": {
						"$ref": "#/components/schemas/OrderOwnership",
						"description": "How the order is tied to the contact: the signed-in Shopify customer, or the contact's email."
					},
					"actions": {
						"items": {
							"$ref": "#/components/schemas/OrderAction"
						},
						"type": "array"
					},
					"blockedActions": {
						"items": {
							"properties": {
								"reason": {
									"type": "string"
								},
								"action": {
									"$ref": "#/components/schemas/OrderAction"
								}
							},
							"required": [
								"reason",
								"action"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Actions this teammate could run for the signed-in customer, shown disabled with the reason (email match only)."
					},
					"refundable": {
						"type": "string",
						"description": "Shopify: what is left to refund (formatted) and the order currency with its decimals (refund dialog)."
					},
					"currency": {
						"type": "string"
					},
					"currencyDecimals": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"id",
					"number",
					"status",
					"statusTone",
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommercePendingView": {
				"description": "A shop request waiting for a teammate, as the approval cards show it.",
				"properties": {
					"id": {
						"type": "string"
					},
					"summary": {
						"type": "string"
					},
					"requestedBy": {
						"type": "string"
					},
					"provider": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					},
					"sessionId": {
						"type": "string"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"expiresAt": {
						"type": "string",
						"format": "date-time"
					},
					"action": {
						"type": "string",
						"description": "create_return (also exchanges) or refund."
					},
					"orderNumber": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"exchange": {
						"type": "boolean"
					},
					"amount": {
						"type": "string",
						"description": "Refund: the amount asked for, formatted (\"€20.00\"), or everything left when absent."
					},
					"currency": {
						"type": "string"
					},
					"items": {
						"items": {
							"properties": {
								"quantity": {
									"type": "number",
									"format": "double"
								},
								"image": {
									"type": "string"
								},
								"variant": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"quantity",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"id",
					"summary",
					"requestedBy",
					"createdAt",
					"expiresAt",
					"action"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommercePanel": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CommerceProviderKey"
					},
					"label": {
						"type": "string"
					},
					"customer": {
						"properties": {
							"adminUrl": {
								"type": "string"
							},
							"since": {
								"type": "string"
							},
							"totalSpent": {
								"type": "string"
							},
							"ordersCount": {
								"type": "number",
								"format": "double"
							},
							"email": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"type": "object",
						"nullable": true
					},
					"matchedBy": {
						"type": "string",
						"enum": [
							"verified",
							"email",
							"order"
						],
						"description": "How the panel found the shop data: `verified` (the signed-in storefront customer), `email` (the contact's\nemail, which the browser can set to anyone's), `order` (an order number + email the guest gave in the chat)."
					},
					"orders": {
						"items": {
							"$ref": "#/components/schemas/CommercePanelOrder"
						},
						"type": "array"
					},
					"pendingReturns": {
						"items": {
							"$ref": "#/components/schemas/CommercePendingView"
						},
						"type": "array"
					},
					"error": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"label",
					"customer",
					"orders",
					"pendingReturns"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Record_string.any_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"IfAny_typeofteamSchema.any.ObtainSchemaGeneric_typeofteamSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"taskLead": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"taskDescription": {
								"type": "string"
							},
							"workingDays": {},
							"operatingHours": {
								"properties": {
									"staticTranslations": {
										"properties": {
											"outOfOfficeMessage": {}
										},
										"type": "object"
									},
									"replyTime": {},
									"timezone": {
										"type": "string"
									},
									"openingTimes": {
										"items": {
											"properties": {
												"closingTime": {
													"type": "string"
												},
												"openingTime": {
													"type": "string"
												},
												"day": {
													"type": "string"
												},
												"replyTime": {}
											},
											"type": "object"
										},
										"type": "array"
									},
									"alwaysOnline": {
										"type": "boolean"
									},
									"enabled": {
										"type": "boolean"
									}
								},
								"required": [
									"openingTimes",
									"alwaysOnline",
									"enabled"
								],
								"type": "object"
							},
							"icon": {
								"type": "string"
							},
							"lexorank": {
								"type": "string"
							},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"agents": {},
							"slaOptions": {
								"properties": {
									"defaultSla": {
										"type": "number",
										"format": "double"
									}
								},
								"type": "object"
							},
							"name": {
								"type": "string"
							},
							"countSnoozedTickets": {
								"type": "boolean"
							},
							"ticketAmount": {
								"type": "number",
								"format": "double"
							},
							"limitTicketAmount": {
								"type": "boolean"
							},
							"needQueueRerun": {
								"type": "boolean"
							},
							"selectOnlyOnlineMembers": {
								"type": "boolean"
							},
							"members": {
								"items": {
									"$ref": "#/components/schemas/ObjectId"
								},
								"type": "array"
							},
							"assignmentMethod": {
								"type": "string",
								"enum": [
									"balanced",
									"random",
									"manual",
									"circular"
								]
							}
						},
						"required": [
							"countSnoozedTickets",
							"ticketAmount",
							"limitTicketAmount",
							"needQueueRerun",
							"selectOnlyOnlineMembers",
							"members",
							"assignmentMethod"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofteamSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofteamSchema.any.ObtainSchemaGeneric_typeofteamSchema.DocType__"
			},
			"TeamI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofteamSchema_"
			},
			"TeamDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/TeamI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"AssignmentMethod": {
				"enum": [
					"random",
					"balanced",
					"manual",
					"circular"
				],
				"type": "string"
			},
			"TeamAgentEntry": {
				"description": "One agent of a team: it takes new tickets on `boards` (ticket types); none = every board but Roadmap ideas.",
				"properties": {
					"agent": {
						"type": "string"
					},
					"boards": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true
					}
				},
				"required": [
					"agent"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TeamWorkingDays": {
				"description": "Who works which weekday (`by_day`); `everyone` (or none) = everyone, every day, as before.",
				"properties": {
					"mode": {
						"type": "string",
						"enum": [
							"everyone",
							"by_day"
						]
					},
					"days": {
						"properties": {
							"sun": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"sat": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"fri": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"thu": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"wed": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"tue": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"mon": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"type": "object"
					}
				},
				"required": [
					"mode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TeamDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"assignmentMethod": {
						"$ref": "#/components/schemas/AssignmentMethod"
					},
					"members": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"selectOnlyOnlineMembers": {
						"type": "boolean"
					},
					"needQueueRerun": {
						"type": "boolean"
					},
					"limitTicketAmount": {
						"type": "boolean"
					},
					"ticketAmount": {
						"type": "number",
						"format": "double"
					},
					"countSnoozedTickets": {
						"type": "boolean"
					},
					"slaOptions": {
						"properties": {
							"defaultSla": {
								"type": "number",
								"format": "double"
							}
						},
						"type": "object"
					},
					"operatingHours": {
						"properties": {
							"openingTimes": {
								"items": {
									"properties": {
										"replyTime": {},
										"closingTime": {
											"type": "string"
										},
										"openingTime": {
											"type": "string"
										},
										"day": {
											"type": "string"
										}
									},
									"type": "object"
								},
								"type": "array"
							},
							"staticTranslations": {
								"properties": {
									"outOfOfficeMessage": {}
								},
								"type": "object"
							},
							"replyTime": {},
							"alwaysOnline": {
								"type": "boolean"
							},
							"timezone": {
								"type": "string"
							},
							"enabled": {
								"type": "boolean"
							}
						},
						"type": "object"
					},
					"lexorank": {
						"type": "string"
					},
					"icon": {
						"type": "string",
						"nullable": true,
						"description": "The team's icon: a Font Awesome solid icon name without the `fa-` prefix\n(`headset`, `user-group`) or one emoji. Empty string or null clears it.\nChecked by isValidTeamIcon (teamIcon.ts) in the controller."
					},
					"agents": {
						"items": {
							"$ref": "#/components/schemas/TeamAgentEntry"
						},
						"type": "array",
						"description": "Agents that take the team's new tickets first, in this order (teamBody.service checks them)."
					},
					"workingDays": {
						"$ref": "#/components/schemas/TeamWorkingDays",
						"description": "Working days of the team's people (teamBody.service keeps only members)."
					},
					"taskDescription": {
						"type": "string",
						"nullable": true,
						"description": "What the team handles, in a sentence: agents and Tasks route by it."
					},
					"taskLead": {
						"type": "string",
						"nullable": true,
						"description": "The team's lead: gets the team's unanswered asks. Must be a member."
					}
				},
				"required": [
					"name",
					"assignmentMethod",
					"members"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BoardSuggestion": {
				"properties": {
					"source": {
						"type": "string",
						"enum": [
							"history",
							"names"
						]
					},
					"share": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"teamId": {
						"type": "string"
					}
				},
				"required": [
					"source",
					"share",
					"teamId"
				],
				"type": "object",
				"description": "A board's suggested team while off: from its last 30 days (`history`), else by name (`names`)."
			},
			"TeamSetupDto": {
				"description": "POST /teams/setup: team routing on or off, the default team, and each board's team.",
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"defaultTeam": {
						"type": "string",
						"nullable": true
					},
					"boards": {
						"items": {
							"properties": {
								"assignTo": {
									"properties": {
										"team": {
											"type": "string",
											"nullable": true
										},
										"mode": {
											"type": "string",
											"enum": [
												"default",
												"team",
												"nobody"
											]
										}
									},
									"required": [
										"mode"
									],
									"type": "object"
								},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"type"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Each board's team (`assignTo`)."
					},
					"escalationLimits": {
						"properties": {
							"monthlyBudgetMinor": {
								"type": "number",
								"format": "double",
								"nullable": true
							},
							"dailyCap": {
								"type": "number",
								"format": "double"
							}
						},
						"type": "object",
						"description": "Hard tickets: automatic starts a day, and a monthly budget of hard-ticket runs in USD cents (null: none)."
					},
					"assignOpenUnowned": {
						"type": "boolean",
						"description": "Also give today's open tickets nobody owns to their board's team (only with `enabled: true`)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TeamOrderDto": {
				"properties": {
					"lexorank": {
						"type": "string"
					}
				},
				"required": [
					"lexorank"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofticketViewSchema.any.ObtainSchemaGeneric_typeofticketViewSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"sortBy": {},
							"icon": {
								"type": "string"
							},
							"lexorank": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"conditions": {},
							"createdBy": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"name": {
								"type": "string"
							},
							"dataSources": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"viewType": {
								"type": "string",
								"enum": [
									"conversation",
									"list",
									"board",
									"table"
								]
							},
							"teams": {
								"items": {
									"$ref": "#/components/schemas/ObjectId"
								},
								"type": "array"
							},
							"isPublic": {
								"type": "boolean"
							},
							"users": {
								"items": {
									"$ref": "#/components/schemas/ObjectId"
								},
								"type": "array"
							}
						},
						"required": [
							"dataSources",
							"viewType",
							"teams",
							"isPublic",
							"users"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofticketViewSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofticketViewSchema.any.ObtainSchemaGeneric_typeofticketViewSchema.DocType__"
			},
			"TicketView": {
				"$ref": "#/components/schemas/InferSchemaType_typeofticketViewSchema_"
			},
			"TicketViewDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/TicketView"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"TicketViewDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"conditions": {},
					"sortBy": {},
					"users": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "People the view is shared with (user ids). Its creator always sees it."
					},
					"teams": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Teams the view is shared with (team ids); their members see it."
					},
					"isPublic": {
						"type": "boolean",
						"description": "Shared with everyone in the project."
					},
					"viewType": {
						"type": "string",
						"description": "How the dashboard shows the view: `table` a full-width list, `list`/`conversation` the list beside the open ticket (`list` is the older name), `board` a board."
					},
					"dataSources": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The boards (ticket types) the view lists; `*` (ALL_BOARDS) is every board the viewer may see."
					},
					"lexorank": {
						"type": "string"
					},
					"icon": {
						"type": "string",
						"description": "The view's icon in the inbox sidebar: a Font Awesome name or an emoji."
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TicketViewOrderDTO": {
				"properties": {
					"lexorank": {
						"type": "string"
					}
				},
				"required": [
					"lexorank"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhatsAppTemplateMessageDocument": {
				"$ref": "#/components/schemas/FlattenMaps_T_"
			},
			"FallbackUserDto": {
				"properties": {
					"username": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"imageUrl": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AttachmentDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"type": {
						"type": "string"
					}
				},
				"required": [
					"name",
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ChannelDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"messageId": {
						"type": "string"
					}
				},
				"required": [
					"id"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateMessageDto": {
				"properties": {
					"user": {
						"type": "string"
					},
					"session": {
						"type": "string"
					},
					"bot": {
						"type": "boolean"
					},
					"fallbackUser": {
						"$ref": "#/components/schemas/FallbackUserDto"
					},
					"messageRef": {
						"type": "string"
					},
					"ticket": {
						"type": "string"
					},
					"data": {},
					"translatedData": {},
					"type": {
						"type": "string"
					},
					"audience": {
						"type": "string",
						"enum": [
							"requester",
							"public"
						]
					},
					"emailId": {
						"type": "string"
					},
					"sessionNotificationsUnread": {
						"type": "boolean"
					},
					"outbound": {
						"type": "string"
					},
					"outboundTemplate": {
						"type": "string"
					},
					"outboundSubject": {
						"type": "string"
					},
					"status": {},
					"statusHistory": {
						"items": {},
						"type": "array"
					},
					"comment": {},
					"markdownComment": {
						"type": "string",
						"description": "Markdown message body, honored when creating a message: the server converts it to TipTap JSON and it\ntakes precedence over `comment`. Ignored when updating a message."
					},
					"replyTo": {
						"type": "string"
					},
					"kaiChat": {
						"type": "boolean"
					},
					"aiData": {},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"actions": {
						"items": {
							"properties": {
								"data": {},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"type"
							],
							"type": "object"
						},
						"type": "array"
					},
					"channel": {
						"$ref": "#/components/schemas/ChannelDto"
					},
					"sendToChannel": {
						"type": "boolean"
					},
					"isNote": {
						"type": "boolean"
					},
					"rating": {
						"type": "string"
					},
					"sessionId": {
						"type": "string",
						"description": "The coding session this message is written for (hard tickets: the Gleap MCP's `send_message`). Same as\nthe `X-Gleap-Session-Id` header, which wins: the message is booked to the session's agent and goes\nthrough the episode guard (409 `refusal: stopped | stale_thread`)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateMessageDto": {
				"properties": {
					"user": {
						"type": "string"
					},
					"session": {
						"type": "string"
					},
					"bot": {
						"type": "boolean"
					},
					"fallbackUser": {
						"$ref": "#/components/schemas/FallbackUserDto"
					},
					"messageRef": {
						"type": "string"
					},
					"ticket": {
						"type": "string"
					},
					"data": {},
					"translatedData": {},
					"type": {
						"type": "string"
					},
					"audience": {
						"type": "string",
						"enum": [
							"requester",
							"public"
						]
					},
					"emailId": {
						"type": "string"
					},
					"sessionNotificationsUnread": {
						"type": "boolean"
					},
					"outbound": {
						"type": "string"
					},
					"outboundTemplate": {
						"type": "string"
					},
					"outboundSubject": {
						"type": "string"
					},
					"status": {},
					"statusHistory": {
						"items": {},
						"type": "array"
					},
					"comment": {},
					"markdownComment": {
						"type": "string",
						"description": "Markdown message body, honored when creating a message: the server converts it to TipTap JSON and it\ntakes precedence over `comment`. Ignored when updating a message."
					},
					"replyTo": {
						"type": "string"
					},
					"kaiChat": {
						"type": "boolean"
					},
					"aiData": {},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"actions": {
						"items": {
							"properties": {
								"data": {},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"type"
							],
							"type": "object"
						},
						"type": "array"
					},
					"channel": {
						"$ref": "#/components/schemas/ChannelDto"
					},
					"sendToChannel": {
						"type": "boolean"
					},
					"isNote": {
						"type": "boolean"
					},
					"rating": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateThreadReplyDto": {
				"properties": {
					"data": {
						"description": "Message payload; `data.content` is TipTap JSON (mention nodes intact).\nTyped `any` deliberately — TSOA silently strips `Record<string, any>`."
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"clientMutationId": {
						"type": "string",
						"description": "Client-supplied, so a retried optimistic send doesn't double-post."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetReactionDto": {
				"description": "Body of PUT /v3/messages/{messageId}/reactions.\n\nExplicit op instead of a blind toggle: idempotent and retry-safe, and\nimmune to the optimistic-UI race where a stale toggle inverts intent.",
				"properties": {
					"emoji": {
						"type": "string",
						"description": "The unicode emoji, e.g. \"👍\" or \"👨‍👩‍👧\". Validated server-side\n(pictographic/keycap/flag required, max 32 UTF-16 units)."
					},
					"op": {
						"type": "string",
						"enum": [
							"add",
							"remove"
						]
					}
				},
				"required": [
					"emoji",
					"op"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SuggestFaqDto": {
				"properties": {
					"accept": {
						"type": "boolean",
						"description": "Whether to add the suggested question/answer to the knowledge base. The suggestion message is deleted in both cases."
					}
				},
				"required": [
					"accept"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofhelpcenterCollectionSchema.any.ObtainSchemaGeneric_typeofhelpcenterCollectionSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"iconUrl": {
								"type": "string"
							},
							"site": {},
							"extendedAudienceFilter": {},
							"baseAudienceFilter": {},
							"docId": {
								"type": "number",
								"format": "double"
							},
							"lexorank": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"parent": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"externalId": {
								"type": "string"
							},
							"title": {},
							"description": {},
							"targetAudience": {
								"type": "string"
							}
						},
						"required": [
							"targetAudience"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofhelpcenterCollectionSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofhelpcenterCollectionSchema.any.ObtainSchemaGeneric_typeofhelpcenterCollectionSchema.DocType__"
			},
			"HelpcenterCollectionI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofhelpcenterCollectionSchema_"
			},
			"HelpcenterCollectionDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/HelpcenterCollectionI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"HelpCenterCollectionDto": {
				"properties": {
					"title": {},
					"description": {},
					"iconUrl": {
						"type": "string"
					},
					"project": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"lexorank": {
						"type": "string"
					},
					"docId": {
						"type": "number",
						"format": "double"
					},
					"parent": {
						"allOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							}
						],
						"nullable": true
					},
					"externalId": {
						"type": "string"
					},
					"targetAudience": {
						"type": "string",
						"description": "Who can read the collection. New collections default to `all`; an update that leaves it out keeps the current audience."
					},
					"baseAudienceFilter": {},
					"extendedAudienceFilter": {},
					"site": {
						"type": "string",
						"description": "Create only: the help center site of a new top-level collection (a site id, or `default`).\nA sub-collection always gets its parent's site; updates ignore it (PUT /helpcenter/collections/{id}/sites\nsets the sites, PUT /helpcenter/sites/{id}/collections moves)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CollectionWithCounts": {
				"allOf": [
					{
						"$ref": "#/components/schemas/HelpcenterCollectionDocument"
					},
					{
						"properties": {
							"subCollectionsCount": {
								"type": "number",
								"format": "double"
							},
							"articlesCount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"subCollectionsCount",
							"articlesCount"
						],
						"type": "object"
					}
				]
			},
			"HelpCenterCollectionOrderDto": {
				"properties": {
					"collectionIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The ids of the collections on one level of the tree, in the order they should be\nshown. Siblings that are left out keep their relative order and are appended after\nthe listed ones."
					},
					"parentId": {
						"type": "string",
						"description": "The parent whose children are being ordered. Omit to order the top-level collections."
					}
				},
				"required": [
					"collectionIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HelpCenterCollectionSitesDto": {
				"properties": {
					"sites": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The help center sites the top-level collection shows on (site ids, `default` for the default site); at least one."
					}
				},
				"required": [
					"sites"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofhelpcenterArticleSchema.any.ObtainSchemaGeneric_typeofhelpcenterArticleSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"hideFromSearch": {
								"type": "boolean"
							},
							"noindex": {
								"type": "boolean"
							},
							"searchKeywords": {},
							"seoImage": {
								"type": "string"
							},
							"seoDescription": {},
							"seoTitle": {},
							"slug": {},
							"site": {},
							"extendedAudienceFilter": {},
							"baseAudienceFilter": {},
							"docId": {
								"type": "number",
								"format": "double"
							},
							"author": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"helpcenterCollection": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"navigationTitle": {},
							"upvotes": {},
							"plainContent": {},
							"lexorank": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"externalId": {
								"type": "string"
							},
							"content": {},
							"title": {},
							"description": {},
							"searchKeywordTerms": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"sourceUsage": {
								"type": "number",
								"format": "double"
							},
							"version": {
								"type": "number",
								"format": "double"
							},
							"isDraft": {
								"type": "boolean"
							},
							"targetAudience": {
								"type": "string"
							},
							"tags": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"required": [
							"searchKeywordTerms",
							"sourceUsage",
							"version",
							"isDraft",
							"targetAudience",
							"tags"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofhelpcenterArticleSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofhelpcenterArticleSchema.any.ObtainSchemaGeneric_typeofhelpcenterArticleSchema.DocType__"
			},
			"HelpcenterArticleI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofhelpcenterArticleSchema_"
			},
			"HelpcenterArticleDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/HelpcenterArticleI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"HelpcenterArticleDto": {
				"properties": {
					"title": {},
					"navigationTitle": {
						"description": "Short localized label in Docs navigation. Empty uses the article title."
					},
					"description": {},
					"content": {},
					"plainContent": {},
					"helpcenterCollection": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"author": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"project": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"isDraft": {
						"type": "boolean",
						"description": "`true` keeps the article unpublished. New articles are drafts unless `false` is sent; an update that leaves it out keeps the current state."
					},
					"docId": {
						"type": "number",
						"format": "double"
					},
					"expectedVersion": {
						"type": "number",
						"format": "double",
						"description": "Optimistic-concurrency token. When provided, the update is applied only if the\narticle's current `version` still equals this value; otherwise the server rejects\nthe write with 409 (and preserves the rejected content as a 'conflict' version).\nWhen omitted, the save falls back to last-write-wins (keeps the existing editor\nworking until it is updated to send the token)."
					},
					"lexorank": {
						"type": "string"
					},
					"upvotes": {},
					"targetAudience": {
						"type": "string",
						"description": "Who can read the article. New articles default to `all`; an update that leaves it out keeps the current audience."
					},
					"externalId": {
						"type": "string"
					},
					"baseAudienceFilter": {},
					"extendedAudienceFilter": {},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"slug": {
						"description": "The URL part after the doc id, per language (`{ en: \"share-receipt\" }`). Empty = from the title."
					},
					"seoTitle": {
						"description": "Search result title per language. Empty = the article title."
					},
					"seoDescription": {
						"description": "Search result description per language. Empty = the article description."
					},
					"seoImage": {
						"type": "string",
						"nullable": true,
						"description": "Link preview image (https URL). Empty = the generated image."
					},
					"searchKeywords": {
						"description": "Hidden words help center search matches, per language (`{ en: [\"attach receipt\"] }`)."
					},
					"noindex": {
						"type": "boolean",
						"description": "`true` keeps the article out of search engines and the sitemap."
					},
					"hideFromSearch": {
						"type": "boolean",
						"description": "`true` keeps the article out of help center search results."
					},
					"newCollectionId": {
						"type": "string",
						"description": "Deprecated here. Only read by PUT .../articles/{id}/move (which has its own body); ignored on create/update."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterArticleOrderDto": {
				"properties": {
					"articleIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The ids of this collection's articles, in the order they should be shown. Articles of\nthe collection that are left out keep their relative order and are appended after the\nlisted ones."
					}
				},
				"required": [
					"articleIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterArticleDraftDto": {
				"description": "Staged edits to a help center article that are not yet live. There is at most one\nworking copy per article (unique on `article`). The article keeps serving its own\ncontent until the draft is published.",
				"properties": {
					"title": {},
					"navigationTitle": {},
					"description": {},
					"content": {},
					"plainContent": {},
					"targetAudience": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"author": {},
					"slug": {},
					"seoTitle": {},
					"seoDescription": {},
					"seoImage": {
						"type": "string",
						"nullable": true
					},
					"searchKeywords": {},
					"noindex": {
						"type": "boolean"
					},
					"hideFromSearch": {
						"type": "boolean"
					},
					"expectedDraftVersion": {
						"type": "number",
						"format": "double",
						"description": "Optimistic-concurrency token for the draft itself. When provided, the upsert only\napplies if the stored draft's `draftVersion` still matches; otherwise 409 (mirrors the\nlive-article guard) so two people editing the same draft don't clobber each other."
					},
					"expectedArticleVersion": {
						"type": "number",
						"format": "double",
						"description": "The live article `version` the sending editor session loaded. Guards draft CREATION:\na tab that loaded the article before someone else's publishes would otherwise seed a\nbrand-new draft from its outdated editor state — that stale draft overlays everyone's\neditor (the article looks \"reverted\" in the dashboard) and, because `baseVersion` is\nstamped from the then-current live version, it also publishes without tripping\nthe staleness guard. When provided and it no longer matches the live version, the save\nis rejected with 409 instead (the rejected state is kept as a 'conflict' version)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateSharedMessageDto": {
				"properties": {
					"comment": {
						"type": "string"
					},
					"recaptchaToken": {
						"type": "string"
					},
					"htmlComment": {
						"type": "string"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"ticketShareToken": {
						"type": "string"
					},
					"source": {
						"type": "string"
					},
					"context": {
						"properties": {},
						"additionalProperties": {},
						"type": "object",
						"description": "The sidekick panel's context envelope (`surface: 'sidekick'`: page URL without query, title, onboarding\nstep, the app's own key-values). Client data: sanitised before it is kept (copilotContext.logic)."
					},
					"replyTo": {
						"type": "string"
					},
					"clientMessageId": {
						"type": "string",
						"description": "One id per message from the Messenger, reused when it retries the send: the message is stored once."
					}
				},
				"required": [
					"comment",
					"ticketShareToken"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RatingEnum": {
				"enum": [
					"positive",
					"negative"
				],
				"type": "string"
			},
			"MessageRatingDto": {
				"properties": {
					"rating": {
						"$ref": "#/components/schemas/RatingEnum"
					}
				},
				"required": [
					"rating"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RedirectMatchType": {
				"enum": [
					"exact",
					"pattern"
				],
				"type": "string"
			},
			"IfAny_typeofhelpcenterRedirectSchema.any.ObtainSchemaGeneric_typeofhelpcenterRedirectSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"matchType": {
								"$ref": "#/components/schemas/RedirectMatchType"
							},
							"newUrl": {
								"type": "string"
							},
							"oldUrl": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							}
						},
						"required": [
							"matchType",
							"newUrl",
							"oldUrl",
							"project"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofhelpcenterRedirectSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofhelpcenterRedirectSchema.any.ObtainSchemaGeneric_typeofhelpcenterRedirectSchema.DocType__"
			},
			"HelpcenterRedirect": {
				"$ref": "#/components/schemas/InferSchemaType_typeofhelpcenterRedirectSchema_"
			},
			"HelpcenterRedirectDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/HelpcenterRedirect"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"HelpcenterRedirectDTO": {
				"properties": {
					"oldUrl": {
						"type": "string",
						"description": "Path or URL to redirect from. Required when creating a redirect."
					},
					"newUrl": {
						"type": "string",
						"description": "Target path or URL. Required when creating a redirect."
					},
					"matchType": {
						"$ref": "#/components/schemas/RedirectMatchType",
						"description": "How `oldUrl` is matched: `exact` (default) for a literal match, `pattern` for a wildcard/pattern match. Optional."
					}
				},
				"required": [
					"oldUrl",
					"newUrl",
					"matchType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BotDto": {
				"properties": {
					"active": {
						"type": "boolean"
					},
					"currentBot": {
						"type": "string"
					},
					"currentActionFlow": {
						"type": "string"
					},
					"currentAction": {
						"type": "number",
						"format": "double"
					},
					"forwardedToSupportAt": {
						"type": "string",
						"format": "date-time"
					},
					"kaiActive": {
						"type": "boolean"
					},
					"noAnswerFound": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"Sentiment": {
				"enum": [
					"positive",
					"negative",
					"neutral"
				],
				"type": "string"
			},
			"LastResponseDto": {
				"properties": {
					"contact": {
						"type": "string",
						"format": "date-time"
					},
					"admin": {
						"type": "string",
						"format": "date-time"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpvoteDto": {
				"properties": {
					"email": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TicketChannelDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"metaData": {}
				},
				"required": [
					"id"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateTicketDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"conversationClosed": {
						"type": "boolean"
					},
					"bot": {
						"$ref": "#/components/schemas/BotDto"
					},
					"content": {},
					"plainContent": {
						"type": "string"
					},
					"imageUrl": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"latestComment": {
						"type": "string"
					},
					"latestPublicComment": {
						"type": "string"
					},
					"slaBreached": {
						"type": "boolean"
					},
					"hidden": {
						"type": "boolean"
					},
					"needInitialPush": {
						"type": "boolean"
					},
					"noHumanInteraction": {
						"type": "boolean"
					},
					"snoozed": {
						"type": "boolean"
					},
					"snoozedUntil": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"processingUser": {
						"type": "string"
					},
					"processingTeam": {
						"type": "string"
					},
					"queued": {
						"type": "boolean"
					},
					"queuedAt": {
						"type": "string",
						"format": "date-time"
					},
					"mentions": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"emailRefs": {
						"items": {},
						"type": "array"
					},
					"attributes": {},
					"formData": {},
					"form": {},
					"aiSummary": {
						"type": "string"
					},
					"aiSupportSummary": {
						"type": "string"
					},
					"dueDate": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "string"
							}
						]
					},
					"linkedTickets": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"duplicateOf": {
						"type": "string"
					},
					"duplicatesCount": {
						"type": "number",
						"format": "double"
					},
					"session": {},
					"sessions": {
						"items": {},
						"type": "array"
					},
					"outbound": {
						"type": "string"
					},
					"priority": {
						"type": "string",
						"description": "Priority key of the ticket's board: LOW, MEDIUM, HIGH or a custom key; the\npriority's title is also accepted. Each board's priorities are listed by\nGET /projects/ticket-types."
					},
					"type": {
						"type": "string"
					},
					"sentiment": {
						"$ref": "#/components/schemas/Sentiment"
					},
					"status": {
						"type": "string"
					},
					"shareToken": {
						"type": "string"
					},
					"secretShareToken": {
						"type": "string"
					},
					"lexorank": {
						"type": "string"
					},
					"bugId": {
						"type": "number",
						"format": "double"
					},
					"project": {
						"type": "string"
					},
					"organisation": {
						"type": "string"
					},
					"screenshotUrl": {
						"type": "string"
					},
					"screenshotBroke": {
						"type": "string",
						"format": "date-time"
					},
					"generatingScreenshot": {
						"type": "boolean"
					},
					"screenshotRenderingFailed": {
						"type": "boolean"
					},
					"screenshotLive": {
						"type": "boolean"
					},
					"screenshotDataUrl": {},
					"isSilent": {
						"type": "boolean"
					},
					"replayDataUrl": {
						"type": "string"
					},
					"replayUrl": {
						"type": "string"
					},
					"generatingReplay": {
						"type": "boolean"
					},
					"replayStartDate": {
						"type": "string",
						"format": "date-time"
					},
					"replayRenderingStartedAt": {
						"type": "string",
						"format": "date-time"
					},
					"replayRenderingFailed": {
						"type": "boolean"
					},
					"replayLive": {
						"type": "boolean"
					},
					"originalEmailContent": {
						"type": "string"
					},
					"hasWebReplay": {
						"type": "boolean"
					},
					"integrations": {},
					"metaData": {},
					"actionLog": {},
					"customData": {},
					"replay": {},
					"lastResponse": {
						"$ref": "#/components/schemas/LastResponseDto"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"lastNotification": {
						"type": "string",
						"format": "date-time"
					},
					"faqSuggested": {
						"type": "boolean"
					},
					"notificationsUnread": {
						"type": "boolean"
					},
					"sessionNotificationsUnread": {
						"type": "boolean"
					},
					"hasAgentReply": {
						"type": "boolean"
					},
					"conversationRating": {
						"type": "number",
						"format": "double"
					},
					"upvotesCount": {
						"type": "number",
						"format": "double"
					},
					"upvotes": {
						"items": {
							"$ref": "#/components/schemas/UpvoteDto"
						},
						"type": "array"
					},
					"screenRecordingUrl": {
						"type": "string"
					},
					"firstAssignmentAt": {
						"type": "string",
						"format": "date-time"
					},
					"archived": {
						"type": "boolean"
					},
					"archivedAt": {
						"type": "string",
						"format": "date-time"
					},
					"disabled": {
						"type": "boolean"
					},
					"isSpam": {
						"type": "boolean"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"score": {
						"type": "number",
						"format": "double"
					},
					"channel": {
						"$ref": "#/components/schemas/TicketChannelDto"
					},
					"manuallyAdded": {
						"type": "boolean"
					},
					"fromData": {},
					"consoleLog": {},
					"customEventLog": {},
					"networkLogs": {},
					"isManualStart": {
						"type": "boolean"
					},
					"botId": {
						"type": "string"
					},
					"preventAutoReply": {
						"type": "boolean"
					},
					"skipDuplicateCheck": {
						"type": "boolean",
						"description": "FEATURE_REQUEST creates run a duplicate guard (409 with the existing\nrequest's payload). Pass true to opt out deliberately (e.g. a human\nalready reviewed the suggestions)."
					},
					"sourceTicketId": {
						"type": "string",
						"description": "Create this ticket from another ticket of the project, e.g. a bug from a customer conversation.\nWithout a `session` the new ticket gets the source ticket's contact, and with it the company.\nBoth tickets are linked. An unknown id, or one of another project, is a 404."
					},
					"createdAt": {
						"type": "string",
						"description": "Importing from another helpdesk: the ticket's original creation date (ISO 8601). A date in the past\ndates the ticket (sorting, reports, retention) and stores it as history: it is read, and no\nnotification, webhook, workflow, SLA or AI agent runs on it. A future date or \"now\" is ignored."
					},
					"pipelineEntry": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "CRM pipeline entries to link this ticket to. Verified against the project in\ncreateTicket — foreign or unknown ids are dropped, never an error. A ticket\nmay sit on several entries at once (one shared task blocking several deals)."
					},
					"surveyResponse": {
						"type": "string",
						"description": "Surveys 2.0 response (`rsp_…`) this ticket follows up on. Verified against\nthe project in createTicket — an unknown id is dropped, never an error; a\nknown one is linked both ways, like a reach-out conversation."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateTicketWithMessageDto": {
				"properties": {
					"type": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"message": {
						"type": "string"
					},
					"priority": {
						"type": "string",
						"description": "Priority key of the ticket's board: LOW, MEDIUM, HIGH or a custom key; the\npriority's title is also accepted. Each board's priorities are listed by\nGET /projects/ticket-types."
					},
					"status": {
						"type": "string"
					},
					"processingUser": {
						"type": "string"
					},
					"processingTeam": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"session": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"formData": {},
					"preventAutoReply": {
						"type": "boolean"
					},
					"pipelineEntry": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "CRM pipeline entries to link this ticket to (see CreateTicketDto). The\npipeline create-ticket automation passes the entry that triggered it."
					}
				},
				"required": [
					"type",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BulkTicketAction": {
				"type": "string",
				"enum": [
					"close",
					"assign",
					"archive",
					"snooze",
					"team",
					"priority",
					"tag"
				]
			},
			"BulkTicketSelection": {
				"properties": {
					"ids": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Explicit ticket ids (checkbox selection)."
					},
					"query": {
						"properties": {
							"sort": {
								"type": "string"
							},
							"filter": {
								"type": "string"
							},
							"status": {
								"type": "string"
							},
							"type": {
								"type": "string"
							}
						},
						"required": [
							"status",
							"type"
						],
						"type": "object",
						"description": "\"All matching\" — the same raw query-param shape the lane's GET /tickets uses."
					},
					"limit": {
						"type": "number",
						"format": "double",
						"description": "Select-N: only the first N tickets in the query's sort order. Query mode only."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BulkTicketPayload": {
				"properties": {
					"processingUser": {
						"type": "string"
					},
					"duration": {
						"type": "number",
						"format": "double"
					},
					"processingTeam": {
						"type": "string"
					},
					"priority": {
						"type": "string",
						"description": "Priority key (LOW, MEDIUM, HIGH or a board's custom key) or title. Resolved\nagainst each ticket's board; tickets whose board has no such active\npriority are skipped."
					},
					"tag": {
						"type": "string",
						"description": "Tag label added to every ticket, stored exactly as given: project tags can\ncarry spaces (\"Plan Assistant \"), so a trimmed write would be another tag."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BulkUpdateTicketDto": {
				"properties": {
					"action": {
						"$ref": "#/components/schemas/BulkTicketAction"
					},
					"selection": {
						"$ref": "#/components/schemas/BulkTicketSelection"
					},
					"payload": {
						"$ref": "#/components/schemas/BulkTicketPayload"
					}
				},
				"required": [
					"action",
					"selection"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BulkReplyTicketDto": {
				"properties": {
					"selection": {
						"$ref": "#/components/schemas/BulkTicketSelection"
					},
					"comment": {
						"description": "TipTap JSON document — same shape as a single reply's `comment`."
					},
					"batchId": {
						"type": "string",
						"description": "Client-generated idempotency key. Retries with the same batchId never\ndouble-send: every created comment is deduped per ticket via\n`data.clientMutationId = bulkreply_<batchId>_<ticketId>`."
					}
				},
				"required": [
					"selection",
					"comment"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateTicketDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"conversationClosed": {
						"type": "boolean"
					},
					"bot": {
						"$ref": "#/components/schemas/BotDto"
					},
					"content": {},
					"plainContent": {
						"type": "string"
					},
					"imageUrl": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"latestComment": {
						"type": "string"
					},
					"latestPublicComment": {
						"type": "string"
					},
					"slaBreached": {
						"type": "boolean"
					},
					"hidden": {
						"type": "boolean"
					},
					"needInitialPush": {
						"type": "boolean"
					},
					"noHumanInteraction": {
						"type": "boolean"
					},
					"snoozed": {
						"type": "boolean"
					},
					"snoozedUntil": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"processingUser": {
						"type": "string"
					},
					"processingTeam": {
						"type": "string"
					},
					"queued": {
						"type": "boolean"
					},
					"queuedAt": {
						"type": "string",
						"format": "date-time"
					},
					"mentions": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"emailRefs": {
						"items": {},
						"type": "array"
					},
					"attributes": {},
					"formData": {},
					"form": {},
					"aiSummary": {
						"type": "string"
					},
					"aiSupportSummary": {
						"type": "string"
					},
					"dueDate": {
						"anyOf": [
							{
								"type": "string",
								"format": "date-time"
							},
							{
								"type": "string"
							}
						]
					},
					"linkedTickets": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"duplicateOf": {
						"type": "string"
					},
					"duplicatesCount": {
						"type": "number",
						"format": "double"
					},
					"session": {},
					"sessions": {
						"items": {},
						"type": "array"
					},
					"outbound": {
						"type": "string"
					},
					"priority": {
						"type": "string",
						"description": "Priority key of the ticket's board: LOW, MEDIUM, HIGH or a custom key; the\npriority's title is also accepted. Each board's priorities are listed by\nGET /projects/ticket-types."
					},
					"type": {
						"type": "string"
					},
					"sentiment": {
						"$ref": "#/components/schemas/Sentiment"
					},
					"status": {
						"type": "string"
					},
					"shareToken": {
						"type": "string"
					},
					"secretShareToken": {
						"type": "string"
					},
					"lexorank": {
						"type": "string"
					},
					"bugId": {
						"type": "number",
						"format": "double"
					},
					"project": {
						"type": "string"
					},
					"organisation": {
						"type": "string"
					},
					"screenshotUrl": {
						"type": "string"
					},
					"screenshotBroke": {
						"type": "string",
						"format": "date-time"
					},
					"generatingScreenshot": {
						"type": "boolean"
					},
					"screenshotRenderingFailed": {
						"type": "boolean"
					},
					"screenshotLive": {
						"type": "boolean"
					},
					"screenshotDataUrl": {},
					"isSilent": {
						"type": "boolean"
					},
					"replayDataUrl": {
						"type": "string"
					},
					"replayUrl": {
						"type": "string"
					},
					"generatingReplay": {
						"type": "boolean"
					},
					"replayStartDate": {
						"type": "string",
						"format": "date-time"
					},
					"replayRenderingStartedAt": {
						"type": "string",
						"format": "date-time"
					},
					"replayRenderingFailed": {
						"type": "boolean"
					},
					"replayLive": {
						"type": "boolean"
					},
					"originalEmailContent": {
						"type": "string"
					},
					"hasWebReplay": {
						"type": "boolean"
					},
					"integrations": {},
					"metaData": {},
					"actionLog": {},
					"customData": {},
					"replay": {},
					"lastResponse": {
						"$ref": "#/components/schemas/LastResponseDto"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"lastNotification": {
						"type": "string",
						"format": "date-time"
					},
					"faqSuggested": {
						"type": "boolean"
					},
					"notificationsUnread": {
						"type": "boolean"
					},
					"sessionNotificationsUnread": {
						"type": "boolean"
					},
					"hasAgentReply": {
						"type": "boolean"
					},
					"conversationRating": {
						"type": "number",
						"format": "double"
					},
					"upvotesCount": {
						"type": "number",
						"format": "double"
					},
					"upvotes": {
						"items": {
							"$ref": "#/components/schemas/UpvoteDto"
						},
						"type": "array"
					},
					"screenRecordingUrl": {
						"type": "string"
					},
					"firstAssignmentAt": {
						"type": "string",
						"format": "date-time"
					},
					"archived": {
						"type": "boolean"
					},
					"archivedAt": {
						"type": "string",
						"format": "date-time"
					},
					"disabled": {
						"type": "boolean"
					},
					"isSpam": {
						"type": "boolean"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"score": {
						"type": "number",
						"format": "double"
					},
					"channel": {
						"$ref": "#/components/schemas/TicketChannelDto"
					},
					"manuallyAdded": {
						"type": "boolean"
					},
					"fromData": {},
					"forceCloseOverride": {
						"type": "boolean"
					},
					"pipelineEntry": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "CRM pipeline entries to link this ticket to, verified against the project in\nupdateTicket (unknown/foreign ids drop the change). The list REPLACES the\nticket's links — send `[]` to unlink it from every entry."
					},
					"companyId": {
						"type": "string",
						"description": "The company this conversation is with, by its `companyId`. Changes the ticket only: no contact\nmoves. Must be a company of the project (anything else is ignored); `\"\"` clears it."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CloseTicketAsSpamDto": {
				"properties": {
					"reason": {
						"type": "string",
						"description": "Short internal justification shown in the activity log / status reason."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"OutboundEmailCategory": {
				"type": "string",
				"enum": [
					"conversational",
					"marketing",
					"service"
				],
				"description": "How an outbound email is sent.\n- `marketing`: the broadcast stream, with a visible unsubscribe link and one-click headers.\n- `conversational`: its own transactional stream (`outbound-conversational`), like a\n  personal email, with no unsubscribe link or header. Contacts who unsubscribed or whose\n  address bounced are still never sent outbound email (audience and send-time checks), so\n  this only drops the link.\nOne-off sends to an audience (fixed) are marketing unless they are a `service` notice (a vetted\nlegal / security / outage notice), and non-email outbounds (changelog subscriber emails) are\nalways marketing. Triggered (dynamic) emails choose; they default to\nconversational, which is also how they went out before the email rework."
			},
			"RenderPreviewBody": {
				"properties": {
					"emailStyle": {
						"type": "string"
					},
					"subject": {},
					"preheader": {},
					"message": {
						"description": "TipTap document, or `{ localized: { <lang>: document } }`."
					},
					"sender": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"properties": {
									"customSenderName": {
										"type": "string"
									},
									"id": {
										"type": "string"
									}
								},
								"type": "object"
							}
						],
						"description": "A teammate id, or `{ id?, customSenderName? }`. Defaults to the current user."
					},
					"lang": {
						"type": "string"
					},
					"brand": {
						"description": "Unsaved `emailBrand` values from the brand settings page."
					},
					"emailCategory": {
						"$ref": "#/components/schemas/OutboundEmailCategory",
						"description": "Conversational emails show no unsubscribe line. Defaults to marketing (a newsletter)."
					}
				},
				"required": [
					"emailStyle"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RenderCanvasBody": {
				"description": "Body of `render-canvas`: the preview body without the message, plus the editor's content selector.",
				"properties": {
					"sender": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"properties": {
									"customSenderName": {
										"type": "string"
									},
									"id": {
										"type": "string"
									}
								},
								"type": "object"
							}
						],
						"description": "A teammate id, or `{ id?, customSenderName? }`. Defaults to the current user."
					},
					"lang": {
						"type": "string"
					},
					"emailStyle": {
						"type": "string"
					},
					"subject": {},
					"preheader": {},
					"brand": {
						"description": "Unsaved `emailBrand` values from the brand settings page."
					},
					"emailCategory": {
						"$ref": "#/components/schemas/OutboundEmailCategory",
						"description": "Conversational emails show no unsubscribe line. Defaults to marketing (a newsletter)."
					},
					"root": {
						"type": "string",
						"description": "CSS selector of the editor's content element, e.g. `#email-canvas .ProseMirror`."
					}
				},
				"required": [
					"emailStyle",
					"root"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofoutboundSchema.any.ObtainSchemaGeneric_typeofoutboundSchema.DocType__": {
				"properties": {
					"commentEmailOptOuts": {},
					"tracking": {},
					"emailTemplate": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"sourceOutbound": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"survey": {},
					"aiSummaryAttemptedAt": {
						"type": "string",
						"format": "date-time"
					},
					"aiSummaryData": {},
					"trigger": {},
					"pageFilterDelay": {
						"type": "number",
						"format": "double"
					},
					"pageFilter": {
						"type": "string"
					},
					"eventTriggerDelay": {
						"type": "number",
						"format": "double"
					},
					"eventTrigger": {
						"type": "string"
					},
					"actionType": {
						"type": "string"
					},
					"sentAt": {
						"type": "string",
						"format": "date-time"
					},
					"stats": {},
					"coverImageUrl": {
						"type": "string"
					},
					"subType": {
						"type": "string"
					},
					"emailCategory": {
						"type": "string"
					},
					"preheader": {},
					"subject": {},
					"emailStyle": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"kai": {},
					"sender": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"searchContent": {
						"type": "string"
					},
					"project": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"data": {},
					"conditions": {},
					"config": {},
					"aiSummaryOutdated": {
						"type": "boolean"
					},
					"aiSummary": {
						"type": "string"
					},
					"organisation": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"message": {},
					"createdBy": {
						"properties": {
							"isValid": {
								"properties": {},
								"type": "object"
							},
							"createFromHexString": {
								"properties": {},
								"type": "object"
							},
							"createFromTime": {
								"properties": {},
								"type": "object"
							},
							"generate": {
								"properties": {},
								"type": "object"
							},
							"cacheHexString": {},
							"prototype": {
								"$ref": "#/components/schemas/ObjectId"
							}
						},
						"type": "object"
					},
					"startSendingAfter": {
						"type": "string",
						"format": "date-time"
					},
					"dropIfConditionsFail": {
						"type": "boolean"
					},
					"stopSendingAfter": {
						"type": "string",
						"format": "date-time"
					},
					"pageRules": {
						"items": {
							"properties": {
								"pageFilter": {
									"type": "string"
								},
								"pageFilterType": {
									"type": "string",
									"enum": [
										"is",
										"contains",
										"isnot",
										"notcontains",
										"startswith",
										"endswith",
										"empty",
										"notempty"
									]
								}
							},
							"required": [
								"pageFilterType"
							],
							"type": "object"
						},
						"type": "array"
					},
					"pageFilterType": {
						"type": "string",
						"enum": [
							"is",
							"contains",
							"isnot",
							"notcontains",
							"startswith",
							"endswith",
							"empty",
							"notempty"
						]
					},
					"frequencyDays": {
						"type": "number",
						"format": "double"
					},
					"frequency": {
						"type": "string"
					},
					"frequencyType": {
						"type": "string"
					},
					"sent": {
						"type": "boolean"
					},
					"sound": {
						"type": "boolean"
					},
					"newTrigger": {
						"type": "boolean"
					},
					"format": {
						"type": "string"
					},
					"hidden": {
						"type": "boolean"
					},
					"targetAudience": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"status": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"name": {
						"type": "string"
					},
					"type": {
						"type": "string"
					}
				},
				"required": [
					"startSendingAfter",
					"dropIfConditionsFail",
					"stopSendingAfter",
					"pageRules",
					"pageFilterType",
					"frequencyDays",
					"frequency",
					"frequencyType",
					"sent",
					"sound",
					"newTrigger",
					"format",
					"hidden",
					"targetAudience",
					"updatedAt",
					"createdAt",
					"status",
					"tags",
					"name",
					"type"
				],
				"type": "object"
			},
			"InferSchemaType_typeofoutboundSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofoutboundSchema.any.ObtainSchemaGeneric_typeofoutboundSchema.DocType__"
			},
			"OutboundI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofoutboundSchema_"
			},
			"OutboundDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/OutboundI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateAIContentDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"content": {},
					"contentId": {
						"type": "string"
					},
					"batchId": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"readMoreUrl": {
						"type": "string"
					},
					"readMoreLabel": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"content",
					"contentId",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateAIContentDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"content": {},
					"type": {
						"type": "string"
					},
					"batchId": {
						"type": "string"
					},
					"readMoreUrl": {
						"type": "string"
					},
					"readMoreLabel": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"content",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AnswerSourceFile": {
				"properties": {
					"repo": {
						"type": "string"
					},
					"path": {
						"type": "string"
					}
				},
				"required": [
					"repo",
					"path"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AnswerI": {
				"properties": {
					"question": {
						"type": "string"
					},
					"lang": {
						"type": "string"
					},
					"answer": {
						"type": "string"
					},
					"session": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							},
							{
								"type": "string"
							}
						]
					},
					"sourceName": {
						"type": "string"
					},
					"sourceLink": {
						"type": "string"
					},
					"sourceUsage": {
						"type": "number",
						"format": "double"
					},
					"ticket": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							},
							{
								"type": "string"
							}
						]
					},
					"acknowledged": {
						"type": "boolean"
					},
					"skipped": {
						"type": "boolean"
					},
					"preventChunking": {
						"type": "boolean"
					},
					"fileProcessingId": {
						"type": "string"
					},
					"fileProcessingCheckUrl": {
						"type": "string"
					},
					"fileProcessingStatus": {
						"type": "string",
						"enum": [
							"processing",
							"completed",
							"failed"
						]
					},
					"fileProcessingError": {},
					"filePageCount": {
						"type": "number",
						"format": "double"
					},
					"type": {
						"type": "string",
						"enum": [
							"text",
							"file",
							"product",
							"notion",
							"code_knowledge",
							"youtube"
						]
					},
					"batchId": {
						"type": "string"
					},
					"kaiSuggestion": {
						"type": "boolean"
					},
					"kaiMissingContext": {
						"type": "boolean"
					},
					"project": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							},
							{
								"type": "string"
							}
						]
					},
					"organisation": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							},
							{
								"type": "string"
							}
						]
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"externalId": {
						"type": "string"
					},
					"editedSections": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"folder": {
						"anyOf": [
							{
								"$ref": "#/components/schemas/Types.ObjectId"
							},
							{
								"type": "string"
							}
						],
						"nullable": true
					},
					"richContent": {},
					"analysisIdProduced": {
						"type": "string"
					},
					"reindexRequestedAt": {
						"type": "string",
						"format": "date-time"
					},
					"sourceFiles": {
						"items": {
							"$ref": "#/components/schemas/AnswerSourceFile"
						},
						"type": "array"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AnswerDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/AnswerI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateAnswerDTO": {
				"properties": {
					"question": {
						"type": "string"
					},
					"answer": {
						"type": "string"
					},
					"sourceName": {
						"type": "string"
					},
					"sourceLink": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"folder": {
						"type": "string",
						"nullable": true,
						"description": "Snippet folder id; null or '' files the snippet at the top level."
					},
					"richContent": {
						"description": "Rich-text body (TipTap JSON). When set, `answer` is derived from it as markdown."
					},
					"skipped": {
						"type": "boolean"
					},
					"fileProcessingId": {
						"type": "string"
					},
					"fileProcessingStatus": {
						"type": "string"
					},
					"fileProcessingError": {
						"type": "string"
					},
					"fileProcessingCheckUrl": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SnippetLearningState": {
				"type": "string",
				"enum": [
					"learned",
					"learning",
					"failed",
					"empty",
					"unknown"
				],
				"description": "Whether Kai has learned a project's snippets, from what its knowledge index\nholds. A snippet is \"learned\" once it has chunks in the index, \"learning\"\nwhile it was saved too recently for the ingestion pipeline to have written\nthem (seconds normally, a few minutes under load), and \"failed\" after that."
			},
			"SnippetLearningStatus": {
				"properties": {
					"state": {
						"$ref": "#/components/schemas/SnippetLearningState"
					},
					"checked": {
						"type": "number",
						"format": "double",
						"description": "Snippets checked: the most recently changed ones, see SNIPPET_LEARNING_CHECK_LIMIT."
					},
					"learned": {
						"type": "number",
						"format": "double"
					},
					"learning": {
						"type": "number",
						"format": "double"
					},
					"failed": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"state",
					"checked",
					"learned",
					"learning",
					"failed"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateAnswerDTO": {
				"properties": {
					"question": {
						"type": "string"
					},
					"answer": {
						"type": "string"
					},
					"sourceName": {
						"type": "string"
					},
					"sourceLink": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"folder": {
						"type": "string",
						"nullable": true,
						"description": "Snippet folder id; null or '' files the snippet at the top level."
					},
					"richContent": {
						"description": "Rich-text body (TipTap JSON). When set, `answer` is derived from it as markdown."
					},
					"skipped": {
						"type": "boolean"
					},
					"fileProcessingId": {
						"type": "string"
					},
					"fileProcessingStatus": {
						"type": "string"
					},
					"fileProcessingError": {
						"type": "string"
					},
					"fileProcessingCheckUrl": {
						"type": "string"
					},
					"acknowledged": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ReplaceAnswerSectionDto": {
				"properties": {
					"sectionHeading": {
						"type": "string"
					},
					"newContent": {
						"type": "string"
					}
				},
				"required": [
					"sectionHeading",
					"newContent"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DeleteAnswerSectionDto": {
				"properties": {
					"sectionHeading": {
						"type": "string"
					}
				},
				"required": [
					"sectionHeading"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BotDocument": {
				"$ref": "#/components/schemas/FlattenMaps_T_"
			},
			"Record_string.number_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"IfAny_typeofkaiFunctionsSchema.any.ObtainSchemaGeneric_typeofkaiFunctionsSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"convertedTo": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"testValues": {},
							"responseMode": {},
							"exampleResponse": {},
							"customDataFormat": {},
							"selectedFields": {},
							"dataAccessMode": {},
							"parameters": {},
							"certificates": {},
							"customAnswerPrompt": {
								"type": "string"
							},
							"convertedAt": {
								"type": "string",
								"format": "date-time"
							},
							"url": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"headers": {},
							"organisation": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"description": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"method": {
								"type": "string",
								"enum": [
									"GET",
									"POST",
									"DELETE",
									"PUT",
									"PATCH"
								]
							},
							"access": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"type": {
								"type": "string",
								"enum": [
									"qa",
									"action"
								]
							}
						},
						"required": [
							"method",
							"access",
							"type"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofkaiFunctionsSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofkaiFunctionsSchema.any.ObtainSchemaGeneric_typeofkaiFunctionsSchema.DocType__"
			},
			"KaiFunctionI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofkaiFunctionsSchema_"
			},
			"KaiFunctionDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/KaiFunctionI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateKaiFunction": {
				"properties": {
					"name": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"access": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"description": {
						"type": "string"
					},
					"customAnswerPrompt": {
						"type": "string"
					},
					"certificates": {},
					"url": {
						"type": "string"
					},
					"headers": {},
					"parameters": {},
					"dataAccessMode": {},
					"selectedFields": {},
					"customDataFormat": {},
					"exampleResponse": {},
					"responseMode": {},
					"testValues": {},
					"method": {
						"type": "string"
					}
				},
				"required": [
					"name",
					"type",
					"access",
					"description",
					"customAnswerPrompt",
					"certificates",
					"url",
					"headers",
					"parameters",
					"dataAccessMode",
					"selectedFields",
					"customDataFormat",
					"exampleResponse",
					"responseMode",
					"testValues",
					"method"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AxiosHeaders": {
				"$ref": "#/components/schemas/Record_string.string_"
			},
			"AxiosHeaderValue": {
				"anyOf": [
					{
						"$ref": "#/components/schemas/AxiosHeaders"
					},
					{
						"type": "string"
					},
					{
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					{
						"type": "number",
						"format": "double"
					},
					{
						"type": "boolean"
					}
				],
				"nullable": true
			},
			"Partial_RawAxiosHeaders-and-RawCommonResponseHeaders_": {
				"properties": {
					"Content-Length": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"Content-Encoding": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"Content-Type": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"Server": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"Cache-Control": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"content-length": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"content-encoding": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"content-type": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"server": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"cache-control": {
						"$ref": "#/components/schemas/AxiosHeaderValue"
					},
					"set-cookie": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"RawAxiosResponseHeaders": {
				"$ref": "#/components/schemas/Partial_RawAxiosHeaders-and-RawCommonResponseHeaders_"
			},
			"AxiosResponseHeaders": {
				"allOf": [
					{
						"$ref": "#/components/schemas/RawAxiosResponseHeaders"
					},
					{
						"$ref": "#/components/schemas/AxiosHeaders"
					}
				]
			},
			"Partial_any_": {
				"properties": {},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"UpdateDomainDto": {
				"properties": {
					"senderType": {
						"type": "string"
					},
					"senderName": {
						"type": "string"
					},
					"senderEmail": {
						"type": "string"
					},
					"replyToName": {
						"type": "string"
					},
					"emailNativeReplyTo": {
						"type": "boolean"
					},
					"nativeReplyToEmail": {
						"type": "string"
					}
				},
				"required": [
					"senderType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RecrawlInterval": {
				"type": "string",
				"enum": [
					"DAILY",
					"WEEKLY",
					"BIWEEKLY",
					"MONTHLY"
				],
				"nullable": false
			},
			"HeaderDto": {
				"properties": {
					"key": {
						"type": "string"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"key",
					"value"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateWebCrawlerDto": {
				"properties": {
					"url": {
						"type": "string"
					},
					"followLinks": {
						"type": "boolean"
					},
					"excludePaths": {
						"type": "string"
					},
					"includePaths": {
						"type": "string"
					},
					"excludeTags": {
						"type": "string"
					},
					"includeTags": {
						"type": "string"
					},
					"isSitemap": {
						"type": "boolean"
					},
					"ignoreQueryParameters": {
						"type": "boolean"
					},
					"waitForResponse": {
						"type": "boolean"
					},
					"recrawl": {
						"type": "boolean"
					},
					"recrawlInterval": {
						"$ref": "#/components/schemas/RecrawlInterval",
						"description": "How often the source is automatically recrawled. Defaults to MONTHLY."
					},
					"headers": {
						"items": {
							"$ref": "#/components/schemas/HeaderDto"
						},
						"type": "array"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"crawlDelay": {
						"type": "integer",
						"format": "int32",
						"description": "Seconds to wait between page requests (0 = no delay). Forces the crawl to a single connection.",
						"minimum": 0,
						"maximum": 30
					},
					"maxConcurrency": {
						"type": "integer",
						"format": "int32",
						"description": "Max concurrent page requests against the target site (0 = provider default).",
						"minimum": 0,
						"maximum": 50
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PlanTier": {
				"type": "string",
				"enum": [
					"free",
					"starter",
					"team",
					"pro",
					"enterprise"
				]
			},
			"RequiredPlan": {
				"type": "string",
				"enum": [
					"starter",
					"team",
					"pro",
					"enterprise"
				]
			},
			"CrawlUsageSummary": {
				"description": "The crawl limits of a workspace as the dashboard shows them.",
				"properties": {
					"plan": {
						"$ref": "#/components/schemas/PlanTier"
					},
					"pagesIndexed": {
						"type": "number",
						"format": "double"
					},
					"pagesCap": {
						"type": "number",
						"format": "double"
					},
					"sourcesCap": {
						"type": "number",
						"format": "double"
					},
					"recrawlIntervals": {
						"items": {
							"$ref": "#/components/schemas/RecrawlInterval"
						},
						"type": "array"
					},
					"dailyRecrawlMaxPages": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"manualRecrawlCooldownHours": {
						"type": "number",
						"format": "double"
					},
					"citationPauseDays": {
						"type": "number",
						"format": "double"
					},
					"upgrade": {
						"properties": {
							"pagesCap": {
								"type": "number",
								"format": "double"
							},
							"plan": {
								"$ref": "#/components/schemas/RequiredPlan"
							}
						},
						"required": [
							"pagesCap",
							"plan"
						],
						"type": "object",
						"nullable": true,
						"description": "The lowest plan that indexes more pages, with its cap; null when none does."
					},
					"legacyPerCrawlPages": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "A workspace on the old terms: the pages one crawl may fetch, with no\nworkspace total (pagesCap is then only what the table would allow on top).\nnull on the new terms."
					}
				},
				"required": [
					"plan",
					"pagesIndexed",
					"pagesCap",
					"sourcesCap",
					"recrawlIntervals",
					"dailyRecrawlMaxPages",
					"manualRecrawlCooldownHours",
					"citationPauseDays",
					"upgrade",
					"legacyPerCrawlPages"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebCrawlerTaskDocument": {
				"$ref": "#/components/schemas/FlattenMaps_T_"
			},
			"UpdateWebCrawlerTaskDto": {
				"properties": {
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"recrawl": {
						"type": "boolean"
					},
					"recrawlInterval": {
						"$ref": "#/components/schemas/RecrawlInterval",
						"description": "How often the source is automatically recrawled."
					},
					"crawlDelay": {
						"type": "integer",
						"format": "int32",
						"description": "Seconds to wait between page requests (0 = no delay). Forces the crawl to a single connection.",
						"minimum": 0,
						"maximum": 30
					},
					"maxConcurrency": {
						"type": "integer",
						"format": "int32",
						"description": "Max concurrent page requests against the target site (0 = provider default).",
						"minimum": 0,
						"maximum": 50
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"FirecrawlCrawlStatusSummary": {
				"description": "A crawl job's progress fields, without any of the crawled page content.",
				"properties": {
					"status": {
						"type": "string"
					},
					"total": {
						"type": "number",
						"format": "double"
					},
					"completed": {
						"type": "number",
						"format": "double"
					},
					"creditsUsed": {
						"type": "number",
						"format": "double"
					},
					"error": {
						"type": "string"
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CustomerDataResponse": {
				"description": "DTO for customer data response",
				"properties": {
					"success": {
						"type": "boolean"
					},
					"message": {
						"type": "string"
					},
					"data": {
						"items": {
							"properties": {
								"createdAt": {
									"type": "string",
									"format": "date-time"
								},
								"events": {},
								"customData": {},
								"userId": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"email": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"createdAt",
								"events",
								"customData",
								"userId",
								"name",
								"email",
								"id"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"success"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CustomerDataRequestPayload": {
				"description": "DTO for customer data request webhook payload",
				"properties": {
					"shop_id": {
						"type": "number",
						"format": "double"
					},
					"shop_domain": {
						"type": "string"
					},
					"customer": {
						"properties": {
							"phone": {
								"type": "string"
							},
							"email": {
								"type": "string"
							},
							"id": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"email",
							"id"
						],
						"type": "object"
					},
					"orders_requested": {
						"type": "boolean"
					}
				},
				"required": [
					"shop_id",
					"shop_domain",
					"customer",
					"orders_requested"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RedactionResponse": {
				"description": "DTO for redaction response",
				"properties": {
					"success": {
						"type": "boolean"
					},
					"message": {
						"type": "string"
					}
				},
				"required": [
					"success",
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CustomerRedactPayload": {
				"description": "DTO for customer data redaction webhook payload",
				"properties": {
					"shop_id": {
						"type": "number",
						"format": "double"
					},
					"shop_domain": {
						"type": "string"
					},
					"customer": {
						"properties": {
							"phone": {
								"type": "string"
							},
							"email": {
								"type": "string"
							},
							"id": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"email",
							"id"
						],
						"type": "object"
					}
				},
				"required": [
					"shop_id",
					"shop_domain",
					"customer"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ShopRedactPayload": {
				"description": "DTO for shop data redaction webhook payload",
				"properties": {
					"shop_id": {
						"type": "number",
						"format": "double"
					},
					"shop_domain": {
						"type": "string"
					}
				},
				"required": [
					"shop_id",
					"shop_domain"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateProjectDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"picture": {
						"type": "string"
					},
					"description": {
						"type": "string"
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateOnboardingDto": {
				"properties": {
					"skippedSteps": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Ids of onboarding steps the user chose to skip. Replaces the stored list."
					},
					"dismissedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true,
						"description": "Set to a date to hide the checklist, or null to un-hide it."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateProjectBusinessDto": {
				"description": "`PUT /projects/current/business`: a project's own website, business type\nand store (onboarding v2 for a new project). Every field is optional and\nhas no initializer: a partial PUT leaves the others as they are.",
				"properties": {
					"website": {
						"type": "string",
						"description": "The project's website, like `acme.com`."
					},
					"businessType": {
						"type": "string",
						"description": "The business the project serves: 'saas', 'ecommerce' or 'services'."
					},
					"source": {
						"type": "string",
						"description": "How it was chosen: 'picked' (default), 'scan_confirmed', 'scan_suggested' or 'not_sure'."
					},
					"store": {
						"type": "string",
						"description": "Its store: 'shopify', 'woocommerce', 'other' or 'custom'; 'none' clears it."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ProfileSignatureField": {
				"type": "string",
				"enum": [
					"photo",
					"jobTitle",
					"calendarLink",
					"phone"
				],
				"description": "Fields that come from the teammate's profile (website comes from the brand)."
			},
			"EmailSignaturePreview": {
				"properties": {
					"html": {
						"type": "string"
					},
					"text": {
						"type": "string"
					},
					"missing": {
						"items": {
							"$ref": "#/components/schemas/ProfileSignatureField"
						},
						"type": "array"
					}
				},
				"required": [
					"html",
					"text",
					"missing"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EmailSignaturePreviewBody": {
				"properties": {
					"emailSignature": {
						"description": "Unsaved `project.emailSignature` values; the saved ones when absent."
					},
					"userId": {
						"type": "string",
						"description": "The teammate to preview; the current user when absent."
					},
					"look": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SignatureTeammate": {
				"properties": {
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"missing": {
						"items": {
							"$ref": "#/components/schemas/ProfileSignatureField"
						},
						"type": "array"
					}
				},
				"required": [
					"userId",
					"name",
					"missing"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AuroraAppearanceInput": {
				"properties": {
					"bgType": {
						"type": "string"
					},
					"bgImage": {
						"type": "string"
					},
					"headerColor": {
						"type": "string"
					},
					"headerColor2": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"backgroundColor": {
						"type": "string"
					},
					"variant": {
						"type": "number",
						"format": "double"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateConversationDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"session": {
						"type": "string"
					},
					"channel": {},
					"processingTeam": {
						"type": "string"
					},
					"initiatedByAgent": {
						"type": "boolean"
					}
				},
				"required": [
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EditorAIActionDto": {
				"properties": {
					"action": {
						"type": "string",
						"enum": [
							"emojify",
							"capitalize",
							"simplify",
							"fix-spelling-and-grammar",
							"shorten",
							"extend",
							"adjust-tone",
							"tldr",
							"translate",
							"complete",
							"rephrase",
							"ai-writer",
							"custom-regenerate",
							"prompt"
						]
					},
					"text": {
						"type": "string"
					},
					"data": {}
				},
				"required": [
					"action"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofroleSchema.any.ObtainSchemaGeneric_typeofroleSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"alias": {
								"type": "string"
							},
							"organisation": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"description": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"revokedPermissionGroups": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"permissionGroups": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"required": [
							"revokedPermissionGroups",
							"permissionGroups"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofroleSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofroleSchema.any.ObtainSchemaGeneric_typeofroleSchema.DocType__"
			},
			"RoleI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofroleSchema_"
			},
			"RoleDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/RoleI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"IfAny_typeofinvitationSchema.any.ObtainSchemaGeneric_typeofinvitationSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"organisation": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"email": {
								"type": "string"
							},
							"role": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"type": {
								"type": "string",
								"enum": [
									"organisation",
									"project"
								]
							}
						},
						"required": [
							"role",
							"name",
							"type"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofinvitationSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofinvitationSchema.any.ObtainSchemaGeneric_typeofinvitationSchema.DocType__"
			},
			"Invitation": {
				"$ref": "#/components/schemas/InferSchemaType_typeofinvitationSchema_"
			},
			"InvitationDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/Invitation"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"BoardRole": {
				"type": "string",
				"enum": [
					"edit",
					"view"
				]
			},
			"MemberAccess": {
				"properties": {
					"boards": {
						"items": {
							"properties": {
								"role": {
									"$ref": "#/components/schemas/BoardRole"
								},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"role",
								"type"
							],
							"type": "object"
						},
						"type": "array"
					},
					"agents": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"boards",
					"agents"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Record_string.unknown_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"PublicSessionData": {
				"allOf": [
					{
						"$ref": "#/components/schemas/Record_string.unknown_"
					},
					{
						"properties": {
							"customData": {}
						},
						"type": "object"
					}
				]
			},
			"BillingCurrency": {
				"type": "string",
				"enum": [
					"USD",
					"EUR",
					"GBP"
				]
			},
			"AgentUsageGroup": {
				"type": "string",
				"enum": [
					"copilot",
					"phone",
					"code",
					"custom",
					"support",
					"specialist",
					"pm",
					"database",
					"other"
				]
			},
			"UnitPricingSummary": {
				"properties": {
					"pricingModel": {
						"type": "string",
						"enum": [
							"units"
						],
						"nullable": false
					},
					"outcomeBilled": {
						"type": "boolean",
						"description": "Kai is billed per resolution (Starter, Team, Pro); false on Free and in the trial, where Kai is included, and when Kai Support is token billed."
					},
					"kaiSupportBilling": {
						"type": "string",
						"enum": [
							"resolution",
							"tokens"
						],
						"description": "How Kai Support is paid outside Free and the trial: per resolution, or by its tokens (the `support` usage row) on request."
					},
					"kaiIncluded": {
						"type": "boolean",
						"description": "Free on the new terms and the 7-day Pro trial: Kai included, never billed."
					},
					"topUpsAvailable": {
						"type": "boolean",
						"description": "Top-ups and auto-recharge are offered (never on Free, never in the trial)."
					},
					"trialKai": {
						"properties": {
							"cap": {
								"type": "number",
								"format": "double"
							},
							"used": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"cap",
							"used"
						],
						"type": "object",
						"nullable": true,
						"description": "The 7-day Pro trial: Kai's conversations so far and the cap (50); null outside the trial."
					},
					"displayCurrency": {
						"$ref": "#/components/schemas/BillingCurrency",
						"description": "The currency every `*Local*` amount is in (the wallet's display currency)."
					},
					"period": {
						"type": "string"
					},
					"tier": {
						"type": "string",
						"enum": [
							"free",
							"starter",
							"team",
							"pro"
						]
					},
					"kaiResolution": {
						"properties": {
							"unitPriceLocalMinor": {
								"type": "number",
								"format": "double"
							},
							"unitPriceLocal": {
								"type": "number",
								"format": "double",
								"description": "The price of one resolution in the display currency: 0.29 / 0.29 / 0.25 (major units) and in minor units."
							},
							"localAmountMinor": {
								"type": "number",
								"format": "double",
								"description": "This month's resolutions in the billing currency."
							},
							"localUnitPriceMinor": {
								"type": "number",
								"format": "double"
							},
							"currency": {
								"$ref": "#/components/schemas/BillingCurrency",
								"description": "The workspace's billing currency and the price in it (29 / 29 / 25)."
							},
							"unitPriceMinor": {
								"type": "number",
								"format": "double",
								"description": "USD wallet cents one resolution debits."
							},
							"amountMinor": {
								"type": "number",
								"format": "double",
								"description": "Debited from the USD wallet this month, in USD cents."
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"unitPriceLocalMinor",
							"unitPriceLocal",
							"localAmountMinor",
							"localUnitPriceMinor",
							"currency",
							"unitPriceMinor",
							"amountMinor",
							"count"
						],
						"type": "object"
					},
					"usageByAgent": {
						"items": {
							"properties": {
								"amountLocalMinor": {
									"type": "number",
									"format": "double"
								},
								"amountMinor": {
									"type": "number",
									"format": "double"
								},
								"label": {
									"type": "string"
								},
								"group": {
									"$ref": "#/components/schemas/AgentUsageGroup"
								}
							},
							"required": [
								"amountLocalMinor",
								"amountMinor",
								"label",
								"group"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Token-based usage this month, by agent, in USD cents and in the display currency (every group listed, 0 when unused)."
					},
					"tokenUsageMinor": {
						"type": "number",
						"format": "double"
					},
					"tokenUsageLocalMinor": {
						"type": "number",
						"format": "double"
					},
					"pendingKaiResolutions": {
						"properties": {
							"reservedLocalMinor": {
								"type": "number",
								"format": "double"
							},
							"reservedMinor": {
								"type": "number",
								"format": "double"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"reservedLocalMinor",
							"reservedMinor",
							"count"
						],
						"type": "object",
						"description": "Conversations Kai answered whose resolution is not decided yet: one\nprice each is held against the balance until it is charged or turns out\nfree (kaiResolutionReservation.rules.ts). USD cents and the display currency."
					},
					"included": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Everything the terms include, never billed."
					}
				},
				"required": [
					"pricingModel",
					"outcomeBilled",
					"kaiSupportBilling",
					"kaiIncluded",
					"topUpsAvailable",
					"trialKai",
					"displayCurrency",
					"period",
					"tier",
					"kaiResolution",
					"usageByAgent",
					"tokenUsageMinor",
					"tokenUsageLocalMinor",
					"pendingKaiResolutions",
					"included"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateOrganisationDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"picture": {
						"type": "string"
					},
					"masterOrganisationId": {
						"type": "string"
					},
					"homepage": {
						"type": "string"
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FetchWebsiteCiMode": {
				"type": "string",
				"enum": [
					"full",
					"branding",
					"demo"
				]
			},
			"FetchWebsiteCiDto": {
				"properties": {
					"url": {
						"type": "string"
					},
					"mode": {
						"$ref": "#/components/schemas/FetchWebsiteCiMode",
						"description": "`branding`: answer from Brandfetch as soon as it has the logo and colours\n(no page scrape); `demo`: the Firecrawl scrape only, for the AI demo\nconversation; `full` (default): both, merged."
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateUserRoleDto": {
				"properties": {
					"role": {
						"type": "string"
					}
				},
				"required": [
					"role"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OpenAIAdsAttributionDto": {
				"properties": {
					"openAIAdsConsent": {
						"type": "boolean"
					},
					"openAIAdsClickRef": {
						"type": "string",
						"maxLength": 4096
					},
					"openAIAdsBrowserRef": {
						"type": "string",
						"maxLength": 256
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"PushTokenRegistrationDto": {
				"properties": {
					"fcmToken": {
						"type": "string"
					},
					"platform": {
						"type": "string",
						"description": "'web' | 'desktop' | 'ios' | 'android'"
					},
					"deviceName": {
						"type": "string",
						"description": "Shown in the device list, e.g. \"Chrome on macOS\"."
					}
				},
				"required": [
					"fcmToken"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PushPlatform": {
				"type": "string",
				"enum": [
					"web",
					"desktop",
					"ios",
					"android",
					"unknown"
				],
				"description": "The devices a person gets pushes on (`user.pushDevices`), as pure functions\nover the stored arrays: register, list, prune. The service\n(pushDevice.service.ts) owns the reads and writes. Leaf: no models.\n\nOne token, one owner: a browser or phone that someone else signed in on\nbefore must stop receiving that account's pushes the moment it registers\nfor the new one (487 tokens sat on 2–8 accounts at once)."
			},
			"PushDeviceView": {
				"description": "What a device looks like in an API response: never the token.",
				"properties": {
					"id": {
						"type": "string"
					},
					"platform": {
						"$ref": "#/components/schemas/PushPlatform"
					},
					"name": {
						"type": "string"
					},
					"lastRegisteredAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"lastDeliveredAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"lastErrorCode": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"id",
					"platform",
					"name",
					"lastRegisteredAt",
					"lastDeliveredAt",
					"lastErrorCode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PushPresenceDto": {
				"properties": {
					"focused": {
						"type": "boolean"
					},
					"client": {
						"type": "string",
						"enum": [
							"web",
							"desktop"
						]
					}
				},
				"required": [
					"focused"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UserQuietHoursDto": {
				"description": "Quiet hours: pushes go out inside these working hours only.",
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"days": {
						"items": {
							"type": "number",
							"format": "double"
						},
						"type": "array",
						"description": "0 = Sunday … 6 = Saturday."
					},
					"start": {
						"type": "string",
						"description": "'HH:mm'"
					},
					"end": {
						"type": "string",
						"description": "'HH:mm'"
					},
					"timezone": {
						"type": "string",
						"description": "IANA time zone, e.g. 'Europe/Vienna'."
					}
				},
				"required": [
					"enabled",
					"days",
					"start",
					"end",
					"timezone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UserCustomPushDto": {
				"description": "The Advanced push switches: each kind of push on or off. A key left out is off.",
				"properties": {
					"own": {
						"type": "boolean"
					},
					"direct": {
						"type": "boolean"
					},
					"teamHandoff": {
						"type": "boolean"
					},
					"sla": {
						"type": "boolean"
					},
					"newTeam": {
						"type": "boolean"
					},
					"newOther": {
						"type": "boolean"
					},
					"agentTasks": {
						"type": "boolean"
					},
					"teamMessages": {
						"type": "boolean"
					},
					"otherMessages": {
						"type": "boolean"
					},
					"workflow": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UserChannelSetDto": {
				"description": "The channels of one kind of notification. A key left out is off.",
				"properties": {
					"push": {
						"type": "boolean"
					},
					"email": {
						"type": "boolean"
					},
					"updates": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UserNotificationChannelsDto": {
				"description": "Push, email and Updates for each kind of notification. A kind left out is off.",
				"properties": {
					"messages": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"mentions": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"assignments": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"agentQuestions": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"teamHandoffs": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"sla": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"newTeam": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"teamMessages": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"workflow": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"newOther": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"otherMessages": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					},
					"agentTasks": {
						"$ref": "#/components/schemas/UserChannelSetDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UserNotificationSettingsDto": {
				"description": "`notificationSettings` keys to change: merged into the stored ones, a key left out keeps its value.",
				"properties": {
					"pushLevel": {
						"type": "string",
						"enum": [
							"mine",
							"teams",
							"everything",
							"off",
							"custom"
						],
						"description": "When to push: `mine` (your conversations, mentions, hand-offs, agent asks, new conversations\nnobody picked up), `teams` (plus your teams' conversations), `everything`, `off`, `custom`\n(your own switches in `customPush`)."
					},
					"quietHours": {
						"$ref": "#/components/schemas/UserQuietHoursDto"
					},
					"missedEmail": {
						"type": "boolean",
						"description": "One email with what waited on you while you were away."
					},
					"mentionEmail": {
						"type": "boolean",
						"description": "One email for every @mention, sent right away, also while you are in Gleap."
					},
					"messageEmail": {
						"type": "boolean",
						"description": "One email for every new conversation and customer message your push level reaches, sent right\naway, also while you are in Gleap (one per conversation every few minutes)."
					},
					"projectPushLevels": {
						"properties": {},
						"additionalProperties": {
							"type": "string",
							"enum": [
								"mine",
								"teams",
								"everything",
								"off",
								"direct",
								"custom"
							],
							"nullable": true
						},
						"type": "object",
						"description": "Per project, keyed by project id: a level for that project only, `direct` (only mentions,\nassignments and agents asking you), `custom` (the switches in `projectCustomPush`) or null to\nfollow `pushLevel`. Merged per project."
					},
					"customPush": {
						"$ref": "#/components/schemas/UserCustomPushDto",
						"description": "The switches used while `pushLevel` is `custom`. Replaced as a whole."
					},
					"projectCustomPush": {
						"properties": {},
						"additionalProperties": {
							"allOf": [
								{
									"$ref": "#/components/schemas/UserCustomPushDto"
								}
							],
							"nullable": true
						},
						"type": "object",
						"description": "Per project id: the switches used while that project's level is `custom`, or null. Merged per project."
					},
					"channels": {
						"$ref": "#/components/schemas/UserNotificationChannelsDto",
						"description": "The channel table used while `pushLevel` is `custom`. Replaced as a whole; wins over `customPush`."
					},
					"projectChannels": {
						"properties": {},
						"additionalProperties": {
							"allOf": [
								{
									"$ref": "#/components/schemas/UserNotificationChannelsDto"
								}
							],
							"nullable": true
						},
						"type": "object",
						"description": "Per project id: the channel table used while that project's level is `custom`, or null. Merged per project."
					},
					"sendEmailOnlyWhenOffline": {
						"type": "boolean",
						"description": "No longer read; accepted so older clients still save."
					},
					"directlySendNotifications": {
						"type": "boolean"
					},
					"preventNotificationsWhereICreator": {
						"type": "boolean"
					},
					"agentNotifyLevel": {
						"type": "string",
						"enum": [
							"needed",
							"all",
							"off"
						],
						"description": "No longer read: the agent level follows `pushLevel` (off → off, everything → all, else needed)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateUserDto": {
				"properties": {
					"firstName": {
						"type": "string"
					},
					"lastName": {
						"type": "string"
					},
					"userRole": {
						"type": "string"
					},
					"jobTitle": {
						"type": "string"
					},
					"department": {
						"type": "string"
					},
					"phone": {
						"type": "string"
					},
					"calendarLink": {
						"type": "string"
					},
					"socialLink": {
						"type": "string"
					},
					"otherLink": {
						"type": "string"
					},
					"knewGleapFrom": {
						"type": "string"
					},
					"userUsage": {
						"type": "string"
					},
					"profileImageUrl": {
						"type": "string"
					},
					"completedOnboarding": {
						"type": "boolean"
					},
					"available": {
						"type": "boolean"
					},
					"unavailableProjects": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"awayUntil": {
						"type": "string",
						"description": "\"Away until\" (ISO date, at most a year ahead); an empty string clears it."
					},
					"sendOnEnter": {
						"type": "boolean",
						"description": "Inbox composer: Enter sends the reply, Shift+Enter adds a new line. Off by default (Ctrl/Cmd+Enter sends)."
					},
					"hideAgentHandled": {
						"type": "boolean",
						"description": "Hard tickets: \"Hide tickets agents are handling\" (the inbox list's ⋯ menu). Absent = on."
					},
					"hardTicketStartWith": {
						"type": "string",
						"description": "Hard tickets: the Work-on-it button's default: 'cloud', 'bridge:<deviceId>', 'claude_code', 'codex', 'cursor' or 'antigravity'."
					},
					"notificationPreferences": {},
					"notificationSettings": {
						"$ref": "#/components/schemas/UserNotificationSettingsDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"StringMap": {
				"description": "A free-form string map. Declared as an index signature, not `Record<string,\nstring>`: tsoa renders a Record as an object without properties, and with\n`noImplicitAdditionalProperties: silently-remove-extras` every key was\nstripped at the route before the service saw it (the ad click ids and the\nGA session ids arrived empty).",
				"properties": {},
				"type": "object",
				"additionalProperties": {
					"type": "string"
				}
			},
			"CreateUserDto": {
				"properties": {
					"openAIAdsConsent": {
						"type": "boolean"
					},
					"openAIAdsClickRef": {
						"type": "string",
						"maxLength": 4096
					},
					"openAIAdsBrowserRef": {
						"type": "string",
						"maxLength": 256
					},
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"referral": {
						"type": "string"
					},
					"utm_source": {
						"type": "string",
						"nullable": true
					},
					"utm_medium": {
						"type": "string",
						"nullable": true
					},
					"utm_term": {
						"type": "string",
						"nullable": true
					},
					"utm_content": {
						"type": "string",
						"nullable": true
					},
					"utm_campaign": {
						"type": "string",
						"nullable": true
					},
					"onboardingFlow": {
						"type": "string"
					},
					"turnstileToken": {
						"type": "string"
					},
					"gaClientId": {
						"type": "string"
					},
					"gaSessionId": {
						"type": "string"
					},
					"gaSessionIds": {
						"$ref": "#/components/schemas/StringMap"
					},
					"adClickIds": {
						"$ref": "#/components/schemas/StringMap",
						"description": "First-touch ad click ids of the visit (gclid, gbraid, wbraid, msclkid, fbclid, li_fat_id).\nStored once, never overwritten."
					},
					"acquisitionTouch": {
						"$ref": "#/components/schemas/StringMap",
						"description": "One immutable, sanitized marketing visit; ad IDs identify spend rows."
					},
					"adConsent": {
						"type": "string",
						"description": "The visitor's Cookiebot marketing decision on the marketing site (`granted` | `denied`),\nforwarded as `ad_consent`. Last decision wins; see signupAttribution.ts adConsentChanges."
					},
					"ref": {
						"type": "string",
						"nullable": true,
						"description": "`ref` of the \"Powered by Gleap\" badge the visit came from (first touch)."
					},
					"landingPage": {
						"type": "string",
						"nullable": true,
						"description": "First dashboard page of the visit (first touch)."
					},
					"referrer": {
						"type": "string",
						"nullable": true,
						"description": "Page that referred the first visit (first touch)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ReportScopeCapabilities": {
				"description": "Which capability-gated reports the viewer can open.",
				"properties": {
					"colleaguePerformance": {
						"type": "boolean"
					},
					"reviewScores": {
						"type": "boolean",
						"description": "Per-teammate review scores (TICKET_REVIEW_HUMAN_VIEW)."
					},
					"reviews": {
						"type": "boolean",
						"description": "Ticket-review reports: quality score, Kai accuracy, reviewed tickets (TICKET_REVIEW_VIEW)."
					},
					"helpCenter": {
						"type": "boolean",
						"description": "Help-center reports: article views and search terms (HELP_CENTER_ARTICLE_FIND)."
					},
					"aiCost": {
						"type": "boolean"
					},
					"export": {
						"type": "boolean"
					},
					"topics": {
						"type": "boolean",
						"description": "Topic reports: ticket analyses (TICKET_ANALYSIS_VIEW)."
					},
					"contacts": {
						"type": "boolean",
						"description": "Contact reports: sessions (SESSION_FIND)."
					}
				},
				"required": [
					"colleaguePerformance",
					"reviewScores",
					"reviews",
					"helpCenter",
					"aiCost",
					"export",
					"topics",
					"contacts"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportScopeSummary": {
				"description": "What the requesting teammate can see in Reports (GET /statistics/scope).",
				"properties": {
					"enforced": {
						"type": "boolean",
						"description": "Whether report numbers are scoped to the viewer (REPORT_VIEWER_SCOPE=on)."
					},
					"excludedBoardCount": {
						"type": "number",
						"format": "double",
						"description": "Boards of the project left out of the viewer's numbers: a count, never names."
					},
					"can": {
						"$ref": "#/components/schemas/ReportScopeCapabilities"
					}
				},
				"required": [
					"enforced",
					"excludedBoardCount",
					"can"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportLockReason": {
				"type": "string",
				"enum": [
					"colleague_performance",
					"review_scores",
					"reviews",
					"help_center",
					"ai_cost",
					"export",
					"topics",
					"contacts",
					"board_access"
				]
			},
			"ReportLockedResponse": {
				"description": "The 403 body of a report the viewer may not see; the dashboard shows a locked state for `reason`.",
				"properties": {
					"code": {
						"type": "string",
						"enum": [
							"REPORT_LOCKED"
						],
						"nullable": false
					},
					"reason": {
						"$ref": "#/components/schemas/ReportLockReason"
					}
				},
				"required": [
					"code",
					"reason"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BarChartStatisticTypes": {
				"enum": [
					"NEW_TICKETS_COUNT",
					"TICKET_CLOSE_COUNT",
					"REPLIES_COUNT",
					"TICKET_WORKED_ON_COUNT",
					"TICKETS_WITHOUT_REPLY_RATE",
					"MEDIAN_FIRST_RESPONSE_TIME",
					"MEDIAN_TIME_TO_CLOSE",
					"MEDIAN_REPLY_TIME",
					"MEDIAN_CONVERSATION_RATING",
					"MEDIAN_REASSIGNMENT_COUNT",
					"MEDIAN_TIME_TO_FIRST_ASSIGNMENT",
					"HELP_CENTER_ARTICLE_VIEW_COUNT",
					"NEWS_VIEW_COUNT",
					"CHANGELOG_VIEW_COUNT",
					"KAI_INVOLVED",
					"MESSAGE_COUNT",
					"AI_QUESTIONS_ASKED_COUNT",
					"CUSTOMER_SUPPORT_REQUESTED",
					"SLA_BREACHES_COUNT",
					"SLA_STARTED_COUNT",
					"TICKET_CREATION_GROUPED_BY_DATE_AND_TAGS",
					"AI_RATING_GROUPED_BY_DATE",
					"WIDGET_OPENED_COUNT_BY_DATE",
					"HOME_MENU_CLICK_COUNT_BY_DATE",
					"CONVERSATION_STARTED_COUNT_BY_DATE",
					"TICKET_REVIEW_SCORE_BY_DATE"
				],
				"type": "string"
			},
			"AgentBarChartTypes": {
				"enum": [
					"AGENT_RUNS_COUNT_BY_DATE",
					"AGENT_COST_BY_DATE",
					"AGENT_TASKS_CREATED_BY_DATE",
					"AGENT_TASKS_RESOLVED_BY_DATE"
				],
				"type": "string"
			},
			"FactTypes": {
				"enum": [
					"MEDIAN_FIRST_RESPONSE_TIME",
					"MEDIAN_TIME_TO_CLOSE",
					"TICKET_CLOSE_COUNT",
					"MEDIAN_CONVERSATION_RATING",
					"CONVERSATION_RATING_COUNT",
					"CONVERSATION_RATING_COVERAGE",
					"TICKET_MEDIAN_REPLY_TIME",
					"MEDIAN_FIRST_ASSIGNMENT_TIME",
					"NEW_TICKETS_COUNT",
					"NEW_TICKETS_COUNT_BY_FIRST_TYPE",
					"NEW_TICKETS_COUNT_BY_FINAL_TYPE",
					"TICKET_COUNT_BY_QUERY",
					"TICKET_REPLIES_COUNT",
					"TICKET_WORKED_ON_COUNT",
					"TICKETS_WITH_OTHER_STATUS_THEN_OPEN_OR_CLOSED_COUNT",
					"HELP_CENTER_ARTICLE_VIEW_COUNT",
					"NEWS_VIEW_COUNT",
					"CHANGELOG_VIEW_COUNT",
					"KAI_ANSWERED_COUNT",
					"KAI_NO_ANSWER_COUNT",
					"KAI_RESOLVE_REQUESTED_COUNT",
					"KAI_RESOLVE_AUTO_ENGAGED_COUNT",
					"KAI_ROUTED_TO_AGENT_RATE_COUNT",
					"KAI_DEFLECTION_RATE",
					"KAI_DEFLECTION_RATE_UNIQUE_USERS",
					"KAI_ROUTED_TO_AGENT_RATE_UNIQUE_USERS",
					"KAI_ROUTED_TO_AGENT_RATE",
					"KAI_POSITIVE_FEEDBACK_RATE",
					"KAI_NEGATIVE_FEEDBACK_RATE",
					"KAI_POSITIVE_FEEDBACK_PERCENTAGE",
					"SNAPSHOT_AGENTS_ONLINE_COUNT",
					"SNAPSHOT_OPEN_TICKETS",
					"MESSAGE_COUNT",
					"AI_QUESTIONS_ASKED_COUNT",
					"SLA_BREACHES_COUNT",
					"SLA_COMPLIANCE",
					"SLA_NOT_COMPLIANCE",
					"SLA_BREACHES_COUNT",
					"SLA_NO_BREACHES_COUNT",
					"TICKETS_WITHOUT_COMMENTS_RATE",
					"KAI_DEFLECTION_COUNT",
					"KAI_ROUTED_TO_AGENT_COUNT",
					"KAI_CONVERSATION_FLOW",
					"WIDGET_OPENED_COUNT",
					"HOME_MENU_CLICK_COUNT",
					"CONVERSATION_STARTED_COUNT",
					"TICKET_REVIEW_QUALITY_SCORE",
					"TICKET_REVIEW_COUNT",
					"TICKET_REVIEW_RESOLUTION_RATE",
					"TICKET_REVIEW_KAI_ACCURACY",
					"CALLS_COUNT",
					"CALLS_RESOLVED_BY_KAI_RATE",
					"CALLS_WAIT_TO_ANSWER",
					"CALLS_PHONE_MINUTES"
				],
				"type": "string"
			},
			"AgentFactTypes": {
				"enum": [
					"AGENT_RUNS_COUNT",
					"AGENT_RESOLUTION_RATE",
					"AGENT_ESCALATION_RATE",
					"AGENT_MEDIAN_DURATION",
					"AGENT_TOTAL_COST",
					"AGENT_TOTAL_TOKENS",
					"AGENT_TASKS_CREATED_COUNT",
					"AGENT_TASKS_COMPLETION_RATE",
					"AGENT_TASKS_OPEN_COUNT",
					"AGENT_TASKS_MEDIAN_RESOLUTION_TIME"
				],
				"type": "string"
			},
			"StatisticListTypes": {
				"enum": [
					"AVERAGE_RATING_PER_USER_RESULT_LIST",
					"TEAM_PERFORMANCE_LIST",
					"ARTICLE_SEARCH_RESULT_LIST",
					"ARTICLE_SEARCH_WITH_NO_RESULT_LIST",
					"ARTICLE_VIEW_STATISTICS_LIST",
					"TICKETS_WITH_RATING_LIST",
					"CONVERSATION_RATING_DISTRIBUTION_LIST",
					"LIVE_AGENTS_TEAM",
					"SNAPSHOT_TICKETS",
					"OPEN_TICKETS_PER_AGENT",
					"LATEST_NEGATIVE_AI_FEEDBACK",
					"KAI_HANDED_TO_TEAM_LIST",
					"SLA_REPORTS_LIST",
					"HOME_MENU_CLICKS_LIST",
					"TICKET_REVIEW_SUBJECT_BREAKDOWN_LIST",
					"TICKET_REVIEW_KAI_MISTAKE_LIST",
					"TICKET_REVIEW_RESOLVED_BY_LIST",
					"TICKET_REVIEW_TICKETS_LIST",
					"CALLS_OUTCOMES_LIST",
					"CALLS_LINES_LIST",
					"CALLS_TOP_TAGS_LIST"
				],
				"type": "string"
			},
			"AgentListTypes": {
				"enum": [
					"AGENT_PERFORMANCE_LIST",
					"AGENT_TOOL_USAGE_LIST",
					"AGENT_TASKS_BY_AGENT_LIST",
					"OPEN_AGENT_TASKS_LIST"
				],
				"type": "string"
			},
			"HeatmapTypes": {
				"enum": [
					"BUSIEST_HOURS_PER_WEEKDAY",
					"BUSIEST_COMMENTS_PER_WEEKDAY",
					"CALLS_BY_HOUR"
				],
				"type": "string"
			},
			"SSOProviderConfigDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"issuerUrl": {
						"type": "string"
					},
					"clientId": {
						"type": "string"
					},
					"clientSecret": {
						"type": "string"
					},
					"scope": {
						"type": "string"
					},
					"defaultRole": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"allowedDomains": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"requireSso": {
						"type": "boolean",
						"description": "Members whose email domain is in allowedDomains sign in only through this provider (organisation SSO only)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"Partial_SSOProviderConfigDto_": {
				"properties": {
					"name": {
						"type": "string"
					},
					"issuerUrl": {
						"type": "string"
					},
					"clientId": {
						"type": "string"
					},
					"clientSecret": {
						"type": "string"
					},
					"scope": {
						"type": "string"
					},
					"defaultRole": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"allowedDomains": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"requireSso": {
						"type": "boolean",
						"description": "Members whose email domain is in allowedDomains sign in only through this provider (organisation SSO only)."
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"AssetType": {
				"enum": [
					"image",
					"document",
					"video",
					"audio",
					"other"
				],
				"type": "string"
			},
			"IfAny_typeofassetSchema.any.ObtainSchemaGeneric_typeofassetSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"associatedEntity": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"description": {
								"type": "string"
							},
							"uploadedBy": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"assetType": {
								"$ref": "#/components/schemas/AssetType"
							},
							"mimeType": {
								"type": "string"
							},
							"fileUrl": {
								"type": "string"
							},
							"filename": {
								"type": "string"
							},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"tags": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"required": [
							"uploadedBy",
							"assetType",
							"mimeType",
							"fileUrl",
							"filename",
							"project",
							"tags"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofassetSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofassetSchema.any.ObtainSchemaGeneric_typeofassetSchema.DocType__"
			},
			"Asset": {
				"$ref": "#/components/schemas/InferSchemaType_typeofassetSchema_"
			},
			"AssetDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/Asset"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateAssetDto": {
				"properties": {
					"filename": {
						"type": "string"
					},
					"fileUrl": {
						"type": "string"
					},
					"mimeType": {
						"type": "string"
					},
					"assetType": {
						"$ref": "#/components/schemas/AssetType"
					},
					"associatedEntity": {
						"type": "string"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"description": {
						"type": "string"
					}
				},
				"required": [
					"filename",
					"fileUrl",
					"mimeType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NoteType": {
				"enum": [
					"default",
					"phone_call",
					"meeting"
				],
				"type": "string"
			},
			"IfAny_typeofnoteSchema.any.ObtainSchemaGeneric_typeofnoteSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"createdBy": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"associatedEntity": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"metaData": {},
							"project": {
								"properties": {
									"isValid": {
										"properties": {},
										"type": "object"
									},
									"createFromHexString": {
										"properties": {},
										"type": "object"
									},
									"createFromTime": {
										"properties": {},
										"type": "object"
									},
									"generate": {
										"properties": {},
										"type": "object"
									},
									"cacheHexString": {},
									"prototype": {
										"$ref": "#/components/schemas/ObjectId"
									}
								},
								"type": "object"
							},
							"content": {},
							"title": {
								"type": "string"
							},
							"type": {
								"$ref": "#/components/schemas/NoteType"
							}
						},
						"required": [
							"associatedEntity",
							"metaData",
							"project",
							"content",
							"title",
							"type"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofnoteSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofnoteSchema.any.ObtainSchemaGeneric_typeofnoteSchema.DocType__"
			},
			"Note": {
				"$ref": "#/components/schemas/InferSchemaType_typeofnoteSchema_"
			},
			"NoteDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/Note"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"CreateNoteDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"content": {},
					"associatedEntity": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"type": {
						"$ref": "#/components/schemas/NoteType"
					}
				},
				"required": [
					"title",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateNoteDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"content": {},
					"associatedEntity": {
						"$ref": "#/components/schemas/Types.ObjectId"
					},
					"type": {
						"$ref": "#/components/schemas/NoteType"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TicketAnalysisRebuildState": {
				"type": "string",
				"enum": [
					"idle",
					"queued",
					"running",
					"done",
					"failed"
				]
			},
			"TicketAnalysisRebuildStatus": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/TicketAnalysisRebuildState"
					},
					"progress": {
						"properties": {
							"total": {
								"type": "number",
								"format": "double"
							},
							"done": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"total",
							"done"
						],
						"type": "object"
					},
					"error": {
						"type": "string"
					},
					"finishedAt": {
						"type": "string"
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofwebhookSchema.any.ObtainSchemaGeneric_typeofwebhookSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"filters": {},
							"events": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"url": {
								"type": "string"
							},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"headers": {
								"items": {
									"properties": {
										"value": {
											"type": "string"
										},
										"key": {
											"type": "string"
										}
									},
									"required": [
										"value",
										"key"
									],
									"type": "object"
								},
								"type": "array"
							},
							"enabled": {
								"type": "boolean"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"filters",
							"events",
							"url",
							"project",
							"headers",
							"enabled",
							"name"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofwebhookSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofwebhookSchema.any.ObtainSchemaGeneric_typeofwebhookSchema.DocType__"
			},
			"WebhookI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofwebhookSchema_"
			},
			"WebhookDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/WebhookI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"WebhookHeaderDto": {
				"properties": {
					"key": {
						"type": "string"
					},
					"value": {
						"type": "string",
						"description": "Left out with `valueSet: true` to keep the stored value."
					},
					"valueSet": {
						"type": "boolean"
					}
				},
				"required": [
					"key"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WebhookDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"events": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"headers": {
						"items": {
							"$ref": "#/components/schemas/WebhookHeaderDto"
						},
						"type": "array"
					},
					"filters": {
						"properties": {
							"ticketTypes": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"type": "object"
					}
				},
				"required": [
					"name",
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NotionConnectResponse": {
				"description": "What the dashboard gets after the Notion OAuth code exchange\n(`GET /content-integrations/notion/access-token`): the workspace to show and\nimport, never the tokens. Until 2026-10-12 the endpoint answered with\nNotion's whole token response (`access_token`, `refresh_token`).\n\nLeaf module: no imports.",
				"properties": {
					"workspace_id": {
						"type": "string",
						"nullable": true
					},
					"workspaceId": {
						"type": "string",
						"nullable": true
					},
					"workspaceName": {
						"type": "string",
						"nullable": true
					},
					"workspaceIcon": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"workspace_id",
					"workspaceId",
					"workspaceName",
					"workspaceIcon"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FlattenMaps_any_": {
				"properties": {},
				"type": "object"
			},
			"CommentIdentityMode": {
				"type": "string",
				"enum": [
					"public",
					"anonymous",
					"choice"
				]
			},
			"KaiCodeVerifyReportDto": {
				"description": "The analyzer callback's `verify` block (POST /gleapcode/coding-task/callback): what its host checked around the\nturn. Every key the Server reads (kaiCodeVerify.logic sessionVerifyFrom, proofEntriesOf, isProofRecheck) is named\nhere, or tsoa drops it (silently-remove-extras). The values stay `unknown` on purpose: tsoa passes them through as\nsent and the logic bounds every field, so a value the analyzer changed is dropped there, never a refused callback.",
				"properties": {
					"status": {
						"description": "passed | failed | skipped | error; anything else drops the report."
					},
					"ranAt": {
						"description": "When the checks ran (ISO time)."
					},
					"rounds": {},
					"draft": {
						"description": "The pull request was opened as a draft (a check was red)."
					},
					"diff": {
						"description": "`{ files, additions, deletions }`"
					},
					"checks": {
						"description": "`[{ name, repo?, status, durationMs?, summary?, outputTail? }]`"
					},
					"screens": {
						"description": "`[{ path, caption?, before?, after?, error? }]`, the images as `{ mimeType, data }` (base64) until stored."
					},
					"setup": {
						"description": "`{ status: ready | failed | needs_secret, step?, message? }`"
					},
					"proof": {
						"description": "Per changed repository: the change's own tests on the base commit and on the change."
					},
					"privacy": {
						"description": "The ticket's personal data and the team's database values the change copies into the repository, masked."
					},
					"recheck": {
						"description": "`conflict`: a conflict turn re-ran only the proof, on the head it pushed."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KnowledgeSearchResult": {
				"properties": {
					"sourceId": {
						"type": "string"
					},
					"sourceType": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"content": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"relevanceScore": {
						"type": "number",
						"format": "double",
						"description": "Rerank relevance (0-1); absent when the rerank was unavailable."
					}
				},
				"required": [
					"sourceId",
					"sourceType",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KnowledgeSearchResponse": {
				"properties": {
					"results": {
						"items": {
							"$ref": "#/components/schemas/KnowledgeSearchResult"
						},
						"type": "array"
					},
					"count": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"results",
					"count"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KnowledgeSearchDto": {
				"properties": {
					"query": {
						"type": "string"
					},
					"documentTypeFilter": {
						"type": "string"
					},
					"internally": {
						"type": "boolean"
					},
					"lang": {
						"type": "string"
					},
					"limit": {
						"type": "number",
						"format": "double",
						"description": "Max documents to return. Values above 10 have no effect; retrieval is capped at 10."
					},
					"scope": {
						"properties": {
							"tags": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"mode": {
								"type": "string",
								"enum": [
									"all",
									"include",
									"exclude"
								]
							}
						},
						"required": [
							"mode"
						],
						"type": "object"
					}
				},
				"required": [
					"query"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SimilarTicketResult": {
				"properties": {
					"ticketId": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"similarity": {
						"type": "number",
						"format": "double"
					},
					"content": {
						"type": "string"
					}
				},
				"required": [
					"ticketId",
					"title",
					"similarity",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SimilarTicketsResponse": {
				"properties": {
					"results": {
						"items": {
							"$ref": "#/components/schemas/SimilarTicketResult"
						},
						"type": "array"
					},
					"count": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"results",
					"count"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SimilarTicketsSearchDto": {
				"properties": {
					"query": {
						"type": "string"
					},
					"excludeTicketId": {
						"type": "string"
					},
					"limit": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"query"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompleteTaskRequest": {
				"properties": {
					"message": {
						"type": "string"
					},
					"customerMessage": {
						"type": "string"
					},
					"feedback": {
						"type": "string"
					},
					"questionAnswers": {
						"items": {
							"items": {
								"type": "string"
							},
							"type": "array"
						},
						"type": "array"
					}
				},
				"required": [
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApproveTaskRequest": {
				"properties": {
					"message": {
						"type": "string"
					},
					"customerMessage": {
						"type": "string"
					},
					"feedback": {
						"type": "string"
					},
					"questionAnswers": {
						"items": {
							"items": {
								"type": "string"
							},
							"type": "array"
						},
						"type": "array"
					},
					"merge": {
						"type": "boolean",
						"description": "Kai Code's PR review card: merge the session's open pull requests. Without it the approval only marks the card reviewed."
					},
					"choice": {
						"type": "string",
						"description": "A Kai Copilot card with two positive answers (Publish / Schedule): the key of the one picked."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"RejectTaskRequest": {
				"properties": {
					"message": {
						"type": "string"
					},
					"feedback": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"RedirectTaskRequest": {
				"properties": {
					"message": {
						"type": "string"
					}
				},
				"required": [
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CancelTaskLinkRequest": {
				"description": "Where the fix or the original lives. `kind` may be left out: the server\nthen reads a pasted value itself (a pull request URL, a dashboard ticket or\nKai Code session URL, a ticket number like #1234, any other link).",
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"pr",
							"ticket",
							"session",
							"url"
						]
					},
					"id": {
						"type": "string",
						"description": "A ticket number (#1234), ticket id or share token, or a Kai Code session id."
					},
					"url": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CancelTaskRequest": {
				"description": "Closing a card without answering it. Without a `disposition` the task is\nsimply cancelled with `message` as the reason. With one: `duplicate` needs\na ticket of the same project in `link`, `fixed_elsewhere` needs a pull\nrequest, ticket, Kai Code session or URL, `not_a_bug` needs a `message`,\n`wontfix` takes an optional one.",
				"properties": {
					"disposition": {
						"type": "string",
						"enum": [
							"fixed_elsewhere",
							"duplicate",
							"not_a_bug",
							"wontfix"
						]
					},
					"message": {
						"type": "string",
						"description": "The reason."
					},
					"link": {
						"$ref": "#/components/schemas/CancelTaskLinkRequest"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateTaskNoteBody": {
				"properties": {
					"content": {}
				},
				"required": [
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TranslationEntryType": {
				"description": "Supported translatable entity types.\nUse as the `type` query parameter on GET /translations/entries to filter results.",
				"enum": [
					"article",
					"collection",
					"emailtemplate",
					"statictranslation"
				],
				"type": "string"
			},
			"PutTranslationEntryDto": {
				"properties": {
					"language": {
						"type": "string",
						"description": "The language code to set the translation for (e.g., \"en\", \"de\", \"fr\")."
					},
					"fields": {
						"description": "Key-value pairs of translatable fields.\nKeys depend on the entity type (e.g., \"title\", \"description\", \"content\" for articles).\nValues are plain text or HTML strings depending on the field type.",
						"example": {
							"title": "Getting Started",
							"description": "Learn the basics",
							"content": "<p>Welcome</p>"
						}
					}
				},
				"required": [
					"language",
					"fields"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RepositoryRecoveryAction": {
				"properties": {
					"action": {
						"type": "string",
						"enum": [
							"clone",
							"locate",
							"retry"
						],
						"description": "`retry`: re-run the failed attempt as-is (workspace failures — nothing to clone)."
					},
					"repoKey": {
						"type": "string"
					},
					"path": {
						"type": "string"
					}
				},
				"required": [
					"action"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CloudSessionAgent": {
				"type": "string",
				"enum": [
					"plan",
					"build"
				]
			},
			"CloudSessionEffort": {
				"type": "string",
				"enum": [
					"max",
					"medium",
					"low",
					"high",
					"extra_high"
				]
			},
			"Record_string.worktree-or-local_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"KaiAttachmentDto": {
				"description": "Attachment payload sent with Kai Code messages. Mirrors\n`AttachmentDto` from the ticket-message DTO so the Frontend reuses\nthe same upload flow (R2 → CDN URL) for both surfaces.",
				"properties": {
					"name": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"type": {
						"type": "string"
					}
				},
				"required": [
					"name",
					"url",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AddSessionRepositoriesDto": {
				"description": "Body of POST /gleapcode/sessions/{sessionId}/repositories.",
				"properties": {
					"repositoryIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Connected KaiRepository ids (this project) to add to the session."
					}
				},
				"required": [
					"repositoryIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ExternalAgentPhaseDto": {
				"type": "string",
				"enum": [
					"investigating",
					"reproduced",
					"fixing",
					"pr_opened",
					"blocked",
					"done"
				],
				"description": "Progress report from an EXTERNAL coding agent (Claude Code / Codex /\nCursor opened via deeplink), relayed by the Gleap MCP `report_progress`\ntool into `POST /gleapcode/sessions/{sessionId}/agent-progress`.\n\nSame phase vocabulary as the retired `/tickets/{id}/agent-progress`\nendpoint (removed 2026-08) so existing agent-setup instructions keep\nworking — but reports now land on the SESSION, not a ticket side-table."
			},
			"ExternalFixStatusDto": {
				"type": "string",
				"enum": [
					"queued",
					"working",
					"needs_input",
					"completed",
					"failed",
					"cancelled"
				],
				"description": "One fix status (Kai Support drives, fixStatus.logic): where the fix stands."
			},
			"ExternalFixStepDto": {
				"type": "string",
				"enum": [
					"investigating",
					"reproduced",
					"fixing"
				],
				"description": "While working: investigating, reproduced (the bug shows), fixing (changing code)."
			},
			"ExternalFixQuestionDto": {
				"description": "What the agent waits for (`status: needs_input`).",
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"question",
							"approval",
							"auth",
							"choice"
						],
						"description": "question (default), approval, auth (a secret or a sign-in), choice (pick one of `options`)."
					},
					"prompt": {
						"type": "string",
						"description": "One line, 1–500 chars."
					},
					"options": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Up to 6 answers to pick from, each ≤ 120 chars."
					},
					"audience": {
						"type": "string",
						"enum": [
							"customer",
							"team"
						],
						"description": "customer: only the customer can answer: the session asked its operator first and sent the question itself with\nsend_message (sessionId); this marks the wait. team (default): the operator's team decides."
					}
				},
				"required": [
					"prompt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentProgressByTicketDto": {
				"description": "`POST /gleapcode/sessions/agent-progress`: the same report addressed by\nTICKET, for an app Gleap did not open (no session id in its prompt).",
				"properties": {
					"phase": {
						"$ref": "#/components/schemas/ExternalAgentPhaseDto",
						"description": "Where the agent is in the fix loop (the old vocabulary). Optional since 2026-10-31 when `status`\nis sent; `status` wins when both are (the Gleap MCP always sends a phase)."
					},
					"message": {
						"type": "string",
						"description": "One-line live status shown on the ticket bubble and the session\ntranscript (~10 words). 1–2000 chars."
					},
					"prUrl": {
						"type": "string",
						"description": "Required with `pr_opened` — registering it enables merge follow-up."
					},
					"agentName": {
						"type": "string",
						"description": "e.g. \"Claude Code\" — shown on the session runtime badge."
					},
					"customerUpdateMessage": {
						"type": "string",
						"description": "\"It's on its way\" customer message (≤ 2000 chars, plain text): sent as\nthe session's creator as soon as the session has an open pull request\n(right away with `pr_opened`), unless the project switched it off."
					},
					"customerShipMessage": {
						"type": "string",
						"description": "\"It's live\" customer message (≤ 2000 chars, plain text): sent verbatim\nafter the production merge by the project's post-merge setting (after\nthe deploy delay, or when a teammate confirms it). Projects that send\nnone answer `fixMessages.whenLive: 'mode_none'`."
					},
					"status": {
						"$ref": "#/components/schemas/ExternalFixStatusDto",
						"description": "One fix status: queued, working, needs_input, completed, failed or cancelled. Wins over `phase`."
					},
					"step": {
						"$ref": "#/components/schemas/ExternalFixStepDto",
						"description": "The step while working."
					},
					"question": {
						"$ref": "#/components/schemas/ExternalFixQuestionDto",
						"description": "With `needs_input`: what the agent waits for, and who can answer."
					},
					"customerLine": {
						"type": "string",
						"description": "One plain sentence safe to send to the customer (≤ 300 chars), when the step matters to them. Kai\nSupport passes it on and answers \"any update?\" with it; Gleap never posts it by itself."
					},
					"howSolved": {
						"type": "string",
						"description": "Hard tickets §8: at the end, one paragraph \"how we solved it\" (≤ 2000 chars). Stored on the session and fed\ninto Kai Support's learning, so the next similar ticket is answered on the first line."
					},
					"problem": {
						"type": "string",
						"description": "With a pull request: the problem in one to three simple sentences (≤ 500 chars), for the Merge card."
					},
					"fix": {
						"type": "string",
						"description": "With `problem`: what the change does, in one to three simple sentences (≤ 500 chars)."
					},
					"agentKind": {
						"type": "string",
						"enum": [
							"claude_code",
							"codex",
							"cursor",
							"other"
						],
						"description": "Which app reports: claude_code, codex, cursor or other."
					},
					"device": {
						"type": "string",
						"description": "The machine it runs on, e.g. \"Lukas's MacBook\" (≤ 100 chars)."
					},
					"ticketId": {
						"type": "string",
						"description": "The 24-char ticket id or its #number, in the project the caller is signed in to."
					}
				},
				"required": [
					"message",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentProgressDto": {
				"properties": {
					"phase": {
						"$ref": "#/components/schemas/ExternalAgentPhaseDto",
						"description": "Where the agent is in the fix loop (the old vocabulary). Optional since 2026-10-31 when `status`\nis sent; `status` wins when both are (the Gleap MCP always sends a phase)."
					},
					"message": {
						"type": "string",
						"description": "One-line live status shown on the ticket bubble and the session\ntranscript (~10 words). 1–2000 chars."
					},
					"prUrl": {
						"type": "string",
						"description": "Required with `pr_opened` — registering it enables merge follow-up."
					},
					"agentName": {
						"type": "string",
						"description": "e.g. \"Claude Code\" — shown on the session runtime badge."
					},
					"customerUpdateMessage": {
						"type": "string",
						"description": "\"It's on its way\" customer message (≤ 2000 chars, plain text): sent as\nthe session's creator as soon as the session has an open pull request\n(right away with `pr_opened`), unless the project switched it off."
					},
					"customerShipMessage": {
						"type": "string",
						"description": "\"It's live\" customer message (≤ 2000 chars, plain text): sent verbatim\nafter the production merge by the project's post-merge setting (after\nthe deploy delay, or when a teammate confirms it). Projects that send\nnone answer `fixMessages.whenLive: 'mode_none'`."
					},
					"status": {
						"$ref": "#/components/schemas/ExternalFixStatusDto",
						"description": "One fix status: queued, working, needs_input, completed, failed or cancelled. Wins over `phase`."
					},
					"step": {
						"$ref": "#/components/schemas/ExternalFixStepDto",
						"description": "The step while working."
					},
					"question": {
						"$ref": "#/components/schemas/ExternalFixQuestionDto",
						"description": "With `needs_input`: what the agent waits for, and who can answer."
					},
					"customerLine": {
						"type": "string",
						"description": "One plain sentence safe to send to the customer (≤ 300 chars), when the step matters to them. Kai\nSupport passes it on and answers \"any update?\" with it; Gleap never posts it by itself."
					},
					"howSolved": {
						"type": "string",
						"description": "Hard tickets §8: at the end, one paragraph \"how we solved it\" (≤ 2000 chars). Stored on the session and fed\ninto Kai Support's learning, so the next similar ticket is answered on the first line."
					},
					"problem": {
						"type": "string",
						"description": "With a pull request: the problem in one to three simple sentences (≤ 500 chars), for the Merge card."
					},
					"fix": {
						"type": "string",
						"description": "With `problem`: what the change does, in one to three simple sentences (≤ 500 chars)."
					},
					"agentKind": {
						"type": "string",
						"enum": [
							"claude_code",
							"codex",
							"cursor",
							"other"
						],
						"description": "Which app reports: claude_code, codex, cursor or other."
					},
					"device": {
						"type": "string",
						"description": "The machine it runs on, e.g. \"Lukas's MacBook\" (≤ 100 chars)."
					}
				},
				"required": [
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiCodePostMergeMode": {
				"type": "string",
				"enum": [
					"none",
					"task",
					"auto_message"
				]
			},
			"KaiCodePostMergeBehavior": {
				"properties": {
					"mode": {
						"$ref": "#/components/schemas/KaiCodePostMergeMode"
					},
					"autoMessageDelayMinutes": {
						"type": "number",
						"format": "double"
					},
					"announcePr": {
						"type": "boolean",
						"description": "Kai Code tells the customer the fix is on its way when its pull request\nopens (default true). `mode` decides when its \"it's live\" message goes out."
					},
					"moveToDone": {
						"type": "boolean",
						"description": "A customer ticket moves to Done when its fix merges (default true); the \"it's live\" message still follows."
					}
				},
				"required": [
					"mode",
					"autoMessageDelayMinutes",
					"announcePr",
					"moveToDone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CodeOwnerReason": {
				"type": "string",
				"enum": [
					"chosen",
					"preferred",
					"creator",
					"admin"
				],
				"description": "Which rule above picked the owner: shown on the settings page (\"Emma Li (first admin)\")."
			},
			"DeeplinkTemplateHarness": {
				"type": "string",
				"enum": [
					"cursor",
					"claude",
					"codex"
				]
			},
			"KaiDeeplinkTemplate": {
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"harness": {
						"$ref": "#/components/schemas/DeeplinkTemplateHarness"
					},
					"prompt": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"name",
					"harness",
					"prompt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiCodeSettingsView": {
				"description": "The project's settings plus what this viewer may change.",
				"properties": {
					"customInstructions": {
						"type": "string"
					},
					"defaultSessionModel": {
						"type": "string",
						"nullable": true
					},
					"defaultSessionEffort": {
						"type": "string",
						"nullable": true
					},
					"postMergeBehavior": {
						"$ref": "#/components/schemas/KaiCodePostMergeBehavior"
					},
					"customerReplyInstructions": {
						"type": "string"
					},
					"allowMergeFromGleap": {
						"type": "boolean"
					},
					"openEgress": {
						"type": "boolean"
					},
					"allowedHosts": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"verify": {
						"type": "boolean"
					},
					"routingHints": {
						"type": "string"
					},
					"fixCardsOwner": {
						"properties": {
							"effectiveName": {
								"type": "string",
								"nullable": true
							},
							"effectiveReason": {
								"allOf": [
									{
										"$ref": "#/components/schemas/CodeOwnerReason"
									}
								],
								"nullable": true
							},
							"effectiveUserId": {
								"type": "string",
								"nullable": true
							},
							"userId": {
								"type": "string",
								"nullable": true
							}
						},
						"required": [
							"effectiveName",
							"effectiveReason",
							"effectiveUserId",
							"userId"
						],
						"type": "object"
					},
					"deeplinkTemplates": {
						"items": {
							"$ref": "#/components/schemas/KaiDeeplinkTemplate"
						},
						"type": "array",
						"description": "The project's own \"Open in …\" actions (kaiDeeplinkTemplates.logic)."
					},
					"viewerIsAdmin": {
						"type": "boolean",
						"description": "ADMIN on the project or its organisation: may change the admin-only switches."
					}
				},
				"required": [
					"customInstructions",
					"defaultSessionModel",
					"defaultSessionEffort",
					"postMergeBehavior",
					"customerReplyInstructions",
					"allowMergeFromGleap",
					"openEgress",
					"allowedHosts",
					"verify",
					"routingHints",
					"fixCardsOwner",
					"deeplinkTemplates",
					"viewerIsAdmin"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Partial_KaiCodePostMergeBehavior_": {
				"properties": {
					"mode": {
						"$ref": "#/components/schemas/KaiCodePostMergeMode"
					},
					"autoMessageDelayMinutes": {
						"type": "number",
						"format": "double"
					},
					"announcePr": {
						"type": "boolean",
						"description": "Kai Code tells the customer the fix is on its way when its pull request\nopens (default true). `mode` decides when its \"it's live\" message goes out."
					},
					"moveToDone": {
						"type": "boolean",
						"description": "A customer ticket moves to Done when its fix merges (default true); the \"it's live\" message still follows."
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"ModelProvider": {
				"type": "string",
				"enum": [
					"anthropic",
					"openai",
					"google",
					"xai",
					"openrouter",
					"mistral",
					"deepseek",
					"local"
				]
			},
			"AiModelCost": {
				"properties": {
					"input": {
						"type": "number",
						"format": "double"
					},
					"cachedInput": {
						"type": "number",
						"format": "double"
					},
					"cacheWriteInput": {
						"type": "number",
						"format": "double",
						"description": "Prompt-cache write rate for the default 5-minute TTL (Anthropic: 1.25× input)."
					},
					"cacheWrite1hInput": {
						"type": "number",
						"format": "double",
						"description": "Prompt-cache write rate for the 1-hour TTL (Anthropic `ttl: '1h'`: 2× input).\n`getModelCost` fills it in as 2× `input` for Anthropic models that don't\nset it; every other provider has no 1h tier and prices a 1h bucket at the\n5-minute write rate."
					},
					"output": {
						"type": "number",
						"format": "double"
					},
					"longContextThreshold": {
						"type": "number",
						"format": "double"
					},
					"longInputMultiplier": {
						"type": "number",
						"format": "double"
					},
					"longOutputMultiplier": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"input",
					"output"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiModelCapabilities": {
				"properties": {
					"chat": {
						"type": "boolean"
					},
					"vision": {
						"type": "boolean"
					},
					"tools": {
						"type": "boolean"
					},
					"streaming": {
						"type": "boolean"
					},
					"transcription": {
						"type": "boolean"
					},
					"reasoning": {
						"type": "boolean"
					},
					"minimalReasoning": {
						"type": "boolean"
					},
					"temperatureUnsupported": {
						"type": "boolean",
						"description": "Anthropic models that reject `temperature` (claude-opus-4-8, claude-haiku-5-5)."
					},
					"thinkingAlwaysOn": {
						"type": "boolean",
						"description": "Anthropic models whose thinking can't be turned off: `thinking:\n{type:'disabled'}` is a 400 at every effort level (Fable 5 / 5.1,\nOpus 5.5). Low effort is the only way to make them think less — see\n`claudeReasoningOptions`."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AiModelPickers": {
				"description": "Per-runtime UI-picker visibility.\n\n`kaiAgent`            → Kai default support agent dropdown\n`kaiCodeCloud`        → Kai Code cloud runtime model picker\n`kaiCodeOpenCode`     → Kai Code desktop OpenCode runtime model picker\n\nModels excluded from every picker but still in the catalog are\neither subagent-only (e.g. Kimi K2.5) or special-purpose (transcription,\nCodex CLI) — they appear elsewhere via `capabilities.transcription`\nor via the static `staticModels` list of CLI-only runtimes.",
				"properties": {
					"kaiAgent": {
						"type": "boolean"
					},
					"kaiCodeCloud": {
						"type": "boolean"
					},
					"kaiCodeOpenCode": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ModelEffort": {
				"type": "string",
				"enum": [
					"low",
					"medium",
					"high",
					"extra_high",
					"max"
				]
			},
			"ModelIconKey": {
				"type": "string",
				"enum": [
					"anthropic",
					"openai",
					"google",
					"xai",
					"meta",
					"mistral",
					"cohere",
					"kimi",
					"minimax",
					"mimo",
					"qwen",
					"deepseek",
					"glm",
					"local"
				]
			},
			"AiModelBilledCost": {
				"description": "USD per 1M tokens as the customer's AI credits pay it (markup applied).",
				"properties": {
					"input": {
						"type": "number",
						"format": "double"
					},
					"output": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"input",
					"output"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiModelBilledCosts": {
				"description": "Billed per-1M rates by where a model runs (`calculateTokenCost`: raw × `getMarkup`).",
				"properties": {
					"kai": {
						"$ref": "#/components/schemas/AiModelBilledCost",
						"description": "Kai support answers (`kai` markup)."
					},
					"agents": {
						"$ref": "#/components/schemas/AiModelBilledCost",
						"description": "Custom agents, Kai Resolve and its code investigations, Kai Copilot (default markup)."
					},
					"kaiCode": {
						"$ref": "#/components/schemas/AiModelBilledCost",
						"description": "Kai Code cloud sessions (`gleapcode` markup)."
					}
				},
				"required": [
					"kai",
					"agents",
					"kaiCode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiModelPublicDto": {
				"description": "Public DTO. Strips internal-only fields (`providerRoute` — exposes\nAPI-key env names) and any markup-related metadata. Customer-facing\ncost figures (`averageCostPerAnswerUsd`) are pre-computed server-side\nso the Frontend never needs the markup multiplier.",
				"properties": {
					"id": {
						"type": "string"
					},
					"displayName": {
						"type": "string"
					},
					"shortLabel": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"provider": {
						"$ref": "#/components/schemas/ModelProvider"
					},
					"contextWindow": {
						"type": "number",
						"format": "double"
					},
					"costPerMillionTokens": {
						"$ref": "#/components/schemas/AiModelCost",
						"description": "Effective raw rate per 1M tokens. Always populated for catalog entries\n(pure-alias tiers resolve theirs from the backing model)."
					},
					"capabilities": {
						"$ref": "#/components/schemas/AiModelCapabilities"
					},
					"pickers": {
						"$ref": "#/components/schemas/AiModelPickers"
					},
					"supportedEfforts": {
						"items": {
							"$ref": "#/components/schemas/ModelEffort"
						},
						"type": "array"
					},
					"defaultEffort": {
						"$ref": "#/components/schemas/ModelEffort"
					},
					"subagentModelId": {
						"type": "string"
					},
					"aliases": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"iconKey": {
						"$ref": "#/components/schemas/ModelIconKey"
					},
					"opencodeId": {
						"type": "string"
					},
					"variant1M": {
						"type": "boolean"
					},
					"averageCostPerAnswerUsd": {
						"type": "string",
						"description": "Customer-facing average cost (USD) for a typical Kai support\nanswer. Pre-multiplied by the Kai markup so the Frontend can\nrender the figure without ever seeing the multiplier."
					},
					"billedCostPerMillionTokens": {
						"$ref": "#/components/schemas/AiModelBilledCosts",
						"description": "What Gleap bills per 1M tokens for this model, by where it runs\n(effective raw rate × that usage type's markup). Pickers show these;\n`costPerMillionTokens` stays the raw provider rate."
					}
				},
				"required": [
					"id",
					"displayName",
					"provider"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiPickerOption": {
				"properties": {
					"value": {
						"type": "string",
						"description": "Value persisted on the project / session. Either an alias or a canonical id."
					},
					"label": {
						"type": "string"
					}
				},
				"required": [
					"value",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Record_ModelRuntime.string_": {
				"properties": {
					"codex": {
						"type": "string"
					},
					"cloud": {
						"type": "string"
					},
					"opencode": {
						"type": "string"
					},
					"claudeCode": {
						"type": "string"
					}
				},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"AiModelsPublicResponse": {
				"properties": {
					"models": {
						"items": {
							"$ref": "#/components/schemas/AiModelPublicDto"
						},
						"type": "array",
						"description": "Full catalog (every entry, no filtering)."
					},
					"pickers": {
						"properties": {
							"transcription": {
								"items": {
									"$ref": "#/components/schemas/AiPickerOption"
								},
								"type": "array",
								"description": "STT models (transcription-capable)."
							},
							"kaiCodeOpenCode": {
								"items": {
									"$ref": "#/components/schemas/AiPickerOption"
								},
								"type": "array",
								"description": "Kai Code OpenCode (desktop) runtime model picker."
							},
							"kaiCodeCloud": {
								"items": {
									"$ref": "#/components/schemas/AiPickerOption"
								},
								"type": "array",
								"description": "Kai Code cloud runtime model picker."
							},
							"kaiAgent": {
								"items": {
									"$ref": "#/components/schemas/AiPickerOption"
								},
								"type": "array",
								"description": "Default Kai support agent dropdown."
							}
						},
						"required": [
							"transcription",
							"kaiCodeOpenCode",
							"kaiCodeCloud",
							"kaiAgent"
						],
						"type": "object",
						"description": "Curated picker lists (replaces FE iterate-and-filter logic)."
					},
					"runtimeDefaults": {
						"$ref": "#/components/schemas/Record_ModelRuntime.string_",
						"description": "Per-runtime default modelId."
					}
				},
				"required": [
					"models",
					"pickers",
					"runtimeDefaults"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CodeKnowledgeRepositoryDocument": {
				"$ref": "#/components/schemas/FlattenMaps_T_"
			},
			"CodeRepositoryProvider": {
				"enum": [
					"github",
					"azure",
					"gitlab",
					"bitbucket"
				],
				"type": "string"
			},
			"CreateCodeKnowledgeRepositoryDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"indexBranch": {
						"type": "string"
					},
					"namespace": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"remoteId",
					"owner",
					"name",
					"fullName"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateCodeKnowledgeRepositoryDto": {
				"properties": {
					"indexBranch": {
						"type": "string"
					},
					"autoReindexOnPush": {
						"type": "boolean"
					},
					"excludePaths": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "gitignore-syntax paths Kai must never fetch from this repository."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"GithubInstallationChoice": {
				"properties": {
					"installationId": {
						"type": "number",
						"format": "double"
					},
					"accountLogin": {
						"type": "string"
					},
					"accountType": {
						"type": "string"
					}
				},
				"required": [
					"installationId",
					"accountLogin",
					"accountType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubConnectionCheckStatus": {
				"type": "string",
				"enum": [
					"ok",
					"not_connected",
					"other_account",
					"reconnect_required",
					"app_not_installed",
					"installation_suspended",
					"repo_not_selected",
					"repo_not_found",
					"org_oauth_restricted",
					"org_sso_required",
					"org_invitation_pending",
					"not_org_owner",
					"not_org_member",
					"unknown"
				],
				"description": "\"Can't find your repository?\": why a GitHub repository is missing from the\nKai Code / Code Knowledge picker, in plain language, plus the GitHub page\nthat fixes it.\n\nLeaf module: no models, cache or HTTP clients. GitHub is reached through\nthe ports below, which keeps the two scoping rules testable offline:\n - a project's diagnosis only asks GitHub about the installation the\n   project is connected to. The app JWT can see every customer's\n   installation, so another account is never probed with it;\n - the connect flow's account check reveals installation details only for\n   the signed-in GitHub user's own account and the organizations they own."
			},
			"GithubCheckedRepository": {
				"description": "Same fields as a repository picker row, so an `ok` result can be selected directly.",
				"properties": {
					"id": {
						"type": "string"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					},
					"accessible": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"remoteId",
					"owner",
					"name",
					"fullName",
					"private",
					"accessible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubConnectionCheck": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/GithubConnectionCheckStatus"
					},
					"message": {
						"type": "string",
						"description": "Cause and fix in plain language."
					},
					"account": {
						"type": "string",
						"description": "The GitHub account the result is about."
					},
					"fixUrl": {
						"type": "string",
						"description": "The GitHub page that fixes it."
					},
					"fixLabel": {
						"type": "string"
					},
					"helpUrl": {
						"type": "string",
						"description": "A second page worth knowing, e.g. the organization's OAuth app policy."
					},
					"helpLabel": {
						"type": "string"
					},
					"connectAccount": {
						"type": "string",
						"description": "The fix is to connect (or check) this account through GitHub sign-in in Gleap."
					},
					"repository": {
						"$ref": "#/components/schemas/GithubCheckedRepository",
						"description": "`ok` only: the repository as the picker lists it."
					}
				},
				"required": [
					"status",
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubConnectionOptions": {
				"properties": {
					"installations": {
						"items": {
							"$ref": "#/components/schemas/GithubInstallationChoice"
						},
						"type": "array"
					},
					"proof": {
						"type": "string"
					},
					"installUrl": {
						"type": "string"
					},
					"accountCheck": {
						"$ref": "#/components/schemas/GithubConnectionCheck",
						"description": "Present when the flow was started to check one account (\"Can't find your organization?\")."
					}
				},
				"required": [
					"installations",
					"proof",
					"installUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubRepoSourceAuthResponseDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"hasInstallation": {
						"type": "boolean",
						"description": "True when the \"Kai by Gleap\" GitHub App is installed for this project."
					},
					"accountLogin": {
						"type": "string",
						"description": "The org/user account the app is installed on."
					},
					"accountType": {
						"type": "string",
						"description": "'Organization' | 'User'."
					}
				},
				"required": [
					"provider",
					"hasInstallation"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubAuthRequestDto": {
				"properties": {
					"installationId": {
						"type": "number",
						"format": "double"
					},
					"proof": {
						"type": "string"
					}
				},
				"required": [
					"installationId",
					"proof"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GithubRepositoryListItemDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					},
					"accessible": {
						"type": "boolean",
						"description": "Always true for App installations — kept for frontend compatibility."
					}
				},
				"required": [
					"id",
					"remoteId",
					"owner",
					"name",
					"fullName",
					"private",
					"accessible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiRepositoryDocument": {
				"$ref": "#/components/schemas/FlattenMaps_T_"
			},
			"CreateKaiRepositoryDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"branch": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"namespace": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"remoteId",
					"owner",
					"name",
					"fullName"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateKaiRepositoryDto": {
				"properties": {
					"branch": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"excludePaths": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "gitignore-syntax paths Kai Code must never fetch from this repository."
					},
					"setupCommands": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Setup commands Kai Code runs after cloning, replacing `.gleap/config.yaml`\n`code.setup` (1-5 commands, 500 characters each). null or [] clears them."
					},
					"releaseMode": {
						"type": "string",
						"enum": [
							"continuous",
							"versioned"
						],
						"nullable": true,
						"description": "`continuous` (a merge is live) or `versioned` (it ships with the next\nrelease); null goes back to inferring it from the repository name."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CodeKnowledgeAskDto": {
				"properties": {
					"question": {
						"type": "string"
					}
				},
				"required": [
					"question"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContactMemoryActor": {
				"type": "string",
				"enum": [
					"bot",
					"draft_reply",
					"copilot",
					"admin",
					"consolidation",
					"unknown"
				]
			},
			"ContactMemoryListItem": {
				"properties": {
					"name": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"actor": {
						"$ref": "#/components/schemas/ContactMemoryActor"
					},
					"actorUserId": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"name",
					"description",
					"actor",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContactMemoryEntry": {
				"properties": {
					"name": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"content": {
						"type": "string"
					},
					"actor": {
						"$ref": "#/components/schemas/ContactMemoryActor"
					},
					"actorUserId": {
						"type": "string"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"name",
					"description",
					"content",
					"actor",
					"createdAt",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContactMemoryWriteResult": {
				"properties": {
					"ok": {
						"type": "boolean"
					},
					"reason": {
						"type": "string",
						"enum": [
							"disabled",
							"no_userId",
							"invalid_input",
							"session_not_found"
						],
						"description": "Only set on internal (non-admin) calls; never present in an admin API 200 response."
					},
					"consolidationEnqueued": {
						"type": "boolean"
					},
					"entries": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"ok"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContactMemoryEntryBody": {
				"properties": {
					"name": {
						"type": "string",
						"description": "Trimmed and truncated to 80 characters; the entry is keyed by this value."
					},
					"description": {
						"type": "string",
						"description": "Optional. Omitting it clears the stored description on update (full replace). Truncated to 240 characters."
					},
					"content": {
						"type": "string",
						"description": "Required. Truncated to 4000 characters."
					}
				},
				"required": [
					"name",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContactMemoryUpdateBody": {
				"properties": {
					"description": {
						"type": "string",
						"description": "Optional. Omitting it clears the stored description; this is a full replace, not a patch. Truncated to 240 characters."
					},
					"content": {
						"type": "string",
						"description": "Required. Truncated to 4000 characters."
					}
				},
				"required": [
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ImportYouTubeVideoDto": {
				"properties": {
					"url": {
						"type": "string"
					},
					"batchId": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"VideoMetadata": {
				"properties": {
					"videoId": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"durationSeconds": {
						"type": "number",
						"format": "double"
					},
					"thumbnailUrl": {
						"type": "string"
					},
					"channelName": {
						"type": "string"
					},
					"privacyStatus": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "string",
								"enum": [
									"public",
									"unlisted",
									"private"
								]
							}
						]
					}
				},
				"required": [
					"videoId",
					"title",
					"durationSeconds",
					"thumbnailUrl",
					"channelName",
					"privacyStatus"
				],
				"type": "object",
				"additionalProperties": false
			},
			"YouTubeLimitPlan": {
				"type": "string",
				"enum": [
					"free",
					"trial",
					"team",
					"pro",
					"enterprise"
				]
			},
			"YouTubeAllowanceView": {
				"description": "The allowance as the preview and GET /youtube-source/allowance return it.",
				"properties": {
					"plan": {
						"$ref": "#/components/schemas/YouTubeLimitPlan"
					},
					"period": {
						"type": "string",
						"enum": [
							"month",
							"trial"
						]
					},
					"allowanceSeconds": {
						"type": "number",
						"format": "double"
					},
					"usedSeconds": {
						"type": "number",
						"format": "double"
					},
					"remainingSeconds": {
						"type": "number",
						"format": "double"
					},
					"resetsAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true,
						"description": "When the monthly allowance starts over; null for the trial."
					},
					"maxVideoSeconds": {
						"type": "number",
						"format": "double"
					},
					"maxBatchVideos": {
						"type": "number",
						"format": "double",
						"description": "0: single videos only (the trial)."
					},
					"fits": {
						"type": "boolean",
						"description": "Whether the previewed import fits as it is (true without a preview)."
					},
					"message": {
						"type": "string",
						"nullable": true,
						"description": "Why it does not fit (or why the balance does not cover it), in the user's words."
					},
					"requiredPlan": {
						"type": "string",
						"enum": [
							"starter",
							"team",
							"pro",
							"enterprise"
						],
						"nullable": true,
						"description": "The plan that allows more, or null."
					},
					"firstFitting": {
						"properties": {
							"estimatedCostCents": {
								"type": "number",
								"format": "double"
							},
							"durationSeconds": {
								"type": "number",
								"format": "double"
							},
							"videoCount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"estimatedCostCents",
							"durationSeconds",
							"videoCount"
						],
						"type": "object",
						"nullable": true,
						"description": "A playlist that does not fit: the first videos that do, which `firstFittingOnly` imports."
					},
					"tooLongCount": {
						"type": "number",
						"format": "double",
						"description": "Playlist videos skipped: longer than the per-video maximum, or without a duration."
					},
					"unavailableCount": {
						"type": "number",
						"format": "double"
					},
					"balanceMessage": {
						"type": "string",
						"nullable": true,
						"description": "The AI balance does not cover the estimate (the import is refused until it does)."
					}
				},
				"required": [
					"plan",
					"period",
					"allowanceSeconds",
					"usedSeconds",
					"remainingSeconds",
					"resetsAt",
					"maxVideoSeconds",
					"maxBatchVideos",
					"fits",
					"message",
					"requiredPlan",
					"firstFitting",
					"tooLongCount",
					"unavailableCount",
					"balanceMessage"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PreviewYouTubeDto": {
				"properties": {
					"url": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ImportYouTubeBatchDto": {
				"properties": {
					"url": {
						"type": "string"
					},
					"firstFittingOnly": {
						"type": "boolean",
						"description": "When the playlist does not fit the plan (too many videos, or more video\nthan the allowance has left), import the first videos that fit instead\nof refusing (the preview's `allowance.firstFitting`)."
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InternalFetchBody": {
				"properties": {
					"projectId": {
						"type": "string"
					},
					"taskId": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"format": {
						"type": "string",
						"enum": [
							"markdown",
							"html",
							"json"
						]
					}
				},
				"required": [
					"projectId",
					"url"
				],
				"type": "object",
				"additionalProperties": {}
			},
			"InternalSearchBody": {
				"properties": {
					"projectId": {
						"type": "string"
					},
					"taskId": {
						"type": "string"
					},
					"query": {
						"type": "string"
					},
					"limit": {
						"type": "number",
						"format": "double"
					},
					"country": {
						"type": "string"
					},
					"location": {
						"type": "string"
					},
					"language": {
						"type": "string"
					}
				},
				"required": [
					"projectId",
					"query"
				],
				"type": "object",
				"additionalProperties": {}
			},
			"DesktopHandoffSnapshotRepo": {
				"properties": {
					"remoteUrl": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"branch": {
						"type": "string"
					},
					"baseBranch": {
						"type": "string"
					},
					"description": {
						"type": "string"
					}
				},
				"required": [
					"remoteUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DesktopHandoffSnapshotPr": {
				"properties": {
					"repoUrl": {
						"type": "string"
					},
					"prUrl": {
						"type": "string"
					},
					"prNumber": {
						"type": "number",
						"format": "double"
					},
					"branch": {
						"type": "string"
					},
					"repoFullName": {
						"type": "string"
					},
					"state": {
						"type": "string",
						"enum": [
							"open",
							"closed",
							"merged"
						]
					}
				},
				"required": [
					"repoUrl",
					"prUrl",
					"prNumber",
					"branch"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DesktopHandoffSnapshot": {
				"properties": {
					"success": {
						"type": "boolean"
					},
					"sessionId": {
						"type": "string"
					},
					"projectId": {
						"type": "string"
					},
					"title": {
						"type": "string",
						"nullable": true
					},
					"status": {
						"type": "string"
					},
					"repos": {
						"items": {
							"$ref": "#/components/schemas/DesktopHandoffSnapshotRepo"
						},
						"type": "array"
					},
					"pullRequests": {
						"items": {
							"$ref": "#/components/schemas/DesktopHandoffSnapshotPr"
						},
						"type": "array"
					}
				},
				"required": [
					"success",
					"sessionId",
					"projectId",
					"title",
					"status",
					"repos",
					"pullRequests"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AzureRepoSourceAuthResponseDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"hasInstallation": {
						"type": "boolean"
					},
					"accountLogin": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"hasInstallation"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AzureAuthRequestDto": {
				"properties": {
					"code": {
						"type": "string"
					},
					"redirectUri": {
						"type": "string"
					}
				},
				"required": [
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AzureRepositoryListItemDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"namespace": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					},
					"accessible": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"remoteId",
					"owner",
					"name",
					"fullName",
					"namespace",
					"private",
					"accessible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IfAny_typeofemailSignatureSchema.any.ObtainSchemaGeneric_typeofemailSignatureSchema.DocType__": {
				"allOf": [
					{
						"properties": {
							"updatedAt": {
								"$ref": "#/components/schemas/NativeDate"
							},
							"createdAt": {
								"$ref": "#/components/schemas/NativeDate"
							}
						},
						"required": [
							"updatedAt",
							"createdAt"
						],
						"type": "object"
					},
					{
						"properties": {
							"slug": {
								"type": "string"
							},
							"lastEditedBy": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"htmlContent": {},
							"project": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"organisation": {
								"$ref": "#/components/schemas/ObjectId"
							},
							"title": {
								"type": "string"
							},
							"isDefault": {
								"type": "boolean"
							}
						},
						"required": [
							"isDefault"
						],
						"type": "object"
					}
				]
			},
			"InferSchemaType_typeofemailSignatureSchema_": {
				"$ref": "#/components/schemas/IfAny_typeofemailSignatureSchema.any.ObtainSchemaGeneric_typeofemailSignatureSchema.DocType__"
			},
			"EmailSignatureI": {
				"$ref": "#/components/schemas/InferSchemaType_typeofemailSignatureSchema_"
			},
			"EmailSignatureDocument": {
				"allOf": [
					{
						"$ref": "#/components/schemas/EmailSignatureI"
					},
					{
						"$ref": "#/components/schemas/Document"
					}
				]
			},
			"EmailSignatureDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"isDefault": {
						"type": "boolean"
					},
					"htmlContent": {
						"$ref": "#/components/schemas/Translatable"
					}
				},
				"required": [
					"title",
					"htmlContent"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PrecheckIssue": {
				"properties": {
					"code": {
						"type": "string"
					},
					"message": {
						"type": "string"
					},
					"fix": {
						"type": "string"
					},
					"docUrl": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"message",
					"fix"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EditorPrecheckResult": {
				"properties": {
					"ok": {
						"type": "boolean"
					},
					"reachable": {
						"type": "boolean"
					},
					"finalUrl": {
						"type": "string"
					},
					"blockers": {
						"items": {
							"$ref": "#/components/schemas/PrecheckIssue"
						},
						"type": "array"
					},
					"warnings": {
						"items": {
							"$ref": "#/components/schemas/PrecheckIssue"
						},
						"type": "array"
					}
				},
				"required": [
					"ok",
					"reachable",
					"finalUrl",
					"blockers",
					"warnings"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PrecheckHeader": {
				"properties": {
					"key": {
						"type": "string"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"key",
					"value"
				],
				"type": "object",
				"additionalProperties": false
			},
			"EditorPrecheckBody": {
				"properties": {
					"url": {
						"type": "string"
					},
					"engagementType": {
						"type": "string",
						"enum": [
							"tooltips",
							"producttours"
						],
						"description": "Reserved. Currently ignored; the precheck result does not depend on the engagement type."
					},
					"headers": {
						"items": {
							"$ref": "#/components/schemas/PrecheckHeader"
						},
						"type": "array",
						"description": "Extra request headers to send when fetching the URL, for pages behind\nbasic auth or a preview/bypass token. Malformed or transport-level\nheaders are dropped server-side."
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DeliverFrontendToolResultResponse": {
				"properties": {
					"delivered": {
						"type": "boolean"
					}
				},
				"required": [
					"delivered"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateScheduledCommentDto": {
				"properties": {
					"ticket": {
						"type": "string"
					},
					"comment": {},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AttachmentDto"
						},
						"type": "array"
					},
					"channel": {
						"$ref": "#/components/schemas/ChannelDto"
					},
					"replyTo": {
						"type": "string"
					},
					"scheduledAt": {
						"type": "string"
					}
				},
				"required": [
					"ticket",
					"scheduledAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyAddress": {
				"description": "Request and response shapes of the companies API. They exist for the OpenAPI\nspec (the docs playground renders a body form from it); the service still\nwhitelists and coerces every field itself (normalizeCompanyPayload).",
				"properties": {
					"line1": {
						"type": "string"
					},
					"line2": {
						"type": "string"
					},
					"city": {
						"type": "string"
					},
					"state": {
						"type": "string"
					},
					"postalCode": {
						"type": "string"
					},
					"country": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CompanyRecord": {
				"properties": {
					"_id": {
						"type": "string"
					},
					"companyId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"plan": {
						"type": "string"
					},
					"domain": {
						"type": "string"
					},
					"value": {
						"type": "number",
						"format": "double"
					},
					"sla": {
						"type": "number",
						"format": "double"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"address": {
						"$ref": "#/components/schemas/CompanyAddress"
					},
					"customData": {
						"properties": {},
						"additionalProperties": {},
						"type": "object"
					},
					"owner": {
						"type": "string"
					},
					"ownerEmail": {
						"type": "string"
					},
					"nameIsAuthoritative": {
						"type": "boolean"
					},
					"lastSeenAt": {
						"type": "string"
					},
					"createdAt": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string"
					}
				},
				"required": [
					"_id",
					"companyId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanySearchHit": {
				"properties": {
					"id": {
						"type": "string"
					},
					"companyId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"domain": {
						"type": "string"
					},
					"plan": {
						"type": "string"
					},
					"value": {
						"type": "number",
						"format": "double"
					},
					"lastSeenAt": {
						"type": "string"
					}
				},
				"required": [
					"id"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyImportResult": {
				"properties": {
					"failed": {
						"items": {
							"properties": {
								"message": {
									"type": "string"
								},
								"companyId": {
									"type": "string"
								}
							},
							"required": [
								"message",
								"companyId"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Companies whose write failed; re-sending them is safe."
					},
					"invalidRows": {
						"items": {
							"type": "number",
							"format": "double"
						},
						"type": "array",
						"description": "Positions (0-based) of rows without a usable `companyId`; nothing was written for them."
					},
					"imported": {
						"type": "number",
						"format": "double",
						"description": "Companies created or updated."
					}
				},
				"required": [
					"failed",
					"invalidRows",
					"imported"
				],
				"type": "object"
			},
			"CompanyUpsertBody": {
				"properties": {
					"name": {
						"description": "Text. Display name. A non-empty name set here is never overwritten by names the SDK sends."
					},
					"plan": {
						"description": "Text."
					},
					"domain": {
						"description": "Text, e.g. \"example.com\"."
					},
					"value": {
						"description": "Number (numeric strings are accepted). Account value, e.g. yearly revenue."
					},
					"sla": {
						"description": "Number of seconds (numeric strings are accepted). Response-time SLA."
					},
					"tags": {
						"description": "List of texts. Replaces the stored tags (an empty list clears them). Up to 50."
					},
					"address": {
						"description": "Object with line1, line2, city, state, postalCode, country (texts). Merged into the stored address."
					},
					"customData": {
						"description": "Object of texts, numbers, booleans or lists. Merged into the stored custom data. Up to 100 keys."
					},
					"owner": {
						"description": "Text. Id of the user in this project who owns the account; null or \"\" clears it."
					},
					"ownerEmail": {
						"description": "Text. Email of that user, instead of `owner`; null or \"\" clears it."
					}
				},
				"type": "object",
				"additionalProperties": false,
				"example": {
					"name": "Bäckerei Huber GmbH",
					"plan": "Kplus Premium",
					"domain": "baeckerei-huber.at",
					"value": 4800,
					"tags": [
						"vip"
					],
					"address": {
						"city": "Innsbruck",
						"country": "AT"
					},
					"customData": {
						"licenseNumber": "LIZ-10442",
						"modules": [
							"Kassa",
							"DMS"
						]
					},
					"ownerEmail": "support@example.com"
				}
			},
			"LeaderboardEntry": {
				"properties": {
					"username": {
						"type": "string"
					},
					"score": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"username",
					"score"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApproveContentSuggestionDto": {
				"properties": {
					"question": {
						"type": "string",
						"description": "Optional human edits applied instead of the proposed content."
					},
					"answer": {
						"type": "string"
					},
					"internal": {
						"type": "boolean",
						"description": "Snippets only: tag the snippet `internal` (Kai uses it for teammates,\nnever in customer answers). Omitted: internal when every grounding quote\nis an internal note, or the updated snippet is internal already."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"DismissContentSuggestionDto": {
				"properties": {
					"reason": {
						"type": "string",
						"enum": [
							"not_useful",
							"incorrect",
							"duplicate",
							"sensitive",
							"other"
						]
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UploadedFileResponse": {
				"properties": {
					"success": {
						"type": "boolean"
					},
					"fileUrl": {
						"type": "string",
						"description": "Permanent public URL of the stored file on the Gleap CDN."
					}
				},
				"required": [
					"success",
					"fileUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UploadFromUrlRequest": {
				"properties": {
					"url": {
						"type": "string",
						"description": "Publicly reachable http(s) URL of the image to import."
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PipelineRecordType": {
				"description": "What a pipeline holds. Persisted values — never rename a member, only add.",
				"enum": [
					"COMPANY",
					"CONTACT"
				],
				"type": "string"
			},
			"PipelineDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"icon": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"recordType": {
						"$ref": "#/components/schemas/PipelineRecordType"
					},
					"lanes": {
						"items": {},
						"type": "array"
					},
					"viewType": {
						"type": "string"
					},
					"columns": {
						"items": {},
						"type": "array"
					},
					"fields": {
						"items": {},
						"type": "array",
						"description": "Create-only field seeding (templates): each entry becomes a PIPELINE\nproperty plus a column. Loose `any[]` like lanes/columns — the service\nnormalises via `normalizePipelineFields`, never writes raw."
					},
					"sortBy": {},
					"users": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"isPublic": {
						"type": "boolean"
					}
				},
				"required": [
					"name",
					"recordType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Partial_PipelineDTO_": {
				"properties": {
					"name": {
						"type": "string"
					},
					"icon": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"recordType": {
						"$ref": "#/components/schemas/PipelineRecordType"
					},
					"lanes": {
						"items": {},
						"type": "array"
					},
					"viewType": {
						"type": "string"
					},
					"columns": {
						"items": {},
						"type": "array"
					},
					"fields": {
						"items": {},
						"type": "array",
						"description": "Create-only field seeding (templates): each entry becomes a PIPELINE\nproperty plus a column. Loose `any[]` like lanes/columns — the service\nnormalises via `normalizePipelineFields`, never writes raw."
					},
					"sortBy": {},
					"users": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"isPublic": {
						"type": "boolean"
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"PropertyType": {
				"description": "What a property stores. The values are the persisted DB strings and are\nmirrored by the dashboard's PropertyType — never rename a member, only add.\n\nIts own decorator-free module so pure services (and their harnesses) can\nimport the enum without loading the Mongoose model.",
				"enum": [
					"TEXT",
					"NUMBER",
					"BOOLEAN",
					"EMAIL",
					"DATE",
					"TIME",
					"TEXTAREA",
					"RICHTEXT",
					"SELECT",
					"MULTISELECT",
					"UPLOAD",
					"PHONE"
				],
				"type": "string"
			},
			"PipelineFieldSource": {
				"description": "Where a field's value lives.",
				"enum": [
					"ENTRY",
					"RECORD"
				],
				"type": "string"
			},
			"PipelineCalculation": {
				"description": "Footer totals the lane-stats aggregation supports. Numbers only.",
				"enum": [
					"sum",
					"average",
					"min",
					"max"
				],
				"type": "string"
			},
			"ResolvedPipelineField": {
				"description": "Resolves a pipeline's columns to the fields the dashboard, the stats\naggregation and the API render. The property a column points at decides the\nsource: a PIPELINE property scoped to this pipeline is an ENTRY field, a\nCOMPANY / SESSION property of the pipeline's record type is a RECORD field.\nA column pointing anywhere else (another pipeline's property, the wrong\nrecord type, a deleted property) is dropped — never rendered half-way.",
				"properties": {
					"propertyId": {
						"type": "string"
					},
					"fieldId": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"type": {
						"$ref": "#/components/schemas/PropertyType",
						"description": "TEXT or NUMBER for pipeline-created fields; a record attribute keeps its own type."
					},
					"source": {
						"$ref": "#/components/schemas/PipelineFieldSource"
					},
					"order": {
						"type": "number",
						"format": "double"
					},
					"width": {
						"type": "number",
						"format": "double"
					},
					"unit": {
						"type": "string"
					},
					"calculation": {
						"$ref": "#/components/schemas/PipelineCalculation"
					},
					"recordPath": {
						"type": "string",
						"description": "RECORD only: dotted path on the company/session document (`value`, `customData.seats`)."
					},
					"options": {
						"items": {},
						"type": "array",
						"description": "SELECT-style attributes carry their options for rendering and validation."
					},
					"readOnly": {
						"type": "boolean",
						"description": "RECORD only: the attribute cannot be written (e.g. last-seen device type)."
					}
				},
				"required": [
					"propertyId",
					"fieldId",
					"label",
					"type",
					"source",
					"order"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PipelineEntryDTO": {
				"properties": {
					"recordId": {
						"type": "string",
						"description": "Gleap id of the record to add, matching the pipeline's `recordType`: a company's `_id` (see\nGET /companies) or a contact's `id`. Not your own external companyId / userId."
					},
					"laneId": {
						"type": "string",
						"description": "Stage to add the entry to — a lane `id` from the pipeline's `lanes`. Defaults to the\npipeline's first stage."
					},
					"values": {
						"description": "Initial field values, keyed by the pipeline's field `fieldId`s (see\nGET /pipelines/{pipelineId}/properties). Primitive values only."
					}
				},
				"required": [
					"recordId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BulkAddEntriesDTO": {
				"properties": {
					"recordIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"laneId": {
						"type": "string"
					},
					"runAutomations": {
						"type": "boolean"
					}
				},
				"required": [
					"recordIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BulkAddFromFilterDTO": {
				"properties": {
					"contactViewId": {
						"type": "string"
					},
					"conditions": {},
					"search": {
						"type": "string"
					},
					"laneId": {
						"type": "string"
					},
					"runAutomations": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BulkMoveEntriesDTO": {
				"properties": {
					"entryIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"laneId": {
						"type": "string"
					}
				},
				"required": [
					"entryIds",
					"laneId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ExistingEntriesDTO": {
				"properties": {
					"recordIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"recordIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MovePipelineEntryDTO": {
				"properties": {
					"laneId": {
						"type": "string",
						"description": "Target stage — a lane `id` from the pipeline's `lanes`."
					},
					"lexorank": {
						"type": "string",
						"description": "Board position rank. Omit to place the entry at the end of the target stage."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateEntryValuesDTO": {
				"properties": {
					"values": {
						"description": "Field values keyed by the pipeline's field `fieldId`s (see\nGET /pipelines/{pipelineId}/properties). Sent keys are merged into the existing values;\n`null` clears a field. Primitive values only."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateEntryRecordValuesDTO": {
				"properties": {
					"values": {
						"description": "Values for the pipeline's RECORD fields, keyed by `fieldId` (see\nGET /pipelines/{pipelineId}/properties, `source: 'RECORD'`). Written through to the entry's\ncompany or contact; `null` clears the attribute. Primitive values only."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetEntryDueDateDTO": {
				"properties": {
					"dueDate": {
						"type": "string",
						"nullable": true,
						"description": "When the next step on this entry is due, as an ISO date string. `null` (or an\nempty string) clears it.\n\nTyped as a string rather than a Date so that clearing is expressible: TSOA\nwould reject `null` for a `Date` field, and the service parses it either way."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AnalyzeKaiPmDto": {
				"properties": {
					"websiteUrl": {
						"type": "string"
					}
				},
				"required": [
					"websiteUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmCompanyProfileDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"industry": {
						"type": "string"
					},
					"targetAudience": {
						"type": "string"
					},
					"positioning": {
						"type": "string"
					},
					"keyFeatures": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmCompetitorDto": {
				"properties": {
					"name": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"summary": {
						"type": "string"
					},
					"strengths": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"source": {
						"type": "string",
						"enum": [
							"AI",
							"MANUAL"
						]
					},
					"lastAnalyzedAt": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateKaiPmProfileDto": {
				"properties": {
					"companyProfile": {
						"$ref": "#/components/schemas/KaiPmCompanyProfileDto"
					},
					"goals": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"competitors": {
						"items": {
							"$ref": "#/components/schemas/KaiPmCompetitorDto"
						},
						"type": "array"
					},
					"completeOnboarding": {
						"type": "boolean",
						"description": "When true, sets onboardingCompletedAt (idempotent)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AddCompetitorDto": {
				"properties": {
					"url": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmActivityAction": {
				"description": "What clicking an activity does. `type` discriminates the client handler,\n`data` carries its arguments — new event types can declare new actions\nwithout a client release breaking (unknown types render unclickable).",
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"TICKET",
							"KAI_PM_SETTINGS",
							"KAI_PM_CONTENT"
						]
					},
					"data": {
						"$ref": "#/components/schemas/Record_string.string_"
					}
				},
				"required": [
					"type",
					"data"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmActivityItem": {
				"properties": {
					"id": {
						"type": "string"
					},
					"subType": {
						"type": "string",
						"description": "KaiPmEvent value, or the synthetic 'SHIPPED' derived from status history."
					},
					"createdAt": {
						"type": "string"
					},
					"payload": {
						"$ref": "#/components/schemas/Record_string.any_"
					},
					"action": {
						"$ref": "#/components/schemas/KaiPmActivityAction"
					},
					"ticket": {
						"properties": {
							"shareToken": {
								"type": "string"
							},
							"bugId": {
								"type": "number",
								"format": "double"
							},
							"title": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"title",
							"id"
						],
						"type": "object",
						"description": "Set for ticket-scoped items."
					},
					"actor": {
						"properties": {
							"bot": {
								"type": "boolean"
							},
							"fallbackName": {
								"type": "string"
							},
							"imageUrl": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"userId": {
								"type": "string"
							}
						},
						"required": [
							"bot"
						],
						"type": "object"
					}
				},
				"required": [
					"id",
					"subType",
					"createdAt",
					"payload"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmActivityPage": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/KaiPmActivityItem"
						},
						"type": "array"
					},
					"hasMore": {
						"type": "boolean",
						"description": "True when an older page exists (`before` = last item's createdAt)."
					}
				},
				"required": [
					"items",
					"hasMore"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmNeedsYouKind": {
				"type": "string",
				"enum": [
					"handed_off",
					"customer_reply",
					"review_queue",
					"pr_ready",
					"release_notes",
					"changelog_comment"
				]
			},
			"KaiPmTicketRef": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"bugId": {
						"type": "number",
						"format": "double"
					},
					"shareToken": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmNeedsYouItem": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/KaiPmNeedsYouKind"
					},
					"count": {
						"type": "number",
						"format": "double",
						"description": "How many things this row stands for (1 for a single request)."
					},
					"title": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					},
					"at": {
						"type": "string",
						"description": "Waiting since (ISO), when known."
					},
					"ticket": {
						"$ref": "#/components/schemas/KaiPmTicketRef"
					},
					"url": {
						"type": "string",
						"description": "pr_ready: the pull request."
					},
					"changelogId": {
						"type": "string",
						"description": "changelog_comment: the changelog with the unread comments."
					}
				},
				"required": [
					"kind",
					"count",
					"title",
					"detail"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmNeedsYou": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/KaiPmNeedsYouItem"
						},
						"type": "array"
					},
					"count": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"items",
					"count"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmHeadlines": {
				"properties": {
					"since": {
						"type": "string"
					},
					"headlines": {
						"items": {
							"properties": {
								"ticketId": {
									"type": "string"
								},
								"text": {
									"type": "string"
								}
							},
							"required": [
								"ticketId",
								"text"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"since",
					"headlines"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmBriefingPeriod": {
				"type": "string",
				"enum": [
					"last_visit",
					"week",
					"month"
				]
			},
			"KaiPmActivityPreferences": {
				"properties": {
					"topN": {
						"type": "number",
						"format": "double",
						"description": "Rank moves, entries and exits count inside this top N."
					},
					"minMrr": {
						"type": "number",
						"format": "double",
						"description": "A voter whose account is worth at least this much ($/month) is a big customer."
					},
					"weeklyBriefEmail": {
						"type": "boolean",
						"description": "The Monday weekly brief email for this project (Packet 6); on unless turned off."
					}
				},
				"required": [
					"topN",
					"minMrr",
					"weeklyBriefEmail"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmChangeReason": {
				"type": "string",
				"enum": [
					"shipped",
					"entered_top",
					"moved_up",
					"spike",
					"big_customer",
					"left_top",
					"moved_down"
				]
			},
			"KaiPmChangeCard": {
				"properties": {
					"ticket": {
						"$ref": "#/components/schemas/KaiPmTicketRef"
					},
					"reasons": {
						"items": {
							"$ref": "#/components/schemas/KaiPmChangeReason"
						},
						"type": "array",
						"description": "Why this request is news, most important first."
					},
					"headline": {
						"type": "string",
						"description": "One plain sentence about the change."
					},
					"shortHeadline": {
						"type": "string",
						"description": "Short form for the Overview line (\"Bulk export jumped to #2\")."
					},
					"rankNow": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"rankBefore": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"votesAdded": {
						"type": "number",
						"format": "double"
					},
					"votesTotal": {
						"type": "number",
						"format": "double"
					},
					"bigCustomers": {
						"items": {
							"properties": {
								"value": {
									"type": "number",
									"format": "double"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"value",
								"name"
							],
							"type": "object"
						},
						"type": "array"
					},
					"shippedAt": {
						"type": "string"
					},
					"spike": {
						"properties": {
							"oneCompany": {
								"type": "string"
							},
							"ratio": {
								"type": "number",
								"format": "double"
							},
							"votesLast7d": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"ratio",
							"votesLast7d"
						],
						"type": "object",
						"description": "`oneCompany`: every vote of the last 7 days came from this one company."
					},
					"trend": {
						"items": {
							"type": "number",
							"format": "double"
						},
						"type": "array",
						"description": "Votes per day over the last 30 days, oldest first."
					}
				},
				"required": [
					"ticket",
					"reasons",
					"headline",
					"shortHeadline",
					"rankNow",
					"rankBefore",
					"votesAdded",
					"votesTotal",
					"bigCustomers",
					"trend"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmHandledKind": {
				"type": "string",
				"enum": [
					"accepted",
					"declined",
					"merged",
					"set_aside",
					"already_exists",
					"content"
				]
			},
			"KaiPmHandledGroup": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/KaiPmHandledKind"
					},
					"count": {
						"type": "number",
						"format": "double"
					},
					"title": {
						"type": "string"
					},
					"tickets": {
						"items": {
							"$ref": "#/components/schemas/KaiPmTicketRef"
						},
						"type": "array"
					}
				},
				"required": [
					"kind",
					"count",
					"title",
					"tickets"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmBriefing": {
				"properties": {
					"period": {
						"$ref": "#/components/schemas/KaiPmBriefingPeriod"
					},
					"since": {
						"type": "string",
						"description": "Period start (ISO)."
					},
					"hasRankHistory": {
						"type": "boolean",
						"description": "False until the project's first daily rank snapshot exists."
					},
					"ranksSince": {
						"type": "string",
						"description": "UTC day ('YYYY-MM-DD') rank moves count from; later than `since` for a young project."
					},
					"preferences": {
						"$ref": "#/components/schemas/KaiPmActivityPreferences"
					},
					"changes": {
						"items": {
							"$ref": "#/components/schemas/KaiPmChangeCard"
						},
						"type": "array"
					},
					"handled": {
						"properties": {
							"groups": {
								"items": {
									"$ref": "#/components/schemas/KaiPmHandledGroup"
								},
								"type": "array"
							},
							"total": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"groups",
							"total"
						],
						"type": "object"
					}
				},
				"required": [
					"period",
					"since",
					"hasRankHistory",
					"preferences",
					"changes",
					"handled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmWeeklyBriefSettings": {
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"slack": {
						"properties": {
							"channelName": {
								"type": "string",
								"nullable": true
							},
							"channelId": {
								"type": "string",
								"nullable": true
							},
							"integrationId": {
								"type": "string",
								"nullable": true
							}
						},
						"required": [
							"channelName",
							"channelId",
							"integrationId"
						],
						"type": "object"
					},
					"slackIntegrationIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The project's connected Slack integrations (the channel picker loads channels per integration)."
					},
					"lastSlackError": {
						"type": "string",
						"nullable": true,
						"description": "The last Slack post failed with this error; cleared by the next good post."
					},
					"lastSentWeek": {
						"type": "string",
						"nullable": true,
						"description": "ISO week of the last brief ('2026-W41')."
					},
					"timezone": {
						"type": "string"
					}
				},
				"required": [
					"enabled",
					"slack",
					"slackIntegrationIds",
					"lastSlackError",
					"lastSentWeek",
					"timezone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmTeamMember": {
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string",
						"nullable": true
					},
					"profileImageUrl": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"id",
					"name",
					"email",
					"profileImageUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmTeam": {
				"properties": {
					"customized": {
						"type": "boolean",
						"description": "false = never edited: everyone with Kai PM access who did not turn the brief off."
					},
					"members": {
						"items": {
							"$ref": "#/components/schemas/KaiPmTeamMember"
						},
						"type": "array"
					},
					"candidates": {
						"items": {
							"$ref": "#/components/schemas/KaiPmTeamMember"
						},
						"type": "array",
						"description": "Everyone who could be on the team (has Kai PM access), for the picker."
					}
				},
				"required": [
					"customized",
					"members",
					"candidates"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoadmapReplyDto": {
				"properties": {
					"message": {
						"type": "string",
						"description": "Custom reply sent to upvoters. Omitted -> project template\n(roadmapSettings.acceptReply / declineReply). Empty string -> post no\ncustomer comment (silent accept/decline)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BuildFeatureRequestDto": {
				"properties": {
					"message": {
						"type": "string",
						"description": "Custom reply sent to upvoters. Omitted -> project template\n(roadmapSettings.acceptReply / declineReply). Empty string -> post no\ncustomer comment (silent accept/decline)."
					},
					"engine": {
						"type": "string",
						"description": "'kai' = managed cloud session; any other value = local-agent handoff."
					}
				},
				"required": [
					"engine"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApplyKaiPmProposalDto": {
				"properties": {
					"selection": {
						"properties": {
							"message": {
								"type": "string"
							},
							"ticketIds": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"groups": {
								"items": {
									"properties": {
										"duplicateIds": {
											"items": {
												"type": "string"
											},
											"type": "array"
										},
										"index": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"index"
									],
									"type": "object"
								},
								"type": "array"
							}
						},
						"type": "object",
						"description": "Narrows what runs; omitted = the whole proposal. A selection can only\ndrop saved items, never add any.\n- merge: `groups` by 0-based index, each with the duplicate ids to include\n- status / message: `ticketIds` to include\n- message: `message` = the text edited on the card"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateAgentEvalExampleBody": {
				"properties": {
					"ticketId": {
						"type": "string"
					},
					"verdict": {
						"type": "string",
						"enum": [
							"good",
							"bad"
						],
						"description": "The teammate's judgement of how the agent handled this ticket."
					},
					"description": {
						"type": "string",
						"description": "What went wrong / why it was good — becomes the grading rubric."
					}
				},
				"required": [
					"ticketId",
					"verdict",
					"description"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ChangelogSuggestionStatusDto": {
				"properties": {
					"hasRepos": {
						"type": "boolean"
					},
					"repoCount": {
						"type": "number",
						"format": "double"
					},
					"providers": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"repos": {
						"items": {
							"properties": {
								"branch": {
									"type": "string"
								},
								"provider": {
									"type": "string"
								},
								"fullName": {
									"type": "string"
								},
								"key": {
									"type": "string"
								}
							},
							"required": [
								"branch",
								"provider",
								"fullName",
								"key"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Connected repos for the Sources settings, with their current release branch."
					},
					"lastPublishedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"windowStart": {
						"type": "string",
						"format": "date-time",
						"description": "Start of the window a run would analyze right now."
					},
					"windowReason": {
						"type": "string"
					},
					"releasedFeatureRequestCount": {
						"type": "number",
						"format": "double",
						"description": "Feature requests released inside that window (live count)."
					},
					"cachedRun": {
						"properties": {
							"sourceCounts": {
								"properties": {
									"shippedFeatures": {
										"type": "number",
										"format": "double"
									},
									"featureRequests": {
										"type": "number",
										"format": "double"
									},
									"prs": {
										"type": "number",
										"format": "double"
									}
								},
								"required": [
									"shippedFeatures",
									"featureRequests",
									"prs"
								],
								"type": "object",
								"description": "Item counts per source of that run."
							},
							"trigger": {
								"type": "string",
								"enum": [
									"manual",
									"auto"
								],
								"description": "'auto' when the schedule sweep produced this run."
							},
							"prCount": {
								"type": "number",
								"format": "double"
							},
							"pendingSuggestionCount": {
								"type": "number",
								"format": "double"
							},
							"createdAt": {
								"type": "string",
								"format": "date-time"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"sourceCounts",
							"trigger",
							"prCount",
							"pendingSuggestionCount",
							"createdAt",
							"id"
						],
						"type": "object",
						"nullable": true,
						"description": "Latest completed run, if any."
					}
				},
				"required": [
					"hasRepos",
					"repoCount",
					"providers",
					"repos",
					"lastPublishedAt",
					"windowStart",
					"windowReason",
					"releasedFeatureRequestCount",
					"cachedRun"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentEvidenceDto": {
				"properties": {
					"type": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"count": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"type",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentAutopilotStateDto": {
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"scheduled",
							"held",
							"published",
							"stopped"
						]
					},
					"reason": {
						"type": "string",
						"nullable": true,
						"description": "Why it waits: big_launch | images | fact_check | weekly_cap | paused | stopped | dismissed | person."
					},
					"unsupportedClaims": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"publishAt": {
						"type": "string",
						"nullable": true
					},
					"headsUpAt": {
						"type": "string",
						"nullable": true
					},
					"publishedOutboundId": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"state",
					"reason",
					"unsupportedClaims",
					"publishAt",
					"headsUpAt",
					"publishedOutboundId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentNewsletterIssueDto": {
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"draft",
							"scheduled",
							"sending",
							"sent",
							"skipped",
							"failed"
						]
					},
					"outboundId": {
						"type": "string",
						"nullable": true,
						"description": "The draft EMAIL Outbound (open it in the email editor)."
					},
					"sendAt": {
						"type": "string",
						"nullable": true
					},
					"subject": {
						"type": "string"
					},
					"preheader": {
						"type": "string"
					},
					"approvedVia": {
						"type": "string",
						"nullable": true,
						"description": "'person' | 'autopilot'."
					},
					"headsUpAt": {
						"type": "string",
						"nullable": true
					},
					"error": {
						"type": "string",
						"nullable": true
					},
					"counts": {
						"properties": {
							"asked": {
								"type": "number",
								"format": "double"
							},
							"smaller": {
								"type": "number",
								"format": "double"
							},
							"highlights": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"asked",
							"smaller",
							"highlights"
						],
						"type": "object"
					},
					"draftNotes": {
						"type": "number",
						"format": "double",
						"description": "Release-note drafts the issue links to (published right before it sends)."
					}
				},
				"required": [
					"state",
					"outboundId",
					"sendAt",
					"subject",
					"preheader",
					"approvedVia",
					"headsUpAt",
					"error",
					"counts",
					"draftNotes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentSuggestionDto": {
				"properties": {
					"runId": {
						"type": "string"
					},
					"id": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"enum": [
							"release_note",
							"roundup",
							"newsletter"
						]
					},
					"title": {
						"type": "string"
					},
					"summary": {
						"type": "string"
					},
					"markdownBody": {
						"type": "string"
					},
					"whyLine": {
						"type": "string"
					},
					"evidence": {
						"items": {
							"$ref": "#/components/schemas/ContentEvidenceDto"
						},
						"type": "array"
					},
					"score": {
						"type": "number",
						"format": "double"
					},
					"cover": {
						"properties": {
							"imageUrl": {
								"type": "string",
								"nullable": true
							},
							"mood": {
								"type": "number",
								"format": "double"
							},
							"seed": {
								"type": "number",
								"format": "double"
							},
							"template": {
								"type": "string"
							},
							"url": {
								"type": "string"
							}
						},
						"required": [
							"imageUrl",
							"mood",
							"seed",
							"template",
							"url"
						],
						"type": "object",
						"nullable": true
					},
					"screenshots": {
						"items": {
							"properties": {
								"sourcePr": {
									"type": "string"
								},
								"url": {
									"type": "string"
								}
							},
							"required": [
								"url"
							],
							"type": "object"
						},
						"type": "array"
					},
					"sourceRefs": {
						"properties": {
							"commits": {
								"items": {
									"properties": {
										"title": {
											"type": "string"
										},
										"url": {
											"type": "string"
										},
										"sha": {
											"type": "string"
										},
										"repoFullName": {
											"type": "string"
										}
									},
									"type": "object"
								},
								"type": "array",
								"description": "Commits pushed straight to the main branch."
							},
							"shippedFeatures": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"featureRequests": {
								"items": {
									"properties": {
										"upvotesCount": {
											"type": "number",
											"format": "double"
										},
										"shareToken": {
											"type": "string"
										},
										"title": {
											"type": "string"
										},
										"ticket": {
											"type": "string"
										}
									},
									"required": [
										"ticket"
									],
									"type": "object"
								},
								"type": "array"
							},
							"prs": {
								"items": {
									"properties": {
										"title": {
											"type": "string"
										},
										"prUrl": {
											"type": "string"
										},
										"prNumber": {
											"type": "number",
											"format": "double"
										},
										"repoFullName": {
											"type": "string"
										}
									},
									"type": "object"
								},
								"type": "array"
							}
						},
						"required": [
							"commits",
							"shippedFeatures",
							"featureRequests",
							"prs"
						],
						"type": "object"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"refineCount": {
						"type": "number",
						"format": "double"
					},
					"createdAt": {
						"type": "string"
					},
					"deepWrite": {
						"properties": {
							"images": {
								"items": {
									"properties": {
										"alt": {
											"type": "string"
										},
										"url": {
											"type": "string"
										}
									},
									"required": [
										"alt",
										"url"
									],
									"type": "object"
								},
								"type": "array"
							},
							"error": {
								"type": "string",
								"nullable": true
							},
							"status": {
								"type": "string",
								"enum": [
									"running",
									"done",
									"failed"
								]
							}
						},
						"required": [
							"images",
							"error",
							"status"
						],
						"type": "object",
						"nullable": true,
						"description": "\"Full post\": a longer post with UI scenes rendered from the changed code."
					},
					"autopilot": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ContentAutopilotStateDto"
							}
						],
						"nullable": true,
						"description": "Autopilot (release notes): scheduled to publish on its own, or held with a reason."
					},
					"newsletter": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ContentNewsletterIssueDto"
							}
						],
						"nullable": true,
						"description": "Newsletter issue (type newsletter)."
					}
				},
				"required": [
					"runId",
					"id",
					"type",
					"title",
					"summary",
					"markdownBody",
					"whyLine",
					"evidence",
					"score",
					"cover",
					"screenshots",
					"sourceRefs",
					"tags",
					"refineCount",
					"createdAt",
					"deepWrite",
					"autopilot",
					"newsletter"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentSuggestionListDto": {
				"properties": {
					"suggestions": {
						"items": {
							"$ref": "#/components/schemas/ContentSuggestionDto"
						},
						"type": "array"
					}
				},
				"required": [
					"suggestions"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentItemDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"sourceType": {
						"type": "string"
					},
					"state": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"seenAt": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"title",
					"sourceType",
					"state",
					"reason",
					"seenAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentItemListDto": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/ContentItemDto"
						},
						"type": "array"
					},
					"total": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"items",
					"total"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ShippedEntryDto": {
				"description": "One row in the \"start from what shipped\" picker: a change, or a draft standing for its changes.",
				"properties": {
					"key": {
						"type": "string",
						"description": "`item:<id>` or `draft:<runId>:<suggestionId>`."
					},
					"kind": {
						"type": "string",
						"enum": [
							"pr",
							"commit",
							"feature_request",
							"shipped_feature",
							"draft"
						]
					},
					"title": {
						"type": "string"
					},
					"ref": {
						"type": "string",
						"description": "\"#2402\" for a PR, the short sha for a commit."
					},
					"badge": {
						"type": "string",
						"description": "\"14 votes\", \"main\", \"Draft\"."
					},
					"url": {
						"type": "string"
					},
					"shippedAt": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"announced",
							"dismissed"
						],
						"nullable": true,
						"description": "Scope \"all\" only: already announced or dismissed."
					}
				},
				"required": [
					"key",
					"kind",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ShippedListDto": {
				"properties": {
					"groups": {
						"items": {
							"properties": {
								"entries": {
									"items": {
										"$ref": "#/components/schemas/ShippedEntryDto"
									},
									"type": "array"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"entries",
								"name"
							],
							"type": "object"
						},
						"type": "array",
						"description": "By product area; drafts and changes in no draft."
					},
					"smaller": {
						"items": {
							"$ref": "#/components/schemas/ShippedEntryDto"
						},
						"type": "array",
						"description": "Internal and automated work, folded away."
					},
					"openCount": {
						"type": "number",
						"format": "double"
					},
					"total": {
						"type": "number",
						"format": "double",
						"description": "Rows in the whole list (all pages)."
					},
					"nextOffset": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Offset of the next page, or null on the last one."
					},
					"pendingGroups": {
						"type": "boolean",
						"description": "The areas are still being worked out: ask again in a few seconds."
					}
				},
				"required": [
					"groups",
					"smaller",
					"openCount",
					"total",
					"nextOffset",
					"pendingGroups"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiItemRefDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"kind": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"ref": {
						"type": "string"
					},
					"badge": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"kind",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiThreadMessageDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"role": {
						"type": "string",
						"enum": [
							"user",
							"kai"
						]
					},
					"content": {
						"type": "string"
					},
					"at": {
						"type": "string"
					},
					"change": {
						"properties": {
							"canUndo": {
								"type": "boolean"
							},
							"undone": {
								"type": "boolean"
							},
							"absorbed": {
								"items": {
									"properties": {
										"title": {
											"type": "string"
										},
										"id": {
											"type": "string"
										},
										"runId": {
											"type": "string"
										}
									},
									"required": [
										"title",
										"id",
										"runId"
									],
									"type": "object"
								},
								"type": "array"
							},
							"offered": {
								"items": {
									"$ref": "#/components/schemas/KaiItemRefDto"
								},
								"type": "array"
							},
							"removed": {
								"items": {
									"$ref": "#/components/schemas/KaiItemRefDto"
								},
								"type": "array"
							},
							"added": {
								"items": {
									"$ref": "#/components/schemas/KaiItemRefDto"
								},
								"type": "array"
							}
						},
						"required": [
							"canUndo",
							"undone",
							"absorbed",
							"offered",
							"removed",
							"added"
						],
						"type": "object",
						"nullable": true
					}
				},
				"required": [
					"id",
					"role",
					"content",
					"at",
					"change"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiThreadDto": {
				"properties": {
					"messages": {
						"items": {
							"$ref": "#/components/schemas/KaiThreadMessageDto"
						},
						"type": "array"
					}
				},
				"required": [
					"messages"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiUndoResultDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"markdownBody": {
						"type": "string"
					},
					"messages": {
						"items": {
							"$ref": "#/components/schemas/KaiThreadMessageDto"
						},
						"type": "array"
					}
				},
				"required": [
					"title",
					"markdownBody",
					"messages"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UndoKaiChangeDto": {
				"properties": {
					"messageId": {
						"type": "string"
					}
				},
				"required": [
					"messageId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ContentScheduleDto": {
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"release_notes"
						],
						"nullable": false
					},
					"enabled": {
						"type": "boolean"
					},
					"frequency": {
						"type": "string",
						"enum": [
							"daily",
							"weekdays",
							"every_n_days",
							"weekly",
							"monthly"
						]
					},
					"interval": {
						"type": "number",
						"format": "double"
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double"
					},
					"dayOfMonth": {
						"type": "number",
						"format": "double"
					},
					"time": {
						"type": "string",
						"description": "'HH:mm' in the project time zone."
					},
					"timezone": {
						"type": "string",
						"description": "The project time zone (flowConfig.timezone, falling back to UTC). Read-only."
					},
					"nextRunAt": {
						"type": "string",
						"nullable": true
					},
					"lastRunAt": {
						"type": "string",
						"nullable": true
					},
					"hasRuns": {
						"type": "boolean",
						"description": "Kai has checked at least once, manually or on the schedule (runs are kept 180 days)."
					},
					"hasDrafts": {
						"type": "boolean",
						"description": "A check gave at least one draft (until then the Drafts tab shows its guide)."
					}
				},
				"required": [
					"kind",
					"enabled",
					"frequency",
					"interval",
					"dayOfWeek",
					"dayOfMonth",
					"time",
					"timezone",
					"nextRunAt",
					"lastRunAt",
					"hasRuns",
					"hasDrafts"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateContentScheduleDto": {
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"frequency": {
						"type": "string",
						"enum": [
							"daily",
							"weekdays",
							"every_n_days",
							"weekly",
							"monthly"
						]
					},
					"interval": {
						"type": "number",
						"format": "double"
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double"
					},
					"dayOfMonth": {
						"type": "number",
						"format": "double"
					},
					"time": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"NewsletterSettingsDto": {
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"frequency": {
						"type": "string",
						"enum": [
							"weekly",
							"monthly"
						]
					},
					"interval": {
						"type": "number",
						"format": "double",
						"description": "weekly: 1 or 2."
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double"
					},
					"dayOfMonth": {
						"type": "number",
						"format": "double"
					},
					"time": {
						"type": "string",
						"description": "Send time 'HH:mm' in the project time zone."
					},
					"timezone": {
						"type": "string"
					},
					"nextSendAt": {
						"type": "string",
						"nullable": true
					},
					"sections": {
						"items": {
							"type": "string",
							"enum": [
								"highlights",
								"asked",
								"smaller",
								"coming_soon",
								"tip"
							]
						},
						"type": "array"
					},
					"audience": {
						"type": "string",
						"enum": [
							"all",
							"users"
						]
					},
					"signer": {
						"type": "string",
						"nullable": true,
						"description": "Teammate the issue comes from and is signed by (their email signature)."
					},
					"instructions": {
						"type": "string",
						"description": "Free-text instructions for Kai: what leads, how many updates, what to always or never mention."
					},
					"hasOutboundPlan": {
						"type": "boolean"
					}
				},
				"required": [
					"enabled",
					"frequency",
					"interval",
					"dayOfWeek",
					"dayOfMonth",
					"time",
					"timezone",
					"nextSendAt",
					"sections",
					"audience",
					"signer",
					"instructions",
					"hasOutboundPlan"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverRecipeDto": {
				"properties": {
					"background": {
						"properties": {
							"colorTo": {
								"type": "string"
							},
							"color": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"images",
									"color",
									"gradient"
								]
							}
						},
						"required": [
							"colorTo",
							"color",
							"kind"
						],
						"type": "object"
					},
					"layout": {
						"type": "string",
						"enum": [
							"card",
							"window",
							"phone",
							"none"
						]
					},
					"box": {
						"properties": {
							"fade": {
								"type": "boolean",
								"description": "The window or phone fades into the background at its edges."
							},
							"outlineColor": {
								"type": "string",
								"description": "'' = the theme's."
							},
							"outline": {
								"type": "string",
								"enum": [
									"none",
									"thin",
									"thick"
								]
							},
							"bar": {
								"type": "string",
								"description": "A window's top bar color ('' = the theme's)."
							},
							"theme": {
								"type": "string",
								"enum": [
									"light",
									"dark"
								]
							},
							"bleed": {
								"type": "boolean"
							},
							"share": {
								"type": "number",
								"format": "double",
								"description": "A window's width measured on the examples (share of the cover's width; 0 = by `size`)."
							},
							"size": {
								"type": "string",
								"enum": [
									"small",
									"medium",
									"large"
								]
							},
							"position": {
								"type": "string",
								"enum": [
									"center",
									"bottom",
									"left",
									"right"
								]
							}
						},
						"required": [
							"theme",
							"bleed",
							"size",
							"position"
						],
						"type": "object"
					},
					"card": {
						"properties": {
							"panel": {
								"type": "boolean"
							},
							"ui": {
								"type": "boolean"
							},
							"line": {
								"type": "boolean"
							},
							"labelSource": {
								"type": "string",
								"enum": [
									"fixed",
									"topic"
								]
							},
							"labelText": {
								"type": "string"
							},
							"label": {
								"type": "boolean"
							},
							"icon": {
								"type": "boolean"
							},
							"color": {
								"type": "string"
							}
						},
						"required": [
							"ui",
							"line",
							"labelText",
							"label",
							"icon",
							"color"
						],
						"type": "object",
						"description": "`panel`: the card fills the cover, inset from the edges. `labelSource`: fixed words or each post's topic."
					},
					"title": {
						"properties": {
							"color": {
								"type": "string"
							},
							"size": {
								"type": "string",
								"enum": [
									"small",
									"medium",
									"large"
								]
							},
							"weight": {
								"type": "string",
								"enum": [
									"regular",
									"semibold",
									"bold"
								]
							},
							"position": {
								"type": "string",
								"enum": [
									"left",
									"center",
									"top"
								]
							},
							"scale": {
								"type": "number",
								"format": "double",
								"description": "The title's font size measured on the examples (share of the cover's width; 0 = by `size`)."
							},
							"highlightBackground": {
								"type": "string"
							},
							"highlightColor": {
								"type": "string"
							},
							"highlight": {
								"type": "boolean",
								"description": "Its key words set apart, in `highlightColor` on `highlightBackground` ('' = the accent on a tint of it)."
							},
							"height": {
								"type": "string",
								"enum": [
									"top",
									"middle",
									"bottom"
								],
								"description": "Where it sits from top to bottom."
							},
							"line": {
								"type": "boolean",
								"description": "The post's short description under the title (styles saved before it read as false)."
							},
							"show": {
								"type": "boolean"
							}
						},
						"required": [
							"color",
							"size",
							"weight",
							"position",
							"show"
						],
						"type": "object"
					},
					"text": {
						"properties": {
							"muted": {
								"type": "string"
							},
							"color": {
								"type": "string"
							},
							"font": {
								"type": "string"
							}
						},
						"required": [
							"muted",
							"color",
							"font"
						],
						"type": "object",
						"description": "`font`: a Google Fonts family, '' = Inter."
					},
					"accent": {
						"type": "string"
					},
					"badge": {
						"properties": {
							"source": {
								"type": "string",
								"enum": [
									"fixed",
									"topic"
								]
							},
							"text": {
								"type": "string"
							},
							"style": {
								"type": "string",
								"enum": [
									"none",
									"pill",
									"outline",
									"plain"
								]
							}
						},
						"required": [
							"text",
							"style"
						],
						"type": "object",
						"description": "A small badge above a title on the cover (outside a card)."
					},
					"tags": {
						"properties": {
							"dots": {
								"type": "boolean"
							},
							"style": {
								"type": "string",
								"enum": [
									"pill",
									"outline",
									"plain"
								]
							},
							"show": {
								"type": "boolean"
							}
						},
						"required": [
							"dots",
							"style",
							"show"
						],
						"type": "object",
						"description": "A row of each post's tags under the title."
					},
					"art": {
						"properties": {
							"size": {
								"type": "string",
								"enum": [
									"small",
									"medium",
									"large"
								]
							},
							"position": {
								"type": "string",
								"enum": [
									"left",
									"center",
									"right"
								]
							},
							"style": {
								"type": "string"
							},
							"perPost": {
								"type": "boolean"
							}
						},
						"required": [
							"size",
							"position",
							"style",
							"perPost"
						],
						"type": "object",
						"description": "Art that changes per post: drawn for each post in `style`, at `position` and `size`."
					},
					"logo": {
						"properties": {
							"position": {
								"type": "string",
								"enum": [
									"top-left",
									"top-right",
									"bottom-left",
									"bottom-right",
									"none"
								]
							}
						},
						"required": [
							"position"
						],
						"type": "object"
					}
				},
				"required": [
					"background",
					"layout",
					"box",
					"card",
					"title",
					"text",
					"accent",
					"logo"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverStyleDto": {
				"properties": {
					"examples": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"logoUrl": {
						"type": "string",
						"nullable": true
					},
					"backgrounds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"note": {
						"type": "string"
					},
					"recipe": {
						"$ref": "#/components/schemas/CoverRecipeDto"
					},
					"starred": {
						"type": "boolean"
					},
					"sampleUrl": {
						"type": "string",
						"nullable": true
					},
					"updatedAt": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"examples",
					"logoUrl",
					"backgrounds",
					"note",
					"recipe",
					"starred",
					"sampleUrl",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverLooksDto": {
				"description": "The three covers a saved style gives (data URIs, 480px wide).",
				"properties": {
					"changelog": {
						"type": "string"
					},
					"fullPost": {
						"type": "string"
					},
					"roundup": {
						"type": "string"
					}
				},
				"required": [
					"changelog",
					"fullPost",
					"roundup"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartCoverStyleReadDto": {
				"description": "\"Read my covers\" started: the dashboard polls this read.",
				"properties": {
					"readId": {
						"type": "string"
					}
				},
				"required": [
					"readId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AnalyzeCoverStyleDto": {
				"properties": {
					"logoUrl": {
						"type": "string",
						"nullable": true
					},
					"backgrounds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"examples": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"note": {
						"type": "string"
					}
				},
				"required": [
					"examples"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverStyleFindingDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"detail"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverStyleAnalysisDto": {
				"properties": {
					"recipe": {
						"$ref": "#/components/schemas/CoverRecipeDto"
					},
					"findings": {
						"items": {
							"$ref": "#/components/schemas/CoverStyleFindingDto"
						},
						"type": "array"
					},
					"backgrounds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The backgrounds to use: the uploaded ones, or the covers with the text taken off."
					},
					"previews": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Previews on the team's recent posts (image URLs)."
					}
				},
				"required": [
					"recipe",
					"findings",
					"backgrounds",
					"previews"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverStyleReadDto": {
				"description": "A read's status; `result` when done, `error` (for the team) when failed.",
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"running",
							"done",
							"failed",
							"missing"
						]
					},
					"result": {
						"$ref": "#/components/schemas/CoverStyleAnalysisDto"
					},
					"error": {
						"type": "string"
					}
				},
				"required": [
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CoverStylePreviewsDto": {
				"properties": {
					"previews": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"previews"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PreviewCoverStyleDto": {
				"properties": {
					"logoUrl": {
						"type": "string",
						"nullable": true
					},
					"backgrounds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"recipe": {
						"$ref": "#/components/schemas/CoverRecipeDto"
					},
					"examples": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The example covers: the look a style with per-post art draws in."
					}
				},
				"required": [
					"recipe"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SaveCoverStyleDto": {
				"properties": {
					"logoUrl": {
						"type": "string",
						"nullable": true
					},
					"backgrounds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"examples": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"note": {
						"type": "string"
					},
					"recipe": {
						"$ref": "#/components/schemas/CoverRecipeDto"
					},
					"starred": {
						"type": "boolean"
					}
				},
				"required": [
					"examples",
					"recipe"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateNewsletterSettingsDto": {
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"frequency": {
						"type": "string",
						"enum": [
							"weekly",
							"monthly"
						]
					},
					"interval": {
						"type": "number",
						"format": "double"
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double"
					},
					"dayOfMonth": {
						"type": "number",
						"format": "double"
					},
					"time": {
						"type": "string"
					},
					"sections": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"audience": {
						"type": "string",
						"enum": [
							"all",
							"users"
						]
					},
					"signer": {
						"type": "string",
						"description": "A teammate's user id."
					},
					"instructions": {
						"type": "string",
						"description": "Max 2000 characters; empty clears them."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ScheduleNewsletterIssueDto": {
				"properties": {
					"sendAt": {
						"type": "string",
						"nullable": true,
						"description": "ISO time; omitted = the issue's own send time. Never earlier than now."
					},
					"subject": {
						"type": "string",
						"description": "The subject as the Needs you card left it (unset: Kai's)."
					},
					"preheader": {
						"type": "string",
						"description": "The preview line as the Needs you card left it (unset: Kai's)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SendNewsletterTestDto": {
				"properties": {
					"emails": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"emails"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AutopilotSettingsDto": {
				"properties": {
					"releaseNotes": {
						"type": "boolean"
					},
					"newsletter": {
						"type": "boolean"
					},
					"pausedAt": {
						"type": "string",
						"nullable": true
					},
					"pausedReason": {
						"type": "string",
						"nullable": true
					},
					"recent": {
						"items": {
							"properties": {
								"live": {
									"type": "boolean"
								},
								"outboundId": {
									"type": "string"
								},
								"publishedAt": {
									"type": "string"
								},
								"title": {
									"type": "string"
								},
								"id": {
									"type": "string"
								},
								"runId": {
									"type": "string"
								}
							},
							"required": [
								"live",
								"outboundId",
								"publishedAt",
								"title",
								"id",
								"runId"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Posts autopilot published in the last 14 days."
					}
				},
				"required": [
					"releaseNotes",
					"newsletter",
					"pausedAt",
					"pausedReason",
					"recent"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateAutopilotSettingsDto": {
				"properties": {
					"releaseNotes": {
						"type": "boolean"
					},
					"newsletter": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ChangelogStyleProposalDto": {
				"description": "Proposed `project.changelogAi.instructions` inferred from published changelogs.",
				"properties": {
					"instructions": {
						"type": "string",
						"description": "The style guide text for the instructions box."
					},
					"summary": {
						"type": "string",
						"description": "1-2 sentences shown to the user describing what was detected."
					}
				},
				"required": [
					"instructions",
					"summary"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LearnChangelogStyleResponseDto": {
				"properties": {
					"proposal": {
						"$ref": "#/components/schemas/ChangelogStyleProposalDto"
					},
					"basedOnCount": {
						"type": "number",
						"format": "double",
						"description": "How many published changelogs the analysis was based on."
					}
				},
				"required": [
					"proposal",
					"basedOnCount"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartChangelogSuggestionRunDto": {
				"properties": {
					"force": {
						"type": "boolean",
						"description": "Bypass the cached-result window and rescan."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AcceptChangelogCoverDto": {
				"description": "Wizard cover choice sent with accept.",
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"generated",
							"uploaded"
						]
					},
					"template": {
						"type": "string"
					},
					"seed": {
						"type": "number",
						"format": "double"
					},
					"mood": {
						"type": "number",
						"format": "double"
					},
					"imageTitle": {
						"type": "string",
						"description": "Text baked into the generated image (may differ from the changelog title)."
					},
					"imageSubtitle": {
						"type": "string"
					},
					"color": {
						"type": "string",
						"description": "Custom hex color for the generated image."
					},
					"url": {
						"type": "string",
						"description": "For type 'uploaded': the already-uploaded image URL."
					},
					"imageUrl": {
						"type": "string",
						"description": "https screenshot an image-layout template (browser/phone) shows."
					}
				},
				"required": [
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AcceptChangelogSuggestionDto": {
				"properties": {
					"translate": {
						"type": "boolean",
						"description": "Also translate the draft into every other portal language."
					},
					"title": {
						"type": "string",
						"description": "Wizard edits — the draft is created from these instead of the stored text."
					},
					"markdownBody": {
						"type": "string"
					},
					"cover": {
						"$ref": "#/components/schemas/AcceptChangelogCoverDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ScheduleChangelogSuggestionDto": {
				"description": "A person's Schedule on a release note in Needs you: it publishes at `publishAt` as them.",
				"properties": {
					"publishAt": {
						"type": "string",
						"description": "ISO time; at least a minute from now, within 21 days."
					},
					"title": {
						"type": "string",
						"description": "The title as the Needs you card left it (unset: Kai's)."
					},
					"markdownBody": {
						"type": "string",
						"description": "The text (markdown) as the Needs you card left it (unset: Kai's)."
					}
				},
				"required": [
					"publishAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DismissChangelogSuggestionDto": {
				"properties": {
					"reason": {
						"type": "string",
						"enum": [
							"too_small",
							"internal",
							"not_released_yet",
							"not_relevant",
							"wrong_grouping",
							"already_covered",
							"other"
						]
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"RefineChangelogSuggestionDto": {
				"properties": {
					"instruction": {
						"type": "string",
						"description": "Free-text instruction, e.g. \"shorter\", \"more playful\", \"mention the mobile app too\"."
					},
					"title": {
						"type": "string",
						"description": "Wizard edits: refine this text (local edits) instead of the stored copy."
					},
					"markdownBody": {
						"type": "string"
					},
					"persist": {
						"type": "boolean",
						"description": "false → pure rewrite (combined-preview text): nothing written to the stored suggestion."
					}
				},
				"required": [
					"instruction"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CombineChangelogSuggestionsPreviewDto": {
				"properties": {
					"suggestionIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "At least two pending suggestion ids from the same run."
					}
				},
				"required": [
					"suggestionIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CombineChangelogSuggestionsDto": {
				"properties": {
					"suggestionIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "At least two pending suggestion ids from the same run."
					},
					"translate": {
						"type": "boolean",
						"description": "Also translate the combined draft into every other portal language."
					},
					"title": {
						"type": "string",
						"description": "Wizard edits — the draft is created from these instead of a fresh merge."
					},
					"markdownBody": {
						"type": "string"
					},
					"cover": {
						"$ref": "#/components/schemas/AcceptChangelogCoverDto"
					}
				},
				"required": [
					"suggestionIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GenerateChangelogEntryDto": {
				"properties": {
					"prKeys": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Selected PRs as \"repoFullName#prNumber\" keys from the run's candidates."
					},
					"featureRequestIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Selected feature-request ticket ids from the run's candidates."
					},
					"shippedFeatureIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Selected shipped-feature ids from the run's candidates."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpcomingItem": {
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"SNOOZE",
							"PIPELINE",
							"ATTRIBUTE"
						]
					},
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					},
					"date": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"kind",
					"id",
					"title",
					"date"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WaitingItem": {
				"description": "Open vs total, so a tab can carry a number that is not the loaded page size.",
				"properties": {
					"id": {
						"type": "string"
					},
					"bugId": {
						"type": "number",
						"format": "double"
					},
					"title": {
						"type": "string"
					},
					"waitingDays": {
						"type": "number",
						"format": "double",
						"description": "Whole days since the thread last moved."
					},
					"snoozedUntil": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					}
				},
				"required": [
					"id",
					"bugId",
					"title",
					"waitingDays"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SummaryStatus": {
				"type": "string",
				"enum": [
					"disabled",
					"not-enabled",
					"not-enough-data",
					"ok",
					"not-found",
					"rate-limited"
				]
			},
			"SummaryResult": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/SummaryStatus"
					},
					"summary": {},
					"stale": {
						"type": "boolean",
						"description": "True when the record has moved on but the cooldown is still holding."
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SContact": {
				"properties": {
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"phone": {
						"type": "string"
					},
					"language": {
						"type": "string"
					},
					"companyId": {
						"type": "string"
					},
					"companyName": {
						"type": "string"
					},
					"plan": {
						"type": "string"
					},
					"value": {
						"type": "number",
						"format": "double"
					},
					"customData": {
						"$ref": "#/components/schemas/Record_string.unknown_"
					},
					"unread": {
						"type": "number",
						"format": "double"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastActivityAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"userId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SUpsertContactBody": {
				"properties": {
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"phone": {
						"type": "string"
					},
					"language": {
						"type": "string",
						"description": "ISO language code, e.g. \"en\", \"az\"."
					},
					"companyId": {
						"type": "string"
					},
					"companyName": {
						"type": "string"
					},
					"plan": {
						"type": "string"
					},
					"value": {
						"type": "number",
						"format": "double"
					},
					"customData": {
						"description": "Arbitrary custom contact data (flat key→value object)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"S2STrackEventItem": {
				"properties": {
					"name": {
						"type": "string"
					},
					"date": {
						"type": "string",
						"description": "ISO timestamp; defaults to now."
					},
					"data": {
						"description": "Arbitrary event payload (flat key→value object)."
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2STrackEventsBody": {
				"properties": {
					"events": {
						"items": {
							"$ref": "#/components/schemas/S2STrackEventItem"
						},
						"type": "array"
					}
				},
				"required": [
					"events"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SAuthor": {
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"contact",
							"agent",
							"bot",
							"system"
						]
					},
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"avatar": {
						"type": "string"
					}
				},
				"required": [
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SAttachment": {
				"properties": {
					"url": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"contentType": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SMessage": {
				"properties": {
					"id": {
						"type": "string"
					},
					"conversationId": {
						"type": "string"
					},
					"text": {
						"type": "string"
					},
					"author": {
						"$ref": "#/components/schemas/S2SAuthor"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/S2SAttachment"
						},
						"type": "array"
					},
					"replyToMessageId": {
						"type": "string"
					},
					"rating": {
						"type": "string"
					},
					"unread": {
						"type": "boolean"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"conversationId",
					"author",
					"attachments",
					"unread",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SConversation": {
				"properties": {
					"id": {
						"type": "string"
					},
					"number": {
						"type": "number",
						"format": "double"
					},
					"title": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"status": {
						"type": "string"
					},
					"closed": {
						"type": "boolean"
					},
					"archived": {
						"type": "boolean"
					},
					"unread": {
						"type": "boolean"
					},
					"rating": {
						"type": "number",
						"format": "double",
						"description": "CSAT rating 0-10 given by the contact (rateconversation step or POST …/rating)."
					},
					"workflowActive": {
						"type": "boolean"
					},
					"workflowId": {
						"type": "string"
					},
					"assignee": {
						"allOf": [
							{
								"$ref": "#/components/schemas/S2SAuthor"
							}
						],
						"nullable": true
					},
					"attributes": {
						"$ref": "#/components/schemas/Record_string.unknown_"
					},
					"contact": {
						"properties": {
							"userId": {
								"type": "string"
							}
						},
						"type": "object"
					},
					"latestMessage": {
						"$ref": "#/components/schemas/S2SMessage"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastActivityAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"closed",
					"archived",
					"unread",
					"workflowActive"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SAttachmentInput": {
				"properties": {
					"url": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"contentType": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SCreateConversationBody": {
				"properties": {
					"title": {
						"type": "string"
					},
					"message": {
						"type": "string",
						"description": "The customer's first message."
					},
					"attributes": {
						"description": "Ticket attributes (data attributes); agent-only when the attribute's shared visibility is disabled."
					},
					"source": {
						"type": "string",
						"description": "Free-form source tag, e.g. \"abb-mobile\"."
					},
					"type": {
						"type": "string",
						"description": "Ticket type, e.g. \"BUG\". One of the project's ticket types; defaults to\n\"INQUIRY\". FEATURE_REQUEST and CRASH are not allowed.",
						"example": "BUG"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/S2SAttachmentInput"
						},
						"type": "array"
					},
					"workflowId": {
						"type": "string",
						"description": "Start this workflow immediately (wf_… or bare id). Mutually exclusive with agentId."
					},
					"agentId": {
						"type": "string",
						"description": "Engage this AI agent directly. Mutually exclusive with workflowId."
					}
				},
				"required": [
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SPatchConversationBody": {
				"properties": {
					"title": {
						"type": "string"
					},
					"attributes": {
						"description": "Attribute keys to set (merged into the existing attributes)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"S2STypingBody": {
				"properties": {
					"typing": {
						"type": "boolean"
					}
				},
				"required": [
					"typing"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SNetworkLogRequestInput": {
				"properties": {
					"url": {
						"type": "string",
						"description": "Full request URL."
					},
					"type": {
						"type": "string",
						"description": "HTTP method, e.g. \"GET\"."
					},
					"date": {
						"type": "string",
						"description": "ISO timestamp of the request."
					},
					"duration": {
						"type": "number",
						"format": "double",
						"description": "Duration in milliseconds."
					},
					"success": {
						"type": "boolean"
					},
					"request": {
						"description": "Request details, e.g. { headers, payload }."
					},
					"response": {
						"description": "Response details, e.g. { status, responseText }."
					},
					"initiatorType": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SPutNetworkLogsBody": {
				"properties": {
					"requests": {
						"items": {
							"$ref": "#/components/schemas/S2SNetworkLogRequestInput"
						},
						"type": "array",
						"description": "Snapshot of recent network requests (max 100 entries, 2 MB). Replaces any previous snapshot for this conversation."
					}
				},
				"required": [
					"requests"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SConversationEventInput": {
				"properties": {
					"name": {
						"type": "string",
						"description": "Event name, e.g. \"screen_opened\" or \"pageView\"."
					},
					"date": {
						"type": "string",
						"description": "ISO timestamp of when the event happened; defaults to now."
					},
					"data": {
						"description": "Arbitrary event payload (flat key→value object)."
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SPutConversationEventsBody": {
				"properties": {
					"events": {
						"items": {
							"$ref": "#/components/schemas/S2SConversationEventInput"
						},
						"type": "array",
						"description": "Snapshot of the events that led up to this conversation (max 500 entries, 2 MB). Replaces any previous snapshot for this conversation."
					}
				},
				"required": [
					"events"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SConversationRatingBody": {
				"properties": {
					"rating": {
						"type": "number",
						"format": "double",
						"description": "Integer 0–10."
					}
				},
				"required": [
					"rating"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SSendMessageBody": {
				"properties": {
					"text": {
						"type": "string"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/S2SAttachmentInput"
						},
						"type": "array"
					},
					"replyToMessageId": {
						"type": "string"
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SWorkflowStep": {
				"properties": {
					"workflowId": {
						"type": "string"
					},
					"stepType": {
						"type": "string"
					},
					"actionFlowId": {
						"type": "string"
					},
					"actionId": {
						"type": "number",
						"format": "double"
					},
					"action": {
						"$ref": "#/components/schemas/Record_string.unknown_"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"S2SWorkflowAnswerBody": {
				"properties": {
					"text": {
						"type": "string",
						"description": "Free-text answer (input / chat steps)."
					},
					"selected": {
						"type": "string",
						"description": "Selected option value (button / select steps)."
					},
					"rating": {
						"type": "number",
						"format": "double",
						"description": "Rating value (rate-conversation steps)."
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/S2SAttachmentInput"
						},
						"type": "array"
					},
					"botAction": {
						"type": "string",
						"enum": [
							"humanHandoff"
						],
						"nullable": false,
						"description": "\"humanHandoff\" requests a human without waking an agent run."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"S2SMessageRatingBody": {
				"properties": {
					"rating": {
						"type": "string",
						"enum": [
							"positive",
							"negative"
						]
					}
				},
				"required": [
					"rating"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SStreamConfig": {
				"properties": {
					"protocol": {
						"type": "string",
						"enum": [
							"pusher"
						],
						"nullable": false
					},
					"host": {
						"type": "string"
					},
					"port": {
						"type": "number",
						"format": "double"
					},
					"tls": {
						"type": "boolean"
					},
					"appKey": {
						"type": "string"
					},
					"channel": {
						"type": "string"
					},
					"authEndpoint": {
						"type": "string"
					},
					"userAuthEndpoint": {
						"type": "string"
					}
				},
				"required": [
					"protocol",
					"host",
					"port",
					"tls",
					"appKey",
					"channel",
					"authEndpoint",
					"userAuthEndpoint"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SStreamAuthBody": {
				"properties": {
					"socket_id": {
						"type": "string"
					},
					"channel_name": {
						"type": "string"
					},
					"consumerId": {
						"type": "string",
						"description": "Identifies the connecting backend instance; a new consumerId takes over."
					},
					"typingEvents": {
						"type": "boolean",
						"description": "Opt this stream into agent.typing.* events (high volume; default off)."
					}
				},
				"required": [
					"socket_id",
					"channel_name",
					"consumerId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SStreamUserAuthBody": {
				"properties": {
					"socket_id": {
						"type": "string"
					},
					"consumerId": {
						"type": "string"
					}
				},
				"required": [
					"socket_id",
					"consumerId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SWebhookListItem": {
				"properties": {
					"id": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"events": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"description": {
						"type": "string"
					},
					"secret": {
						"type": "string",
						"description": "Masked; the full secret is returned once at creation."
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"id",
					"url",
					"enabled",
					"events",
					"secret",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SWebhookCreateBody": {
				"properties": {
					"url": {
						"type": "string"
					},
					"events": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Event types to deliver; omit for all."
					},
					"description": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"S2SWorkflowListItem": {
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"id"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DecideShippedFeatureDto": {
				"properties": {
					"status": {
						"type": "string",
						"enum": [
							"confirmed",
							"dismissed",
							"candidate"
						],
						"description": "confirm → 'confirmed', dismiss → 'dismissed', re-open → 'candidate'."
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BitbucketRepoSourceAuthResponseDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"hasInstallation": {
						"type": "boolean"
					},
					"accountLogin": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"hasInstallation"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BitbucketAuthRequestDto": {
				"properties": {
					"code": {
						"type": "string"
					},
					"redirectUri": {
						"type": "string"
					}
				},
				"required": [
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BitbucketRepositoryListItemDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					},
					"accessible": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"remoteId",
					"owner",
					"name",
					"fullName",
					"private",
					"accessible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GitlabRepoSourceAuthResponseDto": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CodeRepositoryProvider"
					},
					"hasInstallation": {
						"type": "boolean"
					},
					"accountLogin": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"hasInstallation"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GitlabAuthRequestDto": {
				"properties": {
					"code": {
						"type": "string"
					},
					"redirectUri": {
						"type": "string"
					}
				},
				"required": [
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GitlabRepositoryListItemDto": {
				"properties": {
					"id": {
						"type": "string"
					},
					"remoteId": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					},
					"accessible": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"remoteId",
					"owner",
					"name",
					"fullName",
					"private",
					"accessible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RegionInfo": {
				"properties": {
					"region": {
						"type": "string",
						"description": "Region this API serves ('eu' | 'us')."
					},
					"primaryRegion": {
						"type": "string",
						"description": "Region that runs account-wide work (billing webhooks without org context)."
					},
					"apiUrl": {
						"type": "string",
						"description": "Public SDK/REST API base of this region."
					},
					"dashApiUrl": {
						"type": "string",
						"description": "Dashboard API base of this region."
					},
					"appUrl": {
						"type": "string",
						"description": "Dashboard SPA base."
					},
					"socketsHost": {
						"type": "string",
						"description": "Public realtime host."
					}
				},
				"required": [
					"region",
					"primaryRegion",
					"apiUrl",
					"dashApiUrl",
					"appUrl",
					"socketsHost"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RegionLookupResult": {
				"properties": {
					"region": {
						"type": "string",
						"description": "Region this API serves ('eu' | 'us')."
					},
					"primaryRegion": {
						"type": "string",
						"description": "Region that runs account-wide work (billing webhooks without org context)."
					},
					"apiUrl": {
						"type": "string",
						"description": "Public SDK/REST API base of this region."
					},
					"dashApiUrl": {
						"type": "string",
						"description": "Dashboard API base of this region."
					},
					"appUrl": {
						"type": "string",
						"description": "Dashboard SPA base."
					},
					"socketsHost": {
						"type": "string",
						"description": "Public realtime host."
					},
					"match": {
						"type": "string",
						"enum": [
							"account",
							"invitation"
						],
						"description": "What lives here for that email: a dashboard account, or only a pending\ninvitation. Sign-in prefers a region with an account over one that merely\nholds an invitation; an invitation alone can't receive a login code."
					}
				},
				"required": [
					"region",
					"primaryRegion",
					"apiUrl",
					"dashApiUrl",
					"appUrl",
					"socketsHost",
					"match"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UploadLinkResponse": {
				"properties": {
					"uploadUrl": {
						"type": "string",
						"description": "POST one image here as multipart/form-data, field `file`. No auth header needed."
					},
					"expiresAt": {
						"type": "string",
						"description": "ISO timestamp after which the link no longer works."
					},
					"maxBytes": {
						"type": "number",
						"format": "double"
					},
					"allowedTypes": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"uploadUrl",
					"expiresAt",
					"maxBytes",
					"allowedTypes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UploadLinkRedeemResponse": {
				"properties": {
					"success": {
						"type": "boolean"
					},
					"fileUrl": {
						"type": "string",
						"description": "Permanent public URL of the stored image on the Gleap CDN."
					}
				},
				"required": [
					"success",
					"fileUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiTaskDraftStep": {
				"properties": {
					"text": {
						"type": "string"
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiTaskAssistBody": {
				"properties": {
					"mode": {
						"type": "string",
						"enum": [
							"draft",
							"refine"
						]
					},
					"goal": {
						"type": "string",
						"description": "mode \"draft\": what Kai should do, in the admin's words."
					},
					"steps": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "mode \"refine\": the current steps, one string each, with @{mention_id} tokens."
					},
					"instruction": {
						"type": "string",
						"description": "mode \"refine\": what to change."
					}
				},
				"required": [
					"mode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CaptureIncludeDto": {
				"description": "Request bodies of the capture-request routes (contract §4). TSOA validates\nthem and silently drops undeclared fields, so every accepted field is\ndeclared here; values are normalized again in the services.",
				"properties": {
					"consoleLog": {
						"type": "boolean"
					},
					"networkLogs": {
						"type": "boolean"
					},
					"customData": {
						"type": "boolean"
					},
					"metaData": {
						"type": "boolean"
					},
					"customEventLog": {
						"type": "boolean"
					},
					"replays": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CaptureRequestOptionsDto": {
				"properties": {
					"message": {
						"type": "string",
						"description": "Customer-facing text on the card (already localized)."
					},
					"reason": {
						"type": "string",
						"description": "Internal: what the requester wants to see (fed to the AI analysis, never shown to the customer)."
					},
					"allowUpload": {
						"type": "boolean"
					},
					"annotate": {
						"type": "boolean"
					},
					"maxDurationSec": {
						"type": "number",
						"format": "double",
						"description": "Clamped to 5..180 seconds."
					},
					"audio": {
						"type": "boolean"
					},
					"attachLogs": {
						"type": "boolean"
					},
					"include": {
						"$ref": "#/components/schemas/CaptureIncludeDto"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateCaptureRequestDto": {
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"screenshot",
							"recording",
							"any",
							"logs"
						]
					},
					"message": {
						"type": "string"
					},
					"options": {
						"$ref": "#/components/schemas/CaptureRequestOptionsDto"
					}
				},
				"required": [
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ClaimCaptureRequestDto": {
				"properties": {
					"deviceId": {
						"type": "string"
					},
					"platform": {
						"type": "string"
					},
					"sdkType": {
						"type": "string"
					},
					"sdkVersion": {
						"type": "string"
					},
					"method": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CaptureEventDto": {
				"properties": {
					"type": {
						"type": "string",
						"enum": [
							"declined",
							"unsupported",
							"failed",
							"released"
						]
					},
					"reason": {
						"type": "string"
					},
					"platform": {
						"type": "string"
					},
					"deviceId": {
						"type": "string"
					}
				},
				"required": [
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SkipCaptureRequestDto": {
				"properties": {
					"message": {
						"type": "string",
						"description": "The customer's message (the client sends a localized default such as \"I can't share that right now.\")."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CaptureFileDto": {
				"properties": {
					"url": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"type": {
						"type": "string"
					},
					"size": {
						"type": "number",
						"format": "double"
					},
					"width": {
						"type": "number",
						"format": "double"
					},
					"height": {
						"type": "number",
						"format": "double"
					},
					"durationMs": {
						"type": "number",
						"format": "double"
					},
					"posterUrl": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompleteCaptureRequestDto": {
				"properties": {
					"files": {
						"items": {
							"$ref": "#/components/schemas/CaptureFileDto"
						},
						"type": "array",
						"description": "1..5 files uploaded through `/uploads/attachments` for this project."
					},
					"method": {
						"type": "string"
					},
					"platform": {
						"type": "string"
					},
					"sdkType": {
						"type": "string"
					},
					"sdkVersion": {
						"type": "string"
					},
					"deviceId": {
						"type": "string"
					},
					"annotations": {
						"items": {},
						"type": "array"
					},
					"timeline": {
						"items": {},
						"type": "array"
					},
					"recordingStartedAt": {
						"type": "string"
					},
					"recordingEndedAt": {
						"type": "string"
					},
					"message": {
						"type": "string"
					}
				},
				"required": [
					"files",
					"method"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RepositorySuggestion": {
				"properties": {
					"repositoryId": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"confidence": {
						"type": "string",
						"enum": [
							"high",
							"low"
						]
					},
					"source": {
						"type": "string",
						"enum": [
							"auto",
							"history"
						]
					}
				},
				"required": [
					"repositoryId",
					"fullName",
					"reason",
					"confidence",
					"source"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateTicketTypeDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"restrictedToUsers": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Members (user ids) who may see the new board. Leave this and `restrictedToTeams` empty to share the\nboard with everyone. Setting either needs the board permissions right (admins, managers)."
					},
					"restrictedToTeams": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Teams (team ids) whose members may see the new board."
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReorderTicketTypesDTO": {
				"properties": {
					"types": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Board `type` keys in the desired sidebar order."
					}
				},
				"required": [
					"types"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateTicketTypeDTO": {
				"description": "Partial board update — only the fields sent change; `null` clears a field\n(e.g. back to the default email template). `type` and `project` are\nimmutable and never accepted.",
				"properties": {
					"name": {
						"type": "string"
					},
					"menuName": {
						"type": "string",
						"nullable": true
					},
					"path": {
						"type": "string"
					},
					"icon": {
						"type": "string",
						"nullable": true
					},
					"selectable": {
						"type": "boolean",
						"nullable": true
					},
					"options": {},
					"restrictedToUsers": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Members (user ids) who may see this board. Empty here and in `restrictedToTeams` = everyone.\nChanging who may see a board needs the board permissions right (admins, managers)."
					},
					"restrictedToTeams": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Teams (team ids) whose members may see this board."
					},
					"restrictedToAgents": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Agents whose runs may read this board while it is restricted."
					},
					"assignTo": {
						"properties": {
							"team": {
								"type": "string",
								"nullable": true
							},
							"mode": {
								"type": "string",
								"enum": [
									"default",
									"team",
									"nobody"
								]
							}
						},
						"required": [
							"mode"
						],
						"type": "object",
						"nullable": true,
						"description": "Which team takes the board's new tickets nobody owns: `default` (the project's default team),\n`team` (with `team`, a team id of this project) or `nobody`."
					},
					"botRestrictedToUsers": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "INQUIRY board only: members who may see the automated (Kai) conversations. Empty here and in\n`botRestrictedToTeams` = the same people as the Conversations board."
					},
					"botRestrictedToTeams": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "INQUIRY board only: teams whose members may see the automated (Kai) conversations."
					},
					"receievedEmailTitle": {},
					"receievedEmailDescription": {},
					"feedbackReceivedEmailTemplate": {},
					"emailReplyTemplate": {},
					"priorities": {
						"items": {},
						"type": "array",
						"description": "The full priority list in urgency order (most urgent first): `{ key?, title, color, archived?, isDefault? }`.\nOmit `key` for new priorities. LOW / MEDIUM / HIGH can be renamed or archived but not removed."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CheckoutInterval": {
				"type": "string",
				"enum": [
					"month",
					"year"
				]
			},
			"CheckoutPriceView": {
				"properties": {
					"amount": {
						"type": "number",
						"format": "double",
						"description": "List price per billing interval, minor units (cents)."
					},
					"currency": {
						"type": "string"
					},
					"interval": {
						"$ref": "#/components/schemas/CheckoutInterval"
					},
					"monthlyAmount": {
						"type": "number",
						"format": "double",
						"description": "List price per month (the yearly price divided by 12), minor units."
					},
					"discountedAmount": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The first discounted billing period, minor units; null without a discount."
					},
					"discountedMonthlyAmount": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The discounted price per month, minor units; null without a discount."
					}
				},
				"required": [
					"amount",
					"currency",
					"interval",
					"monthlyAmount",
					"discountedAmount",
					"discountedMonthlyAmount"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DiscountReason": {
				"type": "string",
				"enum": [
					"startup",
					"partner"
				]
			},
			"CheckoutDiscountView": {
				"properties": {
					"reason": {
						"$ref": "#/components/schemas/DiscountReason"
					},
					"percent": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Percentage off; null for a flat discount (see amountOff)."
					},
					"periods": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Billing periods it applies to, the first payment included; null = every period."
					},
					"amountOff": {
						"type": "number",
						"format": "double",
						"description": "Flat discounts: the amount off per billing period, minor units."
					}
				},
				"required": [
					"reason",
					"percent",
					"periods"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CheckoutSession": {
				"properties": {
					"transactionId": {
						"type": "string",
						"description": "Open with Paddle.Checkout.open({ transactionId })."
					},
					"price": {
						"$ref": "#/components/schemas/CheckoutPriceView"
					},
					"discount": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CheckoutDiscountView"
							}
						],
						"nullable": true
					},
					"trialDays": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The free days before the first charge, null when charged at once."
					}
				},
				"required": [
					"transactionId",
					"price",
					"discount",
					"trialDays"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateCheckoutDto": {
				"properties": {
					"plan": {
						"type": "string",
						"enum": [
							"starter",
							"team",
							"pro"
						]
					},
					"interval": {
						"type": "string",
						"enum": [
							"month",
							"year"
						]
					}
				},
				"required": [
					"plan",
					"interval"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CheckoutPlan": {
				"type": "string",
				"enum": [
					"starter",
					"team",
					"pro"
				]
			},
			"CheckoutMode": {
				"type": "string",
				"enum": [
					"checkout",
					"plan_change",
					"subscribed"
				]
			},
			"YearlyCreditOffer": {
				"description": "The Pro yearly AI credit a checkout of this price earns, as the checkout shows it.",
				"properties": {
					"amountLocalMinor": {
						"type": "number",
						"format": "double",
						"description": "Face value in `currency` (minor units): $500 / EUR 500 / GBP 430."
					},
					"currency": {
						"$ref": "#/components/schemas/BillingCurrency"
					}
				},
				"required": [
					"amountLocalMinor",
					"currency"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LocalUnitPrice": {
				"description": "The list price per billing interval in the buyer's currency (Paddle's price or its override in that currency).",
				"properties": {
					"amountMinor": {
						"type": "number",
						"format": "double"
					},
					"currency": {
						"$ref": "#/components/schemas/BillingCurrency"
					}
				},
				"required": [
					"amountMinor",
					"currency"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CheckoutPlanOffer": {
				"description": "One plan of the checkout sheet, on the requested interval.",
				"properties": {
					"plan": {
						"$ref": "#/components/schemas/CheckoutPlan"
					},
					"mode": {
						"$ref": "#/components/schemas/CheckoutMode",
						"description": "What \"Continue to payment\" does: `checkout` opens a new checkout,\n`plan_change` changes the subscription the workspace holds (to\n`priceId`), `subscribed` means it is on this price already."
					},
					"priceId": {
						"type": "string"
					},
					"price": {
						"$ref": "#/components/schemas/CheckoutPriceView"
					},
					"discount": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CheckoutDiscountView"
							}
						],
						"nullable": true
					},
					"yearlyAiCredit": {
						"allOf": [
							{
								"$ref": "#/components/schemas/YearlyCreditOffer"
							}
						],
						"nullable": true,
						"description": "The Pro yearly AI credit this price comes with ($500 / EUR 500 / GBP 430\nin the price's currency, yearlyCredits.rules.ts), null for every other plan\nand interval."
					},
					"localUnitPrice": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LocalUnitPrice"
							}
						],
						"nullable": true,
						"description": "The list price per billing interval in the buyer's currency (audit C1):\nPaddle's price or its override in the subscription's currency, else the\ncurrency Paddle bills the signup or settings country in. null when the\ncurrency is unknown or the price has none in it (show `price` then)."
					},
					"trialDays": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The free days before the first charge (7: the card is collected now and\ncharged on day 8), null when the checkout charges at once (the workspace\nused its trial, or the plan's trial price is not configured)."
					}
				},
				"required": [
					"plan",
					"mode",
					"priceId",
					"price",
					"discount",
					"yearlyAiCredit",
					"localUnitPrice",
					"trialDays"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CheckoutPreview": {
				"properties": {
					"plan": {
						"$ref": "#/components/schemas/CheckoutPlan"
					},
					"mode": {
						"$ref": "#/components/schemas/CheckoutMode",
						"description": "What \"Continue to payment\" does: `checkout` opens a new checkout,\n`plan_change` changes the subscription the workspace holds (to\n`priceId`), `subscribed` means it is on this price already."
					},
					"priceId": {
						"type": "string"
					},
					"price": {
						"$ref": "#/components/schemas/CheckoutPriceView"
					},
					"discount": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CheckoutDiscountView"
							}
						],
						"nullable": true
					},
					"yearlyAiCredit": {
						"allOf": [
							{
								"$ref": "#/components/schemas/YearlyCreditOffer"
							}
						],
						"nullable": true,
						"description": "The Pro yearly AI credit this price comes with ($500 / EUR 500 / GBP 430\nin the price's currency, yearlyCredits.rules.ts), null for every other plan\nand interval."
					},
					"localUnitPrice": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LocalUnitPrice"
							}
						],
						"nullable": true,
						"description": "The list price per billing interval in the buyer's currency (audit C1):\nPaddle's price or its override in the subscription's currency, else the\ncurrency Paddle bills the signup or settings country in. null when the\ncurrency is unknown or the price has none in it (show `price` then)."
					},
					"trialDays": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The free days before the first charge (7: the card is collected now and\ncharged on day 8), null when the checkout charges at once (the workspace\nused its trial, or the plan's trial price is not configured)."
					},
					"interval": {
						"$ref": "#/components/schemas/CheckoutInterval"
					},
					"recommendedPlan": {
						"$ref": "#/components/schemas/CheckoutPlan",
						"description": "The plan the dashboard preselects (planRecommendation.rules.ts): Team or Pro, never Starter."
					},
					"trialEligible": {
						"type": "boolean",
						"description": "Whether this workspace's checkout starts with the 7-day card trial (isCheckoutTrialEligible)."
					},
					"plans": {
						"items": {
							"$ref": "#/components/schemas/CheckoutPlanOffer"
						},
						"type": "array",
						"description": "Starter, Team and Pro on this interval (a plan whose price is not\nconfigured is left out); the top-level fields repeat the requested (or\nrecommended) plan."
					}
				},
				"required": [
					"plan",
					"mode",
					"priceId",
					"price",
					"discount",
					"yearlyAiCredit",
					"localUnitPrice",
					"trialDays",
					"interval",
					"recommendedPlan",
					"trialEligible",
					"plans"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchStatus": {
				"type": "string",
				"enum": [
					"active",
					"ended",
					"none"
				]
			},
			"Record_TrialCreditStepId.number_": {
				"properties": {
					"go_live": {
						"type": "number",
						"format": "double"
					},
					"connect_domain": {
						"type": "number",
						"format": "double"
					}
				},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"LaunchTrialCreditView": {
				"description": "The trial credit by email type (aicredits/trialCredit.rules.ts TRIAL_CREDIT_BY_EMAIL_TYPE), at face value.",
				"properties": {
					"startMinor": {
						"type": "number",
						"format": "double",
						"description": "Granted at trial start."
					},
					"maxMinor": {
						"type": "number",
						"format": "double",
						"description": "The most the trial gets: start + both step credits (25 personal, 50 company)."
					},
					"steps": {
						"$ref": "#/components/schemas/Record_TrialCreditStepId.number_",
						"description": "What the two steps with credit add."
					}
				},
				"required": [
					"startMinor",
					"maxMinor",
					"steps"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchEmailType": {
				"type": "string",
				"enum": [
					"work",
					"personal"
				]
			},
			"LaunchWelcomeId": {
				"type": "string",
				"enum": [
					"verify_email",
					"work_email"
				]
			},
			"LaunchStepId": {
				"type": "string",
				"enum": [
					"go_live",
					"connect_domain",
					"hire_kai",
					"first_answer",
					"hire_specialist",
					"invite_teammate"
				]
			},
			"LaunchQuestId": {
				"anyOf": [
					{
						"$ref": "#/components/schemas/LaunchWelcomeId"
					},
					{
						"$ref": "#/components/schemas/LaunchStepId"
					}
				]
			},
			"QuestRecordState": {
				"type": "string",
				"enum": [
					"open",
					"claimable",
					"claimed"
				]
			},
			"LaunchQuestView": {
				"description": "Every amount of the view is at face value in the view's `currency` (minor units).",
				"properties": {
					"id": {
						"$ref": "#/components/schemas/LaunchQuestId"
					},
					"title": {
						"type": "string"
					},
					"rewardMinor": {
						"type": "number",
						"format": "double",
						"description": "The item's credit for this workspace: go_live and connect_domain; 0 for everything else, and when no credit can be earned any more."
					},
					"state": {
						"$ref": "#/components/schemas/QuestRecordState",
						"description": "`open`: not done. `claimable`: done, the credit waits for its claim (steps\nwith credit only; `claimableMinor` 0 while go_live's credit waits for\nactivation). `claimed`: done and settled."
					},
					"completedAt": {
						"type": "string",
						"nullable": true
					},
					"claimedAt": {
						"type": "string",
						"nullable": true
					},
					"grantedMinor": {
						"type": "number",
						"format": "double",
						"description": "What it granted (0 unless claimed; an earlier catalog's credit shows here too)."
					},
					"claimableMinor": {
						"type": "number",
						"format": "double",
						"description": "What a claim would pay now (within the maximum); 0 unless claimable."
					}
				},
				"required": [
					"id",
					"title",
					"rewardMinor",
					"state",
					"completedAt",
					"claimedAt",
					"grantedMinor",
					"claimableMinor"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchWelcomeView": {
				"description": "The welcome items (`verify_email`, `work_email`): checklist items without credit, apart from the steps.",
				"properties": {
					"earnedMinor": {
						"type": "number",
						"format": "double",
						"description": "The sum of the items' grants (only trials of an earlier catalog have any)."
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/LaunchQuestView"
						},
						"type": "array",
						"description": "The welcome items the trial has (no `work_email` for a personal email; none without quests)."
					}
				},
				"required": [
					"earnedMinor",
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchPath": {
				"type": "string",
				"enum": [
					"agents",
					"later"
				]
			},
			"LaunchView": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/LaunchStatus"
					},
					"endsAt": {
						"type": "string",
						"nullable": true
					},
					"currency": {
						"$ref": "#/components/schemas/BillingCurrency",
						"description": "The currency every amount of the view is in (the trial credit's, else the billing currency)."
					},
					"trialCredit": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchTrialCreditView"
							}
						],
						"nullable": true,
						"description": "The trial credit's amounts for this workspace; null without a trial (`none`)."
					},
					"capMinor": {
						"type": "number",
						"format": "double",
						"description": "The most the trial gets (trialCredit.maxMinor); 0 without a trial."
					},
					"earnedMinor": {
						"type": "number",
						"format": "double",
						"description": "The trial credit so far: the start credit plus every launch credit granted, never above the cap."
					},
					"claimableMinor": {
						"type": "number",
						"format": "double",
						"description": "The credits waiting for a claim, together never above what the maximum leaves."
					},
					"emailType": {
						"$ref": "#/components/schemas/LaunchEmailType"
					},
					"welcome": {
						"$ref": "#/components/schemas/LaunchWelcomeView"
					},
					"quests": {
						"items": {
							"$ref": "#/components/schemas/LaunchQuestView"
						},
						"type": "array",
						"description": "The checklist's steps (LAUNCH_CHECKLIST_STEP_IDS), in order."
					},
					"nextQuestId": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchStepId"
							}
						],
						"nullable": true,
						"description": "The first open step that is not skipped (never a welcome item, never a claimable one)."
					},
					"path": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchPath"
							}
						],
						"nullable": true,
						"description": "\"Onboard your AI team now\" (`agents`) or `later`; null until chosen."
					},
					"skipped": {
						"$ref": "#/components/schemas/Record_string.string_",
						"description": "The steps the workspace skipped (step id -> when), checklist steps and\nthe Later path's own steps alike. A skipped step counts as done in the\nchecklist; it still completes (and pays, if it has credit) once the work\nis done, and then its quest state shows that."
					}
				},
				"required": [
					"status",
					"endsAt",
					"currency",
					"trialCredit",
					"capMinor",
					"earnedMinor",
					"claimableMinor",
					"emailType",
					"welcome",
					"quests",
					"nextQuestId",
					"path",
					"skipped"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchResponse": {
				"$ref": "#/components/schemas/LaunchView",
				"description": "The launch. Every credit amount is in minor units at face value in its `currency` (the trial credit's currency)."
			},
			"LaunchClaimResponse": {
				"description": "The launch after a claim, with what THIS claim did.",
				"properties": {
					"status": {
						"$ref": "#/components/schemas/LaunchStatus"
					},
					"endsAt": {
						"type": "string",
						"nullable": true
					},
					"currency": {
						"$ref": "#/components/schemas/BillingCurrency",
						"description": "The currency every amount of the view is in (the trial credit's, else the billing currency)."
					},
					"trialCredit": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchTrialCreditView"
							}
						],
						"nullable": true,
						"description": "The trial credit's amounts for this workspace; null without a trial (`none`)."
					},
					"capMinor": {
						"type": "number",
						"format": "double",
						"description": "The most the trial gets (trialCredit.maxMinor); 0 without a trial."
					},
					"earnedMinor": {
						"type": "number",
						"format": "double",
						"description": "The trial credit so far: the start credit plus every launch credit granted, never above the cap."
					},
					"claimableMinor": {
						"type": "number",
						"format": "double",
						"description": "The credits waiting for a claim, together never above what the maximum leaves."
					},
					"emailType": {
						"$ref": "#/components/schemas/LaunchEmailType"
					},
					"welcome": {
						"$ref": "#/components/schemas/LaunchWelcomeView"
					},
					"quests": {
						"items": {
							"$ref": "#/components/schemas/LaunchQuestView"
						},
						"type": "array",
						"description": "The checklist's steps (LAUNCH_CHECKLIST_STEP_IDS), in order."
					},
					"nextQuestId": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchStepId"
							}
						],
						"nullable": true,
						"description": "The first open step that is not skipped (never a welcome item, never a claimable one)."
					},
					"path": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LaunchPath"
							}
						],
						"nullable": true,
						"description": "\"Onboard your AI team now\" (`agents`) or `later`; null until chosen."
					},
					"skipped": {
						"$ref": "#/components/schemas/Record_string.string_",
						"description": "The steps the workspace skipped (step id -> when), checklist steps and\nthe Later path's own steps alike. A skipped step counts as done in the\nchecklist; it still completes (and pays, if it has credit) once the work\nis done, and then its quest state shows that."
					},
					"claim": {
						"properties": {
							"grantedMinor": {
								"type": "number",
								"format": "double",
								"description": "What this request granted, at face value in the launch's `currency`; 0 for `already_claimed`."
							},
							"outcome": {
								"type": "string",
								"enum": [
									"claimed",
									"already_claimed"
								],
								"description": "`claimed`: this request granted the credits. `already_claimed`: an\nearlier claim did (a double click, another tab, a teammate), and this\none granted nothing."
							}
						},
						"required": [
							"grantedMinor",
							"outcome"
						],
						"type": "object"
					}
				},
				"required": [
					"status",
					"endsAt",
					"currency",
					"trialCredit",
					"capMinor",
					"earnedMinor",
					"claimableMinor",
					"emailType",
					"welcome",
					"quests",
					"nextQuestId",
					"path",
					"skipped",
					"claim"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchPathBody": {
				"properties": {
					"path": {
						"$ref": "#/components/schemas/LaunchPath",
						"description": "\"Onboard your AI team now\" (`agents`) or `later`."
					}
				},
				"required": [
					"path"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LaunchStepSkipBody": {
				"properties": {
					"skipped": {
						"type": "boolean",
						"description": "true skips the step, false takes the skip back."
					}
				},
				"required": [
					"skipped"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RecordFunnelStepDto": {
				"properties": {
					"step": {
						"type": "string",
						"description": "A dashboard funnel step: onb_started, onb_company_done, onb_install_viewed, onb_install_sent,\nonb_kai_done, onb_finished, onb_exited, the onboarding v2 steps (onb_track_chosen,\nonb_install_method, onb_store_connected, onb_connectors_viewed, onb_connector_connected,\nonb_email_forwarding_connected, onb_email_domain_verified, onb_kai_code_offered,\nonb_kai_code_connected, onb_kai_tried), the Kai preview and plan screen (onb_kai_preview_viewed,\nonb_kai_preview_asked, onb_plan_viewed), the company size, startup and invite steps\n(onb_size_chosen, onb_startup_done, onb_invite_done), the previous tool step (onb_previous_tool), upgrade_viewed or checkout_opened; or\nonb_screen_viewed, an onboarding screen shown (its id as `detail`)."
					},
					"businessType": {
						"type": "string",
						"description": "Onboarding steps: the business type ('saas', 'ecommerce', 'services'); defaults to the workspace's."
					},
					"detail": {
						"type": "string",
						"description": "Onboarding steps: a short lowercase code saying what the step was about ('shopify', 'kai_code')."
					},
					"reason": {
						"type": "string",
						"description": "onb_exited: how the person left ('dashboard_link', 'look_around', 'pagehide'); the screen is the detail."
					},
					"interval": {
						"type": "string",
						"enum": [
							"month",
							"year"
						],
						"description": "Billing interval shown in the checkout (checkout_opened only)."
					},
					"plan": {
						"type": "string",
						"description": "Plan the checkout was opened for, 'starter', 'team' or 'pro' (checkout_opened only)."
					},
					"currency": {
						"type": "string",
						"description": "Billing currency of the checkout, 'USD', 'EUR' or 'GBP' (checkout_opened only)."
					},
					"gaClientId": {
						"type": "string",
						"description": "GA4 identifiers of the reporting browser, so the GA4 event joins the dashboard's own events."
					},
					"gaSessionId": {
						"type": "string"
					},
					"gaSessionIds": {
						"$ref": "#/components/schemas/StringMap",
						"description": "Session id per GA4 measurement id. A StringMap, not Record<string, string>:\nTSOA compiles the Record to an empty object and strips every key\n(create.user.dto.ts StringMap)."
					}
				},
				"required": [
					"step"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReferralStatus": {
				"type": "string",
				"enum": [
					"signed_up",
					"paying",
					"rewarded",
					"canceled"
				]
			},
			"ReferralListItem": {
				"properties": {
					"id": {
						"type": "string"
					},
					"domainHint": {
						"type": "string",
						"description": "The first letter of the referred owner's email domain and its top-level domain, e.g. \"a•••.io\"."
					},
					"status": {
						"$ref": "#/components/schemas/ReferralStatus"
					},
					"rewardMinor": {
						"type": "number",
						"format": "double",
						"description": "Credits the referrer kept from this referral (granted minus taken back), minor units."
					},
					"at": {
						"type": "string",
						"description": "When the referral reached its status (signup, first plan payment, reward or cancellation)."
					}
				},
				"required": [
					"id",
					"domainHint",
					"status",
					"rewardMinor",
					"at"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReferralStats": {
				"properties": {
					"code": {
						"type": "string"
					},
					"link": {
						"type": "string"
					},
					"signedUp": {
						"type": "number",
						"format": "double",
						"description": "Workspaces created with the code."
					},
					"paying": {
						"type": "number",
						"format": "double",
						"description": "Of those, the ones that paid for a plan and were not canceled (waiting for the referrer reward, or rewarded)."
					},
					"pending": {
						"type": "number",
						"format": "double",
						"description": "Of those, the ones whose referrer reward is still waiting (first payment younger than 30 days, or checks pending)."
					},
					"earnedMinor": {
						"type": "number",
						"format": "double",
						"description": "Credits the referrer kept from its referrals, minor units (USD cents)."
					},
					"referrals": {
						"items": {
							"$ref": "#/components/schemas/ReferralListItem"
						},
						"type": "array",
						"description": "The most recent referrals, newest first."
					}
				},
				"required": [
					"code",
					"link",
					"signedUp",
					"paying",
					"pending",
					"earnedMinor",
					"referrals"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RefereeRewardStatus": {
				"type": "string",
				"enum": [
					"pending",
					"granted",
					"canceled"
				]
			},
			"RefereeReferralStatus": {
				"description": "The referred workspace's view of its referral.",
				"properties": {
					"invitedBy": {
						"properties": {
							"firstName": {
								"type": "string",
								"nullable": true
							},
							"workspaceName": {
								"type": "string",
								"nullable": true
							}
						},
						"required": [
							"firstName",
							"workspaceName"
						],
						"type": "object"
					},
					"reward": {
						"properties": {
							"status": {
								"$ref": "#/components/schemas/RefereeRewardStatus"
							},
							"currency": {
								"type": "string",
								"enum": [
									"USD"
								],
								"nullable": false
							},
							"amountMinor": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"status",
							"currency",
							"amountMinor"
						],
						"type": "object"
					}
				},
				"required": [
					"invitedBy",
					"reward"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FundingBand": {
				"type": "string",
				"enum": [
					"bootstrapped",
					"under_2m",
					"2m_plus"
				],
				"description": "The company answers onboarding saves (PUT /organisations/{id}/company) and\nthe startup check reads: validation, and the parsing of the website domain\nand the team size. Leaf module: no clients, no models, no clock of its own."
			},
			"PreviousTool": {
				"type": "string",
				"enum": [
					"none",
					"other",
					"intercom",
					"zendesk",
					"helpscout",
					"freshdesk",
					"hubspot"
				]
			},
			"CompanyInfo": {
				"properties": {
					"name": {
						"type": "string"
					},
					"website": {
						"type": "string",
						"description": "As entered; websiteDomainOf gives its domain."
					},
					"teamSize": {
						"type": "string",
						"nullable": true,
						"description": "A count (\"12\") or a range (\"1-9\", \"10-19\", \"20-49\", \"500+\"); teamSizeBounds\nreads it. Asked with the startup answers: null when not given."
					},
					"role": {
						"type": "string",
						"description": "The owner's role; optional ('' when not given)."
					},
					"foundedYear": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The startup program answers, optional as a group (STARTUP_ANSWER_FIELDS):\nall three, or null all three when the owner did not apply."
					},
					"fundingBand": {
						"allOf": [
							{
								"$ref": "#/components/schemas/FundingBand"
							}
						],
						"nullable": true
					},
					"productCompany": {
						"type": "boolean",
						"nullable": true,
						"description": "Builds its own product (not an agency or a services company)."
					},
					"previousTool": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PreviousTool"
							}
						],
						"nullable": true,
						"description": "The support tool used before Gleap (onboarding): drives the migrate step."
					},
					"previousToolOther": {
						"type": "string",
						"nullable": true,
						"description": "previousTool 'other': which one, as typed (≤ 60 characters)."
					}
				},
				"required": [
					"name",
					"website",
					"teamSize",
					"role",
					"foundedYear",
					"fundingBand",
					"productCompany"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartupStatus": {
				"type": "string",
				"enum": [
					"eligible",
					"review",
					"rejected",
					"none"
				]
			},
			"StartupSummary": {
				"description": "What members see of the check (the evidence stays on the organisation for Gleap).",
				"properties": {
					"status": {
						"$ref": "#/components/schemas/StartupStatus"
					},
					"checkedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"reasons": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"status",
					"checkedAt",
					"reasons"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompanyInfoResponse": {
				"properties": {
					"company": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CompanyInfo"
							}
						],
						"nullable": true,
						"description": "Null after an address-only save of a workspace that never gave its company."
					},
					"startup": {
						"$ref": "#/components/schemas/StartupSummary"
					}
				},
				"required": [
					"company",
					"startup"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PostalAddressInput": {
				"description": "line1, city and countryCode are required, but checked by the server (400 with\n`error.details.path` = `postalAddress.<field>`) rather than by the request schema,\nso the dashboard can point at the field.",
				"properties": {
					"line1": {
						"type": "string"
					},
					"line2": {
						"type": "string"
					},
					"city": {
						"type": "string"
					},
					"postalCode": {
						"type": "string"
					},
					"region": {
						"type": "string"
					},
					"countryCode": {
						"type": "string",
						"description": "ISO 3166-1 alpha-2, e.g. \"AT\"."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateCompanyDto": {
				"properties": {
					"name": {
						"type": "string",
						"description": "Required with a website. Also names the company in the formatted postal address."
					},
					"website": {
						"type": "string",
						"description": "The company website, e.g. \"acme.com\" or \"https://www.acme.com\". Required to save the\ncompany; without one (absent or empty) only `postalAddress` is saved."
					},
					"teamSize": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "number",
								"format": "double"
							}
						],
						"nullable": true,
						"description": "A head count or a range: \"1-9\", \"10-19\", \"20-49\", \"50-199\", \"200+\". Required with the startup answers, optional otherwise."
					},
					"role": {
						"type": "string",
						"description": "The owner's role; optional."
					},
					"foundedYear": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "The startup program answers (foundedYear, fundingBand, productCompany)\nare optional as a group: send all three to apply, or none."
					},
					"fundingBand": {
						"type": "string",
						"enum": [
							"bootstrapped",
							"under_2m",
							"2m_plus"
						],
						"nullable": true
					},
					"productCompany": {
						"type": "boolean",
						"nullable": true,
						"description": "Builds its own product (not an agency or a services company)."
					},
					"postalAddress": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PostalAddressInput"
							}
						],
						"nullable": true,
						"description": "The company postal address (invoices, email footers). Optional; null clears it.\nThe server builds `formatted` and checks the country (ISO alpha-2) and postal code."
					},
					"previousTool": {
						"type": "string",
						"enum": [
							"intercom",
							"zendesk",
							"helpscout",
							"freshdesk",
							"hubspot",
							"other",
							"none"
						],
						"nullable": true,
						"description": "The support tool used before Gleap. Can be saved on its own (without name and\nwebsite); null clears it. Read back as `organisation.company.previousTool`."
					},
					"previousToolOther": {
						"type": "string",
						"nullable": true,
						"description": "With previousTool 'other': which tool (free text, at most 60 characters)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"PublicReferrer": {
				"description": "The landing page's view of a referral code.",
				"properties": {
					"workspaceName": {
						"type": "string",
						"nullable": true,
						"description": "The referring workspace's name as its members set it."
					},
					"logoUrl": {
						"type": "string",
						"nullable": true,
						"description": "The workspace's logo on Gleap's public CDN."
					},
					"firstName": {
						"type": "string",
						"nullable": true,
						"description": "The first name of the person who owns the referring workspace."
					}
				},
				"required": [
					"workspaceName",
					"logoUrl",
					"firstName"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiSampleBody": {
				"properties": {
					"contactIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Contacts of this project to write for (max 5). Without them Kai picks recent contacts from the audience."
					},
					"count": {
						"type": "number",
						"format": "double",
						"description": "How many samples (default 3, max 5)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiBulkReviewBody": {
				"properties": {
					"decision": {
						"type": "string",
						"enum": [
							"approve",
							"reject"
						]
					},
					"actionIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"decision",
					"actionIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiReviewDecisionBody": {
				"properties": {
					"decision": {
						"type": "string",
						"enum": [
							"approve",
							"reject"
						]
					},
					"subject": {
						"type": "string",
						"description": "Edited subject (approve only)."
					},
					"content": {
						"description": "Edited TipTap JSON document (approve only). Kept as a style example for later emails."
					}
				},
				"required": [
					"decision"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateAnswerFolderDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"parent": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateAnswerFolderDTO": {
				"properties": {
					"name": {
						"type": "string"
					},
					"parent": {
						"type": "string",
						"nullable": true,
						"description": "Another folder of the project, or null to move the folder to the top level."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BillingProviderId": {
				"type": "string",
				"enum": [
					"stripe",
					"chargebee",
					"lemonsqueezy",
					"paddle",
					"revenuecat"
				]
			},
			"ReturnType_typeofkeyKind_": {
				"type": "string",
				"enum": [
					"oauth",
					"restricted_key",
					"secret_key",
					"api_key"
				],
				"description": "Obtain the return type of a function type"
			},
			"Partial_Record_BillingWriteAction.BillingActionMode__": {
				"properties": {
					"refund": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"billing_portal_link": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"retry_payment": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"update_billing_details": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"resume_subscription": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"cancel_subscription": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"pause_subscription": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					},
					"apply_retention_coupon": {
						"type": "string",
						"enum": [
							"off",
							"kai",
							"teammates"
						]
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"BillingActionSettings": {
				"$ref": "#/components/schemas/Partial_Record_BillingWriteAction.BillingActionMode__",
				"description": "Saved per provider connection: `{ retry_payment: 'kai', refund: 'teammates', … }`."
			},
			"PublicBillingConnection": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/BillingProviderId"
					},
					"integrationId": {
						"type": "string"
					},
					"keyKind": {
						"$ref": "#/components/schemas/ReturnType_typeofkeyKind_"
					},
					"testMode": {
						"type": "boolean"
					},
					"actionModes": {
						"$ref": "#/components/schemas/BillingActionSettings"
					},
					"userIdMetadataKey": {
						"type": "string"
					},
					"customerIdIsUserId": {
						"type": "boolean"
					},
					"retentionCouponId": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"integrationId",
					"keyKind",
					"testMode",
					"actionModes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BillingSettings": {
				"properties": {
					"actionModes": {
						"$ref": "#/components/schemas/BillingActionSettings"
					},
					"userIdMetadataKey": {
						"type": "string",
						"description": "Stripe: metadata key holding the verified userId."
					},
					"customerIdIsUserId": {
						"type": "boolean",
						"description": "Chargebee: customer ids are the verified userIds."
					},
					"retentionCouponId": {
						"type": "string",
						"description": "Coupon / discount id Kai may apply for `apply_retention_coupon`."
					}
				},
				"required": [
					"actionModes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BillingSettingsBody": {
				"description": "Billing settings of one provider connection, as the settings page saves them.",
				"properties": {
					"actionModes": {
						"properties": {},
						"additionalProperties": {
							"type": "string"
						},
						"type": "object",
						"description": "`{ [action]: 'off' | 'kai' | 'teammates' }`"
					},
					"userIdMetadataKey": {
						"type": "string",
						"description": "Stripe: metadata key that holds your user id (ties signed-in users to their Stripe customer)."
					},
					"customerIdIsUserId": {
						"type": "boolean",
						"description": "Chargebee: your Chargebee customer ids are your user ids."
					},
					"retentionCouponId": {
						"type": "string",
						"description": "Coupon / discount id Kai may apply as a retention offer."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"BillingActionResult": {
				"properties": {
					"ok": {
						"type": "boolean"
					},
					"summary": {
						"type": "string",
						"description": "One line for the activity log and the customer, in English."
					},
					"reference": {
						"type": "string",
						"description": "Provider ids of what changed (refund id, invoice id, …)."
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"ok",
					"summary"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BillingRunActionBody": {
				"properties": {
					"provider": {
						"type": "string"
					},
					"action": {
						"type": "string"
					},
					"params": {
						"description": "Action parameters: subscriptionId, invoiceId, amount (cents), flow, email, name, address, taxId, reason."
					},
					"ticketId": {
						"type": "string",
						"description": "The ticket the panel is open on: the action is logged there."
					}
				},
				"required": [
					"provider",
					"action"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BillingStripeAppCallbackBody": {
				"properties": {
					"code": {
						"type": "string"
					},
					"state": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommerceKaiSettings": {
				"description": "What Kai may do with one connection (per-connection switches).",
				"properties": {
					"orders": {
						"type": "boolean"
					},
					"products": {
						"type": "boolean"
					},
					"returns": {
						"type": "boolean"
					},
					"discounts": {
						"type": "boolean"
					}
				},
				"required": [
					"orders",
					"products",
					"returns",
					"discounts"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PublicCommerceConnection": {
				"properties": {
					"provider": {
						"$ref": "#/components/schemas/CommerceProviderKey"
					},
					"shopLayer": {
						"properties": {
							"shortId": {
								"type": "string"
							},
							"connectionId": {
								"type": "string"
							}
						},
						"required": [
							"shortId",
							"connectionId"
						],
						"type": "object",
						"description": "The shop layer's ids: events API (`POST /v3/commerce/{connectionId}/events`), `shop-<shortId>-<customer id>` identities."
					},
					"integrationId": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"kai": {
						"$ref": "#/components/schemas/CommerceKaiSettings"
					},
					"customerIdIsUserId": {
						"type": "boolean"
					},
					"storefrontIdentity": {
						"type": "boolean",
						"description": "Gleap's Shopify app / WordPress plugin: signed-in storefront customers are recognised by themselves."
					},
					"refundsMode": {
						"type": "string",
						"enum": [
							"off",
							"ask"
						],
						"description": "Shopify: refunds Kai asks for (ask | off)."
					},
					"returnsMode": {
						"type": "string",
						"enum": [
							"off",
							"ask",
							"auto"
						],
						"description": "How Kai's returns run: 'ask' (a teammate approves first), 'auto' (the customer confirms) or 'off' (Kai Tools sets it)."
					},
					"missingScopes": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Shopify: scopes still missing (reconnect to get them); undefined when unknown."
					},
					"baseUrl": {
						"type": "string",
						"description": "Your shop API: base URL and header names (never values)."
					},
					"headers": {
						"items": {
							"properties": {
								"hasValue": {
									"type": "boolean"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"hasValue",
								"name"
							],
							"type": "object"
						},
						"type": "array"
					},
					"siteUrl": {
						"type": "string"
					}
				},
				"required": [
					"provider",
					"integrationId",
					"label",
					"kai",
					"customerIdIsUserId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommerceSettingsBody": {
				"properties": {
					"kai": {
						"properties": {
							"discounts": {
								"type": "boolean"
							},
							"returns": {
								"type": "boolean"
							},
							"products": {
								"type": "boolean"
							},
							"orders": {
								"type": "boolean"
							}
						},
						"type": "object",
						"description": "Per-connection switches: Kai looks up orders / recommends products / starts returns / shares discount codes."
					},
					"customerIdIsUserId": {
						"type": "boolean",
						"description": "Shopify / WooCommerce: signed-in Gleap user ids are the shop's customer ids."
					},
					"refundsMode": {
						"type": "string",
						"description": "Shopify: refunds Kai asks for: 'ask' (a teammate approves, default) or 'off'."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"OrderActionResult": {
				"properties": {
					"ok": {
						"type": "boolean"
					},
					"summary": {
						"type": "string"
					},
					"link": {
						"type": "string",
						"description": "Links to send: the teammate pastes it into the reply."
					},
					"code": {
						"type": "string"
					}
				},
				"required": [
					"ok",
					"summary"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommerceOrderActionBody": {
				"properties": {
					"action": {
						"type": "string",
						"description": "refund | cancel_order | create_return | update_shipping_address | send_status_link | send_discount | send_cart_link"
					},
					"orderId": {
						"type": "string",
						"description": "The order's Shopify GID (from the panel)."
					},
					"params": {
						"description": "refund: amount (major units, optional), lines [{ lineItemId, quantity }], restock; create_return: lines, reason; update_shipping_address: address; send_discount / send_cart_link: code, items [{ variantId, quantity }]."
					},
					"ticketId": {
						"type": "string",
						"description": "The ticket the panel is open on: the note and the customer message go there."
					}
				},
				"required": [
					"action"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PlatformConnectKind": {
				"type": "string",
				"enum": [
					"plugin",
					"api_key",
					"oauth_app",
					"handshake"
				]
			},
			"PlatformConnectField": {
				"description": "One field of an `api_key` connect form.",
				"properties": {
					"key": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"enum": [
							"text",
							"password",
							"url"
						]
					},
					"placeholder": {
						"type": "string"
					},
					"help": {
						"type": "string"
					},
					"secret": {
						"type": "boolean",
						"description": "Sealed at rest and never sent back to the dashboard."
					},
					"required": {
						"type": "boolean"
					}
				},
				"required": [
					"key",
					"label",
					"type",
					"secret"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PlatformConnectSpec": {
				"description": "What the generic connect dialog (Frontend components/Connectors/ShopPlatformConnectDialog)\nrenders for the platform. Words are the customer's.",
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/PlatformConnectKind"
					},
					"frontendStart": {
						"type": "string",
						"description": "The Connectors flow key. Built-in platforms keep their existing flows\n(`shopify-app`, `integration:woocommerce`, `apikey:commerceapi`); new ones\nleave it out and get `shop-platform:<key>` (the generic dialog)."
					},
					"storeUrl": {
						"properties": {
							"help": {
								"type": "string"
							},
							"placeholder": {
								"type": "string"
							},
							"label": {
								"type": "string"
							}
						},
						"required": [
							"placeholder",
							"label"
						],
						"type": "object",
						"description": "Ask for the store's address first (oauth_app, api_key, handshake)."
					},
					"fields": {
						"items": {
							"$ref": "#/components/schemas/PlatformConnectField"
						},
						"type": "array",
						"description": "`api_key`: the form's fields."
					},
					"steps": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "`plugin`, `handshake`, marketplace `oauth_app`: numbered steps."
					},
					"link": {
						"properties": {
							"url": {
								"type": "string"
							},
							"label": {
								"type": "string"
							}
						},
						"required": [
							"url",
							"label"
						],
						"type": "object",
						"description": "The marketplace listing, plugin download or docs page."
					},
					"actionLabel": {
						"type": "string",
						"description": "The dialog's main button (\"Install the Gleap app\")."
					}
				},
				"required": [
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PlatformFeature": {
				"type": "string",
				"enum": [
					"widget",
					"customers",
					"events",
					"orders",
					"products",
					"returns",
					"discounts",
					"cartLinks",
					"identity"
				]
			},
			"PublicCommercePlatform": {
				"description": "The registry's view of a platform for the dashboard and onboarding (no hooks).",
				"properties": {
					"key": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"logo": {
						"type": "string"
					},
					"connectorKey": {
						"type": "string"
					},
					"connect": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PlatformConnectSpec"
							},
							{
								"properties": {
									"frontendStart": {
										"type": "string"
									}
								},
								"required": [
									"frontendStart"
								],
								"type": "object"
							}
						]
					},
					"features": {
						"items": {
							"$ref": "#/components/schemas/PlatformFeature"
						},
						"type": "array"
					},
					"builtin": {
						"type": "boolean"
					}
				},
				"required": [
					"key",
					"name",
					"logo",
					"connectorKey",
					"connect",
					"features",
					"builtin"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CommercePlatformConnectBody": {
				"properties": {
					"storeUrl": {
						"type": "string",
						"description": "The store's address, for platforms that ask for it first."
					},
					"values": {
						"properties": {},
						"additionalProperties": {
							"type": "string"
						},
						"type": "object",
						"description": "`api_key` platforms: the connect form's values by field key."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ShopLayerView": {
				"properties": {
					"connectionId": {
						"type": "string"
					},
					"shortId": {
						"type": "string"
					},
					"eventsUrl": {
						"type": "string",
						"description": "POST signed batches here (design-handoffs/shop-layer/EVENTS-API.md)."
					},
					"identityNamespace": {
						"type": "string",
						"enum": [
							"shop",
							"shopify",
							"woo"
						],
						"description": "How the store's customers are contacts: `shop-<shortId>-<customer id>`, or the `shopify-` / `woo-` aliases."
					},
					"lastEventAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"connectionId",
					"shortId",
					"eventsUrl",
					"identityNamespace"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ChatLiveSource": {
				"type": "string",
				"enum": [
					"platform",
					"storefront",
					"sdk_traffic"
				]
			},
			"ChatLiveStatus": {
				"properties": {
					"live": {
						"type": "boolean"
					},
					"source": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ChatLiveSource"
							}
						],
						"nullable": true,
						"description": "How it was decided: the platform's own check, the storefront page, or the project's SDK traffic (go-live detection)."
					},
					"checkedAt": {
						"type": "string"
					}
				},
				"required": [
					"live",
					"source",
					"checkedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetState": {
				"type": "string",
				"enum": [
					"on",
					"off",
					"unknown"
				]
			},
			"WidgetInstallResult": {
				"properties": {
					"state": {
						"$ref": "#/components/schemas/WidgetState"
					},
					"message": {
						"type": "string",
						"description": "Customer words: what happened, or what the merchant still has to do."
					},
					"manualUrl": {
						"type": "string",
						"description": "Where the merchant finishes it themselves (theme editor, code injection page)."
					}
				},
				"required": [
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectorCategory": {
				"type": "string",
				"enum": [
					"channels",
					"tickets",
					"code",
					"billing",
					"crm",
					"knowledge",
					"scheduling",
					"automation",
					"import"
				]
			},
			"ConnectKind": {
				"type": "string",
				"enum": [
					"oauth",
					"github_app",
					"api_key",
					"meta",
					"telegram",
					"mcp",
					"composio",
					"vibe",
					"email",
					"plugin",
					"handshake",
					"none"
				]
			},
			"ConnectorUseDef": {
				"properties": {
					"key": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"description": {
						"type": "string",
						"description": "One sentence, customer words."
					},
					"control": {
						"type": "string",
						"enum": [
							"switch",
							"manage"
						],
						"description": "`switch` only where the server can really flip it (SPEC §3); everything else opens today's settings."
					},
					"selectableAtConnect": {
						"type": "boolean",
						"description": "Offered as a checkbox in the connect dialog."
					},
					"defaultAtConnect": {
						"type": "boolean",
						"description": "Checked by default in the connect dialog (every `selectableAtConnect` use sets it)."
					},
					"permission": {
						"type": "string",
						"description": "What the use needs from the account, in plain words (\"issues\", \"read code\"); every `selectableAtConnect` use sets it."
					}
				},
				"required": [
					"key",
					"label",
					"description",
					"control"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Pick_PublicCommercePlatform.key-or-logo-or-connect-or-features_": {
				"properties": {
					"key": {
						"type": "string"
					},
					"logo": {
						"type": "string"
					},
					"connect": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PlatformConnectSpec"
							},
							{
								"properties": {
									"frontendStart": {
										"type": "string"
									}
								},
								"required": [
									"frontendStart"
								],
								"type": "object"
							}
						]
					},
					"features": {
						"items": {
							"$ref": "#/components/schemas/PlatformFeature"
						},
						"type": "array"
					}
				},
				"required": [
					"key",
					"logo",
					"connect",
					"features"
				],
				"type": "object",
				"description": "From T, pick a set of properties whose keys are in the union K"
			},
			"ConnectorDef": {
				"properties": {
					"key": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"categories": {
						"items": {
							"$ref": "#/components/schemas/ConnectorCategory"
						},
						"type": "array"
					},
					"monogram": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"tagline": {
						"type": "string"
					},
					"connect": {
						"properties": {
							"frontendStart": {
								"type": "string"
							},
							"kind": {
								"$ref": "#/components/schemas/ConnectKind"
							}
						},
						"required": [
							"frontendStart",
							"kind"
						],
						"type": "object",
						"description": "`frontendStart` is a stable flow key the Frontend maps to today's connect flow."
					},
					"uses": {
						"items": {
							"$ref": "#/components/schemas/ConnectorUseDef"
						},
						"type": "array"
					},
					"platform": {
						"$ref": "#/components/schemas/Pick_PublicCommercePlatform.key-or-logo-or-connect-or-features_",
						"description": "Shop platforms of the shop layer (not the built-in three): what the generic connect\ndialog renders (connect kind, store address, key fields, steps, link) and the logo key."
					},
					"maxAccounts": {
						"type": "number",
						"format": "double",
						"description": "1: Gleap uses one account of this tool per project (billing resolves one\nper provider, Calendly reads the first, Better Stack one status page,\nZapier one key): the dashboard offers no Add account for it."
					}
				},
				"required": [
					"key",
					"name",
					"categories",
					"monogram",
					"color",
					"tagline",
					"connect",
					"uses"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectorsCatalogResponse": {
				"properties": {
					"categories": {
						"items": {
							"properties": {
								"label": {
									"type": "string"
								},
								"key": {
									"$ref": "#/components/schemas/ConnectorCategory"
								}
							},
							"required": [
								"label",
								"key"
							],
							"type": "object"
						},
						"type": "array"
					},
					"connectors": {
						"items": {
							"$ref": "#/components/schemas/ConnectorDef"
						},
						"type": "array"
					}
				},
				"required": [
					"categories",
					"connectors"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionAccessView": {
				"description": "Who can use a connection (connectionAccess.rules), as the dashboard shows it.",
				"properties": {
					"scope": {
						"type": "string",
						"enum": [
							"everyone",
							"teams",
							"people",
							"private"
						]
					},
					"teamIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"userIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"ownerId": {
						"type": "string",
						"nullable": true
					},
					"ownerName": {
						"type": "string",
						"nullable": true,
						"description": "The owner's display name (a private connector: \"Only Mia\")."
					},
					"label": {
						"type": "string",
						"description": "\"Everyone\", \"Only me\", \"Only Mia\", \"2 teams\", \"1 person\"."
					}
				},
				"required": [
					"scope",
					"teamIds",
					"userIds",
					"ownerId",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionState": {
				"type": "string",
				"enum": [
					"healthy",
					"needs_setup",
					"needs_reconnect",
					"error"
				],
				"description": "`needs_setup`: connected but unfinished (no credentials yet), as the integration's own page says."
			},
			"ConnectionStatusView": {
				"properties": {
					"state": {
						"$ref": "#/components/schemas/ConnectionState"
					},
					"message": {
						"type": "string"
					},
					"since": {
						"type": "string"
					}
				},
				"required": [
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionUseView": {
				"properties": {
					"key": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"summary": {
						"type": "string"
					},
					"needsSetup": {
						"type": "boolean",
						"description": "A switch with nothing behind it yet (Stripe with only an agent tool, no key): Set up, not a switch."
					}
				},
				"required": [
					"key",
					"enabled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionUsedBy": {
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"kai",
							"agent",
							"kaicode",
							"workflow"
						]
					},
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					}
				},
				"required": [
					"kind",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionSummary": {
				"properties": {
					"id": {
						"type": "string"
					},
					"access": {
						"$ref": "#/components/schemas/ConnectionAccessView",
						"description": "Who can use it. Absent on an older server: Everyone."
					},
					"visibility": {
						"type": "string",
						"enum": [
							"full",
							"summary"
						],
						"description": "`summary`: an admin sees that someone's private connector exists (name, owner, state), nothing more."
					},
					"canChangeAccess": {
						"type": "boolean",
						"description": "The viewer may change who can use it."
					},
					"canDisconnect": {
						"type": "boolean",
						"description": "The viewer may disconnect it."
					},
					"canLimitAccess": {
						"type": "boolean",
						"description": "Only tools Kai uses (agent tools) can be limited; a workspace channel or integration is for everyone."
					},
					"connector": {
						"type": "string"
					},
					"account": {
						"properties": {
							"detail": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"name"
						],
						"type": "object"
					},
					"status": {
						"$ref": "#/components/schemas/ConnectionStatusView"
					},
					"uses": {
						"items": {
							"$ref": "#/components/schemas/ConnectionUseView"
						},
						"type": "array",
						"description": "Available uses only, in catalog order."
					},
					"usedBy": {
						"items": {
							"$ref": "#/components/schemas/ConnectionUsedBy"
						},
						"type": "array"
					},
					"agentToolIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "AgentTool ids linked to this connection (ids only), for the agent tool picker."
					},
					"connectedAt": {
						"type": "string"
					},
					"connectedBy": {
						"type": "string",
						"description": "Display name."
					}
				},
				"required": [
					"id",
					"connector",
					"account",
					"status",
					"uses",
					"usedBy",
					"agentToolIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Suggestion": {
				"properties": {
					"connector": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"source": {
						"type": "string",
						"enum": [
							"website",
							"popular"
						]
					}
				},
				"required": [
					"connector",
					"reason",
					"source"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectorsListResponse": {
				"properties": {
					"connections": {
						"items": {
							"$ref": "#/components/schemas/ConnectionSummary"
						},
						"type": "array"
					},
					"suggestions": {
						"items": {
							"$ref": "#/components/schemas/Suggestion"
						},
						"type": "array"
					}
				},
				"required": [
					"connections",
					"suggestions"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BusinessScanResponse": {
				"description": "Onboarding v2's website scan (POST /projects/{id}/connectors/business-scan).",
				"properties": {
					"domain": {
						"type": "string",
						"nullable": true,
						"description": "The website that was read, `acme.com`; null when the project has none."
					},
					"businessType": {
						"type": "string",
						"enum": [
							"saas",
							"ecommerce",
							"services"
						],
						"nullable": true
					},
					"store": {
						"type": "string",
						"enum": [
							"shopify",
							"woocommerce",
							"other"
						],
						"nullable": true
					},
					"platform": {
						"type": "string",
						"enum": [
							"wix",
							"squarespace",
							"shopware",
							"bigcommerce",
							"magento"
						],
						"nullable": true
					},
					"label": {
						"type": "string",
						"nullable": true,
						"description": "\"a Shopify store\", \"a software product\"."
					},
					"found": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Catalog connectors found on the homepage."
					}
				},
				"required": [
					"domain",
					"businessType",
					"store",
					"platform",
					"label",
					"found"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionItemView": {
				"description": "One record of a use, as a row on the connection page: a shared channel, a Jira project, a notification rule.",
				"properties": {
					"id": {
						"type": "string",
						"description": "The linked record (`<store>:<ref>`), stable across reads."
					},
					"title": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					},
					"state": {
						"$ref": "#/components/schemas/ConnectionState"
					},
					"route": {
						"type": "string",
						"description": "The dashboard page that edits this record."
					}
				},
				"required": [
					"id",
					"title",
					"state",
					"route"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionDetail": {
				"properties": {
					"id": {
						"type": "string"
					},
					"access": {
						"$ref": "#/components/schemas/ConnectionAccessView",
						"description": "Who can use it. Absent on an older server: Everyone."
					},
					"visibility": {
						"type": "string",
						"enum": [
							"full",
							"summary"
						],
						"description": "`summary`: an admin sees that someone's private connector exists (name, owner, state), nothing more."
					},
					"canChangeAccess": {
						"type": "boolean",
						"description": "The viewer may change who can use it."
					},
					"canDisconnect": {
						"type": "boolean",
						"description": "The viewer may disconnect it."
					},
					"canLimitAccess": {
						"type": "boolean",
						"description": "Only tools Kai uses (agent tools) can be limited; a workspace channel or integration is for everyone."
					},
					"connector": {
						"type": "string"
					},
					"account": {
						"properties": {
							"detail": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"name"
						],
						"type": "object"
					},
					"status": {
						"$ref": "#/components/schemas/ConnectionStatusView"
					},
					"uses": {
						"items": {
							"$ref": "#/components/schemas/ConnectionUseView"
						},
						"type": "array",
						"description": "Available uses only, in catalog order."
					},
					"usedBy": {
						"items": {
							"$ref": "#/components/schemas/ConnectionUsedBy"
						},
						"type": "array"
					},
					"agentToolIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "AgentTool ids linked to this connection (ids only), for the agent tool picker."
					},
					"connectedAt": {
						"type": "string"
					},
					"connectedBy": {
						"type": "string",
						"description": "Display name."
					},
					"manage": {
						"properties": {},
						"additionalProperties": {
							"properties": {
								"route": {
									"type": "string"
								}
							},
							"required": [
								"route"
							],
							"type": "object"
						},
						"type": "object",
						"description": "Per use key: the existing dashboard route that configures it."
					},
					"reconnect": {
						"properties": {
							"route": {
								"type": "string"
							}
						},
						"required": [
							"route"
						],
						"type": "object",
						"description": "Dashboard route that re-runs the account's sign-in."
					},
					"permissions": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Plain-language list, only when known."
					},
					"useSettings": {
						"properties": {},
						"additionalProperties": {},
						"type": "object",
						"description": "User-set per-use settings stored on the connection (none in v1)."
					},
					"items": {
						"properties": {},
						"additionalProperties": {
							"items": {
								"$ref": "#/components/schemas/ConnectionItemView"
							},
							"type": "array"
						},
						"type": "object",
						"description": "Per use key: its records as rows. Uses without rows are absent."
					}
				},
				"required": [
					"id",
					"connector",
					"account",
					"status",
					"uses",
					"usedBy",
					"agentToolIds",
					"manage",
					"useSettings",
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionAccessPatchRequest": {
				"description": "Who can use a connection.",
				"properties": {
					"scope": {
						"type": "string",
						"description": "everyone | teams | people | private"
					},
					"teamIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "With `teams`: this project's teams."
					},
					"userIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "With `people`: this project's members."
					}
				},
				"required": [
					"scope"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionUsePatchRequest": {
				"description": "The PATCH body as tsoa receives it. The index signature keeps unknown\nfields in the body (tsoa would otherwise drop them silently) so the service\ncan refuse them (connection.rules.ts validateUsePatch).",
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"settings": {
						"properties": {},
						"additionalProperties": {},
						"type": "object"
					}
				},
				"type": "object",
				"additionalProperties": {}
			},
			"LinkStore": {
				"type": "string",
				"enum": [
					"integration",
					"channel",
					"agentTool",
					"codeRepoAuth",
					"vibeConnection",
					"contentIntegration"
				],
				"description": "The legacy stores a connection links to (SPEC §2)."
			},
			"ConnectionLink": {
				"properties": {
					"store": {
						"$ref": "#/components/schemas/LinkStore"
					},
					"ref": {
						"type": "string",
						"description": "e.g. `slack:Ab12Cd34Ef` (integration), `slack:<channelId>` (channel), `<AgentTool _id>` (agentTool)."
					}
				},
				"required": [
					"store",
					"ref"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConnectionDisconnectResult": {
				"description": "Result of `DELETE …/connectors/{connectionId}`.",
				"properties": {
					"disconnected": {
						"items": {
							"$ref": "#/components/schemas/ConnectionLink"
						},
						"type": "array",
						"description": "Linked records that were disconnected through their existing code path."
					},
					"kept": {
						"items": {
							"properties": {
								"reason": {
									"type": "string"
								},
								"link": {
									"$ref": "#/components/schemas/ConnectionLink"
								}
							},
							"required": [
								"reason",
								"link"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Linked records left in place, with the reason in customer words."
					}
				},
				"required": [
					"disconnected",
					"kept"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentCastState": {
				"type": "string",
				"enum": [
					"active",
					"working",
					"needs_you",
					"done",
					"error",
					"idle"
				],
				"description": "One agent tile in the cast row."
			},
			"AgentCastAgent": {
				"properties": {
					"agentId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"role": {
						"type": "string",
						"description": "The agent's description, used as its role line."
					},
					"imageUrl": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"icon": {
						"type": "string"
					},
					"tools": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Tool names, for \"Stripe · Shopify · …\" under the name."
					},
					"canHandOver": {
						"type": "boolean",
						"description": "May take the ticket by a teammate's hand-over. Live agents except Kai\n(the Copilot, `isDefault`): Kai is the teammate's helper and never holds a ticket; a hand-over\naddressed to Kai goes to `AgentCastResponse.kaiResolveAgentId`. Any agent that takes one holds\nthe customer conversation (a holder gets reply_to_customer even without its own tool).\nClients list only `canHandOver` agents (plus `needsPublish` ones, off) as hand-over targets."
					},
					"needsPublish": {
						"type": "boolean",
						"description": "Addition: a custom agent that is still a draft. Clients show \"Publish <name> to\nhand tickets to it\" in the composer and the assignee menu; the input endpoint answers a\nhand-over to it with 409 and that message."
					},
					"isKaiResolve": {
						"type": "boolean",
						"description": "Addition: the project's managed Kai Resolve (installed; `canHandOver` says\nwhether it is live). Clients name hand-overs to Kai after it."
					},
					"state": {
						"allOf": [
							{
								"$ref": "#/components/schemas/AgentCastState"
							}
						],
						"nullable": true,
						"description": "This agent's state on the ticket, null when it never worked on it."
					},
					"lastActiveAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"hasBall": {
						"type": "boolean"
					},
					"isDefault": {
						"type": "boolean",
						"description": "Changed (PLAN-V2 round 3): the project's default helper, Kai (the system Copilot,\nalso while it is a draft). Its `name` is \"Kai\" and `imageUrl` the project's bot\navatar when one is set. The composer's default target is `defaultAgentId`."
					}
				},
				"required": [
					"agentId",
					"name",
					"role",
					"tools",
					"canHandOver",
					"state",
					"lastActiveAt",
					"hasBall"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentCastNameRow": {
				"description": "A name and a tile (castNames.logic `AgentCastName`).",
				"properties": {
					"agentId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"imageUrl": {
						"type": "string"
					},
					"color": {
						"type": "string"
					},
					"icon": {
						"type": "string"
					}
				},
				"required": [
					"agentId",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentBallKind": {
				"type": "string",
				"enum": [
					"agent",
					"teammate",
					"customer",
					"none"
				],
				"description": "Who is expected to act next. Exactly one, decided by code (never by an LLM)."
			},
			"AgentViewBall": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/AgentBallKind"
					},
					"agentId": {
						"type": "string",
						"description": "kind 'agent': the Agent `_id`, or `KAI_CODE_AGENT_ID` for Kai Code."
					},
					"userId": {
						"type": "string",
						"description": "kind 'teammate': the user holding the ball, when known."
					}
				},
				"required": [
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentCastResponse": {
				"properties": {
					"agents": {
						"items": {
							"$ref": "#/components/schemas/AgentCastAgent"
						},
						"type": "array"
					},
					"names": {
						"items": {
							"$ref": "#/components/schemas/AgentCastNameRow"
						},
						"type": "array",
						"description": "Addition: for a viewer limited to Kai Copilot (no AI agents), whose `agents` hold\nKai Copilot only: the other agents this ticket shows (at work, its card, its line), by name and\ntile, so the pane names them. Display only: never a target for input or a hand-over."
					},
					"ball": {
						"$ref": "#/components/schemas/AgentViewBall"
					},
					"defaultAgentId": {
						"type": "string",
						"nullable": true,
						"description": "Addition: the agent text goes to by default (the holder, else the last active agent, else Kai)."
					},
					"cardAccess": {
						"properties": {
							"hiddenOptionIds": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"waitsOn": {
								"type": "string"
							},
							"mayAnswer": {
								"type": "boolean"
							},
							"cardId": {
								"type": "string"
							}
						},
						"required": [
							"mayAnswer",
							"cardId"
						],
						"type": "object",
						"description": "Addition: may the requesting teammate settle the open card? False when an\noption runs an action their role can't (a refund, a return): clients show \"An admin or\nmanager can approve this.\" instead of the buttons. Absent without an open card.\nAddition: `waitsOn` is the line clients show instead of the\nbuttons when it is not that (\"Waiting on Development\"); `hiddenOptionIds` are options this\nteammate can't take (a non-admin's \"Merge\"), left off the card."
					},
					"kaiResolveAgentId": {
						"type": "string",
						"nullable": true,
						"description": "Addition: where a hand-over addressed to Kai goes: the project's live Kai Support doc (the\nidentity its hard tickets run on; the field keeps its old name). Null when the doc is not installed: the\ninput endpoint then installs it on such a hand-over, as the first hard ticket does."
					}
				},
				"required": [
					"agents",
					"ball"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewHandledByKind": {
				"type": "string",
				"enum": [
					"agent",
					"waiting_team",
					"teammate",
					"team",
					"bot",
					"done",
					"failed",
					"closed",
					"none"
				],
				"description": "Addition (agent switching): the \"Handled by\" bar at the top of the\nAgents panel. Exactly one holder, decided here (never by a client):\n - `agent`: an agent holds the ticket (`state` as in `assignedAgent`; `for` with\n   `waiting_teammate`; `startedBy` when a schedule started its run).\n - `waiting_team`: the holder's card waits on a team (`for`); the agent still holds it.\n - `teammate`: a person is on it (`userId`, `name`, `reason`, `resumeAgentId`).\n - `team`: an agent (the bot) handed the conversation to the team, nobody took it yet.\n - `bot`: Kai's chat bot answered; no agent holds the ticket.\n - `done` / `failed`: the last holder finished / couldn't finish; back with the owner.\n - `closed`: the ticket is closed (`agentId`: the agent closing stopped, `byUserId`).\n - `none`: no agent worked on the ticket."
			},
			"AgentViewCardFor": {
				"description": "Addition (PLAN-V2 §2): who must act on a card. `{ kind: 'team', id: 'project', name: 'your team' }` = the whole project.",
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"user",
							"team"
						]
					},
					"id": {
						"type": "string",
						"description": "A User `_id`, a Team `_id`, or `'project'`."
					},
					"name": {
						"type": "string"
					}
				},
				"required": [
					"kind",
					"id",
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewHandledBy": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/AgentViewHandledByKind"
					},
					"agentId": {
						"type": "string"
					},
					"state": {
						"type": "string",
						"enum": [
							"working",
							"waiting_customer",
							"waiting_event",
							"waiting_teammate"
						]
					},
					"for": {
						"$ref": "#/components/schemas/AgentViewCardFor"
					},
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"reason": {
						"type": "string",
						"enum": [
							"replied",
							"stopped",
							"took"
						],
						"description": "`teammate`: how they got it: replied to the customer, stopped the agent, or took it back."
					},
					"resumeAgentId": {
						"type": "string",
						"description": "`teammate`: the agent \"Let <Agent> continue\" wakes."
					},
					"byUserId": {
						"type": "string",
						"description": "`closed`: the teammate who closed it."
					},
					"byUserName": {
						"type": "string"
					},
					"wasRunning": {
						"type": "boolean",
						"description": "Addition, `closed`: the agent it stopped had a running or queued turn (else it only waited)."
					},
					"startedBy": {
						"properties": {
							"at": {
								"type": "string",
								"format": "date-time"
							},
							"name": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"schedule",
									"workflow",
									"trigger"
								]
							}
						},
						"required": [
							"at",
							"name",
							"kind"
						],
						"type": "object",
						"description": "`agent`: what started its run: a schedule, a workflow's hand-off or a trigger (\"Started by workflow: <name>\")."
					},
					"summary": {
						"type": "string",
						"description": "`done`: the agent's one-line summary."
					},
					"since": {
						"type": "string",
						"format": "date-time"
					},
					"fromBot": {
						"type": "boolean",
						"enum": [
							true
						],
						"nullable": false,
						"description": "Addition: `agent` (waiting on a person) / `waiting_team` because of Kai\nSupport's own card (`card.fromBot`): clients name the bot (\"Kai Support is waiting on you\",\n\"Kai Support asked the team\"), not the agent that stores the card."
					}
				},
				"required": [
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentSuggestionKind": {
				"type": "string",
				"enum": [
					"draft",
					"action",
					"ask_customer",
					"close",
					"send_draft",
					"other"
				],
				"description": "Addition (suggested actions): what a chip does when clicked.\n - `draft`: the agent drafts a reply into the reply composer (`mode: 'ask'`, an AGENT_DRAFT line).\n - `action`: run something (`actionKey` when it is a catalog action, e.g. \"Refund €39.90\").\n - `ask_customer`: the agent asks the customer something (\"Ask Sam for the order number\").\n - `other`: any other instruction to the agent.\n - `close` / `send_draft`: the dashboard's own Close / Send (no agent run): \"Close as solved\", \"Send draft\"."
			},
			"Record_string.string-or-number-or-boolean_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"AgentViewSuggestion": {
				"description": "Addition: one suggested next step for the teammate, shown as a chip above\nthe agents composer. `llm`: the holder's last `set_next` gave it (never a separate model\ncall); `state`: derived from the ticket (a staged draft, a thank-you). Never runs by\nitself: a click is the teammate's instruction (`POST …/input { suggestionId }`), or the\ndashboard's own Close / Send for `close` / `send_draft`.",
				"properties": {
					"id": {
						"type": "string",
						"description": "`<runId>:<n>` (llm) or `state:<kind>`. Send it back as `suggestionId`."
					},
					"label": {
						"type": "string",
						"description": "The chip, one line (≤ 48 chars): \"Draft: label is on its way\", \"Refund €39.90\"."
					},
					"kind": {
						"$ref": "#/components/schemas/AgentSuggestionKind"
					},
					"source": {
						"type": "string",
						"enum": [
							"llm",
							"state"
						]
					},
					"agentId": {
						"type": "string",
						"description": "The agent that gave it (the holder); absent for state chips. A click goes to it, else to Kai Copilot."
					},
					"instruction": {
						"type": "string",
						"description": "What the click tells the agent, in the teammate's words (llm only; the server sends it, clients show `label`)."
					},
					"actionKey": {
						"type": "string",
						"description": "A catalog action key (`billing:refund`, `commerce:create_return`, `gleap:add_tags`, `tool:…`), validated server-side."
					},
					"params": {
						"$ref": "#/components/schemas/Record_string.string-or-number-or-boolean_",
						"description": "Bounded parameters for `actionKey` (≤ 6 flat values); money in `amountCents` + `currency`."
					},
					"money": {
						"type": "boolean",
						"description": "The action moves money (from the catalog)."
					}
				},
				"required": [
					"id",
					"label",
					"kind",
					"source"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewHandOverUndo": {
				"description": "Addition: a teammate's hand-over that can still be undone. The new\nholder starts after `until` (10 s); until then `POST …/input { mode: 'undo_hand_over' }`\nby the same teammate puts everything back. Absent once the window passed.",
				"properties": {
					"agentId": {
						"type": "string"
					},
					"byUserId": {
						"type": "string"
					},
					"at": {
						"type": "string",
						"format": "date-time"
					},
					"until": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"agentId",
					"byUserId",
					"at",
					"until"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewSuggest": {
				"description": "Addition: \"Suggest a reply\" on the Kai Copilot pane. A teammate asked Kai for the\nnext step on a ticket a person holds (`POST …/suggest`): `running` until the suggestion run ends,\nthen `done` (its card is the view's card) or `failed` (no card; `reason` is for logs, not people).",
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"running",
							"done",
							"failed"
						]
					},
					"byUserId": {
						"type": "string",
						"nullable": true
					},
					"at": {
						"type": "string",
						"format": "date-time"
					},
					"endedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"state",
					"byUserId",
					"at"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewStatus": {
				"type": "string",
				"enum": [
					"working",
					"needs_you",
					"suggestion",
					"waiting_customer",
					"waiting_event",
					"you",
					"done"
				],
				"description": "The status pill."
			},
			"AgentViewCastEntry": {
				"properties": {
					"agentId": {
						"type": "string"
					},
					"state": {
						"$ref": "#/components/schemas/AgentCastState"
					},
					"lastActiveAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"agentId",
					"state",
					"lastActiveAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewCardOption": {
				"properties": {
					"id": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"actionRef": {
						"type": "string",
						"description": "The pending action this option runs (unified `pendingactions` store, §7.3).\nThe same id a customer-facing `confirm` card may carry: whoever confirms\nfirst runs it once (single use); `source` on the pending action says who\nwas asked (`customer_confirm` | `teammate_card` | `auto`)."
					},
					"via": {
						"type": "string",
						"description": "\"Stripe\", \"Shopify\", \"Kai Code\": shown as \"via <tool>\"."
					},
					"recommended": {
						"type": "boolean"
					},
					"effect": {
						"type": "string",
						"description": "Tasks v2: what happens when the teammate picks it, in one line."
					},
					"url": {
						"type": "string",
						"description": "Addition: a link option. Clients open it in a new tab and never send it to the server."
					},
					"asks": {
						"type": "string",
						"description": "Addition: the option needs words. Clients do not send the click: they focus the\ncomposer (addressed to the card's agent) with this placeholder, and the typed text answers the\ncard (`{ cardId, text }`), which the server treats as this option with the text. A click without\ntext answers 409."
					},
					"customerMessage": {
						"type": "string",
						"description": "Addition (ask replies): the exact message the customer gets when this option is picked,\nin the customer's language. Clients show it as \"Message to <name>\" while this option is highlighted\nand send it back (maybe edited) as the input's `customerMessage` with this `optionId`; without it in\nthe request nothing drafted goes out (the agent writes its own reply). Absent: the option sends nothing."
					}
				},
				"required": [
					"id",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetOption": {
				"properties": {
					"id": {
						"type": "string"
					},
					"label": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetResponseAction": {
				"type": "string",
				"enum": [
					"select",
					"confirm",
					"cancel",
					"submit"
				]
			},
			"Record_string.string-or-string-Array_": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"WidgetResponseValues": {
				"$ref": "#/components/schemas/Record_string.string-or-string-Array_"
			},
			"WidgetResponse": {
				"properties": {
					"action": {
						"$ref": "#/components/schemas/WidgetResponseAction"
					},
					"values": {
						"$ref": "#/components/schemas/WidgetResponseValues"
					},
					"label": {
						"type": "string"
					},
					"at": {
						"type": "string"
					},
					"undoneAt": {
						"type": "string",
						"description": "confirm card: the customer took it back with the Undo button (a `cancel` after a `confirm`)."
					}
				},
				"required": [
					"action",
					"values",
					"label",
					"at"
				],
				"type": "object",
				"additionalProperties": false
			},
			"QuickRepliesWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"quick_replies"
						],
						"nullable": false
					},
					"options": {
						"items": {
							"$ref": "#/components/schemas/WidgetOption"
						},
						"type": "array"
					}
				},
				"required": [
					"id",
					"type",
					"options"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ShowMeWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"show_me"
						],
						"nullable": false
					},
					"url": {
						"type": "string"
					},
					"description": {
						"type": "string"
					},
					"breadcrumb": {
						"type": "string"
					},
					"target": {
						"type": "string"
					},
					"preview": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"url",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetInputType": {
				"type": "string",
				"enum": [
					"number",
					"date",
					"text",
					"select",
					"email",
					"textarea",
					"chips"
				]
			},
			"WidgetInput": {
				"properties": {
					"name": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"type": {
						"$ref": "#/components/schemas/WidgetInputType"
					},
					"required": {
						"type": "boolean"
					},
					"placeholder": {
						"type": "string"
					},
					"options": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"name",
					"label",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FormWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"form"
						],
						"nullable": false
					},
					"inputs": {
						"items": {
							"$ref": "#/components/schemas/WidgetInput"
						},
						"type": "array"
					},
					"submitLabel": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"inputs"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetField": {
				"properties": {
					"label": {
						"type": "string"
					},
					"value": {
						"type": "string"
					}
				},
				"required": [
					"label",
					"value"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConfirmWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"confirm"
						],
						"nullable": false
					},
					"description": {
						"type": "string"
					},
					"fields": {
						"items": {
							"$ref": "#/components/schemas/WidgetField"
						},
						"type": "array"
					},
					"confirmLabel": {
						"type": "string"
					},
					"cancelLabel": {
						"type": "string"
					},
					"destructive": {
						"type": "boolean"
					},
					"icon": {
						"type": "string",
						"enum": [
							"alert",
							"info"
						]
					},
					"receiptLabel": {
						"type": "string",
						"description": "Receipt line once confirmed (\"Cancellation scheduled · Pro ends 14 Mar 2027\")."
					},
					"undoLabel": {
						"type": "string",
						"description": "Ghost button on the receipt that takes the confirmation back (sends `cancel`)."
					}
				},
				"required": [
					"id",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetTone": {
				"type": "string",
				"enum": [
					"neutral",
					"success",
					"info",
					"warning",
					"danger"
				]
			},
			"WidgetStatus": {
				"properties": {
					"label": {
						"type": "string"
					},
					"tone": {
						"$ref": "#/components/schemas/WidgetTone"
					}
				},
				"required": [
					"label",
					"tone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetStepState": {
				"type": "string",
				"enum": [
					"done",
					"failed",
					"current",
					"upcoming"
				]
			},
			"WidgetStep": {
				"properties": {
					"label": {
						"type": "string"
					},
					"state": {
						"$ref": "#/components/schemas/WidgetStepState"
					},
					"date": {
						"type": "string"
					},
					"detail": {
						"type": "string"
					}
				},
				"required": [
					"label",
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StatusWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"status"
						],
						"nullable": false
					},
					"status": {
						"$ref": "#/components/schemas/WidgetStatus"
					},
					"steps": {
						"items": {
							"$ref": "#/components/schemas/WidgetStep"
						},
						"type": "array"
					},
					"eyebrow": {
						"type": "string"
					},
					"footnote": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"status",
					"steps"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BookingSlot": {
				"properties": {
					"start": {
						"type": "string",
						"description": "ISO start time (UTC). The customer's pick is one of these."
					},
					"label": {
						"type": "string",
						"description": "\"11:30\", in the customer's timezone."
					}
				},
				"required": [
					"start",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BookingDay": {
				"properties": {
					"date": {
						"type": "string",
						"description": "\"2026-10-15\", in the customer's timezone."
					},
					"label": {
						"type": "string",
						"description": "\"Wed\""
					},
					"dayNumber": {
						"type": "string",
						"description": "\"15\""
					},
					"slots": {
						"items": {
							"$ref": "#/components/schemas/BookingSlot"
						},
						"type": "array"
					}
				},
				"required": [
					"date",
					"label",
					"dayNumber",
					"slots"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BookingProvider": {
				"type": "string",
				"enum": [
					"calendly",
					"calcom"
				]
			},
			"BookingField": {
				"description": "A required booking question the card asks before booking (Cal.com\n`bookingFields`): only simple ones; anything else goes to the booking page.",
				"properties": {
					"name": {
						"type": "string",
						"description": "The provider's field slug (`attendeePhoneNumber`, a custom slug)."
					},
					"label": {
						"type": "string"
					},
					"type": {
						"type": "string",
						"enum": [
							"phone",
							"text",
							"textarea"
						]
					}
				},
				"required": [
					"name",
					"label",
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BookingResult": {
				"description": "Server-written booking outcome (never from Kai):\n- `booking`: the pick is being booked with the provider.\n- `booked`: done; `label` is the receipt (\"Wed 15 Oct, 11:30\"), `email` where the invite went.\n- `requested`: Cal.com took the request but the host has to confirm it\n  (`host` names them). Not a booked meeting yet: no \"Meeting booked\"\n  message, the workflow step stays parked.\n- `confirm_in_provider`: Calendly without the Scheduling API: `url` opens the\n  pre-filled Calendly page (carrying `tracking`); its `calendly.event_scheduled`\n  comes back as a `confirm` answer with `values.eventUri`.\n- `failed`: the pick could not be booked; the card is open again (no\n  `response`), `days` refreshed (empty when no times are left), `message` says why.",
				"properties": {
					"status": {
						"type": "string",
						"enum": [
							"booking",
							"booked",
							"requested",
							"confirm_in_provider",
							"failed"
						]
					},
					"start": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"message": {
						"type": "string"
					},
					"host": {
						"type": "string",
						"description": "`requested`: who has to confirm."
					},
					"reason": {
						"type": "string",
						"enum": [
							"slot_unavailable",
							"no_times",
							"provider_error",
							"email_missing",
							"not_available",
							"rate_limited",
							"fields_required",
							"needs_booking_page",
							"not_matched",
							"host_declined"
						],
						"description": "`failed` (or a refused Calendly confirmation): why, for a Messenger string of its own (`message` is the English fallback)."
					},
					"tracking": {
						"type": "string",
						"description": "`confirm_in_provider`: the id the pre-filled link carries (utm_content / salesforce_uuid); the confirmation must carry it back."
					},
					"providerRef": {
						"type": "string",
						"description": "The provider's booking id (Cal.com uid)."
					},
					"timeZone": {
						"type": "string",
						"description": "The IANA zone the customer picked the time in (labels, the invite)."
					},
					"at": {
						"type": "string"
					}
				},
				"required": [
					"status",
					"at"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BookingWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"booking"
						],
						"nullable": false
					},
					"host": {
						"properties": {
							"avatar": {
								"type": "string"
							},
							"role": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"required": [
							"name"
						],
						"type": "object"
					},
					"durationLabel": {
						"type": "string"
					},
					"timezoneLabel": {
						"type": "string"
					},
					"days": {
						"items": {
							"$ref": "#/components/schemas/BookingDay"
						},
						"type": "array"
					},
					"provider": {
						"$ref": "#/components/schemas/BookingProvider"
					},
					"eventRef": {
						"type": "string",
						"description": "Server-side reference of the event type (Calendly event type URI / `<integrationId>:<eventTypeId>` for Cal.com)."
					},
					"bookingUrl": {
						"type": "string",
						"description": "The provider's public booking page (\"More times\", text fallback)."
					},
					"invitee": {
						"properties": {
							"email": {
								"type": "string"
							},
							"name": {
								"type": "string"
							}
						},
						"type": "object",
						"description": "Who gets the invite (the contact's or the email they gave Kai)."
					},
					"fields": {
						"items": {
							"$ref": "#/components/schemas/BookingField"
						},
						"type": "array",
						"description": "Required questions the card asks with the pick (sent as `values[name]`)."
					},
					"timeZone": {
						"type": "string",
						"description": "IANA zone of the slot labels (the Messenger may relabel in the customer's browser zone)."
					},
					"booking": {
						"$ref": "#/components/schemas/BookingResult",
						"description": "Server-written outcome of the pick."
					}
				},
				"required": [
					"id",
					"type",
					"host",
					"durationLabel",
					"timezoneLabel",
					"days",
					"provider",
					"eventRef"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetMeter": {
				"properties": {
					"label": {
						"type": "string"
					},
					"used": {
						"type": "number",
						"format": "double"
					},
					"limit": {
						"type": "number",
						"format": "double"
					},
					"unit": {
						"type": "string"
					}
				},
				"required": [
					"label",
					"used",
					"limit"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SubscriptionWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"subscription"
						],
						"nullable": false
					},
					"status": {
						"$ref": "#/components/schemas/WidgetStatus"
					},
					"price": {
						"type": "string"
					},
					"interval": {
						"type": "string"
					},
					"renewsOn": {
						"type": "string"
					},
					"endsOn": {
						"type": "string"
					},
					"meters": {
						"items": {
							"$ref": "#/components/schemas/WidgetMeter"
						},
						"type": "array"
					},
					"url": {
						"type": "string"
					},
					"urlLabel": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"status",
					"price",
					"interval"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetInvoice": {
				"properties": {
					"id": {
						"type": "string"
					},
					"number": {
						"type": "string"
					},
					"date": {
						"type": "string"
					},
					"amount": {
						"type": "string"
					},
					"status": {
						"$ref": "#/components/schemas/WidgetStatus"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"number",
					"date",
					"amount",
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"InvoicesWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"invoices"
						],
						"nullable": false
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/WidgetInvoice"
						},
						"type": "array"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PaymentIssueWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"payment_issue"
						],
						"nullable": false
					},
					"amount": {
						"type": "string"
					},
					"date": {
						"type": "string"
					},
					"method": {
						"type": "string"
					},
					"reason": {
						"type": "string"
					},
					"updateUrl": {
						"type": "string"
					},
					"canRetry": {
						"type": "boolean",
						"description": "Only when a billing handler can run the retry (onWidgetAnswer registry)."
					}
				},
				"required": [
					"id",
					"type",
					"amount",
					"date",
					"method",
					"reason"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetPlan": {
				"properties": {
					"id": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"price": {
						"type": "string"
					},
					"interval": {
						"type": "string"
					},
					"features": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"current": {
						"type": "boolean"
					},
					"recommended": {
						"type": "boolean"
					}
				},
				"required": [
					"id",
					"name",
					"price",
					"interval",
					"features"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PlanCompareWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"plan_compare"
						],
						"nullable": false
					},
					"plans": {
						"items": {
							"$ref": "#/components/schemas/WidgetPlan"
						},
						"type": "array"
					},
					"ctaLabel": {
						"type": "string"
					},
					"footnote": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"plans"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetSwatch": {
				"properties": {
					"label": {
						"type": "string"
					},
					"color": {
						"type": "string",
						"description": "CSS hex colour (#rgb / #rrggbb / #rrggbbaa)."
					}
				},
				"required": [
					"label",
					"color"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetProduct": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"image": {
						"type": "string"
					},
					"price": {
						"type": "string"
					},
					"compareAtPrice": {
						"type": "string"
					},
					"rating": {
						"type": "number",
						"format": "double"
					},
					"reviewCount": {
						"type": "number",
						"format": "double"
					},
					"badge": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"addToCartUrl": {
						"type": "string"
					},
					"swatches": {
						"items": {
							"$ref": "#/components/schemas/WidgetSwatch"
						},
						"type": "array"
					}
				},
				"required": [
					"id",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ProductsWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"products"
						],
						"nullable": false
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/WidgetProduct"
						},
						"type": "array"
					}
				},
				"required": [
					"id",
					"type",
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetOrderItem": {
				"properties": {
					"title": {
						"type": "string"
					},
					"image": {
						"type": "string"
					}
				},
				"required": [
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OrderWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"order"
						],
						"nullable": false
					},
					"orderNumber": {
						"type": "string"
					},
					"status": {
						"$ref": "#/components/schemas/WidgetStatus"
					},
					"headline": {
						"type": "string"
					},
					"subline": {
						"type": "string"
					},
					"progress": {
						"properties": {
							"partial": {
								"type": "boolean"
							},
							"current": {
								"type": "number",
								"format": "double"
							},
							"steps": {
								"items": {
									"type": "string"
								},
								"type": "array"
							}
						},
						"required": [
							"current",
							"steps"
						],
						"type": "object"
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/WidgetOrderItem"
						},
						"type": "array"
					},
					"carrier": {
						"type": "string"
					},
					"trackingUrl": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"orderNumber",
					"status",
					"headline",
					"progress"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetReturnItem": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"image": {
						"type": "string"
					},
					"quantity": {
						"type": "number",
						"format": "double",
						"description": "What the line holds: the quantity stepper's maximum (shown above 1)."
					}
				},
				"required": [
					"id",
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReturnWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"return"
						],
						"nullable": false
					},
					"orderNumber": {
						"type": "string"
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/WidgetReturnItem"
						},
						"type": "array"
					},
					"reasons": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"policyNote": {
						"type": "string"
					},
					"allowExchange": {
						"type": "boolean"
					},
					"selected": {
						"items": {
							"properties": {
								"quantity": {
									"type": "number",
									"format": "double"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"quantity",
								"id"
							],
							"type": "object"
						},
						"type": "array",
						"description": "What the customer already said, ticked / picked when the card opens."
					},
					"reason": {
						"type": "string"
					},
					"teamReviews": {
						"type": "boolean",
						"description": "Ask the team: \"Request return\" / \"Sent to the team\"."
					}
				},
				"required": [
					"id",
					"type",
					"orderNumber",
					"items",
					"reasons"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WidgetBagItem": {
				"properties": {
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"image": {
						"type": "string"
					},
					"price": {
						"type": "string"
					},
					"qty": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"title",
					"price",
					"qty"
				],
				"type": "object",
				"additionalProperties": false
			},
			"BagWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"bag"
						],
						"nullable": false
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/WidgetBagItem"
						},
						"type": "array"
					},
					"subtotal": {
						"type": "string"
					},
					"discounts": {
						"items": {
							"properties": {
								"amount": {
									"type": "string"
								},
								"label": {
									"type": "string"
								}
							},
							"required": [
								"amount",
								"label"
							],
							"type": "object"
						},
						"type": "array"
					},
					"delivery": {
						"type": "string"
					},
					"total": {
						"type": "string"
					},
					"checkoutUrl": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"items",
					"subtotal",
					"total",
					"checkoutUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OfferWidget": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"offer"
						],
						"nullable": false
					},
					"headline": {
						"type": "string"
					},
					"code": {
						"type": "string"
					},
					"expires": {
						"type": "string"
					},
					"applyUrl": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"type",
					"headline",
					"code"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FeatureRequestCardState": {
				"type": "string",
				"enum": [
					"error",
					"choose",
					"upvoted",
					"dismissed",
					"proposed",
					"created",
					"recorded"
				]
			},
			"FeatureRequestCardItem": {
				"description": "One public roadmap item on a `feature_requests` card (never a description, never a hidden-lane request).",
				"properties": {
					"id": {
						"type": "string",
						"description": "The request's ticket id: the value a `select` answer sends back."
					},
					"shareToken": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"statusLabel": {
						"type": "string",
						"description": "The lane's title (\"Planned\")."
					},
					"statusTone": {
						"type": "string",
						"enum": [
							"neutral",
							"info",
							"success",
							"warning"
						]
					},
					"upvotesCount": {
						"type": "number",
						"format": "double"
					},
					"upvoted": {
						"type": "boolean",
						"description": "This customer's email already voted for it."
					},
					"url": {
						"type": "string",
						"description": "The public portal link."
					}
				},
				"required": [
					"id",
					"title",
					"statusLabel",
					"statusTone",
					"upvotesCount",
					"upvoted"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FeatureRequestsWidget": {
				"description": "Kai intake's feature request card (design-handoffs/kai-intake/CONTRACT.md §5).\nBuilt by the server only (find_feature_requests / propose_feature_request),\nnever by show_widget; its answers run in feedbackintake/featureRequestCard.handler.ts.",
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"subtitle": {
						"type": "string"
					},
					"response": {
						"$ref": "#/components/schemas/WidgetResponse",
						"description": "Set once the customer answered the card (single use)."
					},
					"type": {
						"type": "string",
						"enum": [
							"feature_requests"
						],
						"nullable": false
					},
					"state": {
						"$ref": "#/components/schemas/FeatureRequestCardState"
					},
					"query": {
						"type": "string"
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/FeatureRequestCardItem"
						},
						"type": "array"
					},
					"selectedId": {
						"type": "string"
					},
					"proposal": {
						"properties": {
							"description": {
								"type": "string"
							},
							"title": {
								"type": "string"
							}
						},
						"required": [
							"description",
							"title"
						],
						"type": "object"
					},
					"created": {
						"properties": {
							"url": {
								"type": "string"
							},
							"statusLabel": {
								"type": "string"
							},
							"title": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"statusLabel",
							"title",
							"id"
						],
						"type": "object"
					},
					"emailRequired": {
						"type": "boolean",
						"description": "Anonymous session: the card asks for an email before Upvote / Create (the vote is keyed by it)."
					},
					"message": {
						"type": "string",
						"description": "`error` / `recorded`: the English fallback line."
					}
				},
				"required": [
					"id",
					"type",
					"state",
					"query",
					"items",
					"emailRequired"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Widget": {
				"anyOf": [
					{
						"$ref": "#/components/schemas/QuickRepliesWidget"
					},
					{
						"$ref": "#/components/schemas/ShowMeWidget"
					},
					{
						"$ref": "#/components/schemas/FormWidget"
					},
					{
						"$ref": "#/components/schemas/ConfirmWidget"
					},
					{
						"$ref": "#/components/schemas/StatusWidget"
					},
					{
						"$ref": "#/components/schemas/BookingWidget"
					},
					{
						"$ref": "#/components/schemas/SubscriptionWidget"
					},
					{
						"$ref": "#/components/schemas/InvoicesWidget"
					},
					{
						"$ref": "#/components/schemas/PaymentIssueWidget"
					},
					{
						"$ref": "#/components/schemas/PlanCompareWidget"
					},
					{
						"$ref": "#/components/schemas/ProductsWidget"
					},
					{
						"$ref": "#/components/schemas/OrderWidget"
					},
					{
						"$ref": "#/components/schemas/ReturnWidget"
					},
					{
						"$ref": "#/components/schemas/BagWidget"
					},
					{
						"$ref": "#/components/schemas/OfferWidget"
					},
					{
						"$ref": "#/components/schemas/FeatureRequestsWidget"
					}
				]
			},
			"AgentViewCardItem": {
				"description": "Addition: one line item of a batch approval card.",
				"properties": {
					"label": {
						"type": "string"
					},
					"amount": {
						"type": "string",
						"description": "Formatted (\"€89\"), when the item moves money."
					}
				},
				"required": [
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PrBlocker": {
				"type": "string",
				"enum": [
					"conflicts",
					"checks_failed",
					"changes_requested",
					"out_of_date"
				]
			},
			"FixBlocker": {
				"$ref": "#/components/schemas/PrBlocker",
				"description": "What keeps the fix's open pull request from merging (Kai Code PR upkeep, kaiPrUpkeep.logic): a merge conflict,\na failing required check, changes requested by someone with write access, a branch behind its base."
			},
			"AgentViewPullRequest": {
				"description": "Addition: one pull request of a Kai Code session.",
				"properties": {
					"url": {
						"type": "string"
					},
					"number": {
						"type": "number",
						"format": "double"
					},
					"repo": {
						"type": "string",
						"description": "\"owner/repo\""
					},
					"state": {
						"type": "string",
						"enum": [
							"open",
							"merged",
							"closed"
						]
					},
					"title": {
						"type": "string"
					},
					"blocker": {
						"$ref": "#/components/schemas/FixBlocker",
						"description": "Addition (Kai Code PR upkeep): what keeps this open PR from merging (gleapcode kaiPrUpkeep.logic),\nabsent when nothing does. While it is set the PR card offers no Merge."
					},
					"baseBranch": {
						"type": "string",
						"description": "Addition: the branch it merges into, and its own (the coding app's upkeep hand-off)."
					},
					"branch": {
						"type": "string"
					},
					"failingChecks": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Addition: the failing checks that block it, by name (≤ 5)."
					},
					"upkeepTurns": {
						"type": "number",
						"format": "double",
						"description": "Addition: automatic upkeep turns Kai Code ran on this PR so far."
					},
					"upkeepAsked": {
						"properties": {
							"detail": {
								"type": "string"
							},
							"reason": {
								"type": "string",
								"enum": [
									"tried",
									"limit",
									"start_failed",
									"external"
								]
							}
						},
						"required": [
							"reason"
						],
						"type": "object",
						"description": "Addition: upkeep stopped for the current blocker and asked the team (`tried`: a turn ran and it\nis still blocked, `limit`: three turns ran, `start_failed`), or told the coding app's starter (`external`)."
					}
				},
				"required": [
					"url",
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewNeedsYou": {
				"description": "Needs you: one card shape for every kind. `ok`: OK an action (the exact call, frozen\nand hashed; the recommended option runs exactly it); `choose`: pick an option; `tell`: a fact only\na person knows (Kai's best guess as the recommended answer); `do`: something Kai can't (Done).",
				"properties": {
					"kind": {
						"type": "string",
						"enum": [
							"ok",
							"choose",
							"tell",
							"do"
						]
					},
					"board": {
						"properties": {
							"name": {
								"type": "string"
							},
							"type": {
								"type": "string"
							}
						},
						"required": [
							"name",
							"type"
						],
						"type": "object",
						"description": "The board whose people answer (\"Billing\"): the ticket moved there, its team got the card."
					},
					"team": {
						"properties": {
							"name": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"name",
							"id"
						],
						"type": "object"
					},
					"call": {
						"properties": {
							"fields": {
								"items": {
									"properties": {
										"value": {
											"type": "string"
										},
										"label": {
											"type": "string"
										}
									},
									"required": [
										"value",
										"label"
									],
									"type": "object"
								},
								"type": "array"
							},
							"via": {
								"type": "string"
							},
							"label": {
								"type": "string"
							}
						},
						"required": [
							"fields",
							"label"
						],
						"type": "object",
						"description": "OK cards: the exact call. `fields` are every argument, never cut to 140 characters."
					},
					"whyAsks": {
						"type": "string",
						"description": "\"Refunds over $100 need Billing\"."
					},
					"details": {
						"items": {
							"properties": {
								"value": {
									"type": "string"
								},
								"label": {
									"type": "string"
								}
							},
							"required": [
								"value",
								"label"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The card's Details beside the call: what it acts on, how the customer was matched."
					},
					"thenTells": {
						"type": "string",
						"description": "Billing / shop: what the store tells the customer once it ran (shown, not editable)."
					},
					"declineTells": {
						"type": "string",
						"description": "Addition: billing / shop: what the store tells the customer when it is declined (shown, not editable)."
					},
					"declineLabel": {
						"type": "string",
						"description": "The alternative button (\"Don't refund\"); the recommended option is the blue one."
					},
					"promisedAt": {
						"type": "string",
						"description": "When the customer hears back at the latest (ISO) and how they were told (\"usually within 2 hours\")."
					},
					"promiseText": {
						"type": "string"
					},
					"movedFrom": {
						"type": "string",
						"description": "The board the ticket moved from."
					},
					"looking": {
						"properties": {
							"at": {
								"type": "string"
							},
							"name": {
								"type": "string"
							},
							"userId": {
								"type": "string"
							}
						},
						"required": [
							"at",
							"name",
							"userId"
						],
						"type": "object",
						"description": "\"Sarah is looking\": who opened it in the last ten minutes. A hint, never a lock."
					},
					"requestedByUserId": {
						"type": "string",
						"description": "A card routed onward because the requester's role can't run it: this person can't answer it."
					}
				},
				"required": [
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentAskKind": {
				"type": "string",
				"enum": [
					"access",
					"merge",
					"plan_approval",
					"no_proof",
					"money",
					"promise",
					"product_call",
					"needs_person",
					"delete_data",
					"security_legal",
					"incident"
				]
			},
			"AgentViewCardDetail": {
				"description": "Addition: one row behind an ask's \"Details ›\". `url` when the row links somewhere (a PR, a ticket, a proof).",
				"properties": {
					"label": {
						"type": "string"
					},
					"value": {
						"type": "string"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"label",
					"value"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewCard": {
				"properties": {
					"id": {
						"type": "string",
						"description": "The AgentTask `_id` that stores the card. Send it back as `cardId`."
					},
					"personRequest": {
						"properties": {
							"draftReply": {
								"type": "string"
							},
							"customerName": {
								"type": "string"
							}
						},
						"type": "object",
						"description": "Addition: a person ask (the customer persists on a person; the agent keeps the lead). Its\noptions are `answer_myself` (the client opens the ticket's reply composer with `draftReply`; never sent to\nthe server: the reply settles the ask) and `tell_kai` (asks for words, answered like any input card)."
					},
					"agentId": {
						"type": "string"
					},
					"kind": {
						"type": "string",
						"description": "From the verdict/action (\"Bug\", \"Setting\", \"Refund\", \"Pull request\"), never a hardcoded \"Likely bug\"."
					},
					"question": {
						"type": "string"
					},
					"facts": {
						"type": "string"
					},
					"why": {
						"type": "string"
					},
					"sources": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"recommendation": {
						"type": "string",
						"description": "Addition: the asking agent's recommendation and its reason, one sentence\n(\"Send a new parcel: he asked when the right one arrives, not for money back.\"). With\n`recommendationNoView` the agent has no view and says so (\"I can't tell: only the team knows\nwhat was agreed on the call.\"); clients draw it muted, not as a pick."
					},
					"recommendationNoView": {
						"type": "boolean"
					},
					"tried": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Tasks v2: what the agent already tried; the priority it gave the ask."
					},
					"checked": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "What the agent did and read before asking: its `tried` steps, then its sources (the card's \"Checked n things\")."
					},
					"priority": {
						"type": "string"
					},
					"options": {
						"items": {
							"$ref": "#/components/schemas/AgentViewCardOption"
						},
						"type": "array"
					},
					"queued": {
						"type": "number",
						"format": "double",
						"description": "\"1 more waiting\": other open needs behind this card."
					},
					"routeTo": {
						"type": "string",
						"enum": [
							"ticket_owner",
							"code_owner",
							"teammate"
						]
					},
					"routeToUserId": {
						"type": "string",
						"description": "Addition: the user the card is routed to (the code owner for fix cards), when known."
					},
					"taskType": {
						"type": "string",
						"description": "Addition: the AgentTask type behind the card (`agent_card`, `question`, `kai_code_pr_review`, …)."
					},
					"createdAt": {
						"type": "string",
						"format": "date-time",
						"description": "Addition: when the card was filed."
					},
					"for": {
						"$ref": "#/components/schemas/AgentViewCardFor",
						"description": "Addition (PLAN-V2): who must act. Kai Code fix cards → the code owner;\notherwise the ticket's assignee; unassigned → the ticket's team; no team →\n`{ kind: 'team', id: 'project', name: 'your team' }`. Computed on every\nrecompute, so a reassignment moves the card."
					},
					"isApproval": {
						"type": "boolean",
						"description": "Addition (PLAN-V2): an option runs a pending action that moves money or\nchanges an order (refund, cancel, plan change, return, exchange, discount),\nor a connector tool the project set to \"Ask the team\". Clients render the\nrecommended option + Decline (`mode: 'decline'`)."
					},
					"customerWroteSince": {
						"type": "string",
						"description": "Addition (PLAN-V2): ISO time of the customer's newest message when it came\nafter `createdAt` (\"Mia wrote since this was asked\"). The asking agent is\nwoken to re-check; if it withdraws, the card settles with a thread line\n`Withdrawn: <reason>` and disappears."
					},
					"cardType": {
						"type": "string",
						"enum": [
							"decision",
							"input"
						],
						"description": "Addition: `decision` = up to 2 option buttons (PLAN-V2); `input` = the\nagent needs information: question + optional quick-reply chips, answered\nby `send` with `cardId` + free text (a chip = its label as the text, or\nits `optionId`). `kind` is `'input'` for input cards."
					},
					"attachment": {
						"$ref": "#/components/schemas/Widget",
						"description": "Addition (one card system): a chat-card payload shown as the card's facts,\ne.g. the `invoices` / `payment_issue` card under \"Refund €140?\", the\n`order` card under \"Exchange size?\". Same 15 types and validation\n(`normalizeWidget`) as customer cards; rendered read-only here."
					},
					"items": {
						"items": {
							"$ref": "#/components/schemas/AgentViewCardItem"
						},
						"type": "array",
						"description": "Addition (back-office tasks): a batch approval's line items\n(\"#4398 · Tom Berg\" · \"€89\"), shown behind \"Review list\". The card's one\noption runs them all; Decline declines them all."
					},
					"limitText": {
						"type": "string",
						"description": "Addition: the money limit from Skills the card is under, one\nline: \"Billing ops refunds up to €250 per batch on its own. Above that, an\nadmin or manager approves.\""
					},
					"notice": {
						"type": "string",
						"description": "Something a person should know before answering, in amber (\"Auto start didn't run: …\")."
					},
					"customerMessage": {
						"type": "string",
						"description": "The exact message the customer gets if the recommended option is taken; the teammate may edit it (input `customerMessage`)."
					},
					"replySentAt": {
						"type": "string",
						"format": "date-time",
						"description": "A Kai Code PR card's reply went out (its `send_reply` option is gone)."
					},
					"rememberAs": {
						"type": "string",
						"description": "A one-line rule the teammate can tick (input `remember`): money approvals raise the action's Auto limit, others become a draft rule."
					},
					"fromBot": {
						"type": "boolean",
						"enum": [
							true
						],
						"nullable": false,
						"description": "Addition: Kai Support's own card (the chat bot's approval or failure card,\nfiled for Kai's Messenger chat, not by an agent run). `agentId` is still the agent that\nstores it (the default helper); clients name and draw it as the project's bot\n(\"Kai Support\", its avatar), never as Kai Copilot."
					},
					"pullRequests": {
						"items": {
							"$ref": "#/components/schemas/AgentViewPullRequest"
						},
						"type": "array",
						"description": "Addition: Kai Code cards (PR review, release check, failed): the session's pull requests."
					},
					"kaiCodeSessionId": {
						"type": "string",
						"description": "Addition: the Kai Code session behind the card."
					},
					"needsYou": {
						"$ref": "#/components/schemas/AgentViewNeedsYou",
						"description": "Addition (Needs you): the card's kind and the decision's facts, the same\nshape in the ticket pane, Kai Copilot › Needs you and the push. Absent on older cards."
					},
					"evidence": {
						"properties": {
							"kv": {
								"items": {
									"items": {
										"type": "string"
									},
									"type": "array"
								},
								"type": "array"
							}
						},
						"type": "object",
						"description": "Addition (Needs you): what the decision rests on, as rows. For OK cards: the exact call (\"Call ·\nPaddle · Refund transaction\", every argument, \"Why it asks\"), so an older client shows it too."
					},
					"whatHappened": {
						"type": "string",
						"description": "Addition (five-line asks): the ask in five lines. `question` is line 1\n(≤ 160, with who it waits on from `for`), `whatHappened` lines 2-3 (≤ 220, two grey lines), `options` the\nbuttons (Kai's pick first, at most one alternative), `draft` the customer message as one truncated line\n(only when the answer reaches the customer), `details` everything else behind \"Details ›\".\nSet on every card the server builds; older cards get it derived from their own fields."
					},
					"askKind": {
						"$ref": "#/components/schemas/AgentAskKind",
						"description": "Addition: which of the 11 ask kinds this is (AGENT_ASK_KINDS)."
					},
					"draft": {
						"type": "string",
						"description": "Addition: the message the customer gets when Kai's pick is taken, in their language."
					},
					"details": {
						"items": {
							"$ref": "#/components/schemas/AgentViewCardDetail"
						},
						"type": "array",
						"description": "Addition: the evidence behind \"Details ›\": links, proof, PRs, tickets, what was checked. ≤ 12 rows."
					},
					"onlyYou": {
						"type": "string",
						"description": "Addition (every ask carries Kai's pick or says why not): a decision card with no pick. Why only a\nperson can decide, in one short sentence; `whatHappened` then reads \"Only you can decide: <this>\"."
					},
					"answerHint": {
						"type": "string",
						"description": "Addition: a free-text ask's hint of what to type, the card field's placeholder."
					},
					"task": {
						"type": "boolean",
						"description": "Addition: a task a person does elsewhere (a refund in billing, a data deletion). The question is the\ntask, What happened says where it is done, and the answers are what the person reports back (\"Refunded 79 USD\",\n\"No second charge\"), not picks; only an option Kai marked `recommended` is drawn as Kai's pick."
					}
				},
				"required": [
					"id",
					"agentId",
					"kind",
					"question",
					"options",
					"queued"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentInputAttachment": {
				"description": "A file the teammate attached (uploaded to our storage first); same shape as `ticket/message`.",
				"properties": {
					"name": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"type": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewPendingInput": {
				"description": "Addition: a teammate message queued into a running turn (steer, §3.6). The\nclient shows it grey until `pickedUpAt` is set (then it drops off the list).",
				"properties": {
					"id": {
						"type": "string"
					},
					"agentId": {
						"type": "string"
					},
					"text": {
						"type": "string"
					},
					"at": {
						"type": "string",
						"format": "date-time"
					},
					"byUserId": {
						"type": "string"
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AgentInputAttachment"
						},
						"type": "array",
						"description": "Addition: the files that came with it."
					}
				},
				"required": [
					"id",
					"agentId",
					"text",
					"at"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewLive": {
				"description": "Addition (PLAN-V2): the live row while an agent run is active.",
				"properties": {
					"agentId": {
						"type": "string"
					},
					"text": {
						"type": "string",
						"description": "Short, present tense, no agent name: \"fixing the export\", \"checking Stripe\"."
					},
					"since": {
						"type": "string",
						"format": "date-time",
						"description": "When the run started."
					},
					"progress": {
						"properties": {
							"label": {
								"type": "string"
							},
							"total": {
								"type": "number",
								"format": "double"
							},
							"done": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"label",
							"total",
							"done"
						],
						"type": "object",
						"description": "Addition (back-office tasks): the step count the agent reported\n(\"3 of 12 refunds checked\"); clients draw a thin bar and say \"<text> · 3 of 12\"."
					},
					"startsAt": {
						"type": "string",
						"format": "date-time",
						"description": "Addition: a teammate's hand-over in its Undo window: the agent\nstarts then (`handOverUndo.until`) and has not started yet; `text` is empty.\nClients say \"Starts in 0:08 · Undo\" until then and nothing after it, never\nwhat the agent does, until its run starts."
					}
				},
				"required": [
					"agentId",
					"text",
					"since"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewOnIt": {
				"description": "Addition (PLAN-V2): a teammate is on the ticket (replied to the customer,\nstopped the agents, or took it). Agents don't write to the customer. Internal\nnotes never set it; it is gone when the ticket closes and after `hand_back`\n(\"Let <Agent> continue\" = `mode: 'hand_back'`, to `resumeAgentId`).",
				"properties": {
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"since": {
						"type": "string",
						"format": "date-time"
					},
					"resumeAgentId": {
						"type": "string",
						"description": "The agent \"Let <Agent> continue\" hands back to."
					}
				},
				"required": [
					"userId",
					"name",
					"since"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewAssignedAgent": {
				"description": "Addition (auto-assign): the agent shown as the ticket's\nassignee while it works on or holds the ticket. Display only: the human\nassignee (`processingUser` / `processingTeam`) stays the owner and is never\nchanged, so \"Mine\", \"Unassigned\", SLAs and round-robin keep reading the\nhuman fields. Absent when the agent finished, handed back, got stuck,\nneeds the team's input (a card for a team or the project), was stopped, or a\nteammate is on it: clients then show the human owner again.\n - `working`: an agent run is active (Kai Code: coding).\n - `waiting_customer`: the agent asked the customer and their reply wakes it.\n - `waiting_event`: Kai Code waits for the deploy to tell the customer it's live.",
				"properties": {
					"agentId": {
						"type": "string"
					},
					"state": {
						"type": "string",
						"enum": [
							"working",
							"waiting_customer",
							"waiting_event",
							"waiting_teammate"
						],
						"description": "Addition, `waiting_teammate`: the agent's open card waits on one person\n(`for`, the card's `for` when it is a user). The agent still holds the ticket; clients\nsay \"waiting on you\" / \"waiting on <first name>\". A card for a team or the whole\nproject shows no assigned agent (the human owner shows)."
					},
					"for": {
						"properties": {
							"name": {
								"type": "string"
							},
							"id": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"user"
								],
								"nullable": false
							}
						},
						"required": [
							"name",
							"id",
							"kind"
						],
						"type": "object",
						"description": "Set with `waiting_teammate`: the person the card waits on."
					},
					"since": {
						"type": "string",
						"format": "date-time",
						"description": "When this state began (the run's start, the agent's last step), when known."
					},
					"fromBot": {
						"type": "boolean",
						"enum": [
							true
						],
						"nullable": false,
						"description": "Addition: it waits on Kai Support's own card: clients show the bot (\"Kai Support · waiting on you\")."
					}
				},
				"required": [
					"agentId",
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewTask": {
				"description": "Addition: a back-office task ticket (no customer, held by an\nagent). Present only on tasks; the ticket's `agentTask` has the same data.\nClients: \"<Agent> is working on this task\", no customer reply box (only the\nagents composer), a task icon instead of a customer avatar.",
				"properties": {
					"agentId": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"instructions": {
						"type": "string"
					},
					"dueAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"origin": {
						"type": "string",
						"enum": [
							"user",
							"schedule"
						],
						"description": "`user`: \"You created this task\" / \"<Name> created this task\"; `schedule`: \"Created by schedule: <label>, <schedule>\"."
					},
					"createdBy": {
						"type": "string",
						"nullable": true
					},
					"createdByName": {
						"type": "string",
						"nullable": true
					},
					"triggerId": {
						"type": "string",
						"nullable": true
					},
					"triggerLabel": {
						"type": "string",
						"nullable": true
					},
					"schedule": {
						"type": "string",
						"nullable": true,
						"description": "\"daily 08:00\", \"every Monday 09:00\"."
					},
					"progress": {
						"properties": {
							"label": {
								"type": "string"
							},
							"total": {
								"type": "number",
								"format": "double"
							},
							"done": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"label",
							"total",
							"done"
						],
						"type": "object",
						"nullable": true,
						"description": "The newest step count (\"12 of 12 refunds checked\" after the run)."
					},
					"affected": {
						"items": {
							"properties": {
								"at": {
									"type": "string",
									"format": "date-time"
								},
								"change": {
									"type": "string"
								},
								"title": {
									"type": "string"
								},
								"bugId": {
									"type": "number",
									"format": "double",
									"nullable": true
								},
								"ticketId": {
									"type": "string"
								}
							},
							"required": [
								"at",
								"change",
								"title",
								"ticketId"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The other tickets the agent updated or handed over, newest last (≤ 100)."
					},
					"affectedCount": {
						"type": "number",
						"format": "double",
						"description": "All of them (the list keeps the newest 100)."
					}
				},
				"required": [
					"agentId",
					"title",
					"origin"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewKaiCodeSessionStatus": {
				"type": "string",
				"enum": [
					"working",
					"question",
					"review",
					"deploy",
					"live",
					"done",
					"failed",
					"stopped"
				],
				"description": "Addition: where one Kai Code session stands.\n - `working`: investigating or coding (spinner).\n - `question`: Kai Code asked something (its card).\n - `review`: a plan or a pull request waits for a review (its card; several queue as \"1 more\").\n - `deploy`: merged, waiting for the deploy / the \"it's live\" message (`deployAt`: the ring's end).\n - `live`: the fix is live (the customer was told, or no message was due).\n - `done`: it finished without a pull request to ship.\n - `failed` / `stopped`: the session failed or a teammate stopped it."
			},
			"AgentViewKaiCodeVerify": {
				"description": "Addition: the runner's verify result (contract with the analyzer, Program B). Rendered only when present.",
				"properties": {
					"status": {
						"type": "string",
						"enum": [
							"passed",
							"failed",
							"skipped",
							"error"
						]
					},
					"ranAt": {
						"type": "string"
					},
					"rounds": {
						"type": "number",
						"format": "double"
					},
					"draft": {
						"type": "boolean"
					},
					"diff": {
						"properties": {
							"deletions": {
								"type": "number",
								"format": "double"
							},
							"additions": {
								"type": "number",
								"format": "double"
							},
							"files": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"deletions",
							"additions",
							"files"
						],
						"type": "object"
					},
					"checks": {
						"items": {
							"properties": {
								"outputTail": {
									"type": "string"
								},
								"summary": {
									"type": "string"
								},
								"durationMs": {
									"type": "number",
									"format": "double"
								},
								"status": {
									"type": "string",
									"enum": [
										"passed",
										"failed",
										"skipped"
									]
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"status",
								"name"
							],
							"type": "object"
						},
						"type": "array"
					},
					"screens": {
						"items": {
							"properties": {
								"error": {
									"type": "string"
								},
								"afterUrl": {
									"type": "string"
								},
								"beforeUrl": {
									"type": "string"
								},
								"caption": {
									"type": "string"
								},
								"path": {
									"type": "string"
								}
							},
							"required": [
								"path"
							],
							"type": "object"
						},
						"type": "array"
					},
					"shares": {
						"items": {
							"properties": {
								"beforeUrl": {
									"type": "string"
								},
								"caption": {
									"type": "string"
								},
								"url": {
									"type": "string"
								}
							},
							"required": [
								"url"
							],
							"type": "object"
						},
						"type": "array"
					},
					"ticketScreenshotUrl": {
						"type": "string"
					},
					"previewUrl": {
						"type": "string"
					},
					"setup": {
						"properties": {
							"message": {
								"type": "string"
							},
							"step": {
								"type": "string"
							},
							"status": {
								"type": "string",
								"enum": [
									"ready",
									"failed",
									"needs_secret"
								]
							}
						},
						"required": [
							"status"
						],
						"type": "object"
					},
					"privacy": {
						"properties": {
							"database": {
								"properties": {
									"error": {
										"type": "string"
									},
									"truncated": {
										"type": "boolean"
									},
									"hashes": {
										"type": "number",
										"format": "double"
									},
									"status": {
										"type": "string",
										"enum": [
											"checked",
											"unavailable"
										]
									}
								},
								"required": [
									"status"
								],
								"type": "object"
							},
							"found": {
								"items": {
									"properties": {
										"line": {
											"type": "number",
											"format": "double"
										},
										"file": {
											"type": "string"
										},
										"masked": {
											"type": "string"
										},
										"kind": {
											"type": "string",
											"enum": [
												"email",
												"phone",
												"database"
											]
										},
										"repo": {
											"type": "string"
										}
									},
									"required": [
										"masked",
										"kind",
										"repo"
									],
									"type": "object"
								},
								"type": "array"
							},
							"status": {
								"type": "string",
								"enum": [
									"clean",
									"found"
								]
							}
						},
						"required": [
							"found",
							"status"
						],
						"type": "object",
						"description": "Addition (kai-db-access): what the change copies into the repository: the ticket's personal\ndata (masked) and values from the team's own database (`kind: 'database'`, always `•••`, with the line),\nand whether database values were checked. A finding keeps the PR a draft."
					}
				},
				"required": [
					"status",
					"ranAt",
					"rounds",
					"draft",
					"checks",
					"screens",
					"shares"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FixStatusValue": {
				"type": "string",
				"enum": [
					"queued",
					"failed",
					"completed",
					"working",
					"needs_input",
					"cancelled"
				]
			},
			"FixStep": {
				"type": "string",
				"enum": [
					"investigating",
					"reproduced",
					"fixing"
				]
			},
			"FixQuestionKind": {
				"type": "string",
				"enum": [
					"question",
					"auth",
					"choice",
					"approval"
				]
			},
			"FixAudience": {
				"type": "string",
				"enum": [
					"team",
					"customer"
				]
			},
			"FixQuestion": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/FixQuestionKind"
					},
					"prompt": {
						"type": "string"
					},
					"options": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"audience": {
						"$ref": "#/components/schemas/FixAudience"
					}
				},
				"required": [
					"kind",
					"prompt",
					"audience"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FixAgentKind": {
				"type": "string",
				"enum": [
					"cursor",
					"other",
					"codex",
					"kai_code",
					"claude_code"
				]
			},
			"FixRuntime": {
				"type": "string",
				"enum": [
					"cloud",
					"bridge",
					"external"
				]
			},
			"FixAgent": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/FixAgentKind"
					},
					"name": {
						"type": "string"
					},
					"device": {
						"type": "string",
						"nullable": true
					},
					"runtime": {
						"$ref": "#/components/schemas/FixRuntime"
					}
				},
				"required": [
					"kind",
					"name",
					"runtime"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FixJourney": {
				"type": "string",
				"enum": [
					"live",
					"stopped",
					"checking",
					"in_review",
					"shipping",
					"stuck"
				]
			},
			"FixStatus": {
				"description": "The contract shape (SPEC), as every reader gets it.",
				"properties": {
					"status": {
						"$ref": "#/components/schemas/FixStatusValue"
					},
					"step": {
						"allOf": [
							{
								"$ref": "#/components/schemas/FixStep"
							}
						],
						"nullable": true
					},
					"now": {
						"type": "string",
						"nullable": true
					},
					"customerLine": {
						"type": "string",
						"nullable": true
					},
					"question": {
						"allOf": [
							{
								"$ref": "#/components/schemas/FixQuestion"
							}
						],
						"nullable": true
					},
					"agent": {
						"$ref": "#/components/schemas/FixAgent"
					},
					"journey": {
						"allOf": [
							{
								"$ref": "#/components/schemas/FixJourney"
							}
						],
						"nullable": true,
						"description": "Gleap-owned, once a pull request exists ('stuck' also after two failed runs without one)."
					},
					"blocker": {
						"allOf": [
							{
								"$ref": "#/components/schemas/FixBlocker"
							}
						],
						"nullable": true,
						"description": "Gleap-owned (Kai Code PR upkeep): what blocks the open pull request's merge, or null. While Kai Code\nfixes it the status is working again, `now` says what it does (\"Resolving a merge conflict with main\") and\nthe journey stays in_review."
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time",
						"description": "The agent's last report."
					}
				},
				"required": [
					"status",
					"step",
					"now",
					"customerLine",
					"question",
					"agent",
					"journey",
					"blocker",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentViewKaiCodeSession": {
				"description": "Addition: one Kai Code session of the ticket, a work item, not the holder of\nthe customer conversation (the \"Handled by\" bar keeps its one holder). Team-visible sessions\nonly (a private session is its creator's).",
				"properties": {
					"id": {
						"type": "string",
						"description": "The CloudCodingSession `_id`."
					},
					"area": {
						"type": "string",
						"description": "The repository's short name (\"shop-web\"), several joined with \" + \", else the session's title."
					},
					"title": {
						"type": "string"
					},
					"step": {
						"type": "number",
						"format": "double",
						"description": "Index into KAI_CODE_SESSION_STEPS of the current step; 4 once live."
					},
					"status": {
						"$ref": "#/components/schemas/AgentViewKaiCodeSessionStatus"
					},
					"text": {
						"type": "string",
						"description": "One line, no agent name: \"Coding the fix\", \"PR waits for your review\", \"1 of 2 PRs merged\", \"Merged · waiting for the deploy\"."
					},
					"prNumber": {
						"type": "number",
						"format": "double"
					},
					"prUrl": {
						"type": "string"
					},
					"deployFrom": {
						"type": "string",
						"format": "date-time",
						"description": "`deploy` with a known send time: the countdown ring fills from `deployFrom` to `deployAt`."
					},
					"deployAt": {
						"type": "string",
						"format": "date-time"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"startedAt": {
						"type": "string",
						"format": "date-time",
						"description": "When the run started (the work card's elapsed time)."
					},
					"narration": {
						"type": "string",
						"description": "Kai Code's latest own progress sentence at the last refresh (live: `cloudsession.progress` `progressNarration`)."
					},
					"pullRequests": {
						"items": {
							"$ref": "#/components/schemas/AgentViewPullRequest"
						},
						"type": "array",
						"description": "Addition: every pull request of the session (no errored ones), oldest first, ≤ 10."
					},
					"liveMessage": {
						"properties": {
							"sentAt": {
								"type": "string",
								"format": "date-time"
							},
							"sendAt": {
								"type": "string",
								"format": "date-time"
							},
							"status": {
								"type": "string",
								"enum": [
									"scheduled",
									"waiting_deploy",
									"waiting_confirm",
									"sent",
									"cancelled"
								]
							},
							"text": {
								"type": "string"
							}
						},
						"required": [
							"status",
							"text"
						],
						"type": "object",
						"description": "Addition: the \"it's live\" customer message while it is pending or just sent."
					},
					"changedFiles": {
						"type": "number",
						"format": "double",
						"description": "Addition (Kai Copilot's work card): files the session's open or merged pull requests change."
					},
					"checks": {
						"type": "string",
						"enum": [
							"pass",
							"failing",
							"running"
						],
						"description": "Addition: GitHub's checks on the newest open pull request, when known."
					},
					"verdict": {
						"properties": {
							"customerReply": {
								"type": "string"
							},
							"explanation": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"not_a_bug"
								],
								"nullable": false
							}
						},
						"required": [
							"explanation",
							"kind"
						],
						"type": "object",
						"description": "Addition: Kai Code found no code bug (`VERDICT: NOT_A_BUG`): why, and the answer for the customer."
					},
					"told": {
						"properties": {
							"buildAnywayUntil": {
								"type": "string",
								"format": "date-time"
							},
							"message": {
								"type": "string"
							},
							"summary": {
								"type": "string"
							},
							"verdict": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"premise",
									"reply"
								]
							},
							"at": {
								"type": "string",
								"format": "date-time"
							}
						},
						"required": [
							"buildAnywayUntil",
							"kind",
							"at"
						],
						"type": "object",
						"description": "Addition: Kai Code's verdict went to the customer without a click\n(kaiCodeVerdictTell): when, what was found, the sent text when Kai Code drafted it, and until when\n\"Build it anyway\" is offered. The pane's \"Sent to <name> · time\"."
					},
					"summary": {
						"type": "string",
						"description": "Addition: one line on what changed and why (the turn's wrap-up recap), for the PR card."
					},
					"diff": {
						"properties": {
							"deletions": {
								"type": "number",
								"format": "double"
							},
							"additions": {
								"type": "number",
								"format": "double"
							},
							"files": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"deletions",
							"additions",
							"files"
						],
						"type": "object",
						"description": "Addition: the open (else merged) pull requests' size, summed."
					},
					"draft": {
						"type": "boolean",
						"description": "Addition: a pull request of the session is a draft (red checks after the fix rounds)."
					},
					"whenLiveDraft": {
						"type": "string",
						"description": "Addition: the \"it's live\" text before the merge (editable on the PR card), when Kai Code wrote one."
					},
					"verify": {
						"$ref": "#/components/schemas/AgentViewKaiCodeVerify",
						"description": "Addition: Kai Code's own check run (Program B fills `session.verify`; absent until then)."
					},
					"fixStatus": {
						"$ref": "#/components/schemas/FixStatus",
						"description": "Addition: the one fix status of this session, the same for Kai Code\nin the cloud, on Kai Bridge and an app the ticket was handed to (gleapcode fixStatus.logic `FixStatus`).\nAbsent for a session that never started."
					},
					"quiet": {
						"type": "boolean",
						"description": "Addition: queued or working outside the cloud with no agent report for 30 minutes (derived, never stored;\nalways set on rows)."
					},
					"startedBy": {
						"properties": {
							"name": {
								"type": "string"
							},
							"userId": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"kai_support",
									"person"
								]
							}
						},
						"required": [
							"kind"
						],
						"type": "object",
						"description": "Addition: who started the fix. `kai_support`: its auto start or its own tools;\n`person`: who started it (`name` \"First Last\" when known). Absent when unknown."
					}
				},
				"required": [
					"id",
					"area",
					"title",
					"step",
					"status",
					"text",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentView": {
				"properties": {
					"handledBy": {
						"$ref": "#/components/schemas/AgentViewHandledBy",
						"description": "Addition: the \"Handled by\" bar."
					},
					"suggestions": {
						"items": {
							"$ref": "#/components/schemas/AgentViewSuggestion"
						},
						"type": "array",
						"description": "Addition: 1–3 suggested next steps (chips above the agents composer).\nAbsent while a card is open, an agent works, the ticket is closed, or nothing fits.\nThe holder's chips go when the customer writes, a teammate replies or acts (episode),\na card is answered, or the holder changes."
					},
					"handOverUndo": {
						"$ref": "#/components/schemas/AgentViewHandOverUndo",
						"description": "Addition: the hand-over Undo window."
					},
					"suggest": {
						"$ref": "#/components/schemas/AgentViewSuggest",
						"description": "Addition: the last \"Suggest a reply\" on this ticket, while it runs and how it ended."
					},
					"version": {
						"type": "number",
						"format": "double",
						"description": "Monotonic, `$inc` on every recompute. Clients ignore any view older than the one they hold."
					},
					"episode": {
						"type": "number",
						"format": "double"
					},
					"ball": {
						"$ref": "#/components/schemas/AgentViewBall"
					},
					"status": {
						"$ref": "#/components/schemas/AgentViewStatus"
					},
					"statusText": {
						"type": "string",
						"description": "e.g. \"Waiting for deploy · 23 min\"."
					},
					"statusUntil": {
						"type": "string",
						"format": "date-time",
						"description": "Addition: when `statusText` counts down to (\"Waiting for deploy\"): the\n\"it's live\" message's send time. Clients render the minutes from it; the stored view\nis not rewritten as they pass, so its `statusText` minutes may be stale."
					},
					"cast": {
						"items": {
							"$ref": "#/components/schemas/AgentViewCastEntry"
						},
						"type": "array"
					},
					"card": {
						"allOf": [
							{
								"$ref": "#/components/schemas/AgentViewCard"
							}
						],
						"nullable": true
					},
					"pending": {
						"items": {
							"$ref": "#/components/schemas/AgentViewPendingInput"
						},
						"type": "array",
						"description": "Addition: queued steer messages (see AgentViewPendingInput)."
					},
					"moreCards": {
						"type": "number",
						"format": "double",
						"description": "Addition: how many other cards wait behind `card` (\"+2 more\"); same as `card.queued`."
					},
					"otherCards": {
						"items": {
							"$ref": "#/components/schemas/AgentViewCard"
						},
						"type": "array",
						"description": "Addition: those waiting cards, in the order they would show (≤ 5). PLAN-V2: clients don't show them."
					},
					"live": {
						"$ref": "#/components/schemas/AgentViewLive",
						"description": "Addition (PLAN-V2): present while an agent run is active (the live row; no status header)."
					},
					"onIt": {
						"$ref": "#/components/schemas/AgentViewOnIt",
						"description": "Addition (PLAN-V2): present while a teammate is on the ticket (the on-it strip)."
					},
					"assignedAgent": {
						"$ref": "#/components/schemas/AgentViewAssignedAgent",
						"description": "Addition (auto-assign): the agent shown as the assignee (see AgentViewAssignedAgent)."
					},
					"task": {
						"$ref": "#/components/schemas/AgentViewTask",
						"description": "Addition: present on a back-office task ticket (see AgentViewTask)."
					},
					"kaiCodeSessions": {
						"items": {
							"$ref": "#/components/schemas/AgentViewKaiCodeSession"
						},
						"type": "array",
						"description": "Addition: the ticket's Kai Code sessions while at least one is in progress\n(working, a question, a review, the deploy wait, or failed): in progress first, then the ones\nthat went live or stopped in the last 24 h, newest first, at most 5. Absent otherwise and on\nclosed tickets. Clients: \"Kai Code · 2 fixes in progress\" under the bar (in the bar when Kai\nCode holds), expandable to the sessions with the four-step strip."
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"version",
					"episode",
					"ball",
					"status",
					"cast",
					"card",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotActionConfirmResponse": {
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"done",
							"cancelled"
						]
					},
					"result": {
						"type": "string"
					},
					"agentView": {
						"allOf": [
							{
								"$ref": "#/components/schemas/AgentView"
							}
						],
						"nullable": true
					}
				},
				"required": [
					"state",
					"result",
					"agentView"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotActionConfirmRequest": {
				"description": "Kai Copilot's confirm chip: which prepared action (its chat and stored call), and confirm or cancel.",
				"properties": {
					"conversationId": {
						"type": "string"
					},
					"toolCallId": {
						"type": "string"
					},
					"decision": {
						"type": "string",
						"enum": [
							"confirm",
							"cancel"
						]
					}
				},
				"required": [
					"conversationId",
					"toolCallId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotInstructionUndoResponse": {
				"properties": {
					"state": {
						"type": "string",
						"enum": [
							"cancelled"
						],
						"nullable": false
					},
					"result": {
						"type": "string"
					}
				},
				"required": [
					"state",
					"result"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentInputResult": {
				"type": "string",
				"enum": [
					"queued",
					"started",
					"answered_card",
					"chose_option",
					"declined",
					"asked",
					"handed_over",
					"stopped",
					"taken_over",
					"handed_back",
					"duplicate",
					"undone",
					"confirm_requested",
					"approval_requested",
					"steered_fix"
				]
			},
			"AgentInputResponse": {
				"properties": {
					"result": {
						"$ref": "#/components/schemas/AgentInputResult"
					},
					"queued": {
						"type": "boolean",
						"description": "True when the text waits for the agent's next step (steer)."
					},
					"messageStored": {
						"type": "boolean",
						"description": "The teammate's text is stored in the agent's chat with the request's `clientMutationId`\n(metadata.clientMutationIds), or waits as an `agentView.pending` row until the agent's next\nstep: the sender keeps its optimistic row until that copy shows up, never just on this response."
					},
					"clientMutationId": {
						"type": "string",
						"description": "Echo of the request's `clientMutationId` when `messageStored`."
					},
					"agentId": {
						"type": "string",
						"description": "The agent that received the input."
					},
					"settledCardId": {
						"type": "string",
						"description": "The card this input settled, if any."
					},
					"restoredText": {
						"type": "string",
						"description": "Addition: `undone`: the words the teammate handed over with (back into the composer)."
					},
					"fixNotReached": {
						"type": "string",
						"description": "Addition: the team's instruction reached Kai Support, but not the fix that runs\nfor the ticket. One line for the person, why (the pane shows it)."
					},
					"episode": {
						"type": "number",
						"format": "double",
						"description": "The ticket's episode after the input."
					},
					"agentView": {
						"allOf": [
							{
								"$ref": "#/components/schemas/AgentView"
							}
						],
						"nullable": true,
						"description": "The recomputed view (also pushed over `bug.patch`)."
					}
				},
				"required": [
					"result",
					"episode",
					"agentView"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentInputMode": {
				"type": "string",
				"enum": [
					"send",
					"ask",
					"stop",
					"take_over",
					"hand_back",
					"decline",
					"hand_over",
					"undo_hand_over"
				],
				"description": "- Addition: `send` without `to` (or `to` the driver) while Kai Support drives\n  is steering: the text goes to Kai Support (its investigating depth when no agent holds the ball), the\n  instruction row carries `data.steering: true` + `data.byUserName`, and a fix running for the ticket gets it\n  too (steered into its turn, never a second run).\n- `send` (default): `text` to `to ?? ball holder`. While that agent's run is\n  active the text is queued to its next tool boundary (`{queued:true}`).\n  With no active run it answers the open card in free text (if any), bumps\n  the episode and starts a run. PLAN-V2: `to` ≠ ball holder = ASK (the agent\n  answers in the thread, the ball does not move, result `asked`) unless the\n  text matches the take-this rule (`isTakeThisText`: \"take this\", \"take\n  over\", \"take it\", \"please take this\", \"over to you\", \"you take it\", with\n  an optional leading \"@Name\") or `mode: 'hand_over'`. The default agent\n  (Kai) messaged while a teammate is on the ticket runs as the teammate's\n  helper (drafts, summaries, look-ups; never writes to the customer;\n  \"draft a reply…\" posts a `draft` thread line). Answering a card that was\n  already settled → HTTP 409 `{ code: 'card_settled', byName, at, label }`.\n- `ask`: `to` answers `text` in the background as a folded block; the ball\n  does not move.\n- `stop`: cooperative stop of the working agent; the work is kept.\n- `take_over`: the teammate takes the ball (agents stand down).\n- `hand_back`: the ball goes to `handBackTo` (or the kept agent) with\n  optional `text` as the instruction; a new run starts.\n- `hand_over` + `to` (addition): the teammate messages another\n  agent; it takes the ticket. `brief` (or `text`) is posted in the thread as\n  the teammate's message to that agent; a working holder stops.\n- `decline` + `cardId` (addition): the card's More → Decline. Settles the\n  card as \"Declined by <name>\", bumps the episode and wakes the ball holder\n  with that result (its run reads \"<name> declined: <question>\").\n- `optionId` + `cardId`: runs the option's pending action, settles the card\n  with \"You chose: …\", bumps the episode and wakes the ball holder.\n- `undo_hand_over` + `to`: puts the teammate's last hand-over back (10 s).\n  Addition (one owner): with `undoToken` (the PUT ticket response's\n  `agentTakeBackUndo.token`) it undoes exactly that assignment of a person that\n  took the ticket back from agent `to`: the agent gets the ticket back."
			},
			"AgentInputRequest": {
				"properties": {
					"text": {
						"type": "string"
					},
					"brief": {
						"type": "string",
						"description": "Addition: `hand_over`'s brief, the teammate's words to the new agent (same as `text`)."
					},
					"to": {
						"type": "string",
						"description": "Agent id (or `KAI_CODE_AGENT_ID`). Defaults to the ball holder."
					},
					"undoToken": {
						"type": "string",
						"description": "Addition (one owner): `undo_hand_over`'s token. The assignment response's\n`agentTakeBackUndo.token` undoes exactly that take-back; without a token only a\nteammate's hand-over is undone (never a take-back)."
					},
					"optionId": {
						"type": "string"
					},
					"cardId": {
						"type": "string"
					},
					"mode": {
						"$ref": "#/components/schemas/AgentInputMode"
					},
					"handBackTo": {
						"type": "string"
					},
					"clientMutationId": {
						"type": "string",
						"description": "Addition: client-generated id so a retried send doesn't double-post."
					},
					"attachments": {
						"items": {
							"$ref": "#/components/schemas/AgentInputAttachment"
						},
						"type": "array",
						"description": "Addition: files for the agent (max 10, https URLs on Gleap's upload\nstorage; others are dropped). They go with every mode that delivers words\n(send / steer, ask, hand_over, hand_back, a card answer); files alone,\nwithout `text`, are a complete message."
					},
					"suggestionId": {
						"type": "string",
						"description": "Addition: a suggestion chip was clicked (`agentView.suggestions[].id`).\nThe server sends that suggestion's instruction to its agent (the holder, else Kai\nCopilot) as if the teammate had typed it; `text`, `to` and `mode` are ignored. 409\n`{ code: 'suggestion_gone' }` when it no longer shows; 403 \"An admin or manager can\napprove this.\" when its action needs a permission the teammate lacks. `close` /\n`send_draft` chips are the dashboard's own Close / Send and are refused here (409)."
					},
					"customerMessage": {
						"type": "string",
						"description": "Addition (Tasks): with `optionId` on a card's recommended option, the\ncustomer message the teammate approved (Kai's `card.customerMessage`, maybe edited).\nThe server sends exactly this; another option sends nothing.\nAsk replies: also with any option that carries its own `customerMessage`. On an\nagent's question (a quick answer) the agent sends it after doing what the answer asks, through\nits normal reply path."
					},
					"remember": {
						"type": "boolean",
						"description": "Addition (Tasks): the teammate ticked the card's `rememberAs` (\"next time, without asking\")."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ActionMode": {
				"type": "string",
				"enum": [
					"off",
					"auto",
					"ask"
				],
				"description": "- `off`: never suggested, never run.\n- `ask`: Kai prepares it on the card; a teammate's click runs it\n  (billing writes in Kai's chat keep their customer confirm card).\n- `auto`: Kai runs it by itself and writes a \"ran\" line (billing writes:\n  through the customer's confirm card; money moves only inside the limits)."
			},
			"Record_customer-or-team-or-own.allow-or-ask-or-never_": {
				"properties": {
					"team": {
						"type": "string",
						"enum": [
							"ask",
							"allow",
							"never"
						]
					},
					"own": {
						"type": "string",
						"enum": [
							"ask",
							"allow",
							"never"
						]
					},
					"customer": {
						"type": "string",
						"enum": [
							"ask",
							"allow",
							"never"
						]
					}
				},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"ActionStatsView": {
				"properties": {
					"suggested": {
						"type": "number",
						"format": "double"
					},
					"accepted": {
						"type": "number",
						"format": "double"
					},
					"skipped": {
						"type": "number",
						"format": "double"
					},
					"autoRuns": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"suggested",
					"accepted",
					"skipped",
					"autoRuns"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ActionSource": {
				"type": "string",
				"enum": [
					"gleap",
					"billing",
					"commerce",
					"agent_tool",
					"quick_action"
				]
			},
			"ActionAccess": {
				"type": "string",
				"enum": [
					"read",
					"write"
				]
			},
			"ActionSettingsRow": {
				"description": "Settings → Kai → Actions: one row per catalog entry.",
				"properties": {
					"key": {
						"type": "string",
						"description": "Stable key, also the settings key:\n- `gleap:<action>`, `billing:<action>`, `commerce:<action>`;\n- `tool:<connectionId>:<toolName>` when the tool belongs to a Connection\n  (Connectors), so phase-2 credential moves keep the key, else\n  `tool:agenttool_<agentToolId>:<toolName>`;\n- `quick:<agentId>:<index>` for saved prompts."
					},
					"source": {
						"$ref": "#/components/schemas/ActionSource"
					},
					"access": {
						"$ref": "#/components/schemas/ActionAccess"
					},
					"label": {
						"type": "string",
						"description": "Short label for the settings row and the card option (\"Refund\", \"Create Linear issue\")."
					},
					"description": {
						"type": "string",
						"description": "What it does, one line (tool description, trimmed)."
					},
					"via": {
						"type": "string",
						"description": "\"Stripe\", \"Shopify\", \"Linear\", \"Gleap\": shown as \"via …\" on the card."
					},
					"connectionId": {
						"type": "string",
						"description": "The Connection (Connectors) it runs through, when one is known."
					},
					"connector": {
						"type": "string",
						"description": "Connector catalog key of that connection (stripe, shopify, linear, …)."
					},
					"agentToolId": {
						"type": "string",
						"description": "Agent tools: the AgentTool doc and the tool name inside it."
					},
					"toolName": {
						"type": "string"
					},
					"toolType": {
						"type": "string"
					},
					"agentIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Agents that carry it (\"Used by\")."
					},
					"money": {
						"type": "boolean",
						"description": "Moves money (refunds, credits, charges): Auto needs a limit and a known amount."
					},
					"defaultMode": {
						"$ref": "#/components/schemas/ActionMode",
						"description": "Mode when the project never set one."
					},
					"keptAsBefore": {
						"type": "boolean",
						"description": "Agent tools: the tool doc existed before tool access shipped, so its\ndefaults keep its old behaviour (keptAsBefore.logic: Customer & team,\nany customer, API / action changes Automatic)."
					},
					"kind": {
						"type": "string",
						"enum": [
							"public_read",
							"customer_read",
							"internal_read",
							"internal_write",
							"customer_write",
							"money",
							"admin"
						],
						"description": "Tool permissions in Connectors (PLAN tool-permissions-connectors): what kind of\ntool it is (toolKind.logic: public_read, customer_read, internal_read, internal_write,\ncustomer_write, money, admin), which gives its smart defaults."
					},
					"kindReason": {
						"type": "string",
						"description": "The reason line under the tool (\"Public information\", \"Sends emails\", \"Deletes data\")."
					},
					"permissionsVersion": {
						"type": "number",
						"format": "double",
						"description": "Agent tools: `2` = the doc was set up in Connectors, its tools nobody saved take their kind's values."
					},
					"permissionsPending": {
						"type": "boolean",
						"description": "Agent tools: the doc's permission table was never saved; it is bound to no agent until it is."
					},
					"provider": {
						"type": "string",
						"description": "Billing / commerce: the provider and integration entry it belongs to."
					},
					"integrationId": {
						"type": "string"
					},
					"prompt": {
						"type": "string",
						"description": "Saved prompts: the prompt text."
					},
					"mode": {
						"$ref": "#/components/schemas/ActionMode"
					},
					"notChosen": {
						"type": "boolean",
						"description": "A billing change no admin chose: off for Kai until someone picks a word."
					},
					"allowedModes": {
						"items": {
							"$ref": "#/components/schemas/ActionMode"
						},
						"type": "array",
						"description": "Modes this action may take (a read is never `ask`; money without a limit is never `auto`)."
					},
					"autoLimit": {
						"properties": {
							"currency": {
								"type": "string"
							},
							"maxAmount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"maxAmount"
						],
						"type": "object",
						"description": "Money actions: the Auto limit in minor units (\"Automatic up to €50\")."
					},
					"maxAmount": {
						"properties": {
							"currency": {
								"type": "string"
							},
							"maxAmount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"maxAmount"
						],
						"type": "object",
						"description": "PLAN-V2, money actions: the ceiling in minor units (\"never above €500\").\nAbove it no agent acts (not even by asking for an approval); it hands the\nticket to the team with the reason. Same shape as `autoLimit`."
					},
					"requiresVerifiedCustomer": {
						"type": "boolean",
						"description": "PLAN-V2, write skills: the customer must be verified for the customer to confirm it (billing and shop changes)."
					},
					"channelNote": {
						"type": "string",
						"description": "PLAN-V2, write skills that act for the customer: the line under the switch. Empty for the rest."
					},
					"audience": {
						"type": "string",
						"enum": [
							"customer",
							"team"
						],
						"description": "Tool access (agent-permissions PLAN part 2): who can see the result\n(`customer` = Customer & team, `team` = Team only) and whether it needs a\nverified customer, as the project set them or the defaults."
					},
					"verify": {
						"type": "boolean"
					},
					"situations": {
						"$ref": "#/components/schemas/Record_customer-or-team-or-own.allow-or-ask-or-never_",
						"description": "PLAN F: allow · ask · never per situation (`customer` When a customer asks, `team` When your\nteam asks, `own` On its own), as saved or derived from `mode` / `audience`. Choices come from\n`allowedModes` (off = never, ask = ask, auto = allow)."
					},
					"okFrom": {
						"type": "string",
						"description": "Needs you: the board (a ticket type key) whose people OK this write when a\ncustomer's conversation needs it: `situations.customer: 'ask'` reads \"Needs OK from <board>\", and a\nmoney action above its limit asks that board too. Absent: routed as before (the ticket's owner or team)."
					},
					"defaultAudience": {
						"type": "string",
						"enum": [
							"customer",
							"team"
						],
						"description": "The defaults from the classification (\"Default: Team only\")."
					},
					"defaultVerify": {
						"type": "boolean"
					},
					"verifyLocked": {
						"type": "boolean",
						"description": "Billing and shop check the customer themselves: \"verified\" is always On."
					},
					"keptSettings": {
						"items": {
							"type": "string",
							"enum": [
								"mode",
								"audience",
								"verify"
							]
						},
						"type": "array",
						"description": "The settings that still come from before tool access shipped (the tool\nexisted then and the project never set them): \"Kept as before. Review\nthis setting\", and the \"Needs review\" filter. Absent when none."
					},
					"isNew": {
						"type": "boolean",
						"description": "A tool that appeared on a set-up app (its MCP server added it) and has no saved values\nyet: shown with its kind's values and \"New\" until the table is saved (\"Looks good\")."
					},
					"stats": {
						"$ref": "#/components/schemas/ActionStatsView"
					}
				},
				"required": [
					"key",
					"source",
					"access",
					"label",
					"via",
					"agentIds",
					"money",
					"defaultMode",
					"mode",
					"allowedModes",
					"audience",
					"verify",
					"situations",
					"defaultAudience",
					"defaultVerify",
					"stats"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ActionSettingsGroup": {
				"description": "One group per connection (Connectors), plus \"Gleap\" and \"Saved prompts\".",
				"properties": {
					"key": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"connectionId": {
						"type": "string"
					},
					"connector": {
						"type": "string"
					},
					"agentToolIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The agent tool docs whose tools are in this group (Connectors › app, the setup endpoints)."
					},
					"permissionsPending": {
						"type": "boolean",
						"description": "One of those docs never had its permissions saved: \"Set permissions\", bound to no agent."
					},
					"actions": {
						"items": {
							"$ref": "#/components/schemas/ActionSettingsRow"
						},
						"type": "array"
					}
				},
				"required": [
					"key",
					"label",
					"agentToolIds",
					"permissionsPending",
					"actions"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ActionSettingsView": {
				"properties": {
					"groups": {
						"items": {
							"$ref": "#/components/schemas/ActionSettingsGroup"
						},
						"type": "array"
					},
					"autonomy": {
						"properties": {
							"minAcceptRate": {
								"type": "number",
								"format": "double"
							},
							"minSuggestions": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"minAcceptRate",
							"minSuggestions"
						],
						"type": "object",
						"description": "Earned autonomy thresholds, for the copy (\"after 20 suggestions with 90% accepted\")."
					}
				},
				"required": [
					"groups",
					"autonomy"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiActionSettingBody": {
				"description": "Body of `PUT /kai/actions`: one action's mode and, for money actions, its Auto limit.",
				"properties": {
					"key": {
						"type": "string",
						"description": "Catalog key (`gleap:add_tags`, `billing:refund`, `tool:<connectionId>:<tool>`, `quick:<agentId>:<index>`)."
					},
					"mode": {
						"type": "string",
						"description": "`off` | `ask` | `auto`"
					},
					"autoLimit": {
						"properties": {
							"currency": {
								"type": "string"
							},
							"maxAmount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"maxAmount"
						],
						"type": "object",
						"nullable": true,
						"description": "Money actions only: `{ maxAmount }` in minor units (≤ 100000), optional ISO `currency`; `null` removes it."
					},
					"maxAmount": {
						"properties": {
							"currency": {
								"type": "string"
							},
							"maxAmount": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"maxAmount"
						],
						"type": "object",
						"nullable": true,
						"description": "PLAN-V2, money actions only: the ceiling `{ maxAmount }` in minor units (≤ 10000000), optional ISO\n`currency`; above it no agent acts and the ticket goes to the team with the reason. `null` removes it.\nMust not be below `autoLimit`."
					},
					"audience": {
						"type": "string",
						"nullable": true,
						"description": "Tool access: who can see the result, `customer` (Customer & team) or `team` (Team only); `null` resets it to the default."
					},
					"verify": {
						"type": "boolean",
						"nullable": true,
						"description": "Tool access: the tool needs a verified customer; `null` resets it to the default. Billing and shop are always On."
					},
					"situations": {
						"properties": {
							"own": {
								"type": "string"
							},
							"team": {
								"type": "string"
							},
							"customer": {
								"type": "string"
							}
						},
						"type": "object",
						"nullable": true,
						"description": "Tool access F: `{ customer?, team?, own? }`, each `allow` | `ask` | `never` (When a customer asks,\nWhen your team asks, On its own). Wins over `mode` / `audience` and keeps them in sync; `null` drops them."
					},
					"okFrom": {
						"type": "string",
						"nullable": true,
						"description": "Needs you: the board (a ticket type key of the project) whose people OK this write when a\ncustomer's conversation needs it (customer Ask first, or a money action above its limit); `null` removes it."
					}
				},
				"required": [
					"key"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ToolSetupView": {
				"description": "`GET /kai/actions/apps/{agentToolId}/setup` and the answer of the save.",
				"properties": {
					"agentToolId": {
						"type": "string"
					},
					"name": {
						"type": "string",
						"description": "The app's name (\"Slack\", or the tool doc's own name)."
					},
					"connector": {
						"type": "string",
						"description": "Connector catalog key (slack, hubspot, …) when a Connection owns the doc."
					},
					"connectionId": {
						"type": "string"
					},
					"pending": {
						"type": "boolean",
						"description": "The table was never saved: the doc is bound to no agent until it is."
					},
					"rows": {
						"items": {
							"$ref": "#/components/schemas/ActionSettingsRow"
						},
						"type": "array"
					}
				},
				"required": [
					"agentToolId",
					"name",
					"pending",
					"rows"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiAppPermissionsBody": {
				"description": "Body of `PUT /kai/actions/apps/{agentToolId}/permissions` (design-handoffs/tool-permissions-connectors\nPLAN.md): the app's permission table, one row per tool. `customer`: Everyone / Identified users\n(`allow`, with `verify`) or Pass on (`never`); `team`: Allow · Ask first · Not allowed. Values a tool\ncan't take are clamped (look-ups never ask; money runs by itself only with a limit).",
				"properties": {
					"settings": {
						"items": {
							"properties": {
								"okFrom": {
									"type": "string",
									"nullable": true,
									"description": "Needs you: the board (a ticket type key of the project) whose people OK this write; `null` removes it."
								},
								"verify": {
									"type": "boolean",
									"description": "Customers allowed: identified users only (`true`) or everyone (`false`)."
								},
								"situations": {
									"properties": {
										"team": {
											"type": "string",
											"enum": [
												"allow",
												"ask",
												"never"
											]
										},
										"customer": {
											"type": "string",
											"enum": [
												"allow",
												"ask",
												"never"
											]
										}
									},
									"required": [
										"team",
										"customer"
									],
									"type": "object",
									"description": "`customer: 'ask'`: \"Needs OK from <board>\" (Needs you), only with an `okFrom` board (sent or stored)."
								},
								"key": {
									"type": "string",
									"description": "Catalog key of one of this app's tools (`tool:<connectionId>:<tool>`, `tool:agenttool_<id>:<tool>`)."
								}
							},
							"required": [
								"situations",
								"key"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"settings"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateAgentTaskResponse": {
				"properties": {
					"ticketId": {
						"type": "string"
					},
					"bugId": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"agentId": {
						"type": "string"
					}
				},
				"required": [
					"ticketId",
					"bugId",
					"agentId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateAgentTaskBody": {
				"properties": {
					"title": {
						"type": "string"
					},
					"instructions": {
						"type": "string"
					},
					"agentId": {
						"type": "string"
					},
					"dueAt": {
						"type": "string",
						"nullable": true,
						"description": "ISO date; optional."
					}
				},
				"required": [
					"title",
					"agentId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TaskRunRow": {
				"properties": {
					"outcome": {
						"type": "string",
						"description": "`done` | `failed` | `blocked` | `missed` | `running`"
					},
					"at": {
						"type": "string",
						"format": "date-time"
					},
					"text": {
						"type": "string"
					},
					"ticketId": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"outcome",
					"at",
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentTaskRunsResponse": {
				"properties": {
					"rows": {
						"items": {
							"$ref": "#/components/schemas/TaskRunRow"
						},
						"type": "array"
					},
					"agentId": {
						"type": "string"
					},
					"triggerId": {
						"type": "string",
						"nullable": true
					},
					"nextRunAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true,
						"description": "The schedule's next run."
					}
				},
				"required": [
					"rows",
					"agentId",
					"triggerId",
					"nextRunAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateBusinessTypeDto": {
				"properties": {
					"businessType": {
						"type": "string",
						"description": "The business the workspace runs: 'saas', 'ecommerce' or 'services'."
					},
					"source": {
						"type": "string",
						"description": "How it was chosen: 'picked' (default), 'scan_confirmed', 'scan_suggested', 'not_sure' or 'shopify_app_store'."
					}
				},
				"required": [
					"businessType"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SandboxEnvVarView": {
				"properties": {
					"name": {
						"type": "string"
					},
					"updatedAt": {
						"type": "string"
					}
				},
				"required": [
					"name",
					"updatedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiCodeMemoryView": {
				"properties": {
					"files": {
						"items": {
							"properties": {
								"updatedAt": {
									"type": "string"
								},
								"content": {
									"type": "string"
								},
								"path": {
									"type": "string"
								}
							},
							"required": [
								"updatedAt",
								"content",
								"path"
							],
							"type": "object"
						},
						"type": "array"
					},
					"totalBytes": {
						"type": "number",
						"format": "double"
					},
					"limitBytes": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"files",
					"totalBytes",
					"limitBytes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PreviewStatus": {
				"type": "string",
				"enum": [
					"none",
					"crawling",
					"ready",
					"failed"
				]
			},
			"PreviewProduct": {
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"url": {
						"type": "string"
					},
					"imageUrl": {
						"type": "string",
						"nullable": true
					},
					"price": {
						"type": "string",
						"nullable": true
					},
					"currency": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"id",
					"title",
					"url",
					"imageUrl",
					"price",
					"currency"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OnboardingPreviewResponse": {
				"properties": {
					"status": {
						"$ref": "#/components/schemas/PreviewStatus"
					},
					"domain": {
						"type": "string",
						"nullable": true
					},
					"pagesIndexed": {
						"type": "number",
						"format": "double"
					},
					"pagesTarget": {
						"type": "number",
						"format": "double"
					},
					"suggestedQuestions": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"catalog": {
						"properties": {
							"products": {
								"items": {
									"$ref": "#/components/schemas/PreviewProduct"
								},
								"type": "array"
							},
							"platform": {
								"type": "string",
								"enum": [
									"shopify",
									"woocommerce"
								]
							}
						},
						"required": [
							"products",
							"platform"
						],
						"type": "object",
						"nullable": true
					},
					"bookingLink": {
						"properties": {
							"url": {
								"type": "string"
							},
							"provider": {
								"type": "string"
							}
						},
						"required": [
							"url",
							"provider"
						],
						"type": "object",
						"nullable": true
					},
					"repliesLeft": {
						"type": "number",
						"format": "double"
					},
					"recentPages": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The pages Kai read last (at most 8, newest last), titled for the reading\nscreen's ticker (\"Reading Pricing…\"); the URL without query string.\nEmpty when nothing is stored yet."
					},
					"reading": {
						"type": "boolean",
						"description": "The crawl still reads pages: a first test answer may wait for it (holdsWeakAutoAnswer)."
					}
				},
				"required": [
					"status",
					"domain",
					"pagesIndexed",
					"pagesTarget",
					"suggestedQuestions",
					"catalog",
					"bookingLink",
					"repliesLeft",
					"recentPages",
					"reading"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OnboardingPreviewAnswer": {
				"properties": {
					"answer": {
						"type": "string"
					},
					"citations": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					},
					"products": {
						"items": {
							"$ref": "#/components/schemas/PreviewProduct"
						},
						"type": "array"
					},
					"handoff": {
						"properties": {
							"url": {
								"type": "string"
							},
							"provider": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"booking"
								],
								"nullable": false
							}
						},
						"required": [
							"url",
							"provider",
							"kind"
						],
						"type": "object",
						"nullable": true
					},
					"repliesLeft": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"answer",
					"citations",
					"products",
					"handoff",
					"repliesLeft"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AskOnboardingPreviewDto": {
				"properties": {
					"question": {
						"type": "string",
						"description": "The customer's question, at most 300 characters."
					},
					"auto": {
						"type": "boolean",
						"description": "The question the preview asks itself on opening: free (counts no reply),\nonce per workspace and only as its first question; otherwise a counted\nquestion like any other."
					}
				},
				"required": [
					"question"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentPlanItemDto": {
				"description": "Bodies of the external agent routes (design-handoffs/kai-native-turns-2026-10-18/CONTRACT.md §7).\nEach `/gleapcode/sessions/{sessionId}/agent-*` route has a\n`/gleapcode/sessions/agent-*` twin that takes `ticketId` instead.\nTSOA strips undeclared fields, so every field the services read is here.",
				"properties": {
					"content": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"description": "`pending | in_progress | completed | cancelled`; `inProgress`, `active`, `canceled`, `done` … are normalised."
					},
					"activeForm": {
						"type": "string"
					}
				},
				"required": [
					"content",
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentPlanByTicketDto": {
				"description": "The `agent-*` twins addressed by ticket.",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AgentPlanItemDto"
						},
						"type": "array"
					},
					"explanation": {
						"type": "string"
					},
					"agentName": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					}
				},
				"required": [
					"items",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentPlanDto": {
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AgentPlanItemDto"
						},
						"type": "array"
					},
					"explanation": {
						"type": "string"
					},
					"agentName": {
						"type": "string"
					}
				},
				"required": [
					"items"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentWrapUpActionDto": {
				"properties": {
					"label": {
						"type": "string"
					},
					"action": {
						"type": "string",
						"enum": [
							"merge_pr",
							"open_pr",
							"review_changes",
							"open_preview"
						]
					},
					"message": {
						"type": "string"
					}
				},
				"required": [
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentWrapUpByTicketDto": {
				"properties": {
					"recap": {
						"type": "string"
					},
					"ask": {
						"type": "string"
					},
					"actions": {
						"items": {
							"$ref": "#/components/schemas/AgentWrapUpActionDto"
						},
						"type": "array"
					},
					"source": {
						"type": "string",
						"enum": [
							"agent",
							"hook"
						]
					},
					"agentName": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					}
				},
				"required": [
					"recap",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentWrapUpDto": {
				"properties": {
					"recap": {
						"type": "string"
					},
					"ask": {
						"type": "string"
					},
					"actions": {
						"items": {
							"$ref": "#/components/schemas/AgentWrapUpActionDto"
						},
						"type": "array"
					},
					"source": {
						"type": "string",
						"enum": [
							"agent",
							"hook"
						]
					},
					"agentName": {
						"type": "string"
					}
				},
				"required": [
					"recap"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentShareFileDto": {
				"properties": {
					"name": {
						"type": "string",
						"description": "The image's path on the agent's machine (the upload command reads it)."
					},
					"mimeType": {
						"type": "string"
					}
				},
				"required": [
					"name"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentShareByTicketDto": {
				"properties": {
					"caption": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"files": {
						"items": {
							"$ref": "#/components/schemas/AgentShareFileDto"
						},
						"type": "array",
						"description": "`[after, before?]`."
					},
					"imageBase64": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Inline images, same order as `files` (≤ 2.2 MB each): the row lands at once."
					},
					"agentName": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					}
				},
				"required": [
					"caption",
					"files",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentShareDto": {
				"properties": {
					"caption": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"files": {
						"items": {
							"$ref": "#/components/schemas/AgentShareFileDto"
						},
						"type": "array",
						"description": "`[after, before?]`."
					},
					"imageBase64": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Inline images, same order as `files` (≤ 2.2 MB each): the row lands at once."
					},
					"agentName": {
						"type": "string"
					}
				},
				"required": [
					"caption",
					"files"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentArtifactByTicketDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"html": {
						"type": "string",
						"description": "≤ 1 MB."
					},
					"description": {
						"type": "string"
					},
					"artifactId": {
						"type": "string"
					},
					"agentName": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"html",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentArtifactDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"html": {
						"type": "string",
						"description": "≤ 1 MB."
					},
					"description": {
						"type": "string"
					},
					"artifactId": {
						"type": "string"
					},
					"agentName": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"html"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentHookPlanDto": {
				"description": "Plugin hooks (`/v3/kai-agent-hooks/*`, hook token).",
				"properties": {
					"items": {
						"items": {
							"$ref": "#/components/schemas/AgentPlanItemDto"
						},
						"type": "array"
					},
					"todos": {
						"items": {
							"$ref": "#/components/schemas/AgentPlanItemDto"
						},
						"type": "array",
						"description": "Claude Code TodoWrite shape."
					},
					"plan": {
						"items": {
							"properties": {
								"status": {
									"type": "string"
								},
								"content": {
									"type": "string"
								},
								"step": {
									"type": "string"
								}
							},
							"type": "object"
						},
						"type": "array",
						"description": "Codex update_plan shape: `{ step, status }`."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AgentHookStopDto": {
				"properties": {
					"lastMessage": {
						"type": "string",
						"description": "The agent's last message (≤ 4000)."
					},
					"harness": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"AgentHookNeedsInputDto": {
				"description": "The agent waits for its operator (Claude Code's Notification hook).",
				"properties": {
					"message": {
						"type": "string",
						"description": "What the app shows its operator, e.g. \"Claude needs your permission to use Bash\" (≤ 500)."
					},
					"kind": {
						"type": "string",
						"description": "The app's notification type: permission_prompt (an approval), idle_prompt, elicitation_dialog, …"
					},
					"harness": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CreateSequenceBody": {
				"properties": {
					"name": {
						"type": "string"
					},
					"template": {
						"type": "string",
						"description": "blank | onboarding | trial | reengage"
					},
					"timezone": {
						"type": "string",
						"description": "IANA timezone of the sending window (business hours), e.g. Europe/Vienna."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateSequenceBody": {
				"properties": {
					"name": {
						"type": "string"
					},
					"enrollment": {},
					"exit": {},
					"sending": {},
					"steps": {
						"items": {},
						"type": "array"
					},
					"goal": {
						"description": "`{ event, withinDays, exitOnGoal }` or null."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SequenceStatusBody": {
				"properties": {
					"status": {
						"type": "string",
						"description": "live | paused | draft"
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PreviewSequenceBody": {
				"properties": {
					"sessionId": {
						"type": "string"
					},
					"email": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SendTestEmailBody": {
				"properties": {
					"emails": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Defaults to the teammate's own address."
					},
					"sessionId": {
						"type": "string",
						"description": "A step Kai writes: the contact Kai writes it for (default: the most recently active contact)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"EnrollContactsBody": {
				"properties": {
					"sessionIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"emails": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Contacts of this project with these addresses."
					},
					"userIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Contacts of this project with these user ids."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"EnrollSegmentBody": {
				"properties": {
					"targetAudience": {
						"type": "string",
						"description": "all | users | guests"
					},
					"conditions": {
						"description": "Audience rules in the outbound format (`{ logicalOperator, conditions }` or a legacy array)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CommentTargetType": {
				"type": "string",
				"enum": [
					"feature-request",
					"changelog"
				]
			},
			"CommentVerificationTargetBody": {
				"properties": {
					"type": {
						"$ref": "#/components/schemas/CommentTargetType"
					},
					"shareToken": {
						"type": "string"
					},
					"changelogId": {
						"type": "string"
					},
					"parentCommentId": {
						"type": "string"
					}
				},
				"required": [
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartCommentVerificationBody": {
				"properties": {
					"email": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"showIdentity": {
						"type": "boolean"
					},
					"comment": {
						"type": "string"
					},
					"target": {
						"$ref": "#/components/schemas/CommentVerificationTargetBody"
					},
					"lang": {
						"type": "string"
					}
				},
				"required": [
					"email",
					"comment",
					"target"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SocialNetworkName": {
				"type": "string",
				"enum": [
					"linkedin",
					"x"
				]
			},
			"SocialDraftRequest": {
				"properties": {
					"network": {
						"$ref": "#/components/schemas/SocialNetworkName",
						"description": "Unset drafts both networks."
					},
					"instruction": {
						"type": "string",
						"description": "With a network: what to change in its draft."
					},
					"current": {
						"type": "string",
						"description": "With a network: the text on screen, which the change starts from."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SocialDraftSaveRequest": {
				"properties": {
					"network": {
						"$ref": "#/components/schemas/SocialNetworkName"
					},
					"text": {
						"type": "string"
					},
					"includeLink": {
						"type": "boolean"
					},
					"images": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "LinkedIn only: image URLs uploaded to our CDN."
					}
				},
				"required": [
					"network"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LinkedInPostRequest": {
				"properties": {
					"text": {
						"type": "string"
					},
					"includeLink": {
						"type": "boolean"
					},
					"images": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Image URLs uploaded to our CDN."
					}
				},
				"required": [
					"text",
					"includeLink"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SocialShareRequest": {
				"properties": {
					"text": {
						"type": "string"
					},
					"includeLink": {
						"type": "boolean"
					}
				},
				"required": [
					"text",
					"includeLink"
				],
				"type": "object",
				"additionalProperties": false
			},
			"XPostUrlRequest": {
				"properties": {
					"postUrl": {
						"type": "string"
					}
				},
				"required": [
					"postUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LinkedInConnectionView": {
				"properties": {
					"endsSoon": {
						"type": "boolean"
					},
					"expiresAt": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"none",
							"active",
							"expired"
						]
					}
				},
				"required": [
					"endsSoon",
					"status"
				],
				"type": "object"
			},
			"TicketSharingAccess": {
				"type": "string",
				"enum": [
					"link",
					"email",
					"sso"
				]
			},
			"CustomerStatus": {
				"description": "A ticket's status as the page shows it.",
				"properties": {
					"key": {
						"type": "string",
						"nullable": true
					},
					"title": {
						"type": "string",
						"nullable": true
					},
					"order": {
						"type": "number",
						"format": "double"
					},
					"closed": {
						"type": "boolean"
					}
				},
				"required": [
					"key",
					"title",
					"order",
					"closed"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReplyBlock": {
				"type": "string",
				"enum": [
					"off",
					"anonymous",
					"not_owner",
					"closed",
					"read_only"
				],
				"description": "Why the viewer can't reply here, or null when they can."
			},
			"AgentNameMode": {
				"type": "string",
				"enum": [
					"name",
					"firstName",
					"hidden"
				]
			},
			"OpenedByMode": {
				"type": "string",
				"enum": [
					"name",
					"nameEmail",
					"hidden"
				]
			},
			"TicketSharingDetail": {
				"description": "What a ticket shows besides its title, status and messages.",
				"properties": {
					"number": {
						"type": "boolean"
					},
					"priority": {
						"type": "boolean"
					},
					"eta": {
						"type": "boolean"
					},
					"assignee": {
						"type": "boolean"
					},
					"botMessages": {
						"type": "boolean"
					},
					"attachments": {
						"type": "boolean"
					},
					"status": {
						"type": "boolean",
						"description": "The ticket's lane; when off, the page says only open or closed."
					},
					"statusHistory": {
						"type": "boolean"
					},
					"agentNames": {
						"$ref": "#/components/schemas/AgentNameMode"
					},
					"openedBy": {
						"$ref": "#/components/schemas/OpenedByMode"
					}
				},
				"required": [
					"number",
					"priority",
					"eta",
					"assignee",
					"botMessages",
					"attachments",
					"status",
					"statusHistory",
					"agentNames",
					"openedBy"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TicketSharingSettings": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "Company and contact links; a ticket's own share link always works."
					},
					"access": {
						"$ref": "#/components/schemas/TicketSharingAccess",
						"description": "Who can open any shared link."
					},
					"replies": {
						"type": "boolean",
						"description": "The ticket's own customer may reply on its page."
					},
					"companyReplies": {
						"type": "boolean",
						"description": "Members of the ticket's company reply too, and join it as CC on their first reply."
					},
					"ssoLoginUrl": {
						"type": "string",
						"description": "The customer's login page for single sign-on."
					},
					"boards": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Ticket type keys a link lists."
					},
					"closedDays": {
						"type": "number",
						"format": "double",
						"description": "How long closed tickets stay listed: 0 never, -1 always, else days."
					},
					"detail": {
						"$ref": "#/components/schemas/TicketSharingDetail"
					}
				},
				"required": [
					"enabled",
					"access",
					"replies",
					"companyReplies",
					"ssoLoginUrl",
					"boards",
					"closedDays",
					"detail"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AvailableFor": {
				"description": "What an available teammate takes: chats (every conversation channel), calls, or both. Unset: chats.",
				"enum": [
					"chats_and_calls",
					"chats",
					"calls"
				],
				"type": "string"
			},
			"CallAgentPause": {
				"description": "Why an agent's calls were paused without them doing it.",
				"enum": [
					"missed_calls"
				],
				"type": "string"
			},
			"CallAgentSettings": {
				"properties": {
					"availableFor": {
						"$ref": "#/components/schemas/AvailableFor"
					},
					"pausedReason": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CallAgentPause"
							}
						],
						"nullable": true
					}
				},
				"required": [
					"availableFor",
					"pausedReason"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneRights": {
				"properties": {
					"canTakeCalls": {
						"type": "boolean"
					},
					"canPlaceCalls": {
						"type": "boolean"
					},
					"placeCallProjects": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The projects with a line whose customers they may call."
					}
				},
				"required": [
					"canTakeCalls",
					"canPlaceCalls",
					"placeCallProjects"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RingingCall": {
				"properties": {
					"projectId": {
						"type": "string"
					},
					"ticketId": {
						"type": "string",
						"nullable": true
					},
					"ticketShareToken": {
						"type": "string",
						"nullable": true,
						"description": "Opens the ticket in the dashboard."
					},
					"from": {
						"type": "string",
						"description": "The caller's number as the carrier reported it (can be withheld or faked)."
					},
					"contactId": {
						"type": "string",
						"nullable": true,
						"description": "The caller's contact: the one their number matched, or the one made for a new number (it has no name)."
					},
					"contactName": {
						"type": "string",
						"nullable": true
					},
					"contactEmail": {
						"type": "string",
						"nullable": true,
						"description": "The contact's email and picture: their avatar looks as it does in the inbox."
					},
					"contactAvatar": {
						"type": "string",
						"nullable": true
					},
					"verified": {
						"type": "boolean",
						"description": "False while caller ID is all we know: the number can be faked."
					},
					"test": {
						"type": "boolean",
						"description": "A team member trying the line from the dashboard."
					},
					"lineName": {
						"type": "string",
						"nullable": true,
						"description": "The phone line the caller called; null for a widget call."
					},
					"summary": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Kai's brief of the call so far, once it is written (phone/phoneCallSummary.ts)."
					},
					"callId": {
						"type": "string"
					},
					"offerId": {
						"type": "string"
					},
					"reason": {
						"type": "string",
						"nullable": true
					},
					"ringMsLeft": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "How long it still rings from when it was sent; null without a ring time."
					},
					"ringingCount": {
						"type": "number",
						"format": "double",
						"description": "How many teammates this offer rings."
					},
					"ringStartedAt": {
						"type": "string",
						"description": "When this offer started ringing."
					},
					"transferredBy": {
						"type": "string",
						"nullable": true,
						"description": "The teammate who transferred the call, for a transferred caller."
					},
					"consultBy": {
						"type": "string",
						"nullable": true,
						"description": "The teammate on the call who wants to talk first, while the caller holds (a consult)."
					}
				},
				"required": [
					"projectId",
					"ticketId",
					"ticketShareToken",
					"from",
					"contactId",
					"contactName",
					"contactEmail",
					"contactAvatar",
					"verified",
					"test",
					"lineName",
					"summary",
					"callId",
					"offerId",
					"reason",
					"ringMsLeft",
					"ringingCount",
					"ringStartedAt",
					"transferredBy",
					"consultBy"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallDirection": {
				"enum": [
					"inbound",
					"outbound"
				],
				"type": "string"
			},
			"ConsultRole": {
				"description": "Whose side of a consult the agent is on.",
				"enum": [
					"asked",
					"consulted"
				],
				"type": "string"
			},
			"ConsultPhase": {
				"enum": [
					"ringing",
					"joining",
					"talking",
					"merged"
				],
				"type": "string"
			},
			"CurrentConsult": {
				"properties": {
					"role": {
						"$ref": "#/components/schemas/ConsultRole"
					},
					"phase": {
						"$ref": "#/components/schemas/ConsultPhase"
					},
					"with": {
						"type": "string",
						"description": "The other teammate (or team, or outside number) of the consult."
					}
				},
				"required": [
					"role",
					"phase",
					"with"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CurrentCall": {
				"properties": {
					"projectId": {
						"type": "string"
					},
					"ticketId": {
						"type": "string",
						"nullable": true
					},
					"ticketShareToken": {
						"type": "string",
						"nullable": true,
						"description": "Opens the ticket in the dashboard."
					},
					"from": {
						"type": "string",
						"description": "The caller's number as the carrier reported it (can be withheld or faked)."
					},
					"contactId": {
						"type": "string",
						"nullable": true,
						"description": "The caller's contact: the one their number matched, or the one made for a new number (it has no name)."
					},
					"contactName": {
						"type": "string",
						"nullable": true
					},
					"contactEmail": {
						"type": "string",
						"nullable": true,
						"description": "The contact's email and picture: their avatar looks as it does in the inbox."
					},
					"contactAvatar": {
						"type": "string",
						"nullable": true
					},
					"verified": {
						"type": "boolean",
						"description": "False while caller ID is all we know: the number can be faked."
					},
					"test": {
						"type": "boolean",
						"description": "A team member trying the line from the dashboard."
					},
					"lineName": {
						"type": "string",
						"nullable": true,
						"description": "The phone line the caller called; null for a widget call."
					},
					"summary": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"nullable": true,
						"description": "Kai's brief of the call so far, once it is written (phone/phoneCallSummary.ts)."
					},
					"callId": {
						"type": "string"
					},
					"legId": {
						"type": "string"
					},
					"state": {
						"type": "string"
					},
					"joinedAt": {
						"type": "string",
						"nullable": true
					},
					"direction": {
						"$ref": "#/components/schemas/CallDirection",
						"description": "Inbound: the customer called the line; outbound: the agent calls the customer."
					},
					"answeredAt": {
						"type": "string",
						"nullable": true,
						"description": "When the agent and the customer were first in the call together: the customer joining an outbound call (null\nwhile their phone rings), the agent joining an inbound one."
					},
					"consult": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CurrentConsult"
							}
						],
						"nullable": true
					},
					"consulted": {
						"type": "boolean",
						"description": "The agent is in the call only because a teammate talks to them about their caller: until the call is passed to\nthem, its end is not theirs to wrap up. Stays true after the consult ended, until their leg leaves."
					}
				},
				"required": [
					"projectId",
					"ticketId",
					"ticketShareToken",
					"from",
					"contactId",
					"contactName",
					"contactEmail",
					"contactAvatar",
					"verified",
					"test",
					"lineName",
					"summary",
					"callId",
					"legId",
					"state",
					"joinedAt",
					"direction",
					"answeredAt",
					"consult",
					"consulted"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AgentCalls": {
				"properties": {
					"agent": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CallAgentSettings"
							},
							{
								"$ref": "#/components/schemas/PhoneRights"
							}
						],
						"description": "`canTakeCalls`: whether they may choose to take calls, `canPlaceCalls`: whether they may call customers; both for\na person whose roles allow it in a project with a phone line."
					},
					"ringing": {
						"items": {
							"$ref": "#/components/schemas/RingingCall"
						},
						"type": "array"
					},
					"current": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CurrentCall"
							}
						],
						"nullable": true
					}
				},
				"required": [
					"agent",
					"ringing",
					"current"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallAgentBody": {
				"properties": {
					"availableFor": {
						"$ref": "#/components/schemas/AvailableFor",
						"description": "What they take while available; the same again ends a pause of their calls."
					}
				},
				"required": [
					"availableFor"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SoftphoneToken": {
				"description": "What the inbox softphone needs to call in.",
				"properties": {
					"token": {
						"type": "string"
					},
					"identity": {
						"type": "string"
					},
					"expiresAt": {
						"type": "string",
						"format": "date-time"
					},
					"edge": {
						"type": "string",
						"description": "Where the softphone connects to the provider (closest to the region)."
					}
				},
				"required": [
					"token",
					"identity",
					"expiresAt",
					"edge"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MobileSoftphoneToken": {
				"properties": {
					"token": {
						"type": "string"
					},
					"identity": {
						"type": "string"
					},
					"expiresAt": {
						"type": "string",
						"format": "date-time"
					},
					"edge": {
						"type": "string",
						"description": "Where the softphone connects to the provider (closest to the region)."
					},
					"accountSid": {
						"type": "string",
						"description": "The Twilio account the token is for; the app registers once per account."
					},
					"pushCredentialSid": {
						"type": "string",
						"nullable": true,
						"description": "Null: the app cannot be rung in this account (no push credential); it can still join calls it answered."
					}
				},
				"required": [
					"token",
					"identity",
					"expiresAt",
					"edge",
					"accountSid",
					"pushCredentialSid"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MobileSoftphoneTokens": {
				"properties": {
					"identity": {
						"type": "string",
						"description": "The same identity as the dashboard softphone: `agent_<userId>`."
					},
					"ringing": {
						"type": "boolean",
						"description": "Whether any token lets the app be rung."
					},
					"tokens": {
						"items": {
							"$ref": "#/components/schemas/MobileSoftphoneToken"
						},
						"type": "array"
					}
				},
				"required": [
					"identity",
					"ringing",
					"tokens"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MobilePlatform": {
				"enum": [
					"ios",
					"android"
				],
				"type": "string"
			},
			"CallDeviceRegistration": {
				"properties": {
					"deviceId": {
						"type": "string"
					},
					"platform": {
						"$ref": "#/components/schemas/MobilePlatform"
					},
					"accountSids": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The accounts it rings for: those given that are the user's own."
					},
					"lastSeenAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"deviceId",
					"platform",
					"accountSids",
					"lastSeenAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RingWhen": {
				"description": "When a phone wants to be rung through a push. Persisted on the device: never rename one, only add.",
				"enum": [
					"office_hours",
					"always",
					"app_open"
				],
				"type": "string"
			},
			"CallDeviceBody": {
				"properties": {
					"platform": {
						"$ref": "#/components/schemas/MobilePlatform"
					},
					"appVersion": {
						"type": "string"
					},
					"deviceId": {
						"type": "string",
						"description": "The app's own id for this install; without one, one phone per platform."
					},
					"accountSids": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The accounts the app registered in (`accountSid` of its tokens); none given: all of the user's."
					},
					"ringWhen": {
						"$ref": "#/components/schemas/RingWhen",
						"description": "When a push may ring this phone; unchanged when not given."
					}
				},
				"required": [
					"platform"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallDeviceStatus": {
				"properties": {
					"reachable": {
						"type": "boolean",
						"description": "The server has this phone as rung by push right now (fresh, in its accounts, its rings get through)."
					},
					"ringWhen": {
						"$ref": "#/components/schemas/RingWhen"
					},
					"undelivered": {
						"type": "number",
						"format": "double",
						"description": "Rings in a row that never reached it."
					},
					"lastSeenAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"lastDeliveredAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"lastFailure": {
						"properties": {
							"at": {
								"type": "string",
								"format": "date-time"
							},
							"code": {
								"type": "string",
								"nullable": true
							},
							"kind": {
								"type": "string"
							}
						},
						"required": [
							"at",
							"code",
							"kind"
						],
						"type": "object",
						"nullable": true
					},
					"lines": {
						"items": {
							"properties": {
								"number": {
									"type": "string",
									"nullable": true
								},
								"workspace": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"number",
								"workspace",
								"name",
								"id"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The lines it rings for: the workspace's name and the line's."
					},
					"pushSetUp": {
						"type": "boolean",
						"description": "Whether a push could ring it at all in these regions: the deployment holds a certificate or key for it."
					},
					"officeHours": {
						"type": "string",
						"nullable": true,
						"description": "The opening hours in a few words (Mon to Fri, 9:00 to 17:00); null when they don't fit one line."
					}
				},
				"required": [
					"reachable",
					"ringWhen",
					"undelivered",
					"lastSeenAt",
					"lastDeliveredAt",
					"lastFailure",
					"lines",
					"pushSetUp",
					"officeHours"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AppCallReportKind": {
				"description": "What the app says about itself, read back in the logs when a phone did not ring.",
				"enum": [
					"registered",
					"register_failed",
					"unregister_failed",
					"push_token_missing",
					"ring_received",
					"call_joined",
					"connect_failed",
					"call_error",
					"preflight"
				],
				"type": "string"
			},
			"AppCallReport": {
				"properties": {
					"deviceId": {
						"type": "string"
					},
					"kind": {
						"$ref": "#/components/schemas/AppCallReportKind"
					},
					"platform": {
						"type": "string"
					},
					"appVersion": {
						"type": "string"
					},
					"code": {
						"type": "string",
						"description": "The SDK's error code, or what a preflight found (its edge)."
					},
					"callId": {
						"type": "string"
					}
				},
				"required": [
					"deviceId",
					"kind"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CustomerEnd": {
				"enum": [
					"busy",
					"declined",
					"no_answer",
					"failed"
				],
				"type": "string"
			},
			"CallEnding": {
				"properties": {
					"ended": {
						"type": "boolean"
					},
					"callerLeft": {
						"type": "boolean",
						"description": "The caller left before anyone answered."
					},
					"answeredBy": {
						"type": "string",
						"nullable": true,
						"description": "Who answered it, when that was another teammate."
					},
					"customerEnd": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CustomerEnd"
							}
						],
						"nullable": true,
						"description": "How the customer of a call the team placed did not get into it."
					},
					"summary": {
						"type": "string",
						"nullable": true,
						"description": "Kai's summary, a few seconds after the end."
					},
					"durationSec": {
						"type": "number",
						"format": "double"
					},
					"kaiMs": {
						"type": "number",
						"format": "double",
						"description": "How long the caller spent with Kai, and with a person."
					},
					"agentMs": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"ended",
					"callerLeft",
					"answeredBy",
					"customerEnd",
					"summary",
					"durationSec",
					"kaiMs",
					"agentMs"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallOutcome": {
				"enum": [
					"handled_by_kai",
					"answered_by_agent",
					"abandoned",
					"callback",
					"failed",
					"forwarded",
					"unanswered"
				],
				"type": "string"
			},
			"RecentCall": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"ticketId": {
						"type": "string"
					},
					"contactId": {
						"type": "string",
						"nullable": true
					},
					"contactName": {
						"type": "string",
						"nullable": true
					},
					"contactEmail": {
						"type": "string",
						"nullable": true
					},
					"contactAvatar": {
						"type": "string",
						"nullable": true
					},
					"from": {
						"type": "string",
						"nullable": true
					},
					"lineName": {
						"type": "string",
						"nullable": true
					},
					"direction": {
						"$ref": "#/components/schemas/CallDirection"
					},
					"startedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"endedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"durationSec": {
						"type": "number",
						"format": "double",
						"description": "How long the customer was on the call."
					},
					"outcome": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CallOutcome"
							}
						],
						"nullable": true
					},
					"live": {
						"type": "boolean"
					},
					"title": {
						"type": "string",
						"nullable": true
					},
					"summary": {
						"type": "string",
						"nullable": true
					},
					"voicemailSec": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"recordingStored": {
						"type": "boolean",
						"description": "A recording to play (`GET /calls/{id}/recording`)."
					}
				},
				"required": [
					"callId",
					"ticketId",
					"contactId",
					"contactName",
					"contactEmail",
					"contactAvatar",
					"from",
					"lineName",
					"direction",
					"startedAt",
					"endedAt",
					"durationSec",
					"outcome",
					"live",
					"title",
					"summary",
					"voicemailSec",
					"recordingStored"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AnsweredCall": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"legId": {
						"type": "string"
					},
					"claim": {
						"type": "string",
						"description": "The softphone sends it as the `claim` parameter of its call."
					},
					"softphone": {
						"$ref": "#/components/schemas/SoftphoneToken"
					}
				},
				"required": [
					"callId",
					"legId",
					"claim",
					"softphone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallOfferBody": {
				"properties": {
					"offerId": {
						"type": "string"
					}
				},
				"required": [
					"offerId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OutboundCall": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"legId": {
						"type": "string"
					},
					"claim": {
						"type": "string",
						"description": "The softphone sends it as the `claim` parameter of its call."
					},
					"softphone": {
						"$ref": "#/components/schemas/SoftphoneToken"
					},
					"ticketId": {
						"type": "string",
						"description": "The call's ticket: the one it was placed from, or the contact's new phone ticket."
					}
				},
				"required": [
					"callId",
					"legId",
					"claim",
					"softphone",
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OutboundCallRequest": {
				"properties": {
					"ticketId": {
						"type": "string",
						"description": "Call the ticket's contact; the call lives in the ticket."
					},
					"contactId": {
						"type": "string",
						"description": "Call this contact (no ticket): the call gets a new phone ticket."
					},
					"number": {
						"type": "string",
						"description": "Another number than the contact's, with its country code; alone, the keypad's call to that number."
					},
					"lineId": {
						"type": "string",
						"description": "The line to call from, when the ticket's (or the project's only one) is not the one."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"OutboundRefusal": {
				"enum": [
					"unavailable",
					"switched_off",
					"service_account",
					"not_permitted",
					"no_customer",
					"ticket_not_found",
					"contact_not_found",
					"no_contact",
					"plan",
					"no_line",
					"line_not_found",
					"line_not_active",
					"choose_line",
					"no_number",
					"not_a_number",
					"number_country",
					"service_number",
					"number_loops_back",
					"number_route",
					"line_inbound_only",
					"minutes_used_up",
					"credits_used_up",
					"call_on_ticket",
					"on_another_call",
					"too_many_calls"
				],
				"type": "string"
			},
			"OutboundCallOptions": {
				"properties": {
					"allowed": {
						"type": "boolean"
					},
					"refusal": {
						"type": "string",
						"nullable": true,
						"description": "Why not, when not allowed."
					},
					"refusalCode": {
						"allOf": [
							{
								"$ref": "#/components/schemas/OutboundRefusal"
							}
						],
						"nullable": true,
						"description": "The same as a fixed value, for a client that offers the way out."
					},
					"lines": {
						"items": {
							"properties": {
								"recorded": {
									"type": "boolean"
								},
								"transcribed": {
									"type": "boolean"
								},
								"number": {
									"type": "string"
								},
								"name": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"recorded",
								"transcribed",
								"number",
								"name",
								"id"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The lines the call can go out from."
					},
					"defaultLineId": {
						"type": "string",
						"nullable": true,
						"description": "The line it goes out from unless another is chosen; null: the teammate chooses."
					},
					"number": {
						"type": "string",
						"nullable": true,
						"description": "Whom it goes to unless another number is typed."
					},
					"countries": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The countries a number may be in."
					}
				},
				"required": [
					"allowed",
					"refusal",
					"refusalCode",
					"lines",
					"defaultLineId",
					"number",
					"countries"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OutboundNumberCheck": {
				"properties": {
					"number": {
						"type": "string",
						"nullable": true,
						"description": "What would be dialled; null when the text is no number."
					},
					"refusal": {
						"type": "string",
						"nullable": true,
						"description": "Why it cannot be called from the line asked about, or from any line when none was."
					},
					"refusalCode": {
						"allOf": [
							{
								"$ref": "#/components/schemas/OutboundRefusal"
							}
						],
						"nullable": true
					},
					"usableLineIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The lines it can be called from."
					}
				},
				"required": [
					"number",
					"refusal",
					"refusalCode",
					"usableLineIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiVoiceMinutes": {
				"description": "The project's Kai Voice minutes this month, next to its cap in Kai Support's settings.",
				"properties": {
					"usedMinutes": {
						"type": "number",
						"format": "double",
						"description": "Kai's billed minutes of the calls the cap counts: widget calls, and phone calls once a cap is set."
					}
				},
				"required": [
					"usedMinutes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PronunciationPreview": {
				"properties": {
					"audio": {
						"type": "string",
						"description": "WAV, base64."
					},
					"text": {
						"type": "string",
						"description": "What was read out."
					}
				},
				"required": [
					"audio",
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PronunciationPreviewRequest": {
				"properties": {
					"word": {
						"type": "string"
					},
					"sayAs": {
						"type": "string"
					},
					"language": {
						"type": "string",
						"description": "The language to hear it in; English when unset."
					}
				},
				"required": [
					"word",
					"sayAs"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallHoldBody": {
				"properties": {
					"held": {
						"type": "boolean"
					}
				},
				"required": [
					"held"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TransferTargetStatus": {
				"enum": [
					"available",
					"on_call",
					"away"
				],
				"type": "string"
			},
			"TransferTargets": {
				"properties": {
					"teammates": {
						"items": {
							"properties": {
								"status": {
									"$ref": "#/components/schemas/TransferTargetStatus"
								},
								"team": {
									"type": "string",
									"nullable": true
								},
								"profileImageUrl": {
									"type": "string",
									"nullable": true
								},
								"email": {
									"type": "string",
									"nullable": true
								},
								"name": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"status",
								"team",
								"profileImageUrl",
								"email",
								"name",
								"id"
							],
							"type": "object"
						},
						"type": "array"
					},
					"teams": {
						"items": {
							"properties": {
								"reachable": {
									"type": "number",
									"format": "double"
								},
								"available": {
									"type": "number",
									"format": "double"
								},
								"name": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"reachable",
								"available",
								"name",
								"id"
							],
							"type": "object"
						},
						"type": "array",
						"description": "`reachable`: members free or on a call (the caller waits for them); 0: nobody can take it."
					},
					"numbers": {
						"properties": {
							"countries": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"allowed": {
								"type": "boolean"
							}
						},
						"required": [
							"countries",
							"allowed"
						],
						"type": "object",
						"description": "Outside numbers: allowed on a paid plan with forwarded minutes left, in these countries."
					}
				},
				"required": [
					"teammates",
					"teams",
					"numbers"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CallTransferBody": {
				"properties": {
					"to": {
						"properties": {
							"number": {
								"type": "string"
							},
							"teamId": {
								"type": "string"
							},
							"userId": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"user",
									"team",
									"number"
								]
							}
						},
						"required": [
							"kind"
						],
						"type": "object"
					}
				},
				"required": [
					"to"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ConsultStep": {
				"description": "What the teammate who consults does next: leave the caller with the colleague, go back, or let all three talk.",
				"enum": [
					"complete",
					"cancel",
					"merge",
					"split"
				],
				"type": "string"
			},
			"CallRecordingPlayback": {
				"properties": {
					"url": {
						"type": "string",
						"description": "A link that lives a few minutes (fileSigning.ts signCallRecordingUrl)."
					},
					"durationSec": {
						"type": "number",
						"format": "double",
						"nullable": true
					}
				},
				"required": [
					"url",
					"durationSec"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RingDeliveredBody": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"offerId": {
						"type": "string"
					},
					"ack": {
						"type": "string",
						"description": "The proof the ring came with."
					},
					"deviceId": {
						"type": "string"
					}
				},
				"required": [
					"callId",
					"offerId",
					"ack",
					"deviceId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartCopilotCallResponseDto": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"chatId": {
						"type": "string"
					},
					"sdp": {
						"type": "string",
						"description": "WebRTC SDP answer: the dashboard sets it as the remote description."
					},
					"maxDurationSec": {
						"type": "number",
						"format": "double"
					},
					"endsAt": {
						"type": "string"
					}
				},
				"required": [
					"callId",
					"chatId",
					"sdp",
					"maxDurationSec",
					"endsAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotPageContextDto": {
				"description": "The page the teammate is on: the sidekick's envelope (`{ surface, page }`) or its page alone.",
				"properties": {
					"route": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"entity": {
						"properties": {
							"id": {
								"type": "string"
							},
							"type": {
								"type": "string"
							}
						},
						"required": [
							"id",
							"type"
						],
						"type": "object"
					},
					"selection": {
						"type": "string"
					},
					"surface": {
						"type": "string"
					},
					"page": {
						"properties": {
							"selection": {
								"type": "string"
							},
							"entity": {
								"properties": {
									"id": {
										"type": "string"
									},
									"type": {
										"type": "string"
									}
								},
								"required": [
									"id",
									"type"
								],
								"type": "object"
							},
							"title": {
								"type": "string"
							},
							"route": {
								"type": "string"
							}
						},
						"type": "object"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"StartCopilotCallDto": {
				"properties": {
					"sdp": {
						"type": "string",
						"description": "WebRTC SDP offer from the dashboard's RTCPeerConnection."
					},
					"chatId": {
						"type": "string",
						"description": "One of the person's Kai Copilot chats; omitted → a new chat."
					},
					"page": {
						"$ref": "#/components/schemas/CopilotPageContextDto"
					},
					"lang": {
						"type": "string",
						"description": "The browser's language (`navigator.language`): Kai greets in it, then follows the language spoken."
					}
				},
				"required": [
					"sdp"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotCallState": {
				"type": "string",
				"enum": [
					"connecting",
					"live",
					"ended"
				]
			},
			"CopilotCallEndedReason": {
				"type": "string",
				"enum": [
					"hangup",
					"limit",
					"idle",
					"error",
					"customer_call"
				]
			},
			"CopilotCallDto": {
				"description": "The call as the dashboard sees it (contract `CopilotCallDto`).",
				"properties": {
					"callId": {
						"type": "string"
					},
					"chatId": {
						"type": "string"
					},
					"state": {
						"$ref": "#/components/schemas/CopilotCallState"
					},
					"startedAt": {
						"type": "string"
					},
					"endsAt": {
						"type": "string",
						"nullable": true
					},
					"muted": {
						"type": "boolean"
					},
					"card": {
						"properties": {
							"at": {
								"type": "string"
							},
							"conversationId": {
								"type": "string"
							},
							"taskId": {
								"type": "string"
							}
						},
						"required": [
							"at",
							"conversationId",
							"taskId"
						],
						"type": "object",
						"description": "A waiting card from another chat that Kai read out on the call (`at`): the dashboard shows it over the call."
					},
					"endedReason": {
						"$ref": "#/components/schemas/CopilotCallEndedReason"
					}
				},
				"required": [
					"callId",
					"chatId",
					"state",
					"startedAt",
					"endsAt",
					"muted"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotCallOkDto": {
				"properties": {
					"ok": {
						"type": "boolean"
					}
				},
				"required": [
					"ok"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotCallMuteDto": {
				"properties": {
					"muted": {
						"type": "boolean"
					}
				},
				"required": [
					"muted"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotCallEndDto": {
				"properties": {
					"reason": {
						"type": "string",
						"enum": [
							"customer_call"
						],
						"nullable": false,
						"description": "`customer_call`: a customer's call took over (the call ends with that reason)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ComplianceFieldKind": {
				"description": "The form a customer fills in so Twilio checks their company for a number\n(a regulatory bundle), built from Twilio's regulation for the country and\nnumber type: the company's fields, the documents to upload, the address.\nTwilio names everything in English for its own console, so the texts are\nours (the dashboard is in English; documents keep their local names), and\nfields Twilio adds later still show with Twilio's own label. What Twilio\nchecks before a person does (an evaluation) comes back to the field or the\ndocument it is about. Leaf module.",
				"enum": [
					"text",
					"email",
					"url",
					"phone",
					"select"
				],
				"type": "string"
			},
			"ComplianceFormField": {
				"properties": {
					"name": {
						"type": "string",
						"description": "Twilio's attribute of the end user (`business_name`, …)."
					},
					"label": {
						"type": "string"
					},
					"hint": {
						"type": "string",
						"nullable": true
					},
					"kind": {
						"$ref": "#/components/schemas/ComplianceFieldKind"
					},
					"required": {
						"type": "boolean"
					},
					"pattern": {
						"type": "string",
						"nullable": true,
						"description": "The pattern Twilio checks the value against, when it has one."
					},
					"options": {
						"items": {
							"properties": {
								"label": {
									"type": "string"
								},
								"value": {
									"type": "string"
								}
							},
							"required": [
								"label",
								"value"
							],
							"type": "object"
						},
						"type": "array",
						"nullable": true
					}
				},
				"required": [
					"name",
					"label",
					"hint",
					"kind",
					"required",
					"pattern",
					"options"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ComplianceDocumentSlot": {
				"properties": {
					"requirement": {
						"type": "string",
						"description": "Twilio's requirement (`name_of_auth_rep_info`, …): one upload each."
					},
					"label": {
						"type": "string"
					},
					"types": {
						"items": {
							"properties": {
								"label": {
									"type": "string"
								},
								"type": {
									"type": "string"
								}
							},
							"required": [
								"label",
								"type"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Any one of these proves it."
					}
				},
				"required": [
					"requirement",
					"label",
					"types"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ComplianceForm": {
				"properties": {
					"country": {
						"type": "string"
					},
					"numberType": {
						"type": "string"
					},
					"regulationId": {
						"type": "string"
					},
					"fields": {
						"items": {
							"$ref": "#/components/schemas/ComplianceFormField"
						},
						"type": "array"
					},
					"documents": {
						"items": {
							"$ref": "#/components/schemas/ComplianceDocumentSlot"
						},
						"type": "array"
					},
					"addressCountry": {
						"type": "string",
						"description": "Every regulation asks for the company's address, in the number's country."
					}
				},
				"required": [
					"country",
					"numberType",
					"regulationId",
					"fields",
					"documents",
					"addressCountry"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ComplianceValues": {
				"$ref": "#/components/schemas/Record_string.string_"
			},
			"Partial_ComplianceAddress_": {
				"properties": {
					"street": {
						"type": "string"
					},
					"streetSecondary": {
						"type": "string"
					},
					"city": {
						"type": "string"
					},
					"region": {
						"type": "string"
					},
					"postalCode": {
						"type": "string"
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"ComplianceFormView": {
				"properties": {
					"form": {
						"$ref": "#/components/schemas/ComplianceForm"
					},
					"values": {
						"$ref": "#/components/schemas/ComplianceValues"
					},
					"address": {
						"$ref": "#/components/schemas/Partial_ComplianceAddress_"
					}
				},
				"required": [
					"form",
					"values",
					"address"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneComplianceStatus": {
				"description": "Where a company check stands (the carrier's own words: twilioBundleStatus.ts). Persisted: never rename one.",
				"enum": [
					"draft",
					"pending_review",
					"in_review",
					"provisionally_approved",
					"approved",
					"rejected"
				],
				"type": "string"
			},
			"ComplianceErrors": {
				"properties": {
					"fields": {
						"$ref": "#/components/schemas/Record_string.string_"
					},
					"documents": {
						"$ref": "#/components/schemas/Record_string.string_"
					},
					"address": {
						"type": "string",
						"nullable": true
					},
					"general": {
						"type": "string",
						"nullable": true,
						"description": "About the check as a whole."
					}
				},
				"required": [
					"fields",
					"documents",
					"address"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneComplianceUpdateView": {
				"description": "Twilio's request for current details (complianceUpdate.ts), as the dashboard shows it.",
				"properties": {
					"status": {
						"$ref": "#/components/schemas/PhoneComplianceStatus"
					},
					"problems": {
						"$ref": "#/components/schemas/ComplianceErrors"
					},
					"failureReason": {
						"type": "string",
						"nullable": true
					},
					"submittedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"decidedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					}
				},
				"required": [
					"status",
					"problems",
					"failureReason",
					"submittedAt",
					"decidedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneComplianceView": {
				"properties": {
					"id": {
						"type": "string",
						"nullable": true
					},
					"country": {
						"type": "string"
					},
					"numberType": {
						"type": "string"
					},
					"areaCode": {
						"type": "string",
						"nullable": true
					},
					"status": {
						"$ref": "#/components/schemas/PhoneComplianceStatus"
					},
					"problems": {
						"$ref": "#/components/schemas/ComplianceErrors"
					},
					"failureReason": {
						"type": "string",
						"nullable": true
					},
					"validUntil": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"businessName": {
						"type": "string"
					},
					"addressText": {
						"type": "string"
					},
					"documents": {
						"items": {
							"properties": {
								"type": {
									"type": "string"
								},
								"requirement": {
									"type": "string"
								}
							},
							"required": [
								"type",
								"requirement"
							],
							"type": "object"
						},
						"type": "array"
					},
					"submittedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"decidedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"update": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PhoneComplianceUpdateView"
							}
						],
						"nullable": true,
						"description": "Twilio asked for current details by `validUntil`: their review, apart from the check's."
					}
				},
				"required": [
					"id",
					"country",
					"numberType",
					"areaCode",
					"status",
					"problems",
					"failureReason",
					"validUntil",
					"businessName",
					"addressText",
					"documents",
					"submittedAt",
					"decidedAt",
					"update"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLineStatus": {
				"enum": [
					"pending_compliance",
					"provisioning",
					"active",
					"suspended",
					"released"
				],
				"type": "string"
			},
			"CallState": {
				"description": "What the caller is going through right now; derived from the legs on every write.",
				"enum": [
					"connecting",
					"with_kai",
					"waiting_for_team",
					"with_agent",
					"ended"
				],
				"type": "string"
			},
			"LineLastCall": {
				"properties": {
					"at": {
						"type": "string",
						"format": "date-time"
					},
					"from": {
						"type": "string",
						"description": "The caller's number as the carrier reported it; empty for a test call."
					},
					"test": {
						"type": "boolean"
					},
					"state": {
						"$ref": "#/components/schemas/CallState"
					},
					"outcome": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CallOutcome"
							}
						],
						"nullable": true
					}
				},
				"required": [
					"at",
					"from",
					"test",
					"state",
					"outcome"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ComplianceRenewal": {
				"description": "Where a check Twilio asked to renew stands (complianceUpdate.ts), as the line shows it.",
				"enum": [
					"update_needed",
					"update_in_review",
					"expired"
				],
				"type": "string"
			},
			"PhoneLineOrderView": {
				"description": "A number ordered in the dashboard (numberOrders.ts).",
				"properties": {
					"country": {
						"type": "string"
					},
					"numberType": {
						"type": "string"
					},
					"areaCode": {
						"type": "string",
						"nullable": true
					},
					"complianceId": {
						"type": "string",
						"nullable": true
					},
					"complianceStatus": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PhoneComplianceStatus"
							}
						],
						"nullable": true,
						"description": "Where its company check stands, also for those who may not see the check itself."
					},
					"complianceRenewal": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ComplianceRenewal"
							}
						],
						"nullable": true,
						"description": "Twilio asked for current company details: whether they are needed, in review, or ran out, and by when."
					},
					"complianceDeadline": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"orderedAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"country",
					"numberType",
					"areaCode",
					"complianceId",
					"complianceStatus",
					"complianceRenewal",
					"complianceDeadline",
					"orderedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ProvisioningProblem": {
				"description": "Why a line's number is not bought and connected yet, as the dashboard\nexplains it; Twilio's own words stay in the logs.",
				"enum": [
					"no_number_free",
					"check_does_not_fit",
					"plan",
					"carrier"
				],
				"type": "string"
			},
			"PhoneHandoffTarget": {
				"description": "Where Kai sends a caller who wants a person.",
				"enum": [
					"team",
					"callback",
					"forward"
				],
				"type": "string"
			},
			"RingRule": {
				"description": "How a step rings: all free people at once, or one after the other, the one with no call for longest first.",
				"enum": [
					"all_at_once",
					"longest_idle"
				],
				"type": "string"
			},
			"PhoneRingStep": {
				"description": "One step of whom a waiting caller is rung for; `team` null: everyone who takes the project's calls.",
				"properties": {
					"team": {
						"type": "string",
						"nullable": true
					},
					"rule": {
						"$ref": "#/components/schemas/RingRule"
					},
					"ringSeconds": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"team",
					"rule",
					"ringSeconds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLineView": {
				"properties": {
					"name": {
						"type": "string"
					},
					"forwardedFrom": {
						"type": "string",
						"nullable": true
					},
					"kaiShare": {
						"type": "number",
						"format": "double"
					},
					"handoff": {
						"$ref": "#/components/schemas/PhoneHandoffTarget"
					},
					"forwardTo": {
						"type": "string",
						"nullable": true
					},
					"team": {
						"type": "string",
						"nullable": true,
						"description": "The line's team: the first step's that names one. Its callers are called back from its inbox, in its hours."
					},
					"ringSeconds": {
						"type": "number",
						"format": "double"
					},
					"steps": {
						"items": {
							"$ref": "#/components/schemas/PhoneRingStep"
						},
						"type": "array",
						"description": "Whom a caller who waits for a person is rung for, step by step; none: the line's team, all at once."
					},
					"language": {
						"type": "string"
					},
					"greeting": {
						"type": "string",
						"nullable": true
					},
					"voice": {
						"type": "string",
						"nullable": true
					},
					"zeroForPerson": {
						"type": "boolean"
					},
					"transcribeTeam": {
						"type": "boolean",
						"description": "\"Transcribe calls with your team\": the part with a person is transcribed, and the caller hears so first. Left\nout (a dashboard from before the setting), it is on."
					},
					"voicemail": {
						"type": "boolean",
						"description": "A caller who reaches nobody may leave a message. Left out (a dashboard from before the setting), it is on."
					},
					"recordTeam": {
						"type": "boolean",
						"description": "The part with a person is recorded, and the caller hears so first. Left out, it is off."
					},
					"recordingRetentionDays": {
						"type": "number",
						"format": "double",
						"description": "How long a recording is kept before it is deleted."
					},
					"id": {
						"type": "string"
					},
					"number": {
						"type": "string",
						"nullable": true,
						"description": "Null while an ordered number is not bought yet."
					},
					"status": {
						"$ref": "#/components/schemas/PhoneLineStatus"
					},
					"lastCall": {
						"allOf": [
							{
								"$ref": "#/components/schemas/LineLastCall"
							}
						],
						"nullable": true
					},
					"order": {
						"allOf": [
							{
								"$ref": "#/components/schemas/PhoneLineOrderView"
							}
						],
						"nullable": true
					},
					"provisioningProblem": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ProvisioningProblem"
							}
						],
						"nullable": true,
						"description": "Why its number is not bought or connected yet (numberOrder.rules ProvisioningProblem)."
					}
				},
				"required": [
					"name",
					"forwardedFrom",
					"kaiShare",
					"handoff",
					"forwardTo",
					"team",
					"ringSeconds",
					"steps",
					"language",
					"greeting",
					"voice",
					"zeroForPerson",
					"id",
					"number",
					"status",
					"lastCall",
					"order",
					"provisioningProblem"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLanguageView": {
				"description": "What callers hear before Kai, per language, as the line would play it.",
				"properties": {
					"code": {
						"type": "string"
					},
					"disclosure": {
						"type": "string"
					},
					"disclosureWithoutKeypad": {
						"type": "string"
					}
				},
				"required": [
					"code",
					"disclosure",
					"disclosureWithoutKeypad"
				],
				"type": "object",
				"additionalProperties": false
			},
			"VoiceCatalogEntry": {
				"description": "GPT-Live output voices Kai Voice may use. Names verified against the API\n(`audio.output.voice`); the flavour text is what the dashboard\nshows next to each name. `marin` is the default and the fallback for any\nvalue the API would refuse (\"Voice session access denied\" ends the call\nbefore it starts).",
				"properties": {
					"id": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"description": {
						"type": "string",
						"description": "Short flavour line: accent and character."
					}
				},
				"required": [
					"id",
					"label",
					"description"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLinesOverview": {
				"properties": {
					"lines": {
						"items": {
							"$ref": "#/components/schemas/PhoneLineView"
						},
						"type": "array"
					},
					"languages": {
						"items": {
							"$ref": "#/components/schemas/PhoneLanguageView"
						},
						"type": "array"
					},
					"voices": {
						"items": {
							"$ref": "#/components/schemas/VoiceCatalogEntry"
						},
						"type": "array"
					},
					"projectVoice": {
						"type": "string",
						"description": "Kai's voice on lines that keep the project's."
					},
					"forwardingAvailable": {
						"type": "boolean",
						"description": "Callers can be forwarded to an outside number: the organisation pays for its plan (dialPolicy.ts)."
					},
					"numbers": {
						"properties": {
							"paidPlan": {
								"type": "boolean"
							},
							"canOrder": {
								"type": "boolean"
							}
						},
						"required": [
							"paidPlan",
							"canOrder"
						],
						"type": "object",
						"description": "Ordering numbers (numberOrders.ts): organisation admins, on a paid plan with Kai Voice."
					},
					"forwardMinutes": {
						"properties": {
							"canChange": {
								"type": "boolean"
							},
							"maxMinutesPerMonth": {
								"type": "number",
								"format": "double"
							},
							"usedMinutes": {
								"type": "number",
								"format": "double"
							},
							"minutesPerMonth": {
								"type": "number",
								"format": "double"
							},
							"organisationId": {
								"type": "string"
							}
						},
						"required": [
							"canChange",
							"maxMinutesPerMonth",
							"usedMinutes",
							"minutesPerMonth",
							"organisationId"
						],
						"type": "object",
						"description": "The organisation's forwarded minutes this month (billing/forwardMinutes.ts); its admins change the limit."
					},
					"prices": {
						"properties": {
							"includedNumberPlans": {
								"items": {
									"type": "string"
								},
								"type": "array",
								"description": "Plans whose first number is included."
							},
							"numberMonthUsd": {
								"type": "number",
								"format": "double"
							},
							"premiumMinuteUsd": {
								"type": "number",
								"format": "double",
								"description": "A minute with a Swiss mobile."
							},
							"minuteUsd": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"includedNumberPlans",
							"numberMonthUsd",
							"premiumMinuteUsd",
							"minuteUsd"
						],
						"type": "object",
						"description": "What calls and numbers cost, in USD (billing/phonePrices.ts)."
					}
				},
				"required": [
					"lines",
					"languages",
					"voices",
					"projectVoice",
					"forwardingAvailable",
					"numbers",
					"forwardMinutes",
					"prices"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AnswerStatus": {
				"enum": [
					"free",
					"on_call",
					"wrap_up",
					"paused",
					"not_open",
					"chats_only",
					"away",
					"no_permission"
				],
				"type": "string"
			},
			"WhoAnswersPerson": {
				"properties": {
					"userId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string",
						"nullable": true
					},
					"profileImageUrl": {
						"type": "string",
						"nullable": true
					},
					"status": {
						"$ref": "#/components/schemas/AnswerStatus"
					},
					"onCallSince": {
						"type": "string",
						"nullable": true,
						"description": "On a call of this project: since when (null while joining, or a call elsewhere)."
					},
					"wrapUpUntil": {
						"type": "string",
						"nullable": true,
						"description": "Wrapping up a call of this project: until when."
					},
					"availableFor": {
						"$ref": "#/components/schemas/AvailableFor"
					}
				},
				"required": [
					"userId",
					"name",
					"email",
					"profileImageUrl",
					"status",
					"onCallSince",
					"wrapUpUntil",
					"availableFor"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhoAnswersStep": {
				"properties": {
					"teamId": {
						"type": "string",
						"nullable": true,
						"description": "Null: everyone who takes the project's calls."
					},
					"teamName": {
						"type": "string",
						"nullable": true
					},
					"rule": {
						"$ref": "#/components/schemas/RingRule"
					},
					"ringSeconds": {
						"type": "number",
						"format": "double"
					},
					"people": {
						"items": {
							"$ref": "#/components/schemas/WhoAnswersPerson"
						},
						"type": "array"
					}
				},
				"required": [
					"teamId",
					"teamName",
					"rule",
					"ringSeconds",
					"people"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WhoAnswersLine": {
				"properties": {
					"lineId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"number": {
						"type": "string",
						"nullable": true
					},
					"steps": {
						"items": {
							"$ref": "#/components/schemas/WhoAnswersStep"
						},
						"type": "array"
					},
					"free": {
						"type": "number",
						"format": "double",
						"description": "People of its steps who would ring now."
					},
					"lastStepReachable": {
						"type": "number",
						"format": "double",
						"description": "People of its last step who are free or on a call: with none, a caller nobody answered in the earlier steps hears\nthat the team calls back at once (teamPick.ts decideStep)."
					}
				},
				"required": [
					"lineId",
					"name",
					"number",
					"steps",
					"free",
					"lastStepReachable"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LiveCall": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"ticketId": {
						"type": "string",
						"nullable": true
					},
					"direction": {
						"$ref": "#/components/schemas/CallDirection",
						"description": "Inbound: the customer called a line; outbound: a teammate calls the customer."
					},
					"state": {
						"$ref": "#/components/schemas/CallState"
					},
					"callerHeld": {
						"type": "boolean",
						"description": "The customer hears hold music: a teammate held them, or they are being passed on."
					},
					"from": {
						"type": "string",
						"description": "The customer's number; empty for a test call from the line settings."
					},
					"contactName": {
						"type": "string",
						"nullable": true
					},
					"line": {
						"properties": {
							"number": {
								"type": "string",
								"nullable": true
							},
							"name": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"number",
							"name",
							"id"
						],
						"type": "object",
						"nullable": true
					},
					"agent": {
						"properties": {
							"name": {
								"type": "string"
							},
							"userId": {
								"type": "string"
							}
						},
						"required": [
							"name",
							"userId"
						],
						"type": "object",
						"nullable": true,
						"description": "The teammate on the call (or joining it)."
					},
					"ringing": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The teammates being rung for it right now."
					},
					"forwardedTo": {
						"type": "string",
						"nullable": true,
						"description": "The outside number the line passed the caller to."
					},
					"startedAt": {
						"type": "string"
					},
					"waitingSince": {
						"type": "string",
						"nullable": true,
						"description": "Since when the caller waits for a person; null while nobody is wanted."
					},
					"test": {
						"type": "boolean"
					}
				},
				"required": [
					"callId",
					"ticketId",
					"direction",
					"state",
					"callerHeld",
					"from",
					"contactName",
					"line",
					"agent",
					"ringing",
					"forwardedTo",
					"startedAt",
					"waitingSince",
					"test"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TeammateAvailableForBody": {
				"properties": {
					"availableFor": {
						"$ref": "#/components/schemas/AvailableFor"
					}
				},
				"required": [
					"availableFor"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AvailableNumber": {
				"properties": {
					"number": {
						"type": "string"
					},
					"locality": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"number",
					"locality"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLineOrder": {
				"properties": {
					"country": {
						"type": "string"
					},
					"numberType": {
						"type": "string"
					},
					"areaCode": {
						"type": "string",
						"nullable": true
					},
					"complianceId": {
						"type": "string",
						"nullable": true,
						"description": "The company check the number needs (from phone-compliance); none in the US."
					},
					"phoneNumber": {
						"type": "string",
						"nullable": true,
						"description": "The number picked from availableNumbers (US)."
					},
					"name": {
						"type": "string"
					},
					"language": {
						"type": "string"
					},
					"forwardedFrom": {
						"type": "string",
						"nullable": true,
						"description": "The customer's own number that will forward here, when they keep it."
					}
				},
				"required": [
					"country",
					"numberType",
					"language"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PhoneLineSettings": {
				"properties": {
					"name": {
						"type": "string"
					},
					"forwardedFrom": {
						"type": "string",
						"nullable": true
					},
					"kaiShare": {
						"type": "number",
						"format": "double"
					},
					"handoff": {
						"$ref": "#/components/schemas/PhoneHandoffTarget"
					},
					"forwardTo": {
						"type": "string",
						"nullable": true
					},
					"team": {
						"type": "string",
						"nullable": true,
						"description": "The line's team: the first step's that names one. Its callers are called back from its inbox, in its hours."
					},
					"ringSeconds": {
						"type": "number",
						"format": "double"
					},
					"steps": {
						"items": {
							"$ref": "#/components/schemas/PhoneRingStep"
						},
						"type": "array",
						"description": "Whom a caller who waits for a person is rung for, step by step; none: the line's team, all at once."
					},
					"language": {
						"type": "string"
					},
					"greeting": {
						"type": "string",
						"nullable": true
					},
					"voice": {
						"type": "string",
						"nullable": true
					},
					"zeroForPerson": {
						"type": "boolean"
					},
					"transcribeTeam": {
						"type": "boolean",
						"description": "\"Transcribe calls with your team\": the part with a person is transcribed, and the caller hears so first. Left\nout (a dashboard from before the setting), it is on."
					},
					"voicemail": {
						"type": "boolean",
						"description": "A caller who reaches nobody may leave a message. Left out (a dashboard from before the setting), it is on."
					},
					"recordTeam": {
						"type": "boolean",
						"description": "The part with a person is recorded, and the caller hears so first. Left out, it is off."
					},
					"recordingRetentionDays": {
						"type": "number",
						"format": "double",
						"description": "How long a recording is kept before it is deleted."
					}
				},
				"required": [
					"name",
					"forwardedFrom",
					"kaiShare",
					"handoff",
					"forwardTo",
					"team",
					"ringSeconds",
					"steps",
					"language",
					"greeting",
					"voice",
					"zeroForPerson"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TestCall": {
				"properties": {
					"softphone": {
						"$ref": "#/components/schemas/SoftphoneToken"
					},
					"testCall": {
						"type": "string",
						"description": "Sent by the browser as the `testCall` parameter of its call."
					}
				},
				"required": [
					"softphone",
					"testCall"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateWidgetCallResponseDto": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"sdp": {
						"type": "string",
						"description": "WebRTC SDP answer: the widget sets it as the remote description."
					},
					"conversationShareToken": {
						"type": "string"
					},
					"maxDurationSec": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"callId",
					"sdp",
					"conversationShareToken",
					"maxDurationSec"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateWidgetCallDto": {
				"properties": {
					"sdp": {
						"type": "string",
						"description": "WebRTC SDP offer from the widget's RTCPeerConnection."
					},
					"conversationShareToken": {
						"type": "string",
						"description": "Reuse an existing widget Kai conversation; omitted → a new bot conversation is created."
					},
					"botId": {
						"type": "string",
						"description": "Bot to start when creating a new conversation (same value the widget passes to POST /shared/tickets)."
					},
					"lang": {
						"type": "string"
					}
				},
				"required": [
					"sdp"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CodeRepositoryAccessState": {
				"type": "string",
				"enum": [
					"ok",
					"not_shared",
					"gone",
					"suspended",
					"branch_missing"
				]
			},
			"CodeRepositoryStateView": {
				"properties": {
					"tone": {
						"type": "string",
						"enum": [
							"green",
							"blue",
							"amber",
							"red",
							"muted"
						]
					},
					"code": {
						"type": "string"
					},
					"action": {
						"type": "string",
						"enum": [
							"grant_access",
							"remove",
							"reconnect",
							"use_default_branch"
						],
						"nullable": true
					},
					"needsAttention": {
						"type": "boolean"
					}
				},
				"required": [
					"tone",
					"code",
					"action",
					"needsAttention"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CodeRepositoryLimitPlan": {
				"type": "string",
				"enum": [
					"trial",
					"team",
					"pro",
					"enterprise",
					"unlimited"
				]
			},
			"RepositoryPickBody": {
				"description": "GitHub: remoteId + installationId. GitLab, Bitbucket, Azure DevOps: the provider and the repository's path.",
				"properties": {
					"provider": {
						"type": "string",
						"enum": [
							"github",
							"gitlab",
							"bitbucket",
							"azure"
						]
					},
					"remoteId": {
						"type": "string"
					},
					"installationId": {
						"type": "number",
						"format": "double"
					},
					"owner": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"fullName": {
						"type": "string"
					},
					"namespace": {
						"type": "string",
						"description": "The Azure DevOps project."
					},
					"defaultBranch": {
						"type": "string"
					},
					"private": {
						"type": "boolean"
					}
				},
				"required": [
					"remoteId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AddCodeRepositoriesBody": {
				"properties": {
					"repositories": {
						"items": {
							"$ref": "#/components/schemas/RepositoryPickBody"
						},
						"type": "array"
					},
					"ids": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"agents": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "'kaiCode', 'kaiSupport', 'kaiCopilot' or a custom agent's id."
					}
				},
				"required": [
					"agents"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CodeRepositoryIdsBody": {
				"properties": {
					"ids": {
						"items": {
							"type": "string"
						},
						"type": "array"
					}
				},
				"required": [
					"ids"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IndexStatusCallback": {
				"properties": {
					"runId": {
						"type": "string"
					},
					"projectId": {
						"type": "string"
					},
					"repoId": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"progress",
							"done",
							"failed"
						]
					},
					"progress": {
						"type": "number",
						"format": "double"
					},
					"commitSha": {
						"type": "string"
					},
					"commitMessage": {
						"type": "string"
					},
					"headSha": {
						"type": "string"
					},
					"files": {
						"type": "number",
						"format": "double"
					},
					"lines": {
						"type": "number",
						"format": "double"
					},
					"chunks": {
						"type": "number",
						"format": "double"
					},
					"changedFiles": {
						"type": "number",
						"format": "double"
					},
					"seconds": {
						"type": "number",
						"format": "double"
					},
					"error": {
						"type": "string"
					},
					"commits": {
						"items": {
							"properties": {
								"date": {
									"type": "string"
								},
								"author": {
									"type": "string"
								},
								"message": {
									"type": "string"
								},
								"sha": {
									"type": "string"
								}
							},
							"required": [
								"sha"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Commits a refresh covered (newest first): sha, message, author, date."
					}
				},
				"required": [
					"runId",
					"projectId",
					"repoId",
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateCodeRepositoryBody": {
				"description": "No initializers: a partial PUT must not reset what it omits.",
				"properties": {
					"branch": {
						"type": "string",
						"nullable": true,
						"description": "null = follow the default branch (\"Use main\")."
					},
					"notes": {
						"type": "string"
					},
					"excludePaths": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"refreshOnPush": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetupChatDto": {
				"properties": {
					"timezone": {
						"type": "string",
						"nullable": true,
						"description": "The browser's timezone (IANA), kept on the new chat."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetupChatRefDto": {
				"properties": {
					"conversationId": {
						"type": "string",
						"nullable": true,
						"description": "The Kai Copilot chat the card is in (mine); progress and the skip line go there. Else my setup chat."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetupActionDto": {
				"properties": {
					"email": {
						"type": "string",
						"nullable": true,
						"description": "An address typed on the card (their developer, whoever runs DNS)."
					},
					"question": {
						"type": "string",
						"nullable": true,
						"description": "Kai Support's \"Try it first\" question."
					},
					"siteUrl": {
						"type": "string",
						"nullable": true,
						"description": "WooCommerce: the store address and its read-only REST key."
					},
					"consumerKey": {
						"type": "string",
						"nullable": true
					},
					"consumerSecret": {
						"type": "string",
						"nullable": true
					},
					"baseUrl": {
						"type": "string",
						"nullable": true,
						"description": "Your shop API: its address and one header with the key."
					},
					"headerName": {
						"type": "string",
						"nullable": true
					},
					"headerValue": {
						"type": "string",
						"nullable": true
					},
					"via": {
						"type": "string",
						"enum": [
							"copy",
							"prompt"
						],
						"nullable": true,
						"description": "install_copied: the snippet (`copy`) or the coding-agent prompt (`prompt`)."
					},
					"step": {
						"type": "string",
						"nullable": true,
						"description": "skip_step: the step."
					},
					"runsOn": {
						"type": "string",
						"nullable": true,
						"description": "kai_code_autostart_on: `cloud` or one of my own Kai Bridge machines."
					},
					"conversationId": {
						"type": "string",
						"nullable": true
					},
					"roadmap": {
						"properties": {
							"brief": {
								"type": "string"
							},
							"newsletter": {
								"type": "string"
							},
							"notes": {
								"type": "string"
							},
							"tell": {
								"type": "string"
							},
							"requests": {
								"type": "string"
							}
						},
						"type": "object",
						"description": "roadmap_defaults: the card's choices (requests, tell, notes, newsletter: does | asks | never; brief: on | off)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"GleapKnowledgePassage": {
				"properties": {
					"title": {
						"type": "string"
					},
					"url": {
						"type": "string",
						"nullable": true,
						"description": "The public page (help center article, docs page, website), or null (a snippet without a link)."
					},
					"type": {
						"type": "string",
						"description": "'Knowledge article' | 'FAQ' | 'Website' | 'Code knowledge' | 'YouTube video' | 'News'."
					},
					"text": {
						"type": "string"
					}
				},
				"required": [
					"title",
					"url",
					"type",
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"GleapKnowledgeSearchBody": {
				"properties": {
					"query": {
						"type": "string",
						"description": "The question, 2-300 characters. Nothing else is read."
					}
				},
				"required": [
					"query"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MintlifyFilesBody": {
				"properties": {
					"uploadId": {
						"type": "string"
					},
					"files": {
						"items": {
							"properties": {
								"content": {
									"type": "string"
								},
								"path": {
									"type": "string"
								}
							},
							"required": [
								"content",
								"path"
							],
							"type": "object"
						},
						"type": "array"
					},
					"final": {
						"type": "boolean"
					},
					"site": {
						"type": "string"
					},
					"assetBaseUrl": {
						"type": "string"
					}
				},
				"required": [
					"files"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MintlifyGithubBody": {
				"properties": {
					"repoUrl": {
						"type": "string"
					},
					"branch": {
						"type": "string"
					},
					"private": {
						"type": "boolean",
						"description": "Read through the project's GitHub connection (also tried when the anonymous read finds nothing)."
					},
					"site": {
						"type": "string"
					},
					"assetBaseUrl": {
						"type": "string"
					}
				},
				"required": [
					"repoUrl"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteAccessDto": {
				"description": "PUT /helpcenter/sites/{id} `access`. `password` is hashed on write and never returned.",
				"properties": {
					"mode": {
						"type": "string",
						"description": "`public` | `password` | `signedin` | `segment` | `team`."
					},
					"password": {
						"type": "string",
						"description": "A new password for `password` mode (stored hashed). Leave out to keep the current one."
					},
					"loginRedirect": {
						"type": "string"
					},
					"ssoEnabled": {
						"type": "boolean"
					},
					"audienceFilter": {
						"description": "For `segment`: the audience filter, the same shape as a collection's `baseAudienceFilter`."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteCreateDto": {
				"description": "POST /helpcenter/sites. No property initializers (tsoa writes them into every request).",
				"properties": {
					"name": {
						"type": "string"
					},
					"subdomain": {
						"type": "string",
						"description": "The address (`<subdomain>.<help center base>`); generated when left out."
					},
					"startFrom": {
						"type": "string",
						"description": "`copy` (the default): a copy of the default site's settings; `clean`: Gleap's defaults."
					},
					"layout": {
						"type": "string",
						"description": "`classic` | `docs`."
					},
					"config": {
						"description": "Config keys on top of the start (merged key by key)."
					},
					"access": {
						"$ref": "#/components/schemas/HelpcenterSiteAccessDto"
					},
					"aiUse": {
						"type": "string",
						"description": "`visitors` | `team` | `off`."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteUpdateDto": {
				"description": "PATCH (and PUT) /helpcenter/sites/{id}. Every field optional; a field left out keeps its value,\nand so does every config key left out (`config.config` merges by key too).",
				"properties": {
					"name": {
						"type": "string"
					},
					"config": {},
					"access": {
						"$ref": "#/components/schemas/HelpcenterSiteAccessDto"
					},
					"aiUse": {
						"type": "string",
						"description": "`visitors` | `team` | `off`. Ignored for the default site."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteCollectionsDto": {
				"properties": {
					"collectionIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Top-level collections to move to the site (sub-collections and articles follow)."
					}
				},
				"required": [
					"collectionIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteDomainDto": {
				"properties": {
					"customDomain": {
						"type": "string"
					}
				},
				"required": [
					"customDomain"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HelpcenterSiteMessengerDto": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "Leave out (or false) to clear: the Messenger's Help tab then shows the default site."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CdnVisibility": {
				"properties": {
					"truncated": {
						"type": "boolean",
						"description": "The row limit was reached: the counts are a lower bound."
					},
					"days": {
						"items": {
							"properties": {
								"counts": {
									"$ref": "#/components/schemas/Record_string.number_"
								},
								"date": {
									"type": "string"
								}
							},
							"required": [
								"counts",
								"date"
							],
							"type": "object"
						},
						"type": "array"
					},
					"byAgent": {
						"$ref": "#/components/schemas/Record_string.number_"
					},
					"totals": {
						"$ref": "#/components/schemas/Record_string.number_"
					},
					"reason": {
						"type": "string"
					},
					"available": {
						"type": "boolean"
					}
				},
				"required": [
					"days",
					"byAgent",
					"totals",
					"available"
				],
				"type": "object"
			},
			"HelpcenterArticleAiSummariesDto": {
				"properties": {
					"articleIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"lang": {
						"type": "string"
					}
				},
				"required": [
					"articleIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoadmapWord": {
				"type": "string",
				"enum": [
					"does",
					"asks",
					"never"
				]
			},
			"RoadmapFrequency": {
				"type": "string",
				"enum": [
					"weekly",
					"biweekly",
					"monthly"
				],
				"description": "A schedule as the page shows it: weekly, every two weeks or monthly (the first), a weekday and a time."
			},
			"RoadmapSchedule": {
				"properties": {
					"frequency": {
						"$ref": "#/components/schemas/RoadmapFrequency"
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double"
					},
					"time": {
						"type": "string"
					}
				},
				"required": [
					"frequency",
					"dayOfWeek",
					"time"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoadmapView": {
				"properties": {
					"entitled": {
						"type": "boolean"
					},
					"onboarded": {
						"type": "boolean"
					},
					"mayManage": {
						"type": "boolean"
					},
					"requests": {
						"properties": {
							"leftOpen": {
								"type": "number",
								"format": "double"
							},
							"spotExisting": {
								"type": "boolean"
							},
							"askForDetails": {
								"type": "boolean"
							},
							"mode": {
								"$ref": "#/components/schemas/RoadmapWord"
							}
						},
						"required": [
							"leftOpen",
							"spotExisting",
							"askForDetails",
							"mode"
						],
						"type": "object"
					},
					"priority": {
						"properties": {
							"company": {
								"type": "string",
								"nullable": true
							},
							"goals": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"revenueSource": {
								"type": "string",
								"nullable": true
							},
							"revenue": {
								"type": "boolean"
							}
						},
						"required": [
							"company",
							"goals",
							"revenueSource",
							"revenue"
						],
						"type": "object"
					},
					"tell": {
						"properties": {
							"sentLast30": {
								"type": "number",
								"format": "double"
							},
							"mode": {
								"$ref": "#/components/schemas/RoadmapWord"
							}
						},
						"required": [
							"sentLast30",
							"mode"
						],
						"type": "object"
					},
					"releaseNotes": {
						"properties": {
							"sources": {
								"type": "string"
							},
							"covers": {
								"type": "string"
							},
							"style": {
								"type": "string"
							},
							"comingUp": {
								"items": {
									"properties": {
										"by": {
											"type": "string"
										},
										"when": {
											"type": "string"
										},
										"title": {
											"type": "string"
										},
										"id": {
											"type": "string"
										},
										"runId": {
											"type": "string"
										}
									},
									"required": [
										"by",
										"when",
										"title",
										"id",
										"runId"
									],
									"type": "object"
								},
								"type": "array"
							},
							"timezone": {
								"type": "string"
							},
							"schedule": {
								"allOf": [
									{
										"$ref": "#/components/schemas/RoadmapSchedule"
									}
								],
								"nullable": true
							},
							"mode": {
								"$ref": "#/components/schemas/RoadmapWord"
							}
						},
						"required": [
							"sources",
							"covers",
							"style",
							"comingUp",
							"timezone",
							"schedule",
							"mode"
						],
						"type": "object"
					},
					"newsletter": {
						"properties": {
							"nextIssue": {
								"properties": {
									"taskId": {
										"type": "string",
										"nullable": true
									},
									"state": {
										"type": "string",
										"enum": [
											"waiting",
											"scheduled"
										]
									},
									"sendAt": {
										"type": "string"
									},
									"subject": {
										"type": "string"
									},
									"id": {
										"type": "string"
									},
									"runId": {
										"type": "string"
									}
								},
								"required": [
									"taskId",
									"state",
									"sendAt",
									"subject",
									"id",
									"runId"
								],
								"type": "object",
								"nullable": true
							},
							"sections": {
								"type": "string"
							},
							"senderName": {
								"type": "string",
								"nullable": true
							},
							"senderId": {
								"type": "string",
								"nullable": true
							},
							"audienceCount": {
								"type": "number",
								"format": "double",
								"nullable": true
							},
							"audience": {
								"type": "string",
								"enum": [
									"all",
									"users"
								]
							},
							"schedule": {
								"allOf": [
									{
										"$ref": "#/components/schemas/RoadmapSchedule"
									}
								],
								"nullable": true
							},
							"mode": {
								"$ref": "#/components/schemas/RoadmapWord"
							}
						},
						"required": [
							"nextIssue",
							"sections",
							"senderName",
							"senderId",
							"audienceCount",
							"audience",
							"schedule",
							"mode"
						],
						"type": "object"
					},
					"brief": {
						"properties": {
							"slack": {
								"properties": {
									"channelName": {
										"type": "string"
									},
									"channelId": {
										"type": "string"
									},
									"integrationId": {
										"type": "string"
									}
								},
								"required": [
									"channelName",
									"channelId",
									"integrationId"
								],
								"type": "object",
								"nullable": true
							},
							"team": {
								"items": {
									"properties": {
										"email": {
											"type": "string"
										},
										"name": {
											"type": "string"
										},
										"id": {
											"type": "string"
										}
									},
									"required": [
										"email",
										"name",
										"id"
									],
									"type": "object"
								},
								"type": "array"
							},
							"on": {
								"type": "boolean"
							}
						},
						"required": [
							"slack",
							"team",
							"on"
						],
						"type": "object"
					},
					"routines": {
						"items": {
							"properties": {
								"lastRun": {
									"type": "string",
									"nullable": true
								},
								"owner": {
									"type": "string"
								},
								"schedule": {
									"type": "string"
								},
								"label": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"lastRun",
								"owner",
								"schedule",
								"label",
								"id"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"entitled",
					"onboarded",
					"mayManage",
					"requests",
					"priority",
					"tell",
					"releaseNotes",
					"newsletter",
					"brief",
					"routines"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoadmapScheduleDto": {
				"properties": {
					"frequency": {
						"type": "string",
						"description": "weekly | biweekly | monthly"
					},
					"dayOfWeek": {
						"type": "number",
						"format": "double",
						"description": "0 Sunday … 6 Saturday."
					},
					"time": {
						"type": "string",
						"description": "\"09:00\", project time."
					}
				},
				"required": [
					"frequency",
					"dayOfWeek",
					"time"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateRoadmapDto": {
				"description": "Every field optional: a partial PUT changes only what it names (no initializers, see updateBodyDefaults.test).",
				"properties": {
					"requests": {
						"properties": {
							"spotExisting": {
								"type": "boolean"
							},
							"askForDetails": {
								"type": "boolean"
							},
							"mode": {
								"type": "string"
							}
						},
						"type": "object"
					},
					"priority": {
						"properties": {
							"goals": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"revenue": {
								"type": "boolean"
							}
						},
						"type": "object"
					},
					"tell": {
						"properties": {
							"mode": {
								"type": "string"
							}
						},
						"type": "object"
					},
					"releaseNotes": {
						"properties": {
							"schedule": {
								"allOf": [
									{
										"$ref": "#/components/schemas/RoadmapScheduleDto"
									}
								],
								"nullable": true
							},
							"mode": {
								"type": "string"
							}
						},
						"type": "object"
					},
					"newsletter": {
						"properties": {
							"senderId": {
								"type": "string"
							},
							"audience": {
								"type": "string"
							},
							"schedule": {
								"allOf": [
									{
										"$ref": "#/components/schemas/RoadmapScheduleDto"
									}
								],
								"nullable": true
							},
							"mode": {
								"type": "string"
							}
						},
						"type": "object"
					},
					"brief": {
						"properties": {
							"slack": {
								"properties": {
									"channelName": {
										"type": "string"
									},
									"channelId": {
										"type": "string"
									},
									"integrationId": {
										"type": "string"
									}
								},
								"required": [
									"channelId",
									"integrationId"
								],
								"type": "object",
								"nullable": true
							},
							"teamIds": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"on": {
								"type": "boolean"
							}
						},
						"type": "object"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"SetupRoadmapDto": {
				"properties": {
					"requests": {
						"type": "string"
					},
					"tell": {
						"type": "string"
					},
					"notes": {
						"type": "string"
					},
					"newsletter": {
						"type": "string"
					},
					"brief": {
						"type": "string",
						"description": "on | off"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiPmRoutineBody": {
				"properties": {
					"name": {
						"type": "string"
					},
					"prompt": {
						"type": "string"
					},
					"enabled": {
						"type": "boolean"
					},
					"shareRuns": {
						"type": "boolean"
					},
					"trigger": {
						"description": "`{ type: 'scheduled', … }` or `{ type: 'event', source: 'gleap' | 'app', … }`, checked by kaipm.routine.logic."
					}
				},
				"required": [
					"name",
					"prompt",
					"trigger"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TicketIdsDto": {
				"properties": {
					"ticketIds": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"message": {
						"type": "string",
						"description": "Optional note; `{title}` is replaced per request. Empty = Kai's default note."
					}
				},
				"required": [
					"ticketIds"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DraftDto": {
				"properties": {
					"refresh": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ReplyDto": {
				"properties": {
					"message": {
						"type": "string"
					}
				},
				"required": [
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PublishNotesDto": {
				"properties": {
					"notes": {
						"items": {
							"properties": {
								"markdownBody": {
									"type": "string"
								},
								"title": {
									"type": "string"
								},
								"id": {
									"type": "string"
								},
								"runId": {
									"type": "string"
								}
							},
							"required": [
								"id",
								"runId"
							],
							"type": "object"
						},
						"type": "array",
						"description": "`title` / `markdownBody`: the post as the Needs you card left it (unset: Kai's draft)."
					}
				},
				"required": [
					"notes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"WorkspaceSettingsDto": {
				"properties": {
					"cadence": {
						"type": "string"
					},
					"modes": {
						"properties": {
							"intake": {
								"type": "string"
							},
							"news": {
								"type": "string"
							},
							"notes": {
								"type": "string"
							},
							"tell": {
								"type": "string"
							}
						},
						"type": "object"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"MemoryDto": {
				"properties": {
					"text": {
						"type": "string"
					},
					"group": {
						"type": "string"
					},
					"source": {
						"type": "string"
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiChannelSwitchDto": {
				"properties": {
					"type": {
						"type": "string",
						"description": "widget, email, whatsapp, instagram, facebook, telegram, slack or discord."
					},
					"channelId": {
						"type": "string",
						"nullable": true,
						"description": "One account of a multi-account app (a WhatsApp number, an Instagram account, …); leave out for the whole app."
					},
					"on": {
						"type": "boolean",
						"description": "Kai answers new conversations first there, or not."
					},
					"via": {
						"type": "string",
						"description": "Where the switch was made: settings (default), hire or fix (the coverage line)."
					}
				},
				"required": [
					"type",
					"on"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiSupportCodeFixesDto": {
				"description": "Kai Support › Code fixes: only the given parts change (kaiSupportCodeFixes.service).",
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "Code fixes on or off (the built-in skill \"Fix bugs in code\"). Off: Kai Support files no fix card and starts no fix."
					},
					"start": {
						"type": "string",
						"enum": [
							"auto",
							"ask"
						],
						"description": "auto: Kai Support starts the fix itself when auto start allows it. ask: it never does; a teammate starts it from the ticket (no card)."
					},
					"autoStart": {
						"properties": {
							"potentialBugs": {
								"type": "boolean"
							},
							"confirmedBugs": {
								"type": "boolean"
							},
							"deviceId": {
								"type": "string",
								"nullable": true
							},
							"mode": {
								"type": "string",
								"enum": [
									"off",
									"cloud",
									"bridge"
								]
							}
						},
						"required": [
							"mode"
						],
						"type": "object",
						"description": "Where the fixes Kai Support starts run, and which bugs start: off, cloud, or bridge with one of my own devices. Runs as me."
					},
					"defaultModel": {
						"type": "string",
						"nullable": true,
						"description": "The fix runs' model (\"provider/model\"); null = Kai Code's default."
					},
					"defaultEffort": {
						"type": "string",
						"nullable": true,
						"description": "low, medium, high, extra_high or max; null = the model's default."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"NeedsYouLimitProposal": {
				"description": "One action Kai keeps asking the team about, with what a looser limit would cover (Kai Copilot proposes it).",
				"properties": {
					"actionKey": {
						"type": "string"
					},
					"approved": {
						"type": "number",
						"format": "double"
					},
					"declined": {
						"type": "number",
						"format": "double"
					},
					"maxApprovedAmount": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "Minor units; money actions only."
					},
					"currency": {
						"type": "string",
						"nullable": true
					},
					"suggestedLimit": {
						"type": "number",
						"format": "double",
						"nullable": true,
						"description": "A round limit covering every approved amount (minor units); money actions only."
					},
					"firstAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastAt": {
						"type": "string",
						"format": "date-time"
					}
				},
				"required": [
					"actionKey",
					"approved",
					"declined",
					"maxApprovedAmount",
					"currency",
					"suggestedLimit",
					"firstAt",
					"lastAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NeedsYouBulkGroup": {
				"description": "The same OK waiting on several tickets (\"Credit 40 customers $10 each?\").",
				"properties": {
					"key": {
						"type": "string"
					},
					"actionKey": {
						"type": "string"
					},
					"amount": {
						"type": "number",
						"format": "double",
						"nullable": true
					},
					"currency": {
						"type": "string",
						"nullable": true
					},
					"okFrom": {
						"type": "string",
						"nullable": true
					},
					"asks": {
						"items": {
							"properties": {
								"createdAt": {
									"type": "string",
									"format": "date-time"
								},
								"ticketId": {
									"type": "string"
								},
								"taskId": {
									"type": "string"
								}
							},
							"required": [
								"createdAt",
								"ticketId",
								"taskId"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"key",
					"actionKey",
					"amount",
					"currency",
					"okFrom",
					"asks"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NeedsYouBulkApproveResult": {
				"properties": {
					"approved": {
						"type": "number",
						"format": "double"
					},
					"failed": {
						"items": {
							"properties": {
								"reason": {
									"type": "string"
								},
								"taskId": {
									"type": "string"
								}
							},
							"required": [
								"reason",
								"taskId"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"approved",
					"failed"
				],
				"type": "object",
				"additionalProperties": false
			},
			"NeedsYouBulkApproveBody": {
				"properties": {
					"key": {
						"type": "string",
						"description": "A group's key from `GET /needs-you/bulk`."
					},
					"taskIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Approve only these cards of the group (all when left out)."
					}
				},
				"required": [
					"key"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DetectedPath": {
				"type": "string",
				"enum": [
					"saas",
					"ecommerce",
					"services"
				]
			},
			"DetectionFindingKey": {
				"type": "string",
				"enum": [
					"business",
					"apps",
					"billing",
					"help_center",
					"code",
					"support_email",
					"language",
					"shop",
					"returns",
					"social",
					"booking",
					"whatsapp",
					"site"
				]
			},
			"DetectionSource": {
				"type": "string",
				"enum": [
					"homepage",
					"dns",
					"app_store",
					"github",
					"pages",
					"email"
				]
			},
			"DetectionOption": {
				"properties": {
					"value": {
						"type": "string"
					},
					"label": {
						"type": "string"
					}
				},
				"required": [
					"value",
					"label"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DetectionFinding": {
				"properties": {
					"key": {
						"$ref": "#/components/schemas/DetectionFindingKey"
					},
					"value": {
						"type": "string"
					},
					"evidence": {
						"type": "string"
					},
					"effect": {
						"type": "string",
						"nullable": true
					},
					"source": {
						"$ref": "#/components/schemas/DetectionSource"
					},
					"confidence": {
						"type": "number",
						"format": "double"
					},
					"logo": {
						"type": "string",
						"nullable": true
					},
					"options": {
						"items": {
							"$ref": "#/components/schemas/DetectionOption"
						},
						"type": "array"
					},
					"state": {
						"type": "string",
						"enum": [
							"reading",
							"found"
						]
					},
					"paths": {
						"items": {
							"$ref": "#/components/schemas/DetectedPath"
						},
						"type": "array"
					}
				},
				"required": [
					"key",
					"value",
					"evidence",
					"source",
					"confidence",
					"state"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MailProvider": {
				"type": "string",
				"enum": [
					"google",
					"microsoft",
					"other"
				]
			},
			"Builder": {
				"type": "string",
				"enum": [
					"wordpress",
					"wix",
					"squarespace",
					"webflow"
				]
			},
			"DetectionView": {
				"properties": {
					"domain": {
						"type": "string"
					},
					"companyName": {
						"type": "string"
					},
					"firstName": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"none",
							"reading",
							"done"
						]
					},
					"path": {
						"allOf": [
							{
								"$ref": "#/components/schemas/DetectedPath"
							}
						],
						"nullable": true
					},
					"pathConfidence": {
						"type": "number",
						"format": "double"
					},
					"pathEvidence": {
						"type": "string"
					},
					"findings": {
						"items": {
							"$ref": "#/components/schemas/DetectionFinding"
						},
						"type": "array"
					},
					"audience": {
						"type": "string"
					},
					"pages": {
						"properties": {
							"sources": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"read": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"sources",
							"read"
						],
						"type": "object"
					},
					"brand": {
						"properties": {
							"backgroundColor": {
								"type": "string"
							},
							"logo": {
								"type": "string",
								"nullable": true
							},
							"headerColor": {
								"type": "string"
							},
							"color": {
								"type": "string"
							}
						},
						"required": [
							"backgroundColor",
							"logo",
							"headerColor",
							"color"
						],
						"type": "object"
					},
					"language": {
						"type": "string"
					},
					"languages": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"formality": {
						"type": "string",
						"enum": [
							"formal",
							"informal"
						],
						"nullable": true
					},
					"questions": {
						"items": {
							"properties": {
								"needs": {
									"type": "string",
									"nullable": true
								},
								"text": {
									"type": "string"
								},
								"key": {
									"type": "string"
								}
							},
							"required": [
								"text",
								"key"
							],
							"type": "object"
						},
						"type": "array"
					},
					"apps": {
						"properties": {
							"android": {
								"properties": {
									"name": {
										"type": "string"
									},
									"id": {
										"type": "string"
									}
								},
								"required": [
									"name",
									"id"
								],
								"type": "object",
								"nullable": true
							},
							"ios": {
								"properties": {
									"name": {
										"type": "string"
									},
									"id": {
										"type": "string"
									}
								},
								"required": [
									"name",
									"id"
								],
								"type": "object",
								"nullable": true
							},
							"web": {
								"type": "boolean"
							}
						},
						"required": [
							"android",
							"ios",
							"web"
						],
						"type": "object"
					},
					"githubOrg": {
						"type": "string",
						"nullable": true
					},
					"mailProvider": {
						"allOf": [
							{
								"$ref": "#/components/schemas/MailProvider"
							}
						],
						"nullable": true
					},
					"supportAddress": {
						"type": "string",
						"nullable": true
					},
					"helpDesk": {
						"type": "string",
						"nullable": true
					},
					"billing": {
						"type": "string",
						"nullable": true
					},
					"shop": {
						"properties": {
							"products": {
								"type": "number",
								"format": "double",
								"nullable": true
							},
							"address": {
								"type": "string",
								"nullable": true
							},
							"platform": {
								"type": "string",
								"enum": [
									"shopify",
									"woocommerce",
									"other"
								],
								"nullable": true
							}
						},
						"required": [
							"products",
							"address",
							"platform"
						],
						"type": "object",
						"nullable": true
					},
					"builder": {
						"allOf": [
							{
								"$ref": "#/components/schemas/Builder"
							}
						],
						"nullable": true
					},
					"whatsapp": {
						"type": "string",
						"nullable": true
					},
					"instagram": {
						"type": "string",
						"nullable": true
					},
					"booking": {
						"type": "string",
						"nullable": true
					},
					"corrections": {
						"items": {
							"properties": {
								"at": {
									"type": "string"
								},
								"to": {
									"type": "string",
									"nullable": true
								},
								"from": {
									"type": "string",
									"nullable": true
								},
								"field": {
									"type": "string"
								},
								"screen": {
									"type": "string"
								}
							},
							"required": [
								"at",
								"to",
								"from",
								"field",
								"screen"
							],
							"type": "object"
						},
						"type": "array"
					},
					"readMs": {
						"type": "number",
						"format": "double",
						"nullable": true
					}
				},
				"required": [
					"domain",
					"companyName",
					"firstName",
					"status",
					"path",
					"pathConfidence",
					"pathEvidence",
					"findings",
					"audience",
					"pages",
					"brand",
					"language",
					"languages",
					"formality",
					"questions",
					"apps",
					"githubOrg",
					"mailProvider",
					"supportAddress",
					"helpDesk",
					"billing",
					"shop",
					"builder",
					"whatsapp",
					"instagram",
					"booking",
					"corrections",
					"readMs"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OnboardingDetectionCorrectionDto": {
				"properties": {
					"screen": {
						"type": "string",
						"description": "The screen it was corrected on: `type`, `findings` or `team`."
					},
					"field": {
						"type": "string",
						"description": "What was corrected (`business`, `billing`, `apps`, …)."
					},
					"from": {
						"type": "string",
						"nullable": true
					},
					"to": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"screen",
					"field"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SaveOnboardingDetectionDto": {
				"properties": {
					"organisationId": {
						"type": "string",
						"description": "The workspace the flow builds (one the person belongs to)."
					},
					"corrections": {
						"items": {
							"$ref": "#/components/schemas/OnboardingDetectionCorrectionDto"
						},
						"type": "array"
					}
				},
				"required": [
					"corrections"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AskTestQuestionDto": {
				"properties": {
					"question": {
						"type": "string",
						"description": "The question, at most 300 characters."
					},
					"key": {
						"type": "string",
						"description": "Which suggested question it was (`q1`…), or `typed`."
					},
					"auto": {
						"type": "boolean",
						"description": "The question the screen asks itself on opening (free once, as in the preview)."
					}
				},
				"required": [
					"question"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SettingType": {
				"type": "string",
				"enum": [
					"boolean",
					"string",
					"text",
					"number",
					"enum",
					"color",
					"url",
					"stringList",
					"json"
				]
			},
			"SettingsChangeResult": {
				"properties": {
					"changed": {
						"items": {
							"properties": {
								"id": {
									"type": "string"
								},
								"after": {},
								"before": {},
								"key": {
									"type": "string"
								},
								"line": {
									"type": "string"
								},
								"page": {
									"type": "string"
								}
							},
							"required": [
								"line",
								"page"
							],
							"type": "object"
						},
						"type": "array"
					},
					"refused": {
						"items": {
							"properties": {
								"reason": {
									"type": "string"
								},
								"change": {
									"type": "string"
								}
							},
							"required": [
								"reason",
								"change"
							],
							"type": "object"
						},
						"type": "array"
					},
					"needsConfirmation": {
						"items": {
							"properties": {
								"why": {
									"type": "string"
								},
								"change": {
									"type": "string"
								}
							},
							"required": [
								"why",
								"change"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Risky changes not run: the person says yes first (`confirmed: true`, or the card in Kai Copilot)."
					}
				},
				"required": [
					"changed",
					"refused"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SettingChangeDto": {
				"description": "One settings change: a field (`key` + `value`), or an item of a page of items (`page` + `op`, with `id` / `values`).",
				"properties": {
					"key": {
						"type": "string"
					},
					"value": {},
					"page": {
						"type": "string"
					},
					"op": {
						"type": "string",
						"enum": [
							"create",
							"update",
							"delete"
						]
					},
					"id": {
						"type": "string"
					},
					"values": {
						"properties": {},
						"additionalProperties": {},
						"type": "object"
					},
					"site": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateSettingsDto": {
				"properties": {
					"changes": {
						"items": {
							"$ref": "#/components/schemas/SettingChangeDto"
						},
						"type": "array"
					},
					"confirmed": {
						"type": "boolean",
						"description": "The person said yes to the risky changes listed in `needsConfirmation` (SSO, identity verification, deleting …)."
					}
				},
				"required": [
					"changes"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateSkillBody": {
				"properties": {
					"agentId": {
						"type": "string",
						"description": "An engine agent's id, or leave it out and send `agentKey: 'kai-support'`."
					},
					"agentKey": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"definition": {
						"description": "A full or partial skill definition (sanitised; unknown fields are dropped)."
					},
					"rolloutPercent": {
						"type": "number",
						"format": "double"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ConvertAiTaskBody": {
				"properties": {
					"botId": {
						"type": "string",
						"description": "The workflow AI task (a Bot of type aitask) of this project."
					}
				},
				"required": [
					"botId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"SaveSkillDraftBody": {
				"properties": {
					"definition": {
						"description": "The fields to change; sections (`start`, `uses`) replace what they name."
					},
					"summary": {
						"type": "string"
					},
					"baseVersion": {
						"type": "number",
						"format": "double",
						"description": "The live version the editor loaded the skill at: saving over a newer live version makes the publish ask (409)."
					},
					"draftHash": {
						"type": "string",
						"description": "The draft's `definitionHash` the editor last loaded or saved: a teammate's newer save there answers 409."
					}
				},
				"required": [
					"definition"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PublishSkillBody": {
				"properties": {
					"rolloutPercent": {
						"type": "number",
						"format": "double"
					},
					"force": {
						"type": "boolean",
						"description": "Publish although another version went live since the draft was started."
					},
					"fullAfterHours": {
						"type": "number",
						"format": "double",
						"description": "A staged publish (rolloutPercent < 100): everyone this many hours later (1-336), unless undone."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"UpdateSkillSettingsBody": {
				"properties": {
					"status": {
						"type": "string",
						"description": "live | paused (a published skill), draft (never published)."
					},
					"rolloutPercent": {
						"type": "number",
						"format": "double"
					},
					"mode": {
						"type": "string",
						"description": "Built-in Gleap skills: one of their `modes`."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"StartSkillTestBody": {
				"properties": {
					"conversations": {
						"type": "number",
						"format": "double",
						"description": "How many past conversations (1-12, default 10)."
					},
					"ticketIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Test on these tickets instead of the ones Kai picks."
					},
					"includeEscalated": {
						"type": "boolean",
						"description": "Kai Support skills: also replay on the escalated stage (Kai Resolve's model and tools)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TrySkillBody": {
				"properties": {
					"messages": {
						"items": {
							"properties": {
								"text": {
									"type": "string"
								},
								"role": {
									"type": "string"
								}
							},
							"required": [
								"text",
								"role"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The sandbox conversation so far, oldest first, ending with the test customer's message."
					},
					"stage": {
						"type": "string",
						"description": "Kai Support skills: `escalated` answers as on an escalated ticket (its model and tools)."
					}
				},
				"required": [
					"messages"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartSkillOnTicketBody": {
				"properties": {
					"ticketId": {
						"type": "string"
					}
				},
				"required": [
					"ticketId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OperatorRoutineDto": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "Paused (false) or running on its schedule (true)."
					}
				},
				"required": [
					"enabled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoutineUndoDto": {
				"properties": {
					"editId": {
						"type": "string",
						"description": "The change to undo (the change card's `editId`)."
					}
				},
				"required": [
					"editId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MorningBriefDto": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "On (weekdays at 8:00 in my timezone) or off."
					},
					"timezone": {
						"type": "string",
						"nullable": true,
						"description": "The browser's timezone (IANA) for a brief turned on now."
					}
				},
				"required": [
					"enabled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RoutinePresetDto": {
				"properties": {
					"preset": {
						"type": "string",
						"description": "One of Gleap's job routines (GET operator/routines/presets)."
					},
					"enabled": {
						"type": "boolean"
					},
					"timezone": {
						"type": "string",
						"nullable": true,
						"description": "The browser's timezone (IANA) for a routine turned on now."
					}
				},
				"required": [
					"preset",
					"enabled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotContextDto": {
				"description": "Where Kai Copilot was opened (copilotContext.logic): checked and read as you on the server.",
				"properties": {
					"surface": {
						"type": "string",
						"description": "chat | ticket | page | setup | routine | needs_you"
					},
					"ticketId": {
						"type": "string",
						"nullable": true,
						"description": "The ticket of the inbox pane or a Needs you card."
					},
					"page": {
						"properties": {
							"selection": {
								"type": "string",
								"nullable": true
							},
							"entity": {
								"properties": {
									"id": {
										"type": "string"
									},
									"type": {
										"type": "string"
									}
								},
								"required": [
									"id",
									"type"
								],
								"type": "object",
								"nullable": true,
								"description": "What the page shows: ticket, skill, agent, workflow, article, report, board, contact, company, task, …"
							},
							"title": {
								"type": "string",
								"nullable": true
							},
							"route": {
								"type": "string",
								"nullable": true
							}
						},
						"type": "object",
						"nullable": true
					}
				},
				"required": [
					"surface"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OperatorAskDto": {
				"properties": {
					"text": {
						"type": "string",
						"description": "What the person asked, in their words."
					},
					"page": {
						"properties": {
							"path": {
								"type": "string"
							},
							"label": {
								"type": "string"
							}
						},
						"type": "object",
						"nullable": true,
						"description": "The page they asked from (⌘K): its label (\"Ticket #226301\") and path."
					},
					"conversationId": {
						"type": "string",
						"nullable": true,
						"description": "One of my Kai Copilot chats to ask in; left out = a new chat."
					},
					"timezone": {
						"type": "string",
						"nullable": true,
						"description": "The browser's timezone (IANA), kept on a new chat."
					},
					"context": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CopilotContextDto"
							}
						],
						"nullable": true,
						"description": "Where you asked from (the page, a ticket): replaces `page`."
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CopilotChatDto": {
				"properties": {
					"context": {
						"allOf": [
							{
								"$ref": "#/components/schemas/CopilotContextDto"
							}
						],
						"nullable": true,
						"description": "A ticket context is your one chat about that ticket (found or made); any other starts a new chat."
					},
					"timezone": {
						"type": "string",
						"nullable": true,
						"description": "The browser's timezone (IANA), kept on a new chat."
					},
					"title": {
						"type": "string",
						"nullable": true,
						"description": "A new chat's title (default: the page's title, else \"New chat\")."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TaskSettingsDto": {
				"properties": {
					"defaultTeamId": {
						"type": "string",
						"nullable": true
					},
					"escalation": {
						"type": "boolean"
					},
					"safetyNet": {
						"type": "boolean",
						"description": "Safety net: Urgent take-over tasks for conversations nobody is on (needs a default team)."
					},
					"dueMs": {
						"properties": {
							"low": {
								"type": "number",
								"format": "double"
							},
							"normal": {
								"type": "number",
								"format": "double"
							},
							"high": {
								"type": "number",
								"format": "double"
							},
							"urgent": {
								"type": "number",
								"format": "double"
							}
						},
						"type": "object"
					},
					"teams": {
						"items": {
							"properties": {
								"leadId": {
									"type": "string",
									"nullable": true
								},
								"handles": {
									"type": "string",
									"nullable": true
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"id"
							],
							"type": "object"
						},
						"type": "array"
					},
					"kaiCodeAuto": {
						"properties": {
							"potentialBugs": {
								"type": "boolean",
								"nullable": true
							},
							"confirmedBugs": {
								"type": "boolean",
								"nullable": true
							},
							"deviceId": {
								"type": "string",
								"nullable": true
							},
							"mode": {
								"type": "string"
							}
						},
						"required": [
							"mode"
						],
						"type": "object",
						"description": "Kai Code auto mode: start fix cards by themselves in the cloud or on a bridge device."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiCodeAutoDto": {
				"properties": {
					"mode": {
						"type": "string",
						"description": "off | cloud | bridge (where auto start runs)."
					},
					"deviceId": {
						"type": "string",
						"nullable": true,
						"description": "bridge: one of my own bridge devices."
					},
					"confirmedBugs": {
						"type": "boolean",
						"nullable": true,
						"description": "Confirmed bugs start by themselves (unset = on)."
					},
					"potentialBugs": {
						"type": "boolean",
						"nullable": true,
						"description": "Potential bugs (the investigation failed or could not confirm the cause) start too (unset = on)."
					}
				},
				"required": [
					"mode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateTodoDto": {
				"properties": {
					"title": {
						"type": "string"
					},
					"description": {
						"type": "string",
						"nullable": true
					},
					"priority": {
						"type": "string",
						"nullable": true,
						"description": "urgent | high | normal | low; left out = from the item's SLA, else normal."
					},
					"dueAt": {
						"type": "string",
						"nullable": true
					},
					"userId": {
						"type": "string",
						"nullable": true,
						"description": "A person or a team of this project; left out = routed like any task."
					},
					"teamId": {
						"type": "string",
						"nullable": true
					},
					"ticketId": {
						"type": "string",
						"nullable": true
					},
					"sessionId": {
						"type": "string",
						"nullable": true
					},
					"companyId": {
						"type": "string",
						"nullable": true
					},
					"pipelineEntryId": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ForwardMentionDto": {
				"properties": {
					"ticketId": {
						"type": "string"
					},
					"toUserId": {
						"type": "string",
						"description": "A person on this project."
					},
					"quote": {
						"type": "string",
						"nullable": true,
						"description": "The question, quoted in the note."
					},
					"fromName": {
						"type": "string",
						"nullable": true,
						"description": "Who asked originally."
					},
					"notificationIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "My mention's notifications, marked done once it's passed on."
					}
				},
				"required": [
					"ticketId",
					"toUserId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AssignTaskDto": {
				"properties": {
					"userId": {
						"type": "string",
						"nullable": true,
						"description": "A person on this project; leave out (or null) together with teamId to put it back in the pool."
					},
					"teamId": {
						"type": "string",
						"nullable": true,
						"description": "A team of this project."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"LaterTaskDto": {
				"properties": {
					"until": {
						"type": "string",
						"nullable": true,
						"description": "ISO time within the next year; null clears it."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TaskPriorityDto": {
				"properties": {
					"priority": {
						"type": "string"
					}
				},
				"required": [
					"priority"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TaskStatusDto": {
				"properties": {
					"status": {
						"type": "string",
						"description": "open (To do) or in_progress."
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CompleteTaskDto": {
				"properties": {
					"note": {
						"type": "string",
						"nullable": true
					},
					"takeTicket": {
						"type": "boolean",
						"nullable": true,
						"description": "Take over: also make me the ticket's owner (default true)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TeachApplyDto": {
				"properties": {
					"answer": {
						"type": "string",
						"nullable": true,
						"description": "Snippets: the corrected answer as the person edited it; left out = Kai's drafted correction."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TaskCommentDto": {
				"properties": {
					"text": {
						"type": "string",
						"description": "Plain text, at most 4000 characters."
					},
					"mentions": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "People on this project the comment @-mentions (anyone else is dropped)."
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TaskCommentEditDto": {
				"properties": {
					"text": {
						"type": "string"
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AiProvenanceAnswer": {
				"properties": {
					"aiGenerated": {
						"type": "boolean"
					},
					"generatedOn": {
						"type": "string",
						"nullable": true,
						"description": "When the matching message was written (day precision); null when none matched."
					}
				},
				"required": [
					"aiGenerated",
					"generatedOn"
				],
				"type": "object",
				"additionalProperties": false
			},
			"VerifyAiProvenanceDto": {
				"properties": {
					"text": {
						"type": "string",
						"description": "The message text as received (email body, chat or WhatsApp message)."
					}
				},
				"required": [
					"text"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportPageDTO": {
				"description": "A stored page as the API returns it, with its spec (decoded from `specJson`).",
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"ownerName": {
						"type": "string"
					},
					"defaultKey": {
						"type": "string"
					},
					"templateVersion": {
						"type": "number",
						"format": "double"
					},
					"sharedWithProject": {
						"type": "boolean"
					},
					"version": {
						"type": "number",
						"format": "double"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"publicLinks": {
						"properties": {
							"hasTv": {
								"type": "boolean"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"hasTv",
							"count"
						],
						"type": "object",
						"description": "Active public links showing this page, on the list only; absent when there are none."
					},
					"spec": {}
				},
				"required": [
					"id",
					"title",
					"owner",
					"sharedWithProject",
					"version",
					"spec"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportPageSummaryDTO": {
				"description": "A stored page without its spec, as the `shared` half of the list returns it. `ownerName` is filled for pages the caller does not own.",
				"properties": {
					"id": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"ownerName": {
						"type": "string"
					},
					"defaultKey": {
						"type": "string"
					},
					"templateVersion": {
						"type": "number",
						"format": "double"
					},
					"sharedWithProject": {
						"type": "boolean"
					},
					"version": {
						"type": "number",
						"format": "double"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"publicLinks": {
						"properties": {
							"hasTv": {
								"type": "boolean"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"hasTv",
							"count"
						],
						"type": "object",
						"description": "Active public links showing this page, on the list only; absent when there are none."
					}
				},
				"required": [
					"id",
					"title",
					"owner",
					"sharedWithProject",
					"version"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportPageListDTO": {
				"properties": {
					"mine": {
						"items": {
							"$ref": "#/components/schemas/ReportPageDTO"
						},
						"type": "array",
						"description": "The caller's own pages with their spec, shared or not, copies of defaults included (with `defaultKey`). Newest first."
					},
					"shared": {
						"items": {
							"$ref": "#/components/schemas/ReportPageSummaryDTO"
						},
						"type": "array",
						"description": "Pages teammates shared with the project, never the caller's own, without spec: open one with GET /{pageId}. Newest first."
					}
				},
				"required": [
					"mine",
					"shared"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DefaultReportPagesDTO": {
				"description": "GET /report-pages/defaults. `pages` are DefaultReportPage templates (reportpage.pagespec.ts), typed\n`any` here because tsoa cannot describe the spec (tuples, dynamic maps); the frontend mirrors the type.",
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"pages": {
						"items": {},
						"type": "array"
					},
					"flexible": {
						"type": "boolean",
						"description": "Whether flexible report queries (POST /report-queries) are switched on for the project."
					}
				},
				"required": [
					"enabled",
					"pages",
					"flexible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CatalogueKind": {
				"type": "string",
				"enum": [
					"fact",
					"barChart",
					"heatmap",
					"list"
				]
			},
			"CatalogueFormat": {
				"type": "string",
				"enum": [
					"auto",
					"count",
					"percent",
					"duration",
					"rating",
					"currency"
				]
			},
			"CatalogueDisplay": {
				"type": "string",
				"enum": [
					"kpi",
					"timeseries",
					"heatmap",
					"table",
					"distribution"
				]
			},
			"Pick_CatalogueEntry.Exclude_keyofCatalogueEntry.scope__": {
				"properties": {
					"label": {
						"type": "string"
					},
					"plan": {
						"type": "string",
						"enum": [
							"ADVANCED_REPORTS"
						],
						"nullable": false
					},
					"kind": {
						"$ref": "#/components/schemas/CatalogueKind"
					},
					"format": {
						"$ref": "#/components/schemas/CatalogueFormat"
					},
					"chartType": {
						"type": "string",
						"description": "The wire value of the chart type (differs from the enum key for e.g. KAI_POSITIVE_FEEDBACK_RATE)."
					},
					"lowerIsBetter": {
						"type": "boolean"
					},
					"displays": {
						"items": {
							"$ref": "#/components/schemas/CatalogueDisplay"
						},
						"type": "array"
					}
				},
				"required": [
					"label",
					"kind",
					"format",
					"chartType",
					"lowerIsBetter",
					"displays"
				],
				"type": "object",
				"description": "From T, pick a set of properties whose keys are in the union K"
			},
			"Omit_CatalogueEntry.scope_": {
				"$ref": "#/components/schemas/Pick_CatalogueEntry.Exclude_keyofCatalogueEntry.scope__",
				"description": "Construct a type with the properties of T except for those in type K."
			},
			"CreateReportPageDTO": {
				"properties": {
					"title": {
						"type": "string",
						"description": "Required, non-empty once trimmed, at most MAX_TITLE (120) characters; the service checks the trimmed value.",
						"minLength": 1,
						"maxLength": 120
					},
					"spec": {},
					"fromDefaultKey": {
						"type": "string",
						"description": "Copy a default page: sets `defaultKey` and `templateVersion` on the new page."
					},
					"fromPageId": {
						"type": "string",
						"description": "Copy a page visible to the caller (their own or a shared one)."
					}
				},
				"required": [
					"title"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateReportPageDTO": {
				"properties": {
					"title": {
						"type": "string",
						"description": "When sent: non-empty once trimmed, at most MAX_TITLE (120) characters, like on create.",
						"minLength": 1,
						"maxLength": 120
					},
					"spec": {},
					"expectedVersion": {
						"type": "number",
						"format": "double",
						"description": "The `version` the editor loaded. A newer stored version answers 409."
					}
				},
				"required": [
					"expectedVersion"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ShareReportPageDTO": {
				"properties": {
					"shared": {
						"type": "boolean"
					}
				},
				"required": [
					"shared"
				],
				"type": "object",
				"additionalProperties": false
			},
			"LinkDisplay": {
				"type": "string",
				"enum": [
					"tv",
					"page"
				]
			},
			"ReportShareLinkStatus": {
				"type": "string",
				"enum": [
					"serving",
					"off",
					"maker_left",
					"no_pages",
					"plan"
				],
				"description": "Whether a link serves right now, computed per request (reportsharelink.rules.ts servingState), never stored."
			},
			"ReportShareLinkDTO": {
				"description": "A link as the management API returns it. `url` (it carries the token) is filled only for holders\nof the share permission; the frozen settings and the token itself never leave the server here.",
				"properties": {
					"id": {
						"type": "string"
					},
					"pages": {
						"items": {
							"properties": {
								"title": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"title",
								"id"
							],
							"type": "object"
						},
						"type": "array",
						"description": "The link's pages that still exist, in link order."
					},
					"display": {
						"$ref": "#/components/schemas/LinkDisplay"
					},
					"rotateSeconds": {
						"type": "number",
						"format": "double"
					},
					"hideTeammateNames": {
						"type": "boolean"
					},
					"active": {
						"type": "boolean"
					},
					"status": {
						"$ref": "#/components/schemas/ReportShareLinkStatus"
					},
					"createdBy": {
						"properties": {
							"name": {
								"type": "string"
							},
							"id": {
								"type": "string"
							}
						},
						"required": [
							"name",
							"id"
						],
						"type": "object"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastOpenedAt": {
						"type": "string",
						"format": "date-time"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"id",
					"pages",
					"display",
					"rotateSeconds",
					"hideTeammateNames",
					"active",
					"status",
					"createdBy"
				],
				"type": "object",
				"additionalProperties": false
			},
			"FrozenReportState": {
				"properties": {
					"compare": {
						"type": "boolean"
					},
					"workingHours": {
						"type": "boolean"
					},
					"interval": {
						"type": "string",
						"enum": [
							"day",
							"month",
							"year"
						],
						"description": "The frontend ReportInterval."
					},
					"aggregate": {
						"type": "string",
						"enum": [
							"median",
							"average"
						]
					},
					"team": {
						"type": "string",
						"nullable": true
					},
					"agent": {
						"type": "string",
						"nullable": true
					},
					"assignee": {
						"type": "string",
						"nullable": true
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"types": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"range": {
						"anyOf": [
							{
								"properties": {
									"preset": {
										"type": "string",
										"enum": [
											"7d",
											"30d",
											"ytd",
											"12m",
											"all"
										]
									}
								},
								"required": [
									"preset"
								],
								"type": "object"
							},
							{
								"properties": {
									"to": {
										"type": "string"
									},
									"from": {
										"type": "string"
									},
									"preset": {
										"type": "string",
										"enum": [
											"custom"
										],
										"nullable": false
									}
								},
								"required": [
									"to",
									"from",
									"preset"
								],
								"type": "object"
							}
						]
					}
				},
				"required": [
					"compare",
					"workingHours",
					"interval",
					"aggregate",
					"team",
					"agent",
					"assignee",
					"tags",
					"types",
					"range"
				],
				"type": "object",
				"description": "The filters of a page frozen into a link: mirrors the frontend `ReportState`. Range presets are\nrelative ('7d' means the last seven days on every request); a custom range is fixed ISO days."
			},
			"CreateReportShareLinkDTO": {
				"properties": {
					"pageId": {
						"type": "string",
						"description": "The stored page the link is made from; it freezes `state`."
					},
					"extraPageIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "More stored pages for a rotation; they freeze their saved defaults."
					},
					"state": {
						"$ref": "#/components/schemas/FrozenReportState",
						"description": "The page's current filters, frozen into the link; the service validates the shape."
					},
					"timezone": {
						"type": "string",
						"description": "An IANA zone name, frozen at creation."
					},
					"display": {
						"$ref": "#/components/schemas/LinkDisplay"
					},
					"rotateSeconds": {
						"type": "number",
						"format": "double",
						"description": "Seconds per page in a rotation."
					},
					"hideTeammateNames": {
						"type": "boolean"
					}
				},
				"required": [
					"pageId",
					"state",
					"timezone"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateReportShareLinkDTO": {
				"properties": {
					"active": {
						"type": "boolean"
					},
					"display": {
						"$ref": "#/components/schemas/LinkDisplay"
					},
					"rotateSeconds": {
						"type": "number",
						"format": "double",
						"description": "Seconds per page in a rotation."
					},
					"hideTeammateNames": {
						"type": "boolean"
					},
					"pageIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Page ids in rotation order, 1 to MAX_LINK_PAGES."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ApiSpecSource": {
				"anyOf": [
					{
						"properties": {
							"url": {
								"type": "string"
							},
							"type": {
								"type": "string",
								"enum": [
									"url"
								],
								"nullable": false
							}
						},
						"required": [
							"url",
							"type"
						],
						"type": "object"
					},
					{
						"properties": {
							"branch": {
								"type": "string"
							},
							"path": {
								"type": "string"
							},
							"repo": {
								"type": "string"
							},
							"owner": {
								"type": "string"
							},
							"type": {
								"type": "string",
								"enum": [
									"github"
								],
								"nullable": false
							}
						},
						"required": [
							"branch",
							"path",
							"repo",
							"owner",
							"type"
						],
						"type": "object"
					},
					{
						"properties": {
							"filename": {
								"type": "string"
							},
							"type": {
								"type": "string",
								"enum": [
									"upload"
								],
								"nullable": false
							}
						},
						"required": [
							"type"
						],
						"type": "object"
					}
				]
			},
			"ApiPlaygroundSettings": {
				"properties": {
					"prefill": {
						"type": "boolean"
					},
					"route": {
						"type": "string",
						"enum": [
							"proxy",
							"browser"
						]
					},
					"mode": {
						"type": "string",
						"enum": [
							"everyone",
							"signed_in",
							"off"
						]
					}
				},
				"required": [
					"prefill",
					"route",
					"mode"
				],
				"type": "object"
			},
			"ApiSampleLang": {
				"type": "string",
				"enum": [
					"curl",
					"javascript",
					"python",
					"php",
					"go",
					"java",
					"ruby",
					"csharp",
					"swift"
				]
			},
			"ApiSamplesSettings": {
				"properties": {
					"fields": {
						"type": "string",
						"enum": [
							"example",
							"required",
							"all"
						]
					},
					"languages": {
						"items": {
							"$ref": "#/components/schemas/ApiSampleLang"
						},
						"type": "array"
					}
				},
				"required": [
					"fields",
					"languages"
				],
				"type": "object"
			},
			"ApiSpecSettings": {
				"properties": {
					"notifyOnFailure": {
						"type": "boolean"
					},
					"changelog": {
						"type": "boolean"
					},
					"samples": {
						"$ref": "#/components/schemas/ApiSamplesSettings"
					},
					"playground": {
						"$ref": "#/components/schemas/ApiPlaygroundSettings"
					},
					"guidesCollection": {
						"type": "string",
						"nullable": true
					},
					"hiddenFields": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"hiddenTags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"groupBy": {
						"type": "string",
						"enum": [
							"tag",
							"path"
						]
					}
				},
				"required": [
					"notifyOnFailure",
					"changelog",
					"samples",
					"playground",
					"guidesCollection",
					"hiddenFields",
					"hiddenTags",
					"groupBy"
				],
				"type": "object"
			},
			"ApiSpecSyncError": {
				"type": "string",
				"enum": [
					"fetch_failed",
					"too_large",
					"not_openapi",
					"unsupported_version",
					"parse_error",
					"github_not_connected",
					"github_file_not_found"
				]
			},
			"ApiSpecSyncState": {
				"properties": {
					"operationCount": {
						"type": "number",
						"format": "double"
					},
					"openapi": {
						"type": "string"
					},
					"version": {
						"type": "string"
					},
					"title": {
						"type": "string"
					},
					"contentHash": {
						"type": "string"
					},
					"error": {
						"properties": {
							"message": {
								"type": "string"
							},
							"code": {
								"$ref": "#/components/schemas/ApiSpecSyncError"
							}
						},
						"required": [
							"message",
							"code"
						],
						"type": "object"
					},
					"alertedAt": {
						"type": "string",
						"format": "date-time"
					},
					"consecutiveFailures": {
						"type": "number",
						"format": "double"
					},
					"lastChangedAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastAttemptAt": {
						"type": "string",
						"format": "date-time"
					},
					"lastSyncedAt": {
						"type": "string",
						"format": "date-time"
					},
					"status": {
						"type": "string",
						"enum": [
							"never",
							"syncing",
							"ok",
							"error"
						]
					}
				},
				"required": [
					"operationCount",
					"status"
				],
				"type": "object"
			},
			"ApiSpecChecks": {
				"properties": {
					"largeSchemas": {
						"items": {
							"properties": {
								"fieldCount": {
									"type": "number",
									"format": "double"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"fieldCount",
								"name"
							],
							"type": "object"
						},
						"type": "array"
					},
					"noDescription": {
						"properties": {
							"sample": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"sample",
							"count"
						],
						"type": "object"
					},
					"noResponseExample": {
						"properties": {
							"sample": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"sample",
							"count"
						],
						"type": "object"
					},
					"noResponseSchema": {
						"properties": {
							"sample": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"count": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"sample",
							"count"
						],
						"type": "object"
					}
				},
				"required": [
					"largeSchemas",
					"noDescription",
					"noResponseExample",
					"noResponseSchema"
				],
				"type": "object"
			},
			"Record_string._default-string--enum%3F%3Astring-Array--description%3F%3Astring__": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"ApiServer": {
				"properties": {
					"variables": {
						"$ref": "#/components/schemas/Record_string._default-string--enum%3F%3Astring-Array--description%3F%3Astring__"
					},
					"description": {
						"type": "string"
					},
					"url": {
						"type": "string"
					}
				},
				"required": [
					"url"
				],
				"type": "object"
			},
			"ApiSpecAdmin": {
				"properties": {
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"tags": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"info": {
						"properties": {
							"servers": {
								"items": {
									"$ref": "#/components/schemas/ApiServer"
								},
								"type": "array"
							},
							"version": {
								"type": "string"
							},
							"title": {
								"type": "string"
							}
						},
						"required": [
							"servers",
							"version",
							"title"
						],
						"type": "object"
					},
					"checks": {
						"$ref": "#/components/schemas/ApiSpecChecks"
					},
					"sync": {
						"$ref": "#/components/schemas/ApiSpecSyncState"
					},
					"settings": {
						"$ref": "#/components/schemas/ApiSpecSettings"
					},
					"source": {
						"$ref": "#/components/schemas/ApiSpecSource"
					},
					"order": {
						"type": "number",
						"format": "double"
					},
					"slug": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"site": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"tags",
					"info",
					"checks",
					"sync",
					"settings",
					"source",
					"order",
					"slug",
					"name",
					"site",
					"id"
				],
				"type": "object",
				"description": "GET /helpcenter/api-specs: a spec as the dashboard sees it (no internals)."
			},
			"ApiSyncTrigger": {
				"type": "string",
				"enum": [
					"initial",
					"manual",
					"scheduled",
					"github",
					"upload",
					"source_change",
					"import",
					"deploy_hook"
				]
			},
			"ApiEndpointChange": {
				"properties": {
					"sections": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"previousHidden": {
						"type": "boolean"
					},
					"previousTag": {
						"type": "string"
					},
					"hidden": {
						"type": "boolean"
					},
					"tag": {
						"type": "string"
					},
					"summary": {
						"type": "string"
					},
					"path": {
						"type": "string"
					},
					"method": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"key": {
						"type": "string"
					},
					"kind": {
						"type": "string",
						"enum": [
							"added",
							"removed",
							"updated"
						]
					}
				},
				"required": [
					"sections",
					"tag",
					"summary",
					"path",
					"method",
					"slug",
					"key",
					"kind"
				],
				"type": "object"
			},
			"ApiSpecChanges": {
				"properties": {
					"truncated": {
						"type": "boolean"
					},
					"operations": {
						"items": {
							"$ref": "#/components/schemas/ApiEndpointChange"
						},
						"type": "array"
					},
					"metadataChanged": {
						"type": "boolean"
					},
					"updated": {
						"type": "number",
						"format": "double"
					},
					"removed": {
						"type": "number",
						"format": "double"
					},
					"added": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"truncated",
					"operations",
					"metadataChanged",
					"updated",
					"removed",
					"added"
				],
				"type": "object"
			},
			"ApiSpecSyncRun": {
				"properties": {
					"error": {
						"properties": {
							"message": {
								"type": "string"
							},
							"code": {
								"$ref": "#/components/schemas/ApiSpecSyncError"
							}
						},
						"required": [
							"message",
							"code"
						],
						"type": "object"
					},
					"changes": {
						"$ref": "#/components/schemas/ApiSpecChanges"
					},
					"version": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"changed",
							"unchanged",
							"error"
						]
					},
					"finishedAt": {
						"type": "string",
						"format": "date-time"
					},
					"startedAt": {
						"type": "string",
						"format": "date-time"
					},
					"trigger": {
						"$ref": "#/components/schemas/ApiSyncTrigger"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"status",
					"finishedAt",
					"startedAt",
					"trigger",
					"id"
				],
				"type": "object"
			},
			"ApiSpecDeployHookView": {
				"properties": {
					"enabled": {
						"type": "boolean"
					},
					"url": {
						"type": "string"
					},
					"createdAt": {
						"type": "string"
					},
					"lastTriggeredAt": {
						"type": "string"
					}
				},
				"required": [
					"enabled"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApiSpecSourceInputDto": {
				"description": "POST /helpcenter/api-specs `source`. No property initializers (tsoa writes them into every request).",
				"properties": {
					"type": {
						"type": "string",
						"description": "`url` | `github` | `upload`."
					},
					"url": {
						"type": "string"
					},
					"owner": {
						"type": "string"
					},
					"repo": {
						"type": "string"
					},
					"path": {
						"type": "string"
					},
					"branch": {
						"type": "string"
					},
					"content": {
						"type": "string",
						"description": "`upload`: the spec text (JSON or YAML)."
					},
					"filename": {
						"type": "string"
					}
				},
				"required": [
					"type"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApiSpecCreateDto": {
				"properties": {
					"site": {
						"type": "string",
						"description": "A site id, or `default`."
					},
					"name": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"source": {
						"$ref": "#/components/schemas/ApiSpecSourceInputDto"
					}
				},
				"required": [
					"source"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApiSpecUpdateDto": {
				"description": "PATCH: every field optional; `settings` merges key by key (`playground` and `samples` one level deeper).",
				"properties": {
					"name": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"order": {
						"type": "number",
						"format": "double"
					},
					"source": {
						"$ref": "#/components/schemas/ApiSpecSourceInputDto"
					},
					"settings": {}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ApiSpecContentDto": {
				"properties": {
					"content": {
						"type": "string",
						"description": "The spec text (JSON or YAML), at most 15 MB."
					},
					"filename": {
						"type": "string"
					}
				},
				"required": [
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ApiNavOperation": {
				"properties": {
					"deprecated": {
						"type": "boolean"
					},
					"summary": {
						"type": "string"
					},
					"path": {
						"type": "string"
					},
					"method": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					}
				},
				"required": [
					"summary",
					"path",
					"method",
					"slug"
				],
				"type": "object"
			},
			"ApiSpecNav": {
				"properties": {
					"guides": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								},
								"docId": {
									"type": "string"
								}
							},
							"required": [
								"title",
								"docId"
							],
							"type": "object"
						},
						"type": "array"
					},
					"groups": {
						"items": {
							"properties": {
								"operations": {
									"items": {
										"$ref": "#/components/schemas/ApiNavOperation"
									},
									"type": "array"
								},
								"name": {
									"type": "string"
								}
							},
							"required": [
								"operations",
								"name"
							],
							"type": "object"
						},
						"type": "array"
					},
					"changelog": {
						"type": "boolean"
					},
					"updatedAt": {
						"type": "string",
						"format": "date-time"
					},
					"name": {
						"type": "string"
					},
					"slug": {
						"type": "string"
					},
					"id": {
						"type": "string"
					}
				},
				"required": [
					"guides",
					"groups",
					"name",
					"slug",
					"id"
				],
				"type": "object"
			},
			"DemoBrand": {
				"properties": {
					"name": {
						"type": "string"
					},
					"logo": {
						"type": "string",
						"nullable": true
					},
					"icon": {
						"type": "string",
						"nullable": true
					},
					"primary": {
						"type": "string"
					},
					"background": {
						"type": "string"
					},
					"text": {
						"type": "string"
					},
					"colorScheme": {
						"type": "string",
						"enum": [
							"light",
							"dark"
						]
					},
					"font": {
						"type": "string",
						"enum": [
							"sans",
							"serif",
							"mono"
						]
					}
				},
				"required": [
					"name",
					"logo",
					"icon",
					"primary",
					"background",
					"text",
					"colorScheme",
					"font"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Track": {
				"type": "string",
				"enum": [
					"saas",
					"ecommerce",
					"services"
				]
			},
			"DemoSite": {
				"properties": {
					"shot": {
						"type": "string"
					},
					"shotMobile": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"ManagedSalesDemo": {
				"properties": {
					"id": {
						"type": "string"
					},
					"domain": {
						"type": "string"
					},
					"region": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"preparing",
							"ready",
							"needs_review",
							"failed"
						]
					},
					"brand": {
						"$ref": "#/components/schemas/DemoBrand"
					},
					"pagesRead": {
						"type": "number",
						"format": "double"
					},
					"suggestedQuestions": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"sources": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					},
					"repliesLeft": {
						"type": "number",
						"format": "double"
					},
					"expiresAt": {
						"type": "string"
					},
					"language": {
						"type": "string",
						"description": "The site's language and business type, read from its pages (widget chrome and sample scenarios)."
					},
					"track": {
						"$ref": "#/components/schemas/Track"
					},
					"site": {
						"$ref": "#/components/schemas/DemoSite",
						"description": "Screenshots of the site's homepage for the demo stage; absent while preparing, or when capture failed or the page was blocked."
					},
					"published": {
						"type": "boolean"
					},
					"revoked": {
						"type": "boolean"
					},
					"campaign": {
						"type": "string",
						"nullable": true
					},
					"warnings": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"sourceUrls": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"shareUrl": {
						"type": "string"
					},
					"reviewUrl": {
						"type": "string"
					},
					"testRepliesLeft": {
						"type": "number",
						"format": "double"
					},
					"questionsAsked": {
						"type": "number",
						"format": "double"
					},
					"signupClicks": {
						"type": "number",
						"format": "double"
					},
					"imports": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"id",
					"domain",
					"region",
					"status",
					"brand",
					"pagesRead",
					"suggestedQuestions",
					"sources",
					"repliesLeft",
					"expiresAt",
					"track",
					"published",
					"revoked",
					"campaign",
					"warnings",
					"sourceUrls",
					"shareUrl",
					"reviewUrl",
					"testRepliesLeft",
					"questionsAsked",
					"signupClicks",
					"imports"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DemoTrack": {
				"type": "string",
				"enum": [
					"saas",
					"ecommerce",
					"services"
				]
			},
			"PrepareSalesDemoDto": {
				"properties": {
					"domain": {
						"type": "string"
					},
					"sourceUrls": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Public help center or documentation roots to read as well (at most 3)."
					},
					"track": {
						"$ref": "#/components/schemas/DemoTrack"
					},
					"language": {
						"type": "string"
					},
					"campaign": {
						"type": "string"
					}
				},
				"required": [
					"domain"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Partial_DemoBrand_": {
				"properties": {
					"name": {
						"type": "string"
					},
					"logo": {
						"type": "string",
						"nullable": true
					},
					"icon": {
						"type": "string",
						"nullable": true
					},
					"primary": {
						"type": "string"
					},
					"background": {
						"type": "string"
					},
					"text": {
						"type": "string"
					},
					"colorScheme": {
						"type": "string",
						"enum": [
							"light",
							"dark"
						]
					},
					"font": {
						"type": "string",
						"enum": [
							"sans",
							"serif",
							"mono"
						]
					}
				},
				"type": "object",
				"description": "Make all properties in T optional"
			},
			"UpdateSalesDemoDto": {
				"properties": {
					"brand": {
						"$ref": "#/components/schemas/Partial_DemoBrand_"
					},
					"published": {
						"type": "boolean"
					},
					"acknowledgeWarnings": {
						"type": "boolean",
						"description": "Explicitly approve a preview with limited content after reviewing its warnings."
					},
					"revoked": {
						"type": "boolean"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"DemoOutcome": {
				"type": "string",
				"enum": [
					"answered",
					"not_on_pages",
					"needs_system"
				]
			},
			"DemoMessage": {
				"properties": {
					"role": {
						"type": "string",
						"enum": [
							"user",
							"assistant"
						]
					},
					"content": {
						"type": "string"
					},
					"citations": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					},
					"outcome": {
						"$ref": "#/components/schemas/DemoOutcome",
						"description": "Whether the pages answered it, for the widget's \"not found\" card."
					},
					"actions": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Quick replies of a scripted scenario step."
					},
					"scenario": {
						"type": "string",
						"description": "The scripted scenario step this message belongs to."
					}
				},
				"required": [
					"role",
					"content"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DemoReply": {
				"properties": {
					"answer": {
						"type": "string"
					},
					"citations": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					},
					"repliesLeft": {
						"type": "number",
						"format": "double"
					},
					"outcome": {
						"$ref": "#/components/schemas/DemoOutcome"
					},
					"messages": {
						"items": {
							"$ref": "#/components/schemas/DemoMessage"
						},
						"type": "array"
					}
				},
				"required": [
					"answer",
					"citations",
					"repliesLeft"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AskSalesDemoDto": {
				"properties": {
					"question": {
						"type": "string"
					},
					"sessionId": {
						"type": "string"
					},
					"requestId": {
						"type": "string"
					}
				},
				"required": [
					"question",
					"sessionId",
					"requestId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PublicSalesDemo": {
				"properties": {
					"id": {
						"type": "string"
					},
					"domain": {
						"type": "string"
					},
					"region": {
						"type": "string"
					},
					"status": {
						"type": "string",
						"enum": [
							"preparing",
							"ready",
							"needs_review",
							"failed"
						]
					},
					"brand": {
						"$ref": "#/components/schemas/DemoBrand"
					},
					"pagesRead": {
						"type": "number",
						"format": "double"
					},
					"suggestedQuestions": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"sources": {
						"items": {
							"properties": {
								"url": {
									"type": "string"
								},
								"title": {
									"type": "string"
								}
							},
							"required": [
								"url",
								"title"
							],
							"type": "object"
						},
						"type": "array"
					},
					"repliesLeft": {
						"type": "number",
						"format": "double"
					},
					"expiresAt": {
						"type": "string"
					},
					"language": {
						"type": "string",
						"description": "The site's language and business type, read from its pages (widget chrome and sample scenarios)."
					},
					"track": {
						"$ref": "#/components/schemas/Track"
					},
					"site": {
						"$ref": "#/components/schemas/DemoSite",
						"description": "Screenshots of the site's homepage for the demo stage; absent while preparing, or when capture failed or the page was blocked."
					}
				},
				"required": [
					"id",
					"domain",
					"region",
					"status",
					"brand",
					"pagesRead",
					"suggestedQuestions",
					"sources",
					"repliesLeft",
					"expiresAt",
					"track"
				],
				"type": "object",
				"additionalProperties": false
			},
			"CreateSelfServeDemoDto": {
				"properties": {
					"website": {
						"type": "string"
					},
					"turnstileToken": {
						"type": "string"
					},
					"utm": {
						"type": "string",
						"description": "utm_source of the page that sent the visitor (QR code, campaign)."
					},
					"language": {
						"type": "string",
						"description": "The visitor's browser language (navigator.language). Kept when the demo speaks it (de, en):\nthe demo, its crawl and its answers then use it. Anything else is ignored."
					}
				},
				"required": [
					"website",
					"turnstileToken"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DemoScenarioKind": {
				"type": "string",
				"enum": [
					"refund",
					"refund_confirm",
					"refund_decline",
					"bug",
					"bug_fixed"
				],
				"description": "Scripted demo moments that need systems a public website cannot show: a\nrefund looked up in the billing tool, a bug that reaches the dev team. The\ndata is sample data and every message says so; nothing here calls a model."
			},
			"SalesDemoScenarioDto": {
				"properties": {
					"kind": {
						"$ref": "#/components/schemas/DemoScenarioKind"
					},
					"sessionId": {
						"type": "string"
					},
					"text": {
						"type": "string"
					}
				},
				"required": [
					"kind",
					"sessionId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"StartedDemoCall": {
				"properties": {
					"callId": {
						"type": "string"
					},
					"sdp": {
						"type": "string"
					},
					"maxDurationSec": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"callId",
					"sdp",
					"maxDurationSec"
				],
				"type": "object",
				"additionalProperties": false
			},
			"DemoCallStart": {
				"properties": {
					"sdp": {
						"type": "string"
					},
					"sessionId": {
						"type": "string"
					},
					"lang": {
						"type": "string"
					}
				},
				"required": [
					"sdp",
					"sessionId"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseTlsDto": {
				"description": "Request bodies of the `/kai-databases` routes (kai-db-access). TSOA drops every field a body does not\ndeclare (tsoa.json silently-remove-extras), so each one is listed. No property initializers: TSOA would\napply them to every request that omits the field.",
				"properties": {
					"mode": {
						"type": "string",
						"enum": [
							"verify",
							"no_verify",
							"off"
						],
						"description": "verify (default): the certificate must be valid for the host; no_verify: encrypted, not verified (a\nwarning in the settings); off: no TLS, only while the SSH tunnel is on (the tunnel encrypts it)."
					},
					"caPem": {
						"type": "string",
						"nullable": true,
						"description": "The team's CA certificate (PEM), or null to clear."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseSshDto": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"description": "Connect through the team's SSH bastion."
					},
					"host": {
						"type": "string",
						"nullable": true
					},
					"port": {
						"type": "number",
						"format": "double"
					},
					"user": {
						"type": "string",
						"nullable": true
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseAgentsDto": {
				"properties": {
					"kaiSupport": {
						"type": "boolean",
						"description": "Kai Support, on escalated tickets only (the customer's own rows)."
					},
					"copilot": {
						"type": "boolean",
						"description": "Kai Copilot, for data owners and managers (the whole database)."
					},
					"kaiCode": {
						"type": "boolean",
						"description": "Kai Code, through the Gleap MCP (the ticket customer's rows; across customers only with a data owner's OK)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseMappingDto": {
				"properties": {
					"table": {
						"type": "string",
						"description": "schema.table (MongoDB: the collection)."
					},
					"column": {
						"type": "string"
					},
					"contactField": {
						"type": "string",
						"enum": [
							"userId",
							"email"
						]
					}
				},
				"required": [
					"table",
					"column",
					"contactField"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseSensitiveDto": {
				"properties": {
					"table": {
						"type": "string"
					},
					"column": {
						"type": "string"
					},
					"on": {
						"type": "boolean",
						"description": "False switches an automatic one off; a team-marked one is listed with on true (or left out to remove it)."
					}
				},
				"required": [
					"table",
					"column"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiDatabaseWriteDto": {
				"description": "Connect a database (POST) or change it (PUT; only the given fields change, an empty password keeps the stored one).",
				"properties": {
					"name": {
						"type": "string"
					},
					"engine": {
						"type": "string",
						"enum": [
							"postgres",
							"mysql",
							"sqlserver",
							"mongodb"
						],
						"description": "postgres | mysql | sqlserver | mongodb; set when connecting, never changed."
					},
					"host": {
						"type": "string"
					},
					"port": {
						"type": "number",
						"format": "double"
					},
					"database": {
						"type": "string"
					},
					"user": {
						"type": "string"
					},
					"password": {
						"type": "string",
						"description": "Write-only."
					},
					"connectionString": {
						"type": "string",
						"description": "MongoDB: the connection string, write-only."
					},
					"tls": {
						"$ref": "#/components/schemas/KaiDatabaseTlsDto"
					},
					"ssh": {
						"$ref": "#/components/schemas/KaiDatabaseSshDto"
					},
					"agents": {
						"$ref": "#/components/schemas/KaiDatabaseAgentsDto"
					},
					"dataOwnerIds": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Who decides on queries the reviewer is unsure about (project members)."
					},
					"rules": {
						"type": "string",
						"description": "The team's rules for the reviewer, at most 2,000 characters."
					},
					"mapping": {
						"items": {
							"$ref": "#/components/schemas/KaiDatabaseMappingDto"
						},
						"type": "array"
					},
					"shared": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "Tables with no per-customer data that a customer's ticket may read (plans, products)."
					},
					"sensitive": {
						"items": {
							"$ref": "#/components/schemas/KaiDatabaseSensitiveDto"
						},
						"type": "array"
					},
					"hiddenColumns": {
						"items": {
							"properties": {
								"column": {
									"type": "string"
								},
								"table": {
									"type": "string"
								}
							},
							"required": [
								"column",
								"table"
							],
							"type": "object"
						},
						"type": "array",
						"description": "Hard tickets: \"Columns Kai never sees\", stripped from every result before a model reads it (at most 200)."
					},
					"availability": {
						"type": "string",
						"enum": [
							"always",
							"hard_tickets"
						],
						"description": "Hard tickets: where Kai Support may read it on a ticket: `always` or `hard_tickets` (the default)."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiDbAgentDescribeDto": {
				"description": "Kai Code (Gleap MCP): describe_database.",
				"properties": {
					"databaseId": {
						"type": "string"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"KaiDbAgentQueryDto": {
				"description": "Kai Code (Gleap MCP): query_database.",
				"properties": {
					"databaseId": {
						"type": "string"
					},
					"query": {
						"description": "One SQL SELECT, or the MongoDB request as an object or its JSON."
					},
					"purpose": {
						"type": "string",
						"description": "Why, in a few words (shown to a data owner when one decides)."
					},
					"scope": {
						"type": "string",
						"enum": [
							"customer",
							"team"
						],
						"description": "customer (default): the run ticket's customer only. team: across customers, always after a data owner's OK."
					},
					"sessionId": {
						"type": "string",
						"description": "The coding session (CloudCodingSession id), when the agent knows it: the privacy scan reads its query values."
					}
				},
				"required": [
					"query",
					"purpose"
				],
				"type": "object",
				"additionalProperties": false
			},
			"KaiDbDecisionDto": {
				"description": "A data owner's answer to a query that waits (the same as the card's buttons).",
				"properties": {
					"decision": {
						"type": "string",
						"enum": [
							"run",
							"deny"
						]
					},
					"note": {
						"type": "string"
					}
				},
				"required": [
					"decision"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HardTicketStart": {
				"description": "How something starts: on a teammate's click, or on its own (as the person who turned that on).",
				"enum": [
					"click",
					"auto"
				],
				"type": "string"
			},
			"HardTicketAutoRunner": {
				"anyOf": [
					{
						"properties": {
							"kind": {
								"type": "string",
								"enum": [
									"cloud"
								],
								"nullable": false
							}
						},
						"required": [
							"kind"
						],
						"type": "object"
					},
					{
						"properties": {
							"deviceId": {
								"type": "string"
							},
							"kind": {
								"type": "string",
								"enum": [
									"bridge"
								],
								"nullable": false
							}
						},
						"required": [
							"deviceId",
							"kind"
						],
						"type": "object"
					}
				],
				"description": "An automatic run's machine."
			},
			"HardTicketsSettings": {
				"description": "Project setting `hardTickets` (stored partial; hardTicketsSettingsOf applies the defaults).",
				"properties": {
					"start": {
						"$ref": "#/components/schemas/HardTicketStart",
						"description": "Escalated tickets: Kai Support works them first on its own (as `autoEnabledBy`), or on a click. Default 'click'."
					},
					"codeFixStart": {
						"$ref": "#/components/schemas/HardTicketStart",
						"description": "Code fixes: Kai Code starts them on its own (as `codeFixEnabledBy`, else `autoEnabledBy`), or on a click. Default `start`."
					},
					"autoRunner": {
						"$ref": "#/components/schemas/HardTicketAutoRunner",
						"description": "Default `{ kind: 'cloud' }`."
					},
					"offlineFallback": {
						"type": "string",
						"enum": [
							"cloud",
							"wait"
						],
						"description": "When the Bridge machine is offline: run in Kai Code Cloud, or wait and show the card. Default 'cloud'."
					},
					"askPersonFirst": {
						"type": "boolean",
						"description": "Money and deletes wait for a person (an approval card). Fixed on; skills may loosen it with a limit."
					},
					"workOnItCard": {
						"type": "boolean",
						"description": "An escalated ticket Kai Support did not start on gets the Work on it card. Default true."
					},
					"workingOnIt": {
						"type": "boolean",
						"description": "Gleap's \"Thanks for your patience, we're looking into this\" when a ticket escalates and nothing told the\ncustomer yet. Default true. Off: no line (a request for a person still gets its own answer)."
					}
				},
				"required": [
					"start",
					"codeFixStart",
					"autoRunner",
					"offlineFallback",
					"askPersonFirst",
					"workOnItCard",
					"workingOnIt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReviewAskMode": {
				"type": "string",
				"enum": [
					"every_done",
					"confirmed_only"
				]
			},
			"TicketDoneSettings": {
				"description": "Project setting `ticketDone` (stored partial; ticketDoneSettingsOf applies the defaults).",
				"properties": {
					"thankYouOnConfirm": {
						"type": "boolean",
						"description": "Thank the customer when they confirm it is solved. Default true."
					},
					"prompt": {
						"type": "string",
						"description": "The team's words for the thank-you (migrated from kaiCodeFixReplyBehavior's success prompt). '' = Gleap's own."
					},
					"reviewAsk": {
						"properties": {
							"link": {
								"type": "string"
							},
							"mode": {
								"$ref": "#/components/schemas/ReviewAskMode",
								"description": "Default 'every_done'."
							},
							"enabled": {
								"type": "boolean",
								"description": "Default FALSE (G2 forbids inviting only happy customers)."
							}
						},
						"required": [
							"mode",
							"enabled"
						],
						"type": "object"
					}
				},
				"required": [
					"thankYouOnConfirm",
					"prompt",
					"reviewAsk"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HardTicketsSettingsView": {
				"description": "The settings page: the effective values and the Bridge machines an automatic run may use.",
				"properties": {
					"hardTickets": {
						"$ref": "#/components/schemas/HardTicketsSettings"
					},
					"ticketDone": {
						"$ref": "#/components/schemas/TicketDoneSettings"
					},
					"bridgeDevices": {
						"items": {
							"properties": {
								"online": {
									"type": "boolean"
								},
								"name": {
									"type": "string"
								},
								"id": {
									"type": "string"
								}
							},
							"required": [
								"online",
								"name",
								"id"
							],
							"type": "object"
						},
						"type": "array"
					}
				},
				"required": [
					"hardTickets",
					"ticketDone",
					"bridgeDevices"
				],
				"type": "object",
				"additionalProperties": false
			},
			"HardTicketsUpdateDto": {
				"properties": {
					"start": {
						"allOf": [
							{
								"$ref": "#/components/schemas/HardTicketStart"
							}
						],
						"nullable": true,
						"description": "Escalated tickets: Kai Support works them first on its own (as whoever turns it on), or on a click."
					},
					"codeFixStart": {
						"allOf": [
							{
								"$ref": "#/components/schemas/HardTicketStart"
							}
						],
						"nullable": true,
						"description": "Code fixes: Kai Code starts them on its own (as whoever turns it on), or on a click. `null`: the same as `start`."
					},
					"autoRunner": {
						"allOf": [
							{
								"$ref": "#/components/schemas/HardTicketAutoRunner"
							}
						],
						"nullable": true,
						"description": "Where automatic code fixes run: Kai Code Cloud, or one of the saver's own Bridge machines (run as the saver)."
					},
					"offlineFallback": {
						"type": "string",
						"enum": [
							"cloud",
							"wait"
						],
						"nullable": true,
						"description": "The Bridge machine is offline: run in Kai Code Cloud, or wait for a click."
					},
					"workOnItCard": {
						"type": "boolean",
						"nullable": true,
						"description": "An escalated ticket Kai Support did not start on gets the Work on it card."
					},
					"workingOnIt": {
						"type": "boolean",
						"nullable": true,
						"description": "Kai Support tells the customer it is working on their escalated ticket."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TicketDoneReviewAskUpdateDto": {
				"properties": {
					"enabled": {
						"type": "boolean",
						"nullable": true
					},
					"mode": {
						"allOf": [
							{
								"$ref": "#/components/schemas/ReviewAskMode"
							}
						],
						"nullable": true
					},
					"link": {
						"type": "string",
						"nullable": true,
						"description": "An http(s) link; '' or `null` removes it."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"TicketDoneUpdateDto": {
				"properties": {
					"thankYouOnConfirm": {
						"type": "boolean",
						"nullable": true,
						"description": "Thank the customer when they confirm it is solved."
					},
					"prompt": {
						"type": "string",
						"nullable": true,
						"description": "The team's words for the thank-you, at most 2000 characters; '' or `null`: Gleap's own."
					},
					"reviewAsk": {
						"allOf": [
							{
								"$ref": "#/components/schemas/TicketDoneReviewAskUpdateDto"
							}
						],
						"nullable": true
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"HardTicketsSettingsUpdateDto": {
				"properties": {
					"hardTickets": {
						"allOf": [
							{
								"$ref": "#/components/schemas/HardTicketsUpdateDto"
							}
						],
						"nullable": true
					},
					"ticketDone": {
						"allOf": [
							{
								"$ref": "#/components/schemas/TicketDoneUpdateDto"
							}
						],
						"nullable": true
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"CopilotDraftStatus": {
				"description": "Where a draft Kai Copilot proposed is now (the strings the pane reads).",
				"enum": [
					"open",
					"sent",
					"replaced",
					"not_sent"
				],
				"type": "string"
			},
			"CopilotDraftView": {
				"properties": {
					"taskId": {
						"type": "string"
					},
					"text": {
						"type": "string",
						"description": "The draft as proposed (Markdown)."
					},
					"status": {
						"$ref": "#/components/schemas/CopilotDraftStatus"
					},
					"createdAt": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"taskId",
					"text",
					"status",
					"createdAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReportQueryDTO": {
				"description": "One flexible report query. `request` is the query itself (measure, filters, grouping, window); the\nflexible query service parses it, so tsoa only sees an open object. `range` is a page card's date\nfilter and replaces the window inside `request`.",
				"properties": {
					"request": {},
					"range": {
						"properties": {
							"endDate": {
								"type": "string"
							},
							"startDate": {
								"type": "string"
							}
						},
						"required": [
							"endDate",
							"startDate"
						],
						"type": "object"
					}
				},
				"required": [
					"request"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OrganisationMonthUsage": {
				"properties": {
					"month": {
						"type": "string",
						"description": "`YYYY-MM`, UTC."
					},
					"activeUsers": {
						"type": "number",
						"format": "double",
						"description": "Distinct contacts (identified users and guests) the SDK saw this month: the billed MAU."
					},
					"identifiedUsers": {
						"type": "number",
						"format": "double",
						"description": "Of those, contacts identified with a userId."
					}
				},
				"required": [
					"month",
					"activeUsers",
					"identifiedUsers"
				],
				"type": "object",
				"additionalProperties": false
			},
			"OrganisationUsage": {
				"properties": {
					"organisationId": {
						"type": "string"
					},
					"name": {
						"type": "string"
					},
					"email": {
						"type": "string"
					},
					"planId": {
						"type": "string",
						"nullable": true
					},
					"subscriptionStatus": {
						"type": "string",
						"nullable": true
					},
					"months": {
						"items": {
							"$ref": "#/components/schemas/OrganisationMonthUsage"
						},
						"type": "array"
					}
				},
				"required": [
					"organisationId",
					"name",
					"email",
					"planId",
					"subscriptionStatus",
					"months"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UsageMcpRequest": {
				"properties": {
					"jsonrpc": {
						"type": "string"
					},
					"id": {
						"anyOf": [
							{
								"type": "string"
							},
							{
								"type": "number",
								"format": "double"
							}
						],
						"nullable": true
					},
					"method": {
						"type": "string"
					},
					"params": {
						"properties": {
							"arguments": {
								"properties": {
									"months": {},
									"organisation": {}
								},
								"type": "object"
							},
							"name": {
								"type": "string"
							}
						},
						"type": "object"
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"RetentionOfferResponse": {
				"description": "GET /organisations/{id}/retention-offer.",
				"properties": {
					"eligible": {
						"type": "boolean"
					},
					"percent": {
						"type": "number",
						"format": "double"
					},
					"payments": {
						"type": "number",
						"format": "double"
					}
				},
				"required": [
					"eligible"
				],
				"type": "object",
				"additionalProperties": false
			},
			"AcceptedRetentionOffer": {
				"description": "POST /organisations/{id}/retention-offer: what was applied, from the next renewal (startsAt).",
				"properties": {
					"percent": {
						"type": "number",
						"format": "double"
					},
					"payments": {
						"type": "number",
						"format": "double"
					},
					"startsAt": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"percent",
					"payments",
					"startsAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MicrosoftSignInResultDto": {
				"properties": {
					"token": {
						"type": "string"
					},
					"expiresAt": {
						"type": "number",
						"format": "double",
						"description": "Unix seconds: the app renews the session with a fresh Microsoft token before then."
					},
					"user": {}
				},
				"required": [
					"token",
					"expiresAt",
					"user"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MicrosoftSignInDto": {
				"properties": {
					"accessToken": {
						"type": "string",
						"description": "A Microsoft Entra access token for Gleap's API, from the app's Microsoft sign-in."
					}
				},
				"required": [
					"accessToken"
				],
				"type": "object",
				"additionalProperties": false
			},
			"MobileAppProtectionMode": {
				"description": "Mobile app protection (Microsoft Intune): an organisation that turns it on\nlets its data reach the Gleap mobile app only through a session that came\nfrom a Microsoft sign-in in its own Entra tenant. That sign-in is where the\norganisation's Conditional Access (\"Require app protection policy\") runs, so\na phone without the organisation's app protection never gets such a session.\n\nThe dashboard in a browser is covered only with `requireOnWeb`: then a\nbrowser needs the same Microsoft session (the dashboard's \"Continue with\nMicrosoft\" in the tenant), where the tenant's Conditional Access for Gleap's\nweb app runs. Without it, browsers sign in through the organisation's SSO\nwhen it requires one. Decisions only, no I/O.",
				"enum": [
					"off",
					"intune"
				],
				"type": "string"
			},
			"MobileAppProtectionSettingsDto": {
				"properties": {
					"mode": {
						"$ref": "#/components/schemas/MobileAppProtectionMode"
					},
					"entraTenantId": {
						"type": "string",
						"nullable": true
					},
					"allowedDomains": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"suggestedTenantId": {
						"type": "string",
						"nullable": true,
						"description": "Filled in from the organisation's SSO when it is a Microsoft Entra provider."
					},
					"suggestedDomains": {
						"items": {
							"type": "string"
						},
						"type": "array"
					},
					"requireSsoEnabled": {
						"type": "boolean",
						"description": "Whether the organisation's SSO is on with Require SSO: without it, people can still use Gleap in a phone's browser."
					},
					"requireOnWeb": {
						"type": "boolean",
						"description": "Whether the dashboard in a browser needs \"Continue with Microsoft\" in the tenant too."
					},
					"signedInWithMicrosoftInTenant": {
						"type": "boolean",
						"description": "Whether the admin's own session came from \"Continue with Microsoft\" in the saved tenant (needed to turn requireOnWeb on)."
					},
					"microsoftApps": {
						"properties": {
							"webClientId": {
								"type": "string"
							},
							"androidClientId": {
								"type": "string"
							},
							"iosClientId": {
								"type": "string"
							},
							"apiClientId": {
								"type": "string"
							}
						},
						"required": [
							"webClientId",
							"androidClientId",
							"iosClientId",
							"apiClientId"
						],
						"type": "object",
						"nullable": true,
						"description": "Gleap's Entra apps the organisation's admin approves (public client ids); null while not set up.\n`webClientId` is empty while the dashboard's Microsoft sign-in is not set up."
					}
				},
				"required": [
					"mode",
					"entraTenantId",
					"allowedDomains",
					"suggestedTenantId",
					"suggestedDomains",
					"requireSsoEnabled",
					"requireOnWeb",
					"signedInWithMicrosoftInTenant",
					"microsoftApps"
				],
				"type": "object",
				"additionalProperties": false
			},
			"UpdateMobileAppProtectionDto": {
				"properties": {
					"mode": {
						"$ref": "#/components/schemas/MobileAppProtectionMode"
					},
					"entraTenantId": {
						"type": "string",
						"description": "The organisation's Microsoft Entra tenant ID (required when mode is intune)."
					},
					"allowedDomains": {
						"items": {
							"type": "string"
						},
						"type": "array",
						"description": "The organisation's email domains whose people sign in with Microsoft in the app."
					},
					"requireOnWeb": {
						"type": "boolean",
						"description": "The dashboard in a browser needs \"Continue with Microsoft\" in the tenant too. Turning it on\nneeds the admin signed in that way right now: proof the tenant is the organisation's."
					}
				},
				"required": [
					"mode"
				],
				"type": "object",
				"additionalProperties": false
			},
			"PublishWorkflowDraftDto": {
				"properties": {
					"draftHash": {
						"type": "string",
						"description": "The draftHash the caller read: a draft that changed since is refused."
					},
					"liveHash": {
						"type": "string",
						"description": "With a change to a live workflow: the liveHash the caller read."
					}
				},
				"required": [
					"draftHash"
				],
				"type": "object",
				"additionalProperties": false
			},
			"IdentityKeyStatus": {
				"type": "string",
				"enum": [
					"active",
					"retiring",
					"revoked"
				]
			},
			"IdentityKeyPlatform": {
				"description": "Where an identity key verifies: one SDK platform, or every one. The stored and wire strings.",
				"enum": [
					"web",
					"ios",
					"android",
					"all"
				],
				"type": "string"
			},
			"IdentityKeyView": {
				"properties": {
					"id": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"status": {
						"$ref": "#/components/schemas/IdentityKeyStatus"
					},
					"platform": {
						"$ref": "#/components/schemas/IdentityKeyPlatform"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"createdBy": {
						"type": "string",
						"nullable": true
					},
					"lastUsedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"hint": {
						"type": "string",
						"description": "The first characters of the secret, to tell keys apart in a backend config."
					}
				},
				"required": [
					"id",
					"label",
					"status",
					"platform",
					"createdAt",
					"createdBy",
					"lastUsedAt",
					"hint"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ReturnType_typeofidentityKeyViewsOf_": {
				"items": {
					"$ref": "#/components/schemas/IdentityKeyView"
				},
				"type": "array",
				"description": "Obtain the return type of a function type"
			},
			"CreateIdentityKeyDto": {
				"properties": {
					"label": {
						"type": "string",
						"description": "Where the key is used, e.g. \"Backend production\"."
					},
					"platform": {
						"$ref": "#/components/schemas/IdentityKeyPlatform",
						"description": "The SDK platform the key verifies for; `all` (the default) covers every one."
					}
				},
				"type": "object",
				"additionalProperties": false
			},
			"PlatformBucket": {
				"type": "string",
				"enum": [
					"web",
					"ios",
					"android",
					"other"
				]
			},
			"Record_string.string-or-number-or-boolean-or-Record_string.string-or-number-or-boolean__": {
				"properties": {},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"SignedClaims": {
				"$ref": "#/components/schemas/Record_string.string-or-number-or-boolean-or-Record_string.string-or-number-or-boolean__"
			},
			"IdentityError": {
				"type": "string",
				"enum": [
					"no_signature",
					"token_expired",
					"token_invalid",
					"user_mismatch",
					"key_unknown",
					"key_platform",
					"legacy_disabled",
					"no_key_matched"
				]
			},
			"IdentityTestReport": {
				"properties": {
					"ok": {
						"type": "boolean"
					},
					"kind": {
						"type": "string",
						"enum": [
							"jwt",
							"hash"
						]
					},
					"keyId": {
						"type": "string",
						"nullable": true
					},
					"legacy": {
						"type": "boolean"
					},
					"keyPlatform": {
						"allOf": [
							{
								"$ref": "#/components/schemas/IdentityKeyPlatform"
							}
						],
						"nullable": true,
						"description": "The scope of the key that signed (`all` or one platform); null for the project secret."
					},
					"platform": {
						"$ref": "#/components/schemas/PlatformBucket",
						"description": "The platform the token was tested as, when one was given."
					},
					"claims": {
						"$ref": "#/components/schemas/SignedClaims"
					},
					"userId": {
						"type": "string",
						"description": "The user id the signature proved, when it did."
					},
					"proved": {
						"properties": {
							"attributes": {
								"items": {
									"type": "string"
								},
								"type": "array"
							},
							"email": {
								"type": "boolean"
							},
							"userId": {
								"type": "boolean"
							}
						},
						"required": [
							"attributes",
							"email",
							"userId"
						],
						"type": "object"
					},
					"error": {
						"$ref": "#/components/schemas/IdentityError"
					},
					"message": {
						"type": "string"
					}
				},
				"required": [
					"ok",
					"kind",
					"keyId",
					"legacy",
					"proved",
					"message"
				],
				"type": "object",
				"additionalProperties": false
			},
			"TestIdentityDto": {
				"properties": {
					"userHash": {
						"type": "string",
						"description": "The identity token or user hash to check."
					},
					"userId": {
						"type": "string",
						"description": "The user id the identify would send; read from the token when left out."
					},
					"platform": {
						"type": "string",
						"description": "The platform to test as (`web`, `ios`, `android`); without it key scopes are not checked."
					}
				},
				"required": [
					"userHash"
				],
				"type": "object",
				"additionalProperties": false
			},
			"Record_PlatformBucket.number_": {
				"properties": {
					"web": {
						"type": "number",
						"format": "double"
					},
					"ios": {
						"type": "number",
						"format": "double"
					},
					"android": {
						"type": "number",
						"format": "double"
					},
					"other": {
						"type": "number",
						"format": "double"
					}
				},
				"type": "object",
				"description": "Construct a type with a set of properties K of type T"
			},
			"IdentityStats": {
				"properties": {
					"signedLogins7d": {
						"$ref": "#/components/schemas/Record_PlatformBucket.number_"
					},
					"legacyHashes7d": {
						"type": "number",
						"format": "double"
					},
					"lastSignedAt": {
						"type": "string",
						"nullable": true
					}
				},
				"required": [
					"signedLogins7d",
					"legacyHashes7d",
					"lastSignedAt"
				],
				"type": "object",
				"additionalProperties": false
			},
			"RestApiKeyStatus": {
				"description": "REST API keys (Settings › Security): the server API's own credentials, stored on the project\n(`restApiKeys`), rotated like identity keys. Read by services/restApiKey/restApiKey.logic.ts.",
				"enum": [
					"active",
					"retiring",
					"revoked"
				],
				"type": "string"
			},
			"RestApiKeyView": {
				"description": "A key as the dashboard lists it: never the key, a hint to tell keys apart.",
				"properties": {
					"id": {
						"type": "string"
					},
					"label": {
						"type": "string"
					},
					"status": {
						"$ref": "#/components/schemas/RestApiKeyStatus"
					},
					"createdAt": {
						"type": "string",
						"format": "date-time"
					},
					"createdBy": {
						"type": "string",
						"nullable": true
					},
					"lastUsedAt": {
						"type": "string",
						"format": "date-time",
						"nullable": true
					},
					"hint": {
						"type": "string",
						"description": "`grk_` and the id: enough to find the key in a backend config."
					}
				},
				"required": [
					"id",
					"label",
					"status",
					"createdAt",
					"createdBy",
					"lastUsedAt",
					"hint"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ResumePreviewResponse": {
				"properties": {
					"planName": {
						"type": "string",
						"nullable": true
					},
					"resumesAt": {
						"type": "string",
						"nullable": true,
						"description": "When Paddle resumes it on its own; null when paused until resumed."
					},
					"charge": {
						"properties": {
							"currency": {
								"type": "string"
							},
							"amountMinor": {
								"type": "number",
								"format": "double"
							}
						},
						"required": [
							"currency",
							"amountMinor"
						],
						"type": "object",
						"nullable": true,
						"description": "What resuming now charges; null when Paddle could not say."
					}
				},
				"required": [
					"planName",
					"resumesAt",
					"charge"
				],
				"type": "object",
				"additionalProperties": false
			},
			"ResumedSubscriptionResponse": {
				"properties": {
					"status": {
						"type": "string",
						"description": "Paddle's status after the resume: `active`, or `past_due` when the charge failed."
					}
				},
				"required": [
					"status"
				],
				"type": "object",
				"additionalProperties": false
			}
		},
		"securitySchemes": {
			"jwt": {
				"type": "http",
				"scheme": "bearer",
				"bearerFormat": "JWT"
			},
			"s2s": {
				"type": "http",
				"scheme": "bearer",
				"bearerFormat": "Service account token (JWT)"
			}
		}
	},
	"info": {
		"title": "gleap-server",
		"version": "14.0.0",
		"contact": {}
	},
	"openapi": "3.0.0",
	"paths": {
		"/message-templates": {
			"post": {
				"operationId": "CreateMessageTemplate",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MessageTemplateDocument"
								}
							}
						}
					}
				},
				"description": "Create a new message template. Callers who may only manage their own macros\nalways create a private macro visible to themselves alone.",
				"summary": "Create a new message template.",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/MessageTemplateDTO"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "FindMessageTemplates",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"items": {},
											"type": "array"
										},
										{
											"properties": {
												"totalCount": {
													"type": "number",
													"format": "double"
												},
												"data": {
													"items": {},
													"type": "array"
												}
											},
											"required": [
												"totalCount",
												"data"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Find the message templates of a project that are visible to the calling agent (public templates plus\ntemplates shared with them), ordered by `lexorank`.",
				"summary": "Find all message templates.",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Maximum number of templates to return; unlimited when omitted (with `searchTerm`: default 25, max 50).",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "- Number of templates to skip.",
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "- Matches the template title first, then body text. Search results are capped (default 25, max 50) and include `matchedIn` and `matchSnippet`.",
						"in": "query",
						"name": "searchTerm",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- `public` for public templates only, `private` for non-public templates shared with the caller; omit for both.",
						"in": "query",
						"name": "visibility",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Return `{ data, totalCount }` instead of a plain array.",
						"in": "query",
						"name": "withCount",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					},
					{
						"description": "- Apply usage restrictions: exclude templates limited to teams the caller is not a member of. Sent by the template pickers; the settings pages omit it so restricted templates stay manageable.",
						"in": "query",
						"name": "forUsage",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					},
					{
						"description": "- Exclude templates limited to other ticket types.",
						"in": "query",
						"name": "ticketType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Only templates carrying this tag.",
						"in": "query",
						"name": "tag",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/message-templates/tags": {
			"get": {
				"operationId": "GetMessageTemplateTags",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the distinct tags used across the project's message templates, sorted alphabetically.",
				"summary": "List all message template tags.",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/message-templates/{messageTemplateId}": {
			"get": {
				"operationId": "FindMessageTemplateById",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MessageTemplateDocument"
								}
							}
						}
					}
				},
				"description": "Find a single message template of a project by its ID.",
				"summary": "Find a message template.",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageTemplateId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateTeam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MessageTemplateDocument"
								}
							}
						}
					}
				},
				"description": "Update a message template. Callers who may only manage their own macros can\nupdate their personal macros only, and those stay private.",
				"summary": "Update a message template.",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageTemplateId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/MessageTemplateDTO"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteMessageTemplate",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MessageTemplateDocument"
								}
							}
						}
					}
				},
				"description": "Delete a message template. Callers who may only manage their own macros can\ndelete their personal macros only.",
				"summary": "Delete a message template",
				"tags": [
					"Message templates"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageTemplateId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions": {
			"post": {
				"operationId": "CreateSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a session (contact) in the project from the `project` header. When `userId` is supplied this is\nan upsert: an existing contact with that userId is updated and returned instead of a new one being created\n(one session per project + userId). Without `userId` the contact is an email contact: an email contact\nwith the same `email` is updated and returned, so inbound email and later identifies find it and a\nrepeated import creates no duplicates.",
				"summary": "Create a new session",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SessionDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetSessions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List sessions (contacts) of the project. Paginated: `limit` defaults to 50 and is capped at 100 per page,\nand paging cannot go past the first 10,000 results. Optional query parameters: `type` (`users` = has\nuserId, `guests` = no userId, `unsubscribed`, `optedOutAll` = opted out of all email, `bounced` = email address hard-bounced, or `companies`; the latter returns aggregated\ncompanies instead of sessions — `organisations` is the old name for it and still works), `companyId` (only sessions of this company), `userId` and `email` (exact), `name` and `companyName` (word prefix), `withFeedback` (only\nsessions with at least one ticket), `contactViewId` (returns the sessions matching a saved contact view;\n404 when the view does not exist), plus `skip` and `sort`.",
				"summary": "Get all sessions",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}": {
			"put": {
				"operationId": "UpdateSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update a session (contact) in the project from the `project` header. The fields `userId`, `project`,\n`organisation`, `gleapId` and `gleapHash` are ignored if sent. Changing `tags` requires the tag\npermissions of the calling agent. Setting `companyId` automatically creates the company if it does not\nexist yet.",
				"summary": "Update a session",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a session by id.",
				"summary": "Get a session",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "DeleteSession",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Delete a session by id. This also permanently deletes every ticket attached to the session, a hard\ndelete that emits no ticket events or webhooks.",
				"summary": "Delete a session",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/resubscribe": {
			"put": {
				"operationId": "ResubscribeSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Resubscribe a session: clears the unsubscribe, bounce and opt-out-all flags and records who did it. Fails\nwith 400 and code `spam_complaint` when the contact reported your email as spam (final), and with code\n`opt_out_all_dashboard_only` when a project API key / MCP delegate tries to clear opt-out-all (it can still resubscribe a\ncontact that is not opted out of all email), and with code `still_suppressed` when the email provider still suppresses the address.",
				"summary": "Resubscribe a session",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/sessions/search": {
			"get": {
				"operationId": "SearchSessions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Autocomplete search over the project's sessions. Returns at most 50 matches, each containing only `id`,\n`email`, `userId`, `name`, `companyId`, `companyName` and `phone`. Query parameters: `searchTerm`\n(required; terms shorter than 3 characters return an empty array) and `fieldExists` (optional; only\nreturn sessions where that field is set; allowed values: email, userId, phone, companyId, name,\ncompanyName, tags, plan, value, sla, lang, avatar, facebookId, instagramId, instagramUsername,\ntelegramChatId, telegramUsername; other values are ignored). Optional scoping: `contactViewId` limits\nresults to the sessions matching that saved contact view (its conditions apply exactly as in the list\nroute; `type`/`withFeedback` are ignored alongside it); without it, `type` (users | guests | unsubscribed | optedOutAll | bounced),\n`withFeedback=true` and `companyId` narrow the search like the list route. `fullContact=true` returns\nfull session documents (without the kv blobs) instead of the 7 autocomplete fields.",
				"summary": "Search for sessions",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/export": {
			"get": {
				"operationId": "ExportSessions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Export the project's contacts as a CSV file download (`Content-Type: text/csv`, filename `users.csv`).\nNot filterable; query parameters are ignored. Only contacts with an email address are included, capped\nat 75,000 rows, with a fixed column set (userId, name, email, phone, companyName, companyId, lang, plan,\nvalue, sla, deviceType, platform, tags, sessions, blocked, unsubscribed, firstActivity, lastActivity,\ncreatedAt, customData).",
				"summary": "Export sessions",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/warmup": {
			"post": {
				"operationId": "WarmupSessions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"ok": {
											"type": "boolean"
										}
									},
									"required": [
										"ok"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Pre-warm OpenSearch shards + Redis list cache for the active project.\nFire-and-forget: returns {ok:true} immediately while the warmup runs in\nthe background. Triggered from the frontend right before a session query\nis likely (sidebar hover, global search modal mount, RecipientPicker mount,\nperiodic refresh while on the Sessions page) so the user doesn't pay the\ncold-shard penalty on first interaction.",
				"summary": "Pre-warm sessions cache for the active project",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/by-user-id/{userId}": {
			"get": {
				"operationId": "FindSessionByUserId",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"eventData": {},
												"checklistTasks": {},
												"lastSurveySentAt": {
													"type": "string",
													"format": "date-time"
												},
												"lastOutboundSentAt": {
													"properties": {
														"push": {
															"type": "string",
															"format": "date-time"
														},
														"whatsapp": {
															"type": "string",
															"format": "date-time"
														},
														"email": {
															"type": "string",
															"format": "date-time"
														}
													},
													"type": "object"
												},
												"outboundPending": {},
												"outboundHistory": {},
												"plan": {
													"type": "string"
												},
												"discordUsername": {
													"type": "string"
												},
												"discordId": {
													"type": "string"
												},
												"telegramUsername": {
													"type": "string"
												},
												"telegramChatId": {
													"type": "string"
												},
												"instagramUsername": {
													"type": "string"
												},
												"instagramId": {
													"type": "string"
												},
												"facebookId": {
													"type": "string"
												},
												"sla": {
													"type": "number",
													"format": "double"
												},
												"companyName": {
													"type": "string"
												},
												"mergedInto": {
													"$ref": "#/components/schemas/ObjectId"
												},
												"emailLinkedFor": {
													"type": "string"
												},
												"authTokensOldestAt": {
													"type": "string",
													"format": "date-time"
												},
												"hasAuthTokens": {
													"type": "boolean"
												},
												"authTokens": {},
												"signed": {},
												"signedUserId": {
													"type": "string"
												},
												"emailVerifiedFor": {
													"type": "string"
												},
												"emailVerifiedAt": {
													"type": "string",
													"format": "date-time"
												},
												"emailVerified": {
													"type": "boolean"
												},
												"portalShowIdentity": {
													"type": "boolean"
												},
												"portalVerifiedEmail": {
													"type": "string"
												},
												"portalEmailVerifiedAt": {
													"type": "string",
													"format": "date-time"
												},
												"deviceType": {
													"type": "string"
												},
												"companyId": {
													"type": "string"
												},
												"avatar": {
													"type": "string"
												},
												"location": {},
												"lastPageView": {},
												"emailOptInAllAt": {
													"type": "string",
													"format": "date-time"
												},
												"emailOptInAllBy": {
													"type": "string"
												},
												"emailOptOutAllReason": {
													"type": "string"
												},
												"emailOptOutAllAt": {
													"type": "string",
													"format": "date-time"
												},
												"emailOptOutAll": {
													"type": "boolean"
												},
												"emailBounceStream": {
													"type": "string"
												},
												"emailBouncedAt": {
													"type": "string",
													"format": "date-time"
												},
												"emailBounced": {
													"type": "boolean"
												},
												"unsubscribedAt": {
													"type": "string",
													"format": "date-time"
												},
												"unsubscribeReason": {
													"type": "string"
												},
												"lastFeedbackReport": {
													"type": "string",
													"format": "date-time"
												},
												"lastActivity": {
													"type": "string",
													"format": "date-time"
												},
												"lastHeardFrom": {
													"type": "string",
													"format": "date-time"
												},
												"gleapHash": {
													"type": "string"
												},
												"gleapId": {
													"type": "string"
												},
												"customData": {},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"organisation": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"phone": {
													"type": "string"
												},
												"email": {
													"type": "string"
												},
												"platform": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"userId": {
													"type": "string"
												},
												"countFeedbackComments": {
													"type": "number",
													"format": "double"
												},
												"countFeedbackReports": {
													"type": "number",
													"format": "double"
												},
												"identityHistory": {
													"items": {
														"properties": {
															"changes": {
																"properties": {
																	"email": {
																		"properties": {
																			"to": {
																				"type": "string"
																			},
																			"from": {
																				"type": "string"
																			}
																		},
																		"type": "object"
																	},
																	"name": {
																		"properties": {
																			"to": {
																				"type": "string"
																			},
																			"from": {
																				"type": "string"
																			}
																		},
																		"type": "object"
																	},
																	"userId": {
																		"properties": {
																			"to": {
																				"type": "string"
																			},
																			"from": {
																				"type": "string"
																			}
																		},
																		"type": "object"
																	}
																},
																"type": "object"
															},
															"by": {
																"properties": {
																	"referer": {
																		"type": "string"
																	},
																	"originalUrl": {
																		"type": "string"
																	},
																	"hasApiKey": {
																		"type": "boolean"
																	},
																	"userEmail": {
																		"type": "string"
																	},
																	"source": {
																		"type": "string"
																	},
																	"method": {
																		"type": "string"
																	},
																	"userId": {
																		"type": "string"
																	}
																},
																"type": "object"
															},
															"_id": {},
															"at": {
																"type": "string",
																"format": "date-time"
															}
														},
														"required": [
															"at"
														],
														"type": "object"
													},
													"type": "array"
												},
												"memory": {
													"items": {
														"properties": {
															"actorUserId": {
																"properties": {
																	"isValid": {
																		"properties": {},
																		"type": "object"
																	},
																	"createFromHexString": {
																		"properties": {},
																		"type": "object"
																	},
																	"createFromTime": {
																		"properties": {},
																		"type": "object"
																	},
																	"generate": {
																		"properties": {},
																		"type": "object"
																	},
																	"cacheHexString": {},
																	"prototype": {
																		"$ref": "#/components/schemas/ObjectId"
																	}
																},
																"type": "object"
															},
															"actor": {
																"type": "string"
															},
															"updatedAt": {
																"type": "string",
																"format": "date-time"
															},
															"content": {
																"type": "string"
															},
															"createdAt": {
																"type": "string",
																"format": "date-time"
															},
															"description": {
																"type": "string"
															},
															"name": {
																"type": "string"
															}
														},
														"required": [
															"actor",
															"updatedAt",
															"content",
															"createdAt",
															"description",
															"name"
														],
														"type": "object"
													},
													"type": "array"
												},
												"sessions": {
													"type": "number",
													"format": "double"
												},
												"emailOnly": {
													"type": "boolean"
												},
												"blocked": {
													"type": "boolean"
												},
												"unsubscribed": {
													"type": "boolean"
												},
												"firstActivity": {
													"type": "string",
													"format": "date-time"
												},
												"lang": {
													"type": "string"
												},
												"value": {
													"type": "number",
													"format": "double"
												},
												"updatedAt": {
													"type": "string",
													"format": "date-time"
												},
												"createdAt": {
													"type": "string",
													"format": "date-time"
												},
												"tags": {
													"items": {
														"type": "string"
													},
													"type": "array"
												},
												"_id": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												}
											},
											"required": [
												"countFeedbackComments",
												"countFeedbackReports",
												"identityHistory",
												"memory",
												"sessions",
												"emailOnly",
												"blocked",
												"unsubscribed",
												"firstActivity",
												"lang",
												"value",
												"updatedAt",
												"createdAt",
												"tags",
												"_id"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Get a session by the contact's external user id (`Session.userId`, the id your app passes to the SDK\nidentify call), not the Mongo `_id`. Responds 404 when no contact with that userId exists.",
				"summary": "Get a session by user id",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/activities": {
			"get": {
				"operationId": "GetSessionActivities",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get the tickets (\"activities\") of a session, newest activity first. If the session has an email address,\ntickets from other sessions in the project sharing that email are included as well and are flagged with\n`isFromDuplicateSession: true`. Query parameters: `limit` (default 50), `skip` (default 0),\n`startDate`/`endDate` (ISO dates filtering on ticket `createdAt`; only applied when both are present).",
				"summary": "Get session activities",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/events": {
			"get": {
				"operationId": "GetSessionEvents",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get the streamed events of a session, newest first. Events emitted by outbounds are relabelled to\n\"<outbound or feedback type name> submitted\". Query parameter `limit`: number of events to return,\ndefault 5, maximum 300.",
				"summary": "Get session events",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/importer": {
			"post": {
				"operationId": "ImportSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"type": "string"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Bulk-import sessions (contacts). The body must be `{ \"sessions\": [...] }`. Every entry is matched\nagainst an existing contact before anything is created — by `userId` when the row carries one,\notherwise by `email` — so importing the same list twice updates those contacts instead of\nduplicating them. Returns the ids of the imported sessions.\n\nAt most `MAX_IMPORT_SESSIONS_PER_REQUEST` rows per call: a request has to finish well inside the\nedge's 60s window, and a larger list belongs in a sequence of these calls. Oversized bodies are\nrejected rather than truncated.",
				"summary": "Import sessions",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/sessions/importer/intercom": {
			"post": {
				"operationId": "ImportSessionIntercom",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Import sessions from intercom.",
				"summary": "Import sessions from intercom",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ImportIntercomSessionDto"
							}
						}
					}
				}
			}
		},
		"/sessions/importer/hubspot": {
			"post": {
				"operationId": "ImportSessionHubspot",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Import sessions from HubSpot.",
				"summary": "Import sessions from HubSpot",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"apiKey": {
										"type": "string"
									}
								},
								"required": [
									"apiKey"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/sessions/importer/zendesk": {
			"post": {
				"operationId": "ImportSessionZendesk",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Import sessions (contacts) from Zendesk.",
				"summary": "Import sessions from Zendesk",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"apiToken": {
										"type": "string"
									},
									"email": {
										"type": "string"
									},
									"state": {
										"type": "string"
									},
									"code": {
										"type": "string"
									},
									"subdomain": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/sessions/importer/freshdesk": {
			"post": {
				"operationId": "ImportSessionFreshdesk",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Import sessions (contacts) from Freshdesk.",
				"summary": "Import sessions from Freshdesk",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"apiKey": {
										"type": "string"
									},
									"domain": {
										"type": "string"
									}
								},
								"required": [
									"apiKey",
									"domain"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/sessions/unsubscribe": {
			"post": {
				"operationId": "UnsubscribeSessions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Unsubscribe contacts by email and/or userId. Fire-and-forget: the response is always\n`{ \"success\": true }` and does not reflect whether the contacts were found or updated. Every session in\nthe project matching an entry's email OR userId is unsubscribed; entries with neither field are ignored.",
				"summary": "Unsubscribe sessions",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"allEmail": {
										"type": "boolean",
										"description": "Also opt the contacts out of all email, service notices included (Session.emailOptOutAll). Default false."
									},
									"reason": {
										"type": "string",
										"description": "Stored as Session.unsubscribeReason. Defaults to \"CSV upload\" when omitted."
									},
									"sessions": {
										"items": {
											"properties": {
												"userId": {
													"type": "string"
												},
												"email": {
													"type": "string"
												}
											},
											"type": "object"
										},
										"type": "array"
									}
								},
								"required": [
									"sessions"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/sessions/{sessionId}/checklists": {
			"get": {
				"operationId": "GetChecklistsForSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get the non-draft checklists of a session, most recently updated first. Each entry contains only\n`completedSteps` and the parent outbound's name and step titles/ids. Query parameter `limit`: default 3,\nmaximum 10.",
				"summary": "Get session checklists",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/checklists/{checklistId}/reset": {
			"post": {
				"operationId": "ResetChecklistForSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Reset a checklist for a session — clears all completed steps and sets it back to active.",
				"summary": "Reset session checklist",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "checklistId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/identity-history": {
			"get": {
				"operationId": "GetSessionIdentityHistory",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"history": {}
									},
									"required": [
										"history"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Get the identity-change history for a session: recorded mutations of\nemail / name / userId on this contact record, capped at the 100 most\nrecent entries and returned as `{ history: [...] }`. Stripped from\ndefault session responses (see session.model.ts toJSON), so this is\nthe only path that returns it.",
				"summary": "Get session identity history",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/stripe": {
			"get": {
				"operationId": "FindSessionStripeInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get Stripe information for a session. Returns `{ customer, charges, subscriptions }` when the Stripe\nintegration is configured and a customer matches the session; otherwise an empty object.\nCached for 5 minutes per contact.",
				"summary": "Get session Stripe info",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "Load it from Stripe again instead of the cached copy.",
						"in": "query",
						"name": "refresh",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/chargebee": {
			"get": {
				"operationId": "FindSessionChargebeeInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {},
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Get Chargebee information for a session. Returns `{ customer, subscriptions, invoices }` when the\nChargebee integration is configured and a customer matches the session; otherwise an empty object.",
				"summary": "Get session Chargebee info",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/lemonsqueezy": {
			"get": {
				"operationId": "FindSessionLemonSqueezyInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {},
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Get LemonSqueezy information for a session. Returns `{ customer, subscriptions, invoices }` when the\nLemonSqueezy integration is configured and a customer matches the session; otherwise an empty object.",
				"summary": "Get session LemonSqueezy info",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/woocommerce": {
			"get": {
				"operationId": "FindSessionWooCommerceInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/CommercePanel"
										},
										{
											"$ref": "#/components/schemas/Record_string.any_"
										}
									]
								}
							}
						}
					}
				},
				"description": "Get Shopify information for a session. Returns `{ customer, orders, shopDomain }`; `customer` may be\nnull for guest checkouts; returns an empty object when the integration is not configured or no customer\nmatches.",
				"summary": "Get session Shopify info",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/shop": {
			"get": {
				"operationId": "FindSessionShopInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/CommercePanel"
										},
										{
											"$ref": "#/components/schemas/Record_string.any_"
										}
									]
								}
							}
						}
					}
				},
				"description": "Get \"Your shop API\" information for a session: the shop customer matching the contact's email and their last 5\norders, plus returns waiting for a teammate. Empty when no shop API is connected.",
				"summary": "Get session shop info",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/shopify-store": {
			"get": {
				"operationId": "FindSessionShopifyStoreInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/CommercePanel"
										},
										{
											"$ref": "#/components/schemas/Record_string.any_"
										}
									]
								}
							}
						}
					}
				},
				"description": "Get the Shopify store data of a session through the commerce panel (the Gleap Shopify app's connection): the\nsigned-in storefront customer or the customer matching the contact's email, their last 5 orders with lines,\ntotals, tracking and returns, and the order actions a teammate may run. Empty when Shopify is not connected.",
				"summary": "Get session Shopify store panel",
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/shopify": {
			"get": {
				"operationId": "FindSessionShopifyInfo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"properties": {
												"shopDomain": {},
												"error": {}
											},
											"type": "object"
										},
										{
											"properties": {
												"shopDomain": {
													"type": "string"
												},
												"error": {
													"type": "string"
												}
											},
											"required": [
												"shopDomain",
												"error"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"tags": [
					"Session"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/teams": {
			"post": {
				"operationId": "CreateTeam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/TeamDocument"
								}
							}
						}
					}
				},
				"description": "Create a new team and associate it with a project.",
				"summary": "Create a new team",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TeamDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetTeams",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/TeamDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get all teams associated with a project.",
				"summary": "Get all teams",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/teams/setup": {
			"get": {
				"operationId": "GetTeamSetup",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"escalationLimits": {
											"properties": {
												"reached": {},
												"today": {},
												"monthlyBudgetMinor": {},
												"dailyCap": {}
											},
											"required": [
												"reached",
												"today",
												"monthlyBudgetMinor",
												"dailyCap"
											],
											"type": "object"
										},
										"openUnowned": {
											"type": "number",
											"format": "double"
										},
										"boards": {
											"items": {
												"properties": {
													"suggestion": {
														"$ref": "#/components/schemas/BoardSuggestion"
													},
													"teamId": {
														"type": "string"
													},
													"assignTo": {},
													"icon": {},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string"
													}
												},
												"required": [
													"suggestion",
													"teamId",
													"assignTo",
													"icon",
													"name",
													"type"
												],
												"type": "object"
											},
											"type": "array"
										},
										"defaultTeam": {
											"type": "string"
										},
										"enabledAt": {},
										"enabled": {
											"type": "boolean"
										}
									},
									"required": [
										"escalationLimits",
										"openUnowned",
										"boards",
										"defaultTeam",
										"enabledAt",
										"enabled"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "How boards send their new tickets to teams (Teams of agents and people): on or off, the\ndefault team, each board's team, and for a project that has not turned it on, a setup\nsuggested from its last 30 days plus how many open tickets nobody owns.",
				"summary": "Get the boards' team setup",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "SetTeamSetup",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"escalationLimits": {
											"properties": {
												"reached": {},
												"today": {},
												"monthlyBudgetMinor": {},
												"dailyCap": {}
											},
											"required": [
												"reached",
												"today",
												"monthlyBudgetMinor",
												"dailyCap"
											],
											"type": "object"
										},
										"openUnowned": {
											"type": "number",
											"format": "double"
										},
										"boards": {
											"items": {
												"properties": {
													"suggestion": {
														"$ref": "#/components/schemas/BoardSuggestion"
													},
													"teamId": {
														"type": "string"
													},
													"assignTo": {},
													"icon": {},
													"name": {
														"type": "string"
													},
													"type": {
														"type": "string"
													}
												},
												"required": [
													"suggestion",
													"teamId",
													"assignTo",
													"icon",
													"name",
													"type"
												],
												"type": "object"
											},
											"type": "array"
										},
										"defaultTeam": {
											"type": "string"
										},
										"enabledAt": {},
										"enabled": {
											"type": "boolean"
										},
										"scheduled": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"escalationLimits",
										"openUnowned",
										"boards",
										"defaultTeam",
										"enabledAt",
										"enabled",
										"scheduled"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Turn team routing on or off, set the default team and each board's team (`default`, `team` with\na team id, or `nobody`). `assignOpenUnowned` also gives today's open tickets nobody owns to their\nboard's team. Off: assignment works exactly as before; the boards keep their picks.",
				"summary": "Set the boards' team setup",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TeamSetupDto"
							}
						}
					}
				}
			}
		},
		"/teams/{teamId}": {
			"put": {
				"operationId": "UpdateTeam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/TeamDocument"
								}
							}
						}
					}
				},
				"description": "Update a team.",
				"summary": "Update a team",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "teamId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TeamDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteTeam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/TeamDocument"
								}
							}
						}
					}
				},
				"description": "Delete a team.",
				"summary": "Delete a team",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "teamId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/teams/{teamId}/order": {
			"put": {
				"operationId": "UpdateTeamOrder",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/TeamDocument"
								}
							}
						}
					}
				},
				"description": "Update a team's ordering position in the inbox sidebar.",
				"summary": "Reorder a team",
				"tags": [
					"Team"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "teamId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/TeamOrderDto"
							}
						}
					}
				}
			}
		},
		"/messages": {
			"post": {
				"operationId": "CreateMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {},
								"examples": {
									"Example 1": {
										"value": {
											"id": "507f1f77bcf86cd799439015",
											"ticket": "507f1f77bcf86cd799439011",
											"type": "TEXT",
											"data": {
												"content": {
													"type": "doc",
													"content": [
														{
															"type": "paragraph",
															"content": [
																{
																	"type": "text",
																	"text": "Thank you for reporting this issue. We are looking into it."
																}
															]
														}
													]
												}
											},
											"comment": "Thank you for reporting this issue. We are looking into it.",
											"attachments": [
												{
													"name": "screenshot.png",
													"url": "https://example.com/screenshots/screenshot.png",
													"type": "image/png"
												}
											],
											"user": {
												"id": "507f1f77bcf86cd799439012",
												"email": "support@example.com",
												"firstName": "John",
												"lastName": "Doe"
											},
											"createdAt": "2024-01-20T11:00:00.000Z",
											"updatedAt": "2024-01-20T11:00:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"description": "Create a new message in a ticket. Required field: `ticket` (ticket ID).\nOptional fields: `comment` (rich text as TipTap doc JSON, or a plain string) or `markdownComment`\n(Markdown, converted server-side; takes precedence over `comment`), `type` (defaults to `TEXT`, or `NOTE`\nwhen `isNote` is true), `isNote` (creates an internal note), `attachments` (array of `{ name, url, type }`),\n`channel`, `replyTo` (message ID to quote), `data`, and `actions`. Other schema properties are accepted for\nbackwards compatibility but are ignored on create; messages are always attributed to the authenticated\nuser.",
				"summary": "Create a new message",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateMessageDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {},
								"examples": {
									"Example 1": {
										"value": [
											{
												"id": "507f1f77bcf86cd799439015",
												"ticket": "507f1f77bcf86cd799439011",
												"type": "TEXT",
												"data": {
													"content": {
														"type": "doc",
														"content": [
															{
																"type": "paragraph",
																"content": [
																	{
																		"type": "text",
																		"text": "This is a sample message content."
																	}
																]
															}
														]
													}
												},
												"comment": "This is a sample message content.",
												"bot": false,
												"user": {
													"id": "507f1f77bcf86cd799439012",
													"email": "support@example.com",
													"firstName": "John",
													"lastName": "Doe"
												},
												"session": {
													"_id": "507f1f77bcf86cd799439013",
													"id": "507f1f77bcf86cd799439013",
													"email": "user@example.com"
												},
												"createdAt": "2024-01-15T10:30:00.000Z",
												"updatedAt": "2024-01-15T10:30:00.000Z",
												"index": 0
											},
											{
												"id": "507f1f77bcf86cd799439016",
												"ticket": "507f1f77bcf86cd799439011",
												"type": "TEXT",
												"data": {
													"content": {
														"type": "doc",
														"content": [
															{
																"type": "paragraph",
																"content": [
																	{
																		"type": "text",
																		"text": "Thank you for the update!"
																	}
																]
															}
														]
													}
												},
												"comment": "Thank you for the update!",
												"bot": false,
												"user": {
													"id": "507f1f77bcf86cd799439017",
													"email": "user@example.com",
													"firstName": "Jane",
													"lastName": "Smith"
												},
												"session": {
													"_id": "507f1f77bcf86cd799439013",
													"id": "507f1f77bcf86cd799439013",
													"email": "user@example.com"
												},
												"createdAt": "2024-01-15T11:00:00.000Z",
												"updatedAt": "2024-01-15T11:00:00.000Z",
												"index": 1
											}
										]
									}
								}
							}
						}
					}
				},
				"description": "Get messages by query with support for filtering and pagination.\n\n**Filtering:**\n- Filter by ticket: `ticket=507f1f77bcf86cd799439011`. Any identifier `GET /tickets/{ticketId}` accepts works\n  here too — the human-facing ticket number shown in the dashboard (`ticket=143790`), the 24-char ObjectId, or\n  the shareToken.\n- Filter by type: `type=TEXT` or `type=TEXT,NOTE` (comma-separated values match any; bracket syntax such\n  as `type[$in]=...` is NOT supported)\n- Filter by bot messages: `bot=true` or `bot=false`\n- Filter by date range: `createdAt>=2024-01-01&createdAt<=2024-12-31`\n\n**Ordering:** Messages within a response are always oldest-first (ascending `createdAt`); the sort order is\nnot configurable.\n\n**Pagination:**\n- Cursor mode (recommended): pass `paginated=true` to receive `{ items, hasMore, nextBefore }`. Pages walk\n  backwards in time: the first page holds the newest `limit` messages, and `before=<messageId>` (the\n  previous `nextBefore`, which is the oldest message of that page) fetches the next older page. Keep going\n  until `hasMore` is `false`, then sort by `createdAt` on your side. `skip` is ignored in this mode; `limit`\n  defaults to 30 and is clamped to 1-100. If the cursor message was deleted between two calls, the request\n  fails with 409; restart from the newest page.\n- Legacy mode (no `paginated`): returns a flat array; `limit` defaults to 1000 and values above 100 are\n  clamped to 100; `skip` is applied.\n\n**Exporting a full conversation:**\nFilter by `ticket` rather than by `bot`. `bot=true` selects messages exchanged with the AI bot, so on a\nconversation that was handed over to a human it omits the agent's replies — `ticket={ticketId}` returns\nevery top-level message. Thread replies are not part of the main feed: a message with replies carries a\n`thread` object (`replyCount`, `lastReplyAt`), so call `GET /messages/{messageId}/thread` only for those.\nTicket history is not part of it either (see below). Which conversations still exist is governed by\nretention — AI-only (`type=BOT`) conversations are deleted about 33 days after they are created, see\nGET /tickets.\n\n**Edits and deletes:** a message's `updatedAt` changes when it is edited, and also on other updates such\nas reactions or read status; there is no separate \"edited\" flag. Deleted messages are removed permanently\n(with their thread replies) and send no webhook or event; compare message IDs on re-fetch to detect them.\nNeither changes the ticket's `updatedAt`.\n\n**Attachments:** file URLs in the response are signed and expire after about one day; no authentication is\nneeded while they are valid. Download files you want to keep, and re-fetch the message for a fresh URL.\n\n**Ticket history:**\nSince August 2026 this endpoint returns conversation messages only. Audit entries — `FEEDBACK_UPDATED`\n(status, assignee, team, priority, type, tag, title changes, …) and workflow/system entries — are no\nlonger part of the response; filtering by those types returns an empty result. Fetch them from\n`GET /tickets/{ticketId}/history`, which returns them in the same message-compatible shape.\n\n**Translation:**\n- `language=es` returns messages translated into the given language. Requires the project setting\n  'translate customer messages'; only conversation messages (`TEXT`, `USER_TEXT`, `NOTE`, `BOT`,\n  `BOT_REPLY`, `SHARED_COMMENT`) are translated, and messages already in the target language are returned\n  unchanged.",
				"summary": "Find messages by query",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Set to `true` for cursor mode: returns `{ items, hasMore, nextBefore }`",
						"in": "query",
						"name": "paginated",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					},
					{
						"description": "- Cursor for the next older page (the previous response's `nextBefore`); only with `paginated=true`",
						"in": "query",
						"name": "before",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Maximum number of messages to return. Cursor mode: default 30, clamped to 1-100. Legacy mode: default 1000, values above 100 are clamped to 100.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						},
						"example": "50"
					},
					{
						"description": "- Deprecated, accepted and ignored. Ticket-history entries are served by `GET /tickets/{ticketId}/history`.",
						"in": "query",
						"name": "showHistory",
						"required": false,
						"schema": {
							"type": "boolean"
						},
						"deprecated": true
					}
				]
			}
		},
		"/messages/search": {
			"get": {
				"operationId": "SearchMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"hits": {}
									},
									"required": [
										"hits"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Search messages by query.",
				"summary": "Search messages",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "searchTerm",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/messages/{messageId}": {
			"put": {
				"operationId": "UpdateMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Edit an existing message. Only `data` (the message content, e.g. `data.content` as TipTap JSON) and\n`attachments` are persisted; all other schema properties are ignored, and `data` is replaced wholesale\n(an omitted `data` clears the content). Agents may only edit their own messages, sent through the widget\nor email channel, that the contact has not read yet and that are less than 2 minutes old; own internal\nnotes can be edited at any time.",
				"summary": "Update a message",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateMessageDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteMessage",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Permanently deletes a message from a ticket, together with its thread replies; this cannot be undone. No\nwebhook or event is sent, and the ticket's `updatedAt` does not change.",
				"summary": "Delete a message",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/messages/{messageId}/thread": {
			"post": {
				"operationId": "CreateThreadReply",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Reply inside a message's thread.\n\nThread replies are INTERNAL — they never reach the customer, never fire\nwebhooks/integrations/SLA, and never move the ticket's latest message.",
				"summary": "Create a thread reply",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateThreadReplyDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetThreadMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the replies of a thread as a cursor-paged envelope `{ items, hasMore, nextBefore }`, paged like\n`GET /messages` with `paginated=true`: the first page holds the newest `limit` replies (default 50, max 100),\neach page is oldest-first, and `before=<nextBefore>` fetches the next older page until `hasMore` is `false`.\nIf the cursor message was deleted between two calls, the request fails with 409; restart from the newest\npage. Only messages with a `thread` object have replies.",
				"summary": "Get thread messages",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "before",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/messages/{messageId}/reactions": {
			"put": {
				"operationId": "SetMessageReaction",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Add or remove an emoji reaction on a message.\n\nReactions are INTERNAL — never visible to end customers, never fire\nwebhooks/SLA/unread, never move the ticket's latest message. The update\nreaches open dashboards via the ordinary comment.updated broadcast.",
				"summary": "Set a message reaction",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SetReactionDto"
							}
						}
					}
				}
			}
		},
		"/messages/{messageId}/faq": {
			"post": {
				"operationId": "SuggestFaq",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Resolves an AI-generated FAQ suggestion message. With `accept: true` the suggested question/answer pair\nis added to the knowledge base; with `accept: false` it is discarded. Either way the suggestion message is\ndeleted.",
				"summary": "Accept or decline an AI FAQ suggestion",
				"tags": [
					"Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SuggestFaqDto"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections": {
			"post": {
				"operationId": "CreateHelpcenterCollection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterCollectionDocument"
								}
							}
						}
					}
				},
				"description": "Create a new help center collection. `project`, `docId` and `lexorank` are assigned by the server and\nignored if sent. When `parent` is set, `baseAudienceFilter` is inherited from the parent collection (any\nvalue sent is overwritten) and an unknown `parent` returns 404.",
				"summary": "Create a new collection",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpCenterCollectionDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetHelpcenterCollections",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/CollectionWithCounts"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get help center collections. Returns only top-level collections by default; pass\n`parentId=<collectionId>` to list the direct children of a collection, or `parentId=all` to list every\ncollection. Results are sorted by `lexorank` and each entry includes `articlesCount` and\n`subCollectionsCount`. Note: this endpoint returns the dashboard view of a collection; `project` and\n`externalId` are omitted. Use GET /helpcenter/collections/all for full documents. Pass `site=<siteId>` (or\n`site=default`) to list one help center site's collections.",
				"summary": "Get all collections",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/all": {
			"get": {
				"operationId": "GetAllHelpcenterCollections",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/HelpcenterCollectionDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get all help center collections (subcollections included)",
				"summary": "Get all collections with subcollections",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/stats": {
			"get": {
				"operationId": "GetHelpcenterArticleStats",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"draftArticlesCount": {
											"type": "number",
											"format": "double"
										},
										"liveArticlesCount": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"draftArticlesCount",
										"liveArticlesCount"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Get live/draft article counts across the whole help center",
				"summary": "Get article stats",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/order": {
			"put": {
				"operationId": "ReorderHelpcenterCollections",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/CollectionWithCounts"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Set the order of the collections on one level of the tree. Send every collection id in\nthe order they should appear, plus the `parentId` whose children are being ordered\n(omit it for the top level). The server rewrites all of that level's ranks so the order\nis exact and stable; siblings left out keep their relative order and follow the listed\nones. Returns the level's collections in their new order.",
				"summary": "Reorder collections",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpCenterCollectionOrderDto"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}": {
			"get": {
				"operationId": "GetHelpcenterCollectionItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterCollectionDocument"
								}
							}
						}
					}
				},
				"description": "Get a help center collection by id",
				"summary": "Get a collection",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateHelpcenterCollection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterCollectionDocument"
								}
							}
						}
					}
				},
				"description": "Update a help center collection. Changing `targetAudience`, `baseAudienceFilter` or\n`extendedAudienceFilter` also re-applies the resulting audience filter to every article in this\ncollection and, recursively, to all subcollections and their articles.",
				"summary": "Update a collection",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpCenterCollectionDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteHelpcenterCollection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a help center collection. The collection must be empty: the request is rejected with 409 while\nit still contains articles. Subcollections are not deleted; move or delete them first. Returns\n`{ success: true }`.",
				"summary": "Delete a collection",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/sites": {
			"put": {
				"operationId": "SetHelpcenterCollectionSites",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"sites": {
											"items": {
												"type": "string"
											},
											"type": "array"
										},
										"success": {
											"type": "boolean"
										},
										"articles": {
											"type": "number",
											"format": "double"
										},
										"collections": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"sites",
										"success",
										"articles",
										"collections"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Put a top-level collection (with its sub-collections and articles) on each of the listed help\ncenter sites (`default` for the default site) and take it off the others. Its home site, the\nfirst, keeps the canonical links. Returns the sites in stored order.",
				"summary": "Set the sites a collection shows on",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpCenterCollectionSitesDto"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/toggle-publish": {
			"put": {
				"operationId": "UnpublishHelpcenterCollection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Publish or unpublish every article in a help center collection. Set `unpublished` to `true` to\nunpublish or `false` to publish; the change is applied recursively to all articles in this collection\nand in all of its subcollections. The collection document itself is not modified. Returns\n`{ success: true }`.",
				"summary": "Publish or unpublish a collection's articles",
				"tags": [
					"Help center collections"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"unpublished": {
										"type": "boolean"
									}
								},
								"required": [
									"unpublished"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles": {
			"post": {
				"operationId": "CreateHelpcenterArticle",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterArticleDocument"
								}
							}
						}
					}
				},
				"description": "Create a new help center article in a collection. `title`, `description` and `content` may be sent\neither localized (`{ \"en\": ... }`) or as a bare value, which is stored under the help center's default\nlanguage. `project`, `helpcenterCollection`, `docId`, `lexorank`, `plainContent` and\n`baseAudienceFilter` are assigned by the server and ignored if sent. The article is created unpublished\n(`isDraft: true`) unless `isDraft: false` is passed.\n\n`content` is TipTap JSON. Images are `image` nodes referencing a hosted image URL:\n`{ \"type\": \"image\", \"attrs\": { \"src\": \"<url>\" } }`. To host images on the Gleap CDN, upload\nthem first via `POST /v3/uploads` (or import from an existing URL via `POST /v3/uploads/from-url`)\nand use the returned `fileUrl` as the `src`.",
				"summary": "Create a new article",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterArticleDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetHelpcenterArticles",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/HelpcenterArticleDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get every article in a help center collection, published and unpublished, sorted by `lexorank`. This\nendpoint is not paginated.",
				"summary": "Get all articles",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/order": {
			"put": {
				"operationId": "ReorderHelpcenterArticles",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/HelpcenterArticleDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Set the order of the articles in a collection. Send every article id in the order they\nshould appear; the server rewrites all of the collection's ranks so the order is exact\nand stable. Articles left out of the list keep their relative order and follow the\nlisted ones. Returns the collection's articles in their new order.",
				"summary": "Reorder articles",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterArticleOrderDto"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}": {
			"get": {
				"operationId": "GetHelpcenterArticleItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a help center article by id. Pass format=html or format=markdown to\nadditionally include the article content converted to that format (as a localized\ncontentHtml / contentMarkdown field) next to the stored editor JSON. Omit the\nparameter to return the article unchanged.",
				"summary": "Get an article",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "format",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateHelpcenterArticleItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterArticleDocument"
								}
							}
						}
					}
				},
				"description": "Update a help center article. `content` is TipTap JSON; images are `image` nodes\nreferencing a hosted image URL (`{ \"type\": \"image\", \"attrs\": { \"src\": \"<url>\" } }`) —\nupload files via `POST /v3/uploads` first and use the returned `fileUrl` as the `src`.",
				"summary": "Update an article",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterArticleDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteHelpcenterArticleItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a help center article",
				"summary": "Delete an article",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/versions": {
			"get": {
				"operationId": "ListHelpcenterArticleVersions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "List the retained version snapshots of a help center article (newest first)",
				"summary": "List article versions",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateHelpcenterArticleVersion",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Capture a manual version checkpoint of the article's current state",
				"summary": "Create an article version checkpoint",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/versions/{versionId}": {
			"get": {
				"operationId": "GetHelpcenterArticleVersion",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a single version snapshot of a help center article, including its content",
				"summary": "Get an article version",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "versionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/versions/{versionId}/restore": {
			"post": {
				"operationId": "RestoreHelpcenterArticleVersion",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Restore a help center article to a previous version (the current state is\nsnapshotted first, so the restore itself can be undone)",
				"summary": "Restore an article version",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "versionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/move": {
			"put": {
				"operationId": "MoveHelpcenterArticleItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterArticleDocument"
								}
							}
						}
					}
				},
				"description": "Move a help center article to a different collection",
				"summary": "Move an article",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"newCollectionId": {
										"type": "string"
									}
								},
								"required": [
									"newCollectionId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/draft": {
			"get": {
				"operationId": "GetHelpcenterArticleDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the staged (unpublished) draft of a help center article, or null",
				"summary": "Get an article draft",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "SaveHelpcenterArticleDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create or update the staged draft of an article. The live article is never modified by this call; use\nthe draft publish endpoint to promote it.",
				"summary": "Save an article draft",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterArticleDraftDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DiscardHelpcenterArticleDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Discard the staged draft of an article (the live article is untouched)",
				"summary": "Discard an article draft",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter/collections/{helpcenterCollectionId}/articles/{helpcenterArticleId}/draft/publish": {
			"post": {
				"operationId": "PublishHelpcenterArticleDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Publish a staged draft to the live article (promote). Pass force=true to\noverride the warning when the live article changed since the draft started.",
				"summary": "Publish an article draft",
				"tags": [
					"Help center articles"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "helpcenterCollectionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "helpcenterArticleId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "force",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/shared/helpcenter/search": {
			"get": {
				"operationId": "GetHelpcenterCollections",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"domainRedirect": {},
										"redirectUrl": {},
										"session": {
											"properties": {
												"gleapHash": {},
												"gleapId": {},
												"userName": {},
												"userEmail": {},
												"userId": {}
											},
											"required": [
												"gleapHash",
												"gleapId",
												"userName",
												"userEmail",
												"userId"
											],
											"type": "object"
										},
										"project": {
											"properties": {
												"apiUrl": {
													"type": "string"
												},
												"region": {
													"type": "string"
												},
												"defaultDomain": {
													"type": "string"
												},
												"customDomain": {},
												"apiKey": {},
												"flowConfig": {
													"properties": {
														"localizationOptions": {},
														"operatorAvatarImage": {},
														"hideBranding": {},
														"backgroundColor": {},
														"headerColor": {},
														"color": {},
														"helpcenterConfig": {}
													},
													"required": [
														"localizationOptions",
														"operatorAvatarImage",
														"hideBranding",
														"backgroundColor",
														"headerColor",
														"color",
														"helpcenterConfig"
													],
													"type": "object"
												},
												"name": {}
											},
											"required": [
												"apiUrl",
												"region",
												"defaultDomain",
												"customDomain",
												"apiKey",
												"flowConfig",
												"name"
											],
											"type": "object"
										},
										"data": {}
									},
									"required": [
										"domainRedirect",
										"redirectUrl",
										"session",
										"project",
										"data"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Full-text search the published articles of a help center. Returns at most 30 hits, filtered to the\nrequested language and to the articles the current visitor session is allowed to see. Hits are returned\nunder `data.hits`, alongside the help center's `project` configuration and any `domainRedirect`.\nAuthentication: the `api-token` header must carry the help center domain (e.g. `acme-app.gleap.help` or\nyour custom domain); a `password` header is required for password-protected help centers; optional\n`gleap-id`/`gleap-hash` headers resolve the visitor session for audience filtering. Query parameters:\n`searchTerm` (required), `lang` (defaults to `en`, falling back to the help center's first configured\nlanguage), `collectionId` (restrict results to one collection).",
				"summary": "Search help center articles",
				"tags": [
					"Help center"
				],
				"security": [],
				"parameters": []
			}
		},
		"/shared/helpcenter/sources": {
			"get": {
				"operationId": "GetHelpcenterSources",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Find the help center sources (articles and indexed URLs) most relevant to a search term, as used for\nAI answers. `searchTerm` is required (the request fails without it). Each source is returned with `id`,\n`title`, `url` and a short `extract`. Same authentication headers as the search endpoint; `lang`\noptional.",
				"summary": "Get help center sources",
				"tags": [
					"Help center"
				],
				"security": [],
				"parameters": []
			}
		},
		"/shared/helpcenter/answer": {
			"get": {
				"operationId": "AnswerHelpCenterQuestion",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Answer a visitor question with AI (Kai Support, with its settings), grounded in the help center's content.\nPass the question in the `question` query parameter (required) and optionally `lang`. Returns the generated\nanswer under `answer` and, when Kai shows sources, the articles it cited under `sources` (`id`, `title`,\n`url`, `sourceType`). Same authentication headers as the search endpoint.",
				"summary": "Answer help center question",
				"tags": [
					"Help center"
				],
				"security": [],
				"parameters": []
			}
		},
		"/helpcenter-redirect": {
			"post": {
				"operationId": "CreateHelpcenterRedirect",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterRedirectDocument"
								}
							}
						}
					}
				},
				"description": "Create a new redirect.",
				"summary": "Create a new redirect.",
				"tags": [
					"Help center redirects"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterRedirectDTO"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "FindRedirects",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/HelpcenterRedirectDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Find all redirects of a project.",
				"summary": "Find all redirects.",
				"tags": [
					"Help center redirects"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/helpcenter-redirect/{redirectId}": {
			"put": {
				"operationId": "UpdateRedirect",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterRedirectDocument"
								}
							}
						}
					}
				},
				"description": "Update a redirect.",
				"summary": "Update a redirect.",
				"tags": [
					"Help center redirects"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "redirectId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HelpcenterRedirectDTO"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteRedirect",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HelpcenterRedirectDocument"
								}
							}
						}
					}
				},
				"description": "Delete a redirect.",
				"summary": "Delete a redirect",
				"tags": [
					"Help center redirects"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "redirectId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets": {
			"post": {
				"operationId": "CreateTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {},
								"examples": {
									"Example 1": {
										"value": {
											"_id": "507f1f77bcf86cd799439011",
											"id": "507f1f77bcf86cd799439011",
											"bugId": 42,
											"title": "Login button not working",
											"description": "Users cannot log in when clicking the login button",
											"type": "BUG",
											"status": "OPEN",
											"priority": "HIGH",
											"archived": false,
											"isSpam": false,
											"shareToken": "ubjvxvxpuvz7d9zwqyi9v4jekjif5skn",
											"project": "507f1f77bcf86cd799439010",
											"session": "507f1f77bcf86cd799439013",
											"customData": {
												"browser": "Chrome",
												"version": "120.0.0.0"
											},
											"createdAt": "2024-01-15T10:30:00.000Z",
											"updatedAt": "2024-01-15T10:30:00.000Z"
										}
									}
								}
							}
						}
					}
				},
				"description": "Create a new ticket in a project. Every field is optional. Common fields include: `title`, `description`,\n`type` (BUG, FEATURE_REQUEST, etc.), `status`, `priority`, `session` (contact/session ID\nif manually added), and `customData` (custom fields). Use `linkedTickets` to reference existing tickets.\n`sourceTicketId` creates the ticket from another one (e.g. a bug from a conversation): it takes that\nticket's contact and company unless `session` is set, and links both tickets.\n`priority` is a priority key of the ticket's board (LOW, MEDIUM, HIGH or a custom key) or its title; an\nunknown value falls back to the board's default priority. GET /projects/ticket-types lists each board's\npriorities.",
				"summary": "Create a new ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateTicketDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "GetTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {},
								"examples": {
									"Example 1": {
										"value": {
											"tickets": [
												{
													"_id": "507f1f77bcf86cd799439011",
													"id": "507f1f77bcf86cd799439011",
													"title": "Login button not working",
													"formData": {
														"description": "Users cannot log in when clicking the login button"
													},
													"type": "BUG",
													"status": "OPEN",
													"priority": "HIGH",
													"createdAt": "2024-01-15T10:30:00.000Z",
													"updatedAt": "2024-01-15T11:45:00.000Z",
													"processingUser": {
														"_id": "507f1f77bcf86cd799439012",
														"email": "support@example.com",
														"firstName": "John",
														"lastName": "Doe"
													},
													"session": {
														"_id": "507f1f77bcf86cd799439013",
														"email": "user@example.com"
													},
													"latestComment": {
														"_id": "507f1f77bcf86cd799439014",
														"data": {
															"content": "Any update on this issue?"
														}
													}
												}
											],
											"count": 1,
											"totalCount": 42
										}
									}
								}
							}
						}
					}
				},
				"description": "Get all tickets in a project with support for filtering, sorting, and pagination.\n\n**Filtering:**\n- Filter by type: `type=BUG` or `type=BUG,FEATURE_REQUEST`\n- Filter by status: `status=OPEN`\n- Filter by priority key: `priority=HIGH` or `priority=HIGH,MEDIUM`. Keys are LOW, MEDIUM, HIGH or a board's\n  custom priority key (listed by GET /projects/ticket-types)\n- Filter by archived state: archived tickets are hidden by default; pass `ignoreArchived=true` to include them,\n  or `ignoreArchived=true&archived=true` for archived tickets only\n- Filter by spam: `isSpam=false`\n- Filter the archive by archive date: `startDate` / `endDate` (ISO 8601) narrow the archive, spam and\n  waiting-on-customer views to tickets archived within that range. Ignored on the non-archive views,\n  where `archivedAt` is unset.\n- Filter by update or creation time: `updatedAt>=2026-10-01T00:00:00Z&updatedAt<=2026-10-08T00:00:00Z`\n  (`>=`, `>`, `<=`, `<` work on `updatedAt` and `createdAt`). Use UTC with a `Z` suffix: a `+hh:mm` offset is\n  decoded as a space and matches nothing.\n\n**Never listed:** tickets merged into another ticket as duplicates, and spam unless `isSpam=true`. Without a\n`type`, only the project's boards (GET /ticket-types) and `BOT` are listed, so tickets whose board was deleted\nand survey responses need an explicit `type`. For a complete export use GET /tickets/csv-export without `type`.\n\n**Sorting:**\n- Sort by creation date: `sort=-createdAt` (newest first) or `sort=createdAt` (oldest first)\n- Sort by priority: `sort=priority` (most urgent first, in the board's priority order) or `sort=-priority`\n  (least urgent first)\n- Sort by updated date: `sort=-updatedAt`\n- Default sort (no `sort` param): most recent activity first (`lastNotification` descending)\n- Archived, spam and waiting-on-customer views always sort by `archivedAt` descending; a `sort` param is ignored there\n\n**Pagination:**\n- Limit results: `limit=20` (default: 500, max: 500)\n- Skip results: `skip=0` (for pagination: `skip=(page-1)*limit`)\n\n**Retention — read this before building an export:**\n- `type=BOT` conversations (AI conversations that never reached a human) are closed and archived about 3 days\n  after they are created, and permanently deleted 30 days after that. Roughly the last 33 days are available;\n  older AI-only conversations no longer exist and cannot be exported or restored.\n- Every other ticket type is permanently deleted 365 days after it was archived, or after the project's custom\n  archive window if one is configured. Unarchived tickets are never deleted by retention.\n- Projects with \"Keep forever\" on (Pro and up) keep every archived ticket except `type=BOT`\n  conversations, which still follow the 30-day window.\n- A conversation handed over to a human stops being `type=BOT` (it becomes `INQUIRY` or the type the handover\n  assigns) and from then on follows the longer window above.\n- Ticket history entries have their own 180-day window — see GET /tickets/{ticketId}/history.",
				"summary": "Get all tickets",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/compose": {
			"post": {
				"operationId": "CreateTicketWithMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new ticket and optionally post an initial message in a single request.\nProvide either a session (contact ID) or email to associate the ticket with a contact.\nIf an email is provided and no contact exists, one will be created automatically.",
				"summary": "Create a new ticket with an optional initial message",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateTicketWithMessageDto"
							}
						}
					}
				}
			}
		},
		"/tickets/search": {
			"get": {
				"operationId": "SearchForTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Full-text search over the project's tickets and their comments. Returns `{ hits: [...] }` with at most\n30 hits, ordered by relevance.\n\nQuery parameters: `searchTerm` (required, max 100 characters), `type` (optional ticket type filter, e.g.\n`BUG`), `status` (optional status filter, e.g. `OPEN`), `archived` (optional `true`/`false`; omit to search\nboth), `addSession` (set to `true` to include contact data on each hit).",
				"summary": "Search for tickets",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/extendedsearch": {
			"get": {
				"operationId": "SearchForTicketsExtended",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Searches contacts and tickets in parallel and returns two buckets: `sessionResults` (tickets belonging to\nmatching contacts, with their latest comment) and `generalResults`. Each bucket is capped at 250 tickets.\n\nQuery parameters: `searchTerm` (required), `type` (match mode: `STRICT` by default, or `BROAD`; note this\nis NOT the ticket type here), `ticketType` (optional ticket type filter; by default CRASH, SURVEY and BOT\ntickets are excluded), `ticketStatus` (optional status filter), `sort` (optional: `newest` or `oldest` orders\nboth buckets by creation date; best match first by default), `addSession` (set to `true` to include\ncontact data).",
				"summary": "Extended ticket search (contacts + tickets)",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/by-session-query": {
			"get": {
				"operationId": "FindTicketsBySessionQuery",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Resolves contacts (sessions) matching the given identifiers (at most 100) and returns their tickets as\n`{ tickets, count, totalCount }`. Archived, hidden, spam and merged-duplicate tickets are excluded and at\nmost 500 tickets are returned. Pass at least one of `email`, `userId`, `phone` or `customData.TIN`.",
				"summary": "Find tickets by session query",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "email",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "userId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "phone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "customData.TIN",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/export": {
			"get": {
				"operationId": "ExportTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns the project's tickets as a JSON array, capped at 25,000 tickets. Supports the usual ticket\nfilters. For larger exports or CSV output use GET /tickets/csv-export.\n\nUnlike GET /tickets, exports include archived tickets by default — there is no `ignoreArchived` to set\n(it is accepted and ignored). Narrow the export with `archived=true` / `archived=false` instead.\n\nThis endpoint returns ticket records only, not their conversations: fetch each ticket's messages with\nGET /messages?ticket={ticketId}. Retention limits which conversations still exist — see GET /tickets.\n\n`type` accepts one ticket type (default `BUG`) or a comma-separated list (`BUG,INQUIRY,BOT`) to export\nseveral boards — `BOT` is the Kai conversations lane — in one file; the `type` field tells rows apart.\n\n`startDate`/`endDate` (ISO 8601, inclusive) filter on `createdAt`; filter on the update time with\n`updatedAt>=…&updatedAt<=…` (UTC, `Z` suffix). `sort`, `skip` and `limit` are ignored, so this endpoint cannot\npage past 25,000 tickets.",
				"summary": "Export tickets as JSON",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/notification/{shareToken}": {
			"get": {
				"operationId": "GetNotificationTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get notification ticket.\n\nThe dashboard calls this for every websocket ticket event whose ticket\nisn't already loaded — it is a READ, gated on TICKET_FIND like GET\n/tickets. It previously required TICKET_EXPORT (copied from the export\nendpoints around it), which silently broke realtime inserts for any\ncustom role that can view the inbox but not export.",
				"summary": "Get notification ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "shareToken",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/csv-export": {
			"get": {
				"operationId": "ExportTicketsAsCSV",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Streams the project's tickets as a CSV download (`tickets.csv`, `text/csv`), with no row cap. For a JSON\nexport use GET /tickets/export instead.\n\n**Rows:** `type` narrows the export to one type or a comma-separated list such as `BUG,INQUIRY,BOT` (`BOT` is\nthe Kai conversations lane). Without `type`, tickets of every type are exported, including types whose board\nwas deleted and survey responses. Archived tickets (`ignoreArchived` is accepted and ignored), spam and merged\nduplicates are included. `startDate`/`endDate` (ISO 8601, inclusive) filter on `createdAt`; to filter on the\nupdate time use `updatedAt>=2026-10-01T00:00:00Z&updatedAt<=2026-10-08T00:00:00Z` (UTC with a `Z` suffix: a\n`+hh:mm` offset is decoded as a space and matches nothing). The usual ticket filters apply; `sort`, `skip` and\n`limit` are ignored and rows come in `_id` order.\n\n**Columns:** pass `projection[]` to pick fields (see GET /tickets/export-fields). Without it, the columns are\nthe listed types' export fields, or the `BUG` board's fields when `type` is omitted.\n\nExports ticket records only, not their conversations. Retention limits which tickets still exist — see\nGET /tickets. If the export fails after the download has started, the connection is aborted rather than\nended, so a download that completes without a transfer error contains every matching row.",
				"summary": "Export tickets as CSV",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/export-fields": {
			"get": {
				"operationId": "GetTicketExportFields",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns the exportable field definitions (`{ fields: [...] }`) for a ticket type; use these keys as\n`projection[]` values on GET /tickets/csv-export.",
				"summary": "List available export fields",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Ticket type whose fields to list (default: `BUG`); a comma-separated list merges the fields of every listed type",
						"in": "query",
						"name": "type",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/tracker-tickets": {
			"post": {
				"operationId": "CreateTrackerTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a tracker ticket in a project. When\n`customerEmail` is set, the customer is added as the first upvoter\n(`upvotes: [{ email, name }]`, `upvotesCount: 1`) and their session\n(source ticket's session, else resolved by email) becomes the ticket's\ncreator `session` — used for feature requests where the originating\ncustomer should own the request like a portal-submitted one.\n\nFeature requests filed by an agent (`createdByAgent` set) are created as\nordinary customer requests linked to their conversation, NOT as tracker\ntickets — only human/dashboard creates get `trackerTicket: true`.\n\nA feature request that strongly matches existing ones is refused with a\n409 `DUPLICATE_FEATURE_REQUEST` listing them in `candidates` (best first;\n`duplicate` is the best one). Repeat the call with their ids in\n`notDuplicateOf` when they are a different need.",
				"summary": "Create a tracker ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"createdByAgent": {
										"properties": {
											"sourceTicketId": {
												"type": "string"
											},
											"agentName": {
												"type": "string"
											},
											"agentId": {
												"type": "string"
											}
										},
										"required": [
											"agentName"
										],
										"type": "object",
										"description": "Provenance for agent-created tickets (\"Created by Kai from #123\")."
									},
									"notDuplicateOf": {
										"items": {
											"type": "string"
										},
										"type": "array",
										"description": "Ids of existing feature requests (from a duplicate response's\n`candidates`) that are a different need than this one, e.g. the same\nfeature on another product surface. The duplicate check skips them."
									},
									"skipDuplicateCheck": {
										"type": "boolean",
										"description": "Dashboard creates pass true (humans already saw duplicate\nsuggestions in the modal). Agent/MCP creates must NOT set this —\nthe server-side duplicate guard is what keeps agents from filing\nthe same request twice."
									},
									"customerName": {
										"type": "string"
									},
									"customerEmail": {
										"type": "string"
									},
									"linkedTicketIds": {
										"items": {
											"type": "string"
										},
										"type": "array"
									},
									"description": {
										"type": "string"
									},
									"title": {
										"type": "string"
									},
									"type": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "FindTrackerTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Find tracker tickets in a project.",
				"summary": "Find tracker tickets",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "searchTerm",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "page",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/tickets/search-feature-requests": {
			"get": {
				"operationId": "SearchFeatureRequests",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Dedupe-style search across the project's\n`FEATURE_REQUEST` tickets. Uses OpenSearch fuzzy match + Voyage AI\nrerank — returns the most semantically similar matches to the\n`query` argument, not literal keyword hits. Use this before filing\na new feature request to avoid duplicates.\n\nReturns `{ matches: [...] }` with at most 5 reranked matches, best first, each with its rerank `score`.\nArchived feature requests are excluded, and so are hidden lanes unless `includeHiddenLanes=true`: those\nmatches come back with `public: false` and no status label or share link (new requests land in the\nhidden intake lane, so an agent deduping before it files one needs them). When the reranker is\nunavailable the matches are unranked (`score: null`) and `ranked` is false.",
				"summary": "Search feature requests semantically",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required free-text description of the requested feature.",
						"in": "query",
						"name": "query",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Size of the candidate set retrieved before reranking (default: 10). The reranked response is still capped at 5 matches unless `minScore=0` is passed.",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "- Minimum rerank relevance score, 0-1 (default: 0.35). `0` disables reranking and returns up to `limit` candidates.",
						"in": "query",
						"name": "minScore",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "- Also return feature requests in hidden lanes, flagged `public: false` (default: false).",
						"in": "query",
						"name": "includeHiddenLanes",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/feature-request": {
			"get": {
				"operationId": "GetFeatureRequestSummary",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Roadmap summary of one feature request: title, a description excerpt, the customer-facing status,\nthe upvote count and the public share link. `ticketId` is the ticket id or its number (`123` or\n`#123`). Only feature requests of this project resolve (404 otherwise); a request in a hidden lane\ncomes back with `public: false` and no status label or share link. Voter identities are never\nreturned.",
				"summary": "Get a feature request's roadmap summary",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/generate-data": {
			"post": {
				"operationId": "GenerateTrackerTicketData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Uses AI to draft a tracker ticket from an existing ticket. Returns `{ title, description }`: a short\ntitle and a ~30-word summary written in the project's default summary language. Responds 404 when\n`sourceTicketId` does not resolve to a ticket. `type` (e.g. `FEATURE_REQUEST`) is used as prompt context.",
				"summary": "Generate tracker ticket data with AI",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"sourceTicketId": {
										"type": "string"
									},
									"type": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/ticketscount": {
			"get": {
				"operationId": "GetTicketCount",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns the number of tickets grouped by status, as `[{ \"_id\": \"OPEN\", \"count\": 12 }, ...]`. Counts\nalways exclude archived, hidden, spam and merged-duplicate tickets. Other filters (e.g. `type`, `tags`,\n`processingUser`) are applied; a `status` filter is ignored because the result is already grouped by\nstatus.",
				"summary": "Get ticket counts per status",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/audit-export": {
			"get": {
				"operationId": "ExportTicketAuditEndpoint",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns an audit-focused CSV export of one ticket: one row per event in strict chronological order with\nthe columns `timestamp, actor, actor_email, event_type, detail, content`. Covers messages, internal notes,\nstatus/assignee/team/priority/tag changes (team changes as `team_change` rows) and automated/system actions.\nDownloaded as `ticket_<bugId>_audit.csv` (text/csv).\n\nThe change rows come from the ticket history, so they follow its 180-day retention (see\nGET /tickets/{ticketId}/history) and include at most the newest 5,000 entries. Rows carry display text (names,\nnot IDs) and no entry IDs; for a structured export use GET /messages and GET /tickets/{ticketId}/history.",
				"summary": "Export a single ticket for audit",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}": {
			"get": {
				"operationId": "GetTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a ticket in a project.",
				"summary": "Get a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update a ticket in a project.",
				"summary": "Update a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateTicketDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Permanently deletes a ticket; this cannot be undone. Also deletes every ticket marked as its duplicate,\nalong with all messages, scheduled replies, console/network logs and replay data, and removes the ticket from\nother tickets' linked lists. Tickets combined with PUT /tickets/merge are archived and linked, not deleted.\n\nFires the `TICKET_DELETED` webhook and the S2S `conversation.deleted` event for this ticket only, not for the\nduplicates deleted with it. The same events fire when archive retention deletes a ticket. Tickets deleted\ntogether with their contact send no event; to catch every deletion, periodically compare the IDs from\nGET /tickets/csv-export (`projection[]=_id`, no `type`). Returns an empty body.",
				"summary": "Delete a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/merge": {
			"put": {
				"operationId": "MergeTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Merges `ticketsToMergeIds` into a target ticket and returns the resulting main ticket. `targetTicketId`\nis required unless `shouldCreateNewTicket` is `true`, in which case a fresh main ticket is created (and an\nexisting target ticket, if given, is archived too). Merged tickets are archived and linked to the main\nticket. `shouldMergeTasks` re-parents linked sub-tickets; `shouldMergeContacts` merges the contacts of the\nmerged tickets.",
				"summary": "Merge multiple tickets into one",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"shouldMergeContacts": {
										"type": "boolean"
									},
									"shouldMergeTasks": {
										"type": "boolean"
									},
									"shouldCreateNewTicket": {
										"type": "boolean"
									},
									"ticketsToMergeIds": {
										"items": {
											"type": "string"
										},
										"type": "array"
									},
									"targetTicketId": {
										"type": "string"
									}
								},
								"required": [
									"shouldMergeContacts",
									"shouldMergeTasks",
									"shouldCreateNewTicket",
									"ticketsToMergeIds"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/bulk": {
			"put": {
				"operationId": "BulkUpdateTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"summary": "Bulk-update tickets",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/BulkUpdateTicketDto"
							}
						}
					}
				}
			}
		},
		"/tickets/bulk/reply": {
			"post": {
				"operationId": "BulkReplyTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Send the same customer-visible reply to every ticket in the selection.\nUnlike bulk updates there is NO fast path — every reply runs the full\ncreateComment pipeline (channel/email delivery, notifications, SLA\nclearing, workflows, integrations). Selections up to 30 send inline;\nlarger ones (up to 500) fan out as per-ticket scheduled replies firing\n~60s later, delivered by the Bull worker with the reconcile-sweep\nbackstop and cancellable per ticket until they fire.",
				"summary": "Bulk-reply to tickets",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/BulkReplyTicketDto"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/console-logs": {
			"get": {
				"operationId": "GetConsoleLogsForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get console logs for a ticket in a project.",
				"summary": "Get console logs for a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/activity-logs": {
			"get": {
				"operationId": "GetActivityLogsForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get activity logs for a ticket in a project.",
				"summary": "Get activity logs for a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/history": {
			"get": {
				"operationId": "GetTicketHistoryForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {},
								"examples": {
									"Example 1": {
										"value": {
											"items": [
												{
													"id": "689b1f77bcf86cd799439031",
													"ticket": "507f1f77bcf86cd799439011",
													"type": "FEEDBACK_UPDATED",
													"data": {
														"type": "STATUS",
														"value": "INPROGRESS"
													},
													"user": {
														"id": "507f1f77bcf86cd799439012",
														"email": "support@example.com",
														"firstName": "John",
														"lastName": "Doe"
													},
													"bot": false,
													"createdAt": "2026-08-07T10:30:00.000Z",
													"ticketHistoryRow": true
												},
												{
													"id": "689b1f77bcf86cd799439032",
													"ticket": "507f1f77bcf86cd799439011",
													"type": "FEEDBACK_UPDATED",
													"data": {
														"type": "PROCESSING_USER",
														"value": {
															"id": "507f1f77bcf86cd799439012",
															"firstName": "John",
															"lastName": "Doe"
														}
													},
													"fallbackUser": {
														"username": "System"
													},
													"bot": false,
													"createdAt": "2026-08-07T10:31:00.000Z",
													"ticketHistoryRow": true
												}
											],
											"truncated": false
										}
									}
								}
							}
						}
					}
				},
				"description": "Every internal history entry for a ticket — status, assignee, team, priority,\ntype, tag, contact, due-date and title changes, plus workflow starts, agent handoffs and\nmirrored integration status updates. Returned oldest first in a comment-compatible shape so\nthe conversation feed can splice them inline. Not paginated: `truncated` is true when the\nticket has more entries than `limit` (default 1000, max 5000); the oldest entries are the ones left out.\n\nPrior to August 2026 these entries were returned by `GET /messages` as `FEEDBACK_UPDATED` and\nsystem messages; this endpoint is now their only source. The shape is unchanged — a status\nchange, for example, is `{ type: 'FEEDBACK_UPDATED', data: { type: 'STATUS', value: <status> } }`\nwith the acting user on `user`.\n\n**Entry types:**\n- `FEEDBACK_UPDATED` with `data.type`: `STATUS`, `PROCESSING_USER`, `PROCESSING_TEAM`, `PRIORITY`, `TYPE`,\n  `SESSION`, `SESSIONS_ADDED`, `SESSIONS_REMOVED`, `ARCHIVED`, `RESTORED`, `TAGS_ADDED`, `TAGS_REMOVED`,\n  `DUE_DATE`, `TITLE`, `TICKET_LINKED`, `TICKET_UNLINKED`, `DUPLICATE`, `QUEUED`, `MARKED_AS_SPAM`,\n  `EMAIL_RELAYED`.\n- `SYSTEM_MESSAGE` with `data.type` `WORKFLOW_MESSAGE` or `AGENT_HANDOFF_TO_HUMAN`.\n- `INTEGRATION_STATUS_UPDATED` (no `data.type`).\n\nEntries carry the new value only; the previous value is the one in the entry before. `PROCESSING_TEAM`\nhas `value: { _id, name }` (read `_id`; some entries also carry `id`), or `value: null` when the team was\nremoved. An entry's `id` is stored with it and never changes, so it can be used as a deduplication key.\n\nEntries are retained for at least 180 days from the event and can remain available somewhat longer.",
				"summary": "Get the internal history of a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/network-logs": {
			"get": {
				"operationId": "GetNetworkLogsForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get network logs for a ticket in a project.",
				"summary": "Get network logs for a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/replay": {
			"get": {
				"operationId": "GetReplayForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns a self-contained HTML page that plays back the ticket's recorded session replay. Responds 404\nwhen the ticket has no replay recording.",
				"summary": "Get the session replay for a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/typing": {
			"post": {
				"operationId": "IndicateUserTyping",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Indicate user is typing.",
				"summary": "Indicate user typing",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"typing": {
										"type": "boolean"
									}
								},
								"required": [
									"typing"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/viewing": {
			"post": {
				"operationId": "IndicateUserViewing",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Indicate user is viewing.",
				"summary": "Indicate user viewing",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"viewing": {
										"type": "boolean"
									}
								},
								"required": [
									"viewing"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/presence/viewers": {
			"get": {
				"operationId": "GetTicketViewers",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns the set of agents currently viewing tickets in the project (presence).\nDashboards call this to seed and periodically reconcile viewer avatars, so presence does not\ndepend on keepalive broadcasts.",
				"summary": "List current ticket viewers",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/snooze": {
			"put": {
				"operationId": "SnoozeTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Snoozes a ticket for `duration` seconds: sets `snoozedUntil`, moves the status to `SNOOZED` and clears\nthe unread flag. The ticket reopens automatically when the snooze expires.",
				"summary": "Snooze a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"duration": {
										"type": "number",
										"format": "double",
										"description": "Snooze length in seconds (>= 0)."
									}
								},
								"required": [
									"duration"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/draft-message": {
			"put": {
				"operationId": "SetDraftMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Stage a drafted reply in the ticket's dashboard composer. `content` is either a Markdown string\n(converted server-side to the composer's rich-text format) or a TipTap doc. The draft appears\ninstantly in the composer of everyone viewing the ticket; nothing is sent to the customer. It\nreplaces any previous draft and is cleared automatically when a reply is sent or the draft is\ndismissed in the composer.",
				"summary": "Set the composer draft message",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"content": {
										"description": "The draft reply — a Markdown string or a TipTap doc."
									}
								},
								"required": [
									"content"
								],
								"type": "object"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "ClearDraftMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Remove the composer draft message from a ticket. No-op when the ticket has no draft.",
				"summary": "Clear the composer draft message",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/link": {
			"put": {
				"operationId": "LinkTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Creates a bidirectional link between the ticket and `targetTicketId` and returns the updated list of\nlinked tickets. Linking a regular ticket to a tracker ticket also archives the regular ticket (it is now\ntracked by the tracker). Calling it again for an already linked pair is a no-op.",
				"summary": "Link a ticket to another ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"targetTicketId": {
										"type": "string"
									}
								},
								"required": [
									"targetTicketId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/unlink": {
			"put": {
				"operationId": "UnlinkTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Unlink a ticket in a project.",
				"summary": "Unlink a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"targetTicketId": {
										"type": "string"
									}
								},
								"required": [
									"targetTicketId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/archive": {
			"put": {
				"operationId": "ArchiveTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Archive a ticket in a project.",
				"summary": "Archive a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/spam": {
			"put": {
				"operationId": "MarkTicketAsSpam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Mark a ticket as spam: flags the ticket (and its merged duplicates) as spam, archives it into\nthe spam tab, and blocks the contact — future tickets from them are auto-flagged as spam and\ninbound emails from them are dropped unless whitelisted. Undo via unarchive (\"Not spam\"),\nwhich clears the spam flag and unblocks the contact again.",
				"summary": "Mark a ticket as spam",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/close-as-spam": {
			"put": {
				"operationId": "CloseTicketAsSpam",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "CLOSE a ticket as spam (agent/MCP verdict): sets the done status, flags +\narchives it into the Spam review queue, and suppresses every\ncustomer-facing follow-up — no CSAT, no notifications, no knowledge\nextraction. Unlike the manual `PUT {ticketId}/spam` above it does NOT\nblock the contact: agent verdicts stay recoverable (a genuine customer\nreply un-flags the ticket). Used by the Gleap MCP's close_ticket\n(asSpam) and the classic close_as_spam tool.",
				"summary": "Close a ticket as spam (agent verdict)",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CloseTicketAsSpamDto"
							}
						}
					}
				}
			}
		},
		"/tickets/archive/all": {
			"put": {
				"operationId": "ArchiveAllTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Archives every non-archived ticket of the given `type` and `status` (both required in the body).\nPass the board's active `filter` (the same JSON string GET /tickets takes) to archive only the\nfiltered subset — omit it to archive the whole lane.\nProcesses at most 1000 tickets per call; repeat the call to drain larger lanes. Returns `true`.",
				"summary": "Archive all tickets in a lane",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"filter": {
										"type": "string"
									},
									"type": {
										"type": "string"
									},
									"status": {
										"type": "string"
									}
								},
								"required": [
									"type",
									"status"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/unarchive": {
			"put": {
				"operationId": "UnarchiveTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Unarchive a ticket in a project.",
				"summary": "Unarchive a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/await-customer-reply": {
			"put": {
				"operationId": "AwaitCustomerReply",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Park a ticket as \"waiting on customer\": set expectsReply and archive it. The customer's next reply automatically un-archives, clears the flag, and resumes any awaiting agent.",
				"summary": "Await customer reply on a ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/tickets/{ticketId}/workflow": {
			"post": {
				"operationId": "RunWorkflow",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Run workflow",
				"summary": "Run workflow",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"workflowId": {
										"type": "string"
									}
								},
								"required": [
									"workflowId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/send-to-integration": {
			"post": {
				"operationId": "SendTicketToIntegration",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Send ticket to integration",
				"summary": "Send ticket to integration",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"integrationType": {
										"type": "string"
									},
									"integrationId": {
										"type": "string"
									}
								},
								"required": [
									"integrationType",
									"integrationId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/vote": {
			"post": {
				"operationId": "VoteForTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Vote for a feature request. `action` controls semantics:\n`'toggle'` (default) flips the vote, `'subscribe'` is idempotent add,\n`'unsubscribe'` is idempotent remove. `ticketId` is the ticket id or its\nnumber; only feature requests take votes. Emails are matched\ncase-insensitively and stored lowercased. The response carries the\nrequest's `status` (customer-facing label, null when not public),\n`public` flag and `shareUrl`.",
				"summary": "Vote for ticket",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"action": {
										"type": "string",
										"enum": [
											"toggle",
											"subscribe",
											"unsubscribe"
										]
									},
									"name": {
										"type": "string"
									},
									"email": {
										"type": "string"
									}
								},
								"required": [
									"email"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/voice-reply": {
			"post": {
				"operationId": "VoiceReply",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"reply": {
											"type": "string"
										},
										"transcript": {
											"type": "string"
										}
									},
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Process an operator's recorded audio for a ticket with one\nmultimodal model call. `dictate` returns a verbatim transcript; `smart`\ntreats the audio as spoken keywords and drafts a fluent reply using the\nticket + conversation as context (no knowledge-base retrieval). The client\nuploads the audio via POST /uploads first and passes the resulting URL.",
				"summary": "Voice reply (dictate or smart)",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"internal": {
										"type": "boolean",
										"description": "Smart only: an internal note (no greeting or sign-off)."
									},
									"draft": {
										"type": "string",
										"description": "Smart only: the composer's current text; the reply continues it without a new greeting."
									},
									"audioUrl": {
										"type": "string",
										"description": "Public URL of the uploaded audio clip (from POST /uploads)."
									},
									"mode": {
										"type": "string",
										"enum": [
											"dictate",
											"smart"
										],
										"description": "`dictate` returns the transcript; `smart` returns a drafted reply."
									}
								},
								"required": [
									"audioUrl",
									"mode"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/tickets/{ticketId}/send-transcript": {
			"post": {
				"operationId": "SendTicketTranscript",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Send the conversation history of a ticket to a list of email addresses",
				"summary": "Send ticket conversation transcript to multiple emails",
				"tags": [
					"Ticket"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"emails": {
										"items": {
											"type": "string"
										},
										"type": "array"
									}
								},
								"required": [
									"emails"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/engagement/banners": {
			"post": {
				"operationId": "CreateBanner",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement banner. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new banner",
				"tags": [
					"Engagement Banner"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetBanners",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement banners of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all banners",
				"tags": [
					"Engagement Banner"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/banners/{bannerId}": {
			"put": {
				"operationId": "UpdateBanner",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement banner. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a banner",
				"tags": [
					"Engagement Banner"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "bannerId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteBanner",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement banner",
				"summary": "Delete a banner",
				"tags": [
					"Engagement Banner"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "bannerId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetBanner",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement banner",
				"summary": "Get a banner",
				"tags": [
					"Engagement Banner"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "bannerId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/chat-messages": {
			"post": {
				"operationId": "CreateChatMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement chat message. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new chat message",
				"tags": [
					"Engagement Chat Message"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetChatMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement chat messages of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all chat messages",
				"tags": [
					"Engagement Chat Message"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/chat-messages/{chatMessageId}": {
			"put": {
				"operationId": "UpdateChatMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement chat message. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a chat message",
				"tags": [
					"Engagement Chat Message"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "chatMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteChatMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement chat message",
				"summary": "Delete a chat message",
				"tags": [
					"Engagement Chat Message"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "chatMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetChatMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement chat message",
				"summary": "Get a chat message",
				"tags": [
					"Engagement Chat Message"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "chatMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/cobrowse": {
			"post": {
				"operationId": "CreateCobrowseProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement cobrowse product tour. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied. `config.type` is set server-side as well.",
				"summary": "Create a new cobrowse product tour",
				"tags": [
					"Engagement Cobrowse"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetCobrowseProductTours",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement cobrowse product tours of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all cobrowse product tours",
				"tags": [
					"Engagement Cobrowse"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/cobrowse/{cobrowseProductTourId}": {
			"put": {
				"operationId": "UpdateCobrowseProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement cobrowse product tour. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a cobrowse product tour",
				"tags": [
					"Engagement Cobrowse"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "cobrowseProductTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteCobrowseProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement cobrowse product tour",
				"summary": "Delete a cobrowse product tour",
				"tags": [
					"Engagement Cobrowse"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "cobrowseProductTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetCobrowseProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement cobrowse product tour",
				"summary": "Get a cobrowse product tour",
				"tags": [
					"Engagement Cobrowse"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "cobrowseProductTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/emails": {
			"post": {
				"operationId": "CreateEngagementEmail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement email. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetEngagementEmails",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement emails of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all emails",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/emails/{engagementEmailId}": {
			"put": {
				"operationId": "UpdateEngagementEmail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement email. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update an email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteEngagementEmail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Permanently delete an engagement email, including its delivery records. This cannot be undone.",
				"summary": "Delete an email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetEngagementEmail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement email",
				"summary": "Get an email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/emails/render-preview": {
			"post": {
				"operationId": "RenderEmailPreview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"sizeBytes": {
											"type": "number",
											"format": "double"
										},
										"text": {
											"type": "string"
										},
										"html": {
											"type": "string"
										}
									},
									"required": [
										"sizeBytes",
										"text",
										"html"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Render an email the way a recipient gets it, from unsaved editor values: `emailStyle`\n(plain, personal or company), `subject`, `preheader`, `message` (TipTap JSON, or\n`{ localized: { <lang>: doc } }`), optional `sender` (a teammate id, or\n`{ customSenderName }`), `lang` and `brand` (unsaved `emailBrand` values). The current\nuser is the sample recipient and variables resolve with their values. Nothing is\nstored or sent.",
				"summary": "Render an email preview",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/RenderPreviewBody"
							}
						}
					}
				}
			}
		},
		"/engagement/emails/render-canvas": {
			"post": {
				"operationId": "RenderEmailCanvas",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"slot": {
											"type": "string"
										},
										"css": {
											"type": "string"
										},
										"html": {
											"type": "string"
										}
									},
									"required": [
										"slot",
										"css",
										"html"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The editor canvas of an email: the email of the look (`emailStyle`) rendered around an\nempty body, with `slot` marking where the body goes, and `css` that styles the editor's\ncontent (TipTap markup under the `root` selector) like the renderer styles the body.\nTakes the same values as `render-preview` except `message`. Nothing is stored or sent.",
				"summary": "Render the email editor canvas",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/RenderCanvasBody"
							}
						}
					}
				}
			}
		},
		"/engagement/emails/{engagementEmailId}/send-email-preview": {
			"post": {
				"operationId": "SendEmailPreview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Send a test email of an engagement email to up to 10 addresses. Fails with 400 and the\nreason when the email can't be sent (invalid address, email limit, invalid sender, …).",
				"summary": "Send email preview",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"lang": {
										"type": "string"
									},
									"emails": {
										"items": {
											"type": "string"
										},
										"type": "array"
									}
								},
								"required": [
									"emails"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/engagement/emails/{engagementEmailId}/service-notice-status": {
			"get": {
				"operationId": "GetServiceNoticeStatus",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"unavailableReason": {
											"type": "string",
											"nullable": true
										},
										"available": {
											"type": "boolean"
										},
										"reviewTicketId": {
											"type": "string",
											"nullable": true
										},
										"category": {
											"type": "string",
											"nullable": true
										},
										"verdict": {
											"type": "string",
											"nullable": true
										}
									},
									"required": [
										"unavailableReason",
										"available",
										"reviewTicketId",
										"category",
										"verdict"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The service-notice check state of an email's current content: `verdict` (`pass`, `fail`,\n`unavailable`, `pending_review`, `approved`, `rejected`, or null when it was never checked),\nthe `category` the check found and the `reviewTicketId` of a requested review. `available` is\nfalse when the project can't send service notices at all (feature off, no own sending server,\nnot set up yet, paused), with the reason in `unavailableReason`.",
				"summary": "Get the service-notice status of an email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/emails/{engagementEmailId}/service-notice-review": {
			"post": {
				"operationId": "RequestServiceNoticeReview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"reviewTicketId": {
											"type": "string"
										},
										"verdict": {
											"type": "string",
											"enum": [
												"pending_review"
											],
											"nullable": false
										}
									},
									"required": [
										"reviewTicketId",
										"verdict"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Ask a Gleap teammate to review an email whose service-notice check failed or could not run.\nOnly possible while the latest check of the current content is `fail` or `unavailable`.\nApproval never sends the email: publish it again afterwards.",
				"summary": "Request a service-notice review",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"note": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/engagement/news": {
			"post": {
				"operationId": "CreateNewsArticle",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/OutboundDocument"
								}
							}
						}
					}
				},
				"description": "Create a news article for a project. `subject` is required, either as `{ localized: { en: \"...\" } }`\nor as a bare per-language map `{ en: \"...\" }` (canonicalized server-side; same for `message` and\n`markdownMessage`). `sender` defaults to the\nauthenticated user and `trigger` defaults to `sessionStarted`/`firstoccured` when omitted. Instead of\n`message` you may send `markdownMessage` (localized markdown), which is converted to rich text\nserver-side. `searchContent` is computed server-side and ignored if supplied. Creating a `CHANGELOG`\nnews item with `status: \"live\"` immediately sends changelog notification emails to subscribers.\nNews items always use a dynamic audience: `frequencyType: \"fixed\"` and `csvContacts` are ignored.\nTarget people with `targetAudience` and `conditions` instead.",
				"summary": "Create a new engagement news article",
				"tags": [
					"Engagement News"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetNewsArticles",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/OutboundDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get the engagement news articles of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.\nPass `withoutChangelogs=true` (exact lowercase string) to exclude changelog entries (news items with\nsubType `CHANGELOG`); any other value is ignored.",
				"summary": "Get all engagement news articles",
				"tags": [
					"Engagement News"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "withoutChangelogs",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/news/{newsId}": {
			"get": {
				"operationId": "GetNewsArticle",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/OutboundDocument"
								}
							}
						}
					}
				},
				"description": "Get a news article by id.",
				"summary": "Get an engagement news article",
				"tags": [
					"Engagement News"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "newsId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateNewsArticle",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement news article. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied. `searchContent` is derived\nfrom `subject` (recomputed only when `subject` is sent) and ignored if supplied. News items always use a\ndynamic audience, so `frequencyType: \"fixed\"` and `csvContacts` are ignored unless the item already\nstores them.",
				"summary": "Update a news article.",
				"tags": [
					"Engagement News"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "newsId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteNewsArticle",
				"responses": {
					"204": {
						"description": "No content"
					}
				},
				"description": "Delete an engagement news article",
				"summary": "Delete a news article.",
				"tags": [
					"Engagement News"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "newsId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/product-tours": {
			"post": {
				"operationId": "CreateEngagementProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement product tour. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied. `config.type` is set server-side as well.",
				"summary": "Create a new product tour",
				"tags": [
					"Engagement Product Tour"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetEngagementProductTours",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement product tours of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all product tours",
				"tags": [
					"Engagement Product Tour"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/product-tours/{productTourId}": {
			"put": {
				"operationId": "UpdateEngagementProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement product tour. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a product tour",
				"tags": [
					"Engagement Product Tour"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "productTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteEngagementProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement product tour",
				"summary": "Delete a product tour",
				"tags": [
					"Engagement Product Tour"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "productTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetEngagementProductTour",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement product tour",
				"summary": "Get a product tour",
				"tags": [
					"Engagement Product Tour"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "productTourId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/push-notifications": {
			"post": {
				"operationId": "CreateEngagementPushNotification",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement push notification. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new push notification",
				"tags": [
					"Engagement Push Notification"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetEngagementPushNotifications",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement push notifications of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all push notifications",
				"tags": [
					"Engagement Push Notification"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/push-notifications/{pushNotificationId}": {
			"put": {
				"operationId": "UpdateEngagementPushNotification",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement push notification. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a push notification",
				"tags": [
					"Engagement Push Notification"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pushNotificationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteEngagementPushNotification",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement push notification",
				"summary": "Delete a push notification",
				"tags": [
					"Engagement Push Notification"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pushNotificationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetEngagementPushNotification",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement push notification",
				"summary": "Get a push notification",
				"tags": [
					"Engagement Push Notification"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pushNotificationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys": {
			"post": {
				"operationId": "CreateSurvey",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement survey. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.\n\nSurveys 2.0: with a `definition` (SurveyDefinition, schemaVersion 2) the survey is created as a v2\nDRAFT: body `{ name, format?: 'card'|'full', definition, trigger?, frequencyType?, frequency?,\nfrequencyDays?, targetAudience?, conditions? }`. The response is the outbound plus `warnings`\n(validation issues that block publishing). A malformed definition answers 422 `{ errors }`.",
				"summary": "Create a new survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetSurveys",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement surveys of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all surveys",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}": {
			"put": {
				"operationId": "UpdateSurvey",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement survey. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteSurvey",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Permanently delete an engagement survey with everything stored for it: its versions, all of its\nresponses (with the files respondents uploaded, and the SURVEY tickets of a survey from before\nSurveys 2.0), its stats and analytics, its delivery records and its search index entries. The\nsurvey is gone at once; its data is deleted in the background within minutes. Live email\ncampaigns that send it are paused (their pending sends dropped) and kept without the link; see\n`GET /{surveyId}/delete-preview`. This cannot be undone.",
				"summary": "Delete a survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetSurvey",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement survey",
				"summary": "Get a survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/delete-preview": {
			"get": {
				"operationId": "DeletePreview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "What deleting the survey affects besides its own data, for the confirmation: the live email campaigns\nthat send it (paused on delete, their pending sends dropped) and how many survey tickets from before\nSurveys 2.0 are deleted with it. Returns `{ liveEmailCampaigns: [{ id, name }], legacyTickets }`.",
				"summary": "Preview a survey deletion",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/responses/search": {
			"get": {
				"operationId": "SearchSurveyResponses",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Full-text search over the answers of all the project's survey responses (Surveys 2.0), newest first.\nQuery parameters: `q` (required, 2–100 characters), `surveyId` (optional, narrows to one survey),\n`status` (optional comma list of `completed`, `partial`, `in_progress`), `limit` (default 10, at most 50).\nAnswers `{ available, hits: [{ id, surveyId, surveyName, status, channel, nps, snippet, contact,\ncreatedAt, completedAt }] }`; `available: false` means the search index is not available in this region\n(use `GET /{surveyId}/responses?q=` per survey instead).",
				"summary": "Search survey responses",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses": {
			"get": {
				"operationId": "GetSurveyResponses",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the responses of a survey, unread first, then newest first. Supports `skip`, `limit` (defaults to\n1000 when omitted; supplied values above 100 are clamped to 100) and field filters via query parameters.\n\nSurveys 2.0: with `v=2` or any of `cursor`, `status` (comma list), `from`, `to` (YYYY-MM-DD), `version`,\n`filter[<key>]=<value|min..max|a-b>`, `theme`, `channel`, `contactUserId`, `q`, `legacyTicket` the\nresponse is `{ items, nextCursor?, total? }` (newest first, `limit` ≤ 50). Without them a v2 survey\nanswers the legacy array (`_id`, `formData` = answers by key, `session`, `createdAt`, `updatedAt`).",
				"summary": "Get all survey responses",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses/export": {
			"get": {
				"operationId": "ExportSurveyResponses",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Export all responses of a survey as a downloadable file. CSV by default (`Content-Type: text/csv`,\nsent as an attachment named after the survey). Query parameters: `format=json` returns the same data as\nJSON instead; `label=keys` uses internal field names as column headers instead of the localized question\ntitles.",
				"summary": "Export survey responses",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses/read": {
			"put": {
				"operationId": "MarkSurveyResponsesAsRead",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Mark all engagement survey responses as read",
				"summary": "Mark all survey responses as read",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses/samples": {
			"get": {
				"operationId": "GetSurveyResponseSamples",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a random sample of up to 10,000 responses for a survey, for client-side aggregation. Returns\n`{ samples, sampleSize, count }` where `count` is the total number of matching responses and\n`sampleSize` is the 10,000 sampling ceiling. Each sample is trimmed to `createdAt`, `formData`,\n`shareToken` and a minimal `session` (`_id`, `name`, `email`).",
				"summary": "Get survey response samples",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses/summarize": {
			"get": {
				"operationId": "SummarizeSurveyResponses",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "AI summary of a survey's responses. Returns `status` `ok` with `summary` (plain text) and `data` (headline,\noverview, sentiment, findings with verbatim quotes that carry the response `ticketId`, themes, actions),\n`not-enough-data` below 3 responses, `rate-limited` within 60 seconds of the last attempt, or `failed`\nshortly after a failed attempt. A stored summary is returned without calling the model; `refresh=true`\nregenerates it (at most once per minute). `outdated` is true when responses arrived after it was generated.\nUses up to the 999 newest responses within a 30,000-token budget. Consumes AI credits; 402 when the\norganisation is out of AI usage, 409 when generation fails and nothing is stored.",
				"summary": "Summarize survey responses",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "refresh",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/engagement/surveys/validate": {
			"post": {
				"operationId": "ValidateDefinition",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Validate a Surveys 2.0 definition without saving it (editor, MCP `validate_survey`). Body\n`{ definition }`. Returns `{ ok, errors: [{ path, code, message }] }`.",
				"summary": "Validate a survey definition",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/validate": {
			"post": {
				"operationId": "ValidateSurveyDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Validate a Surveys 2.0 definition for this survey. Body `{ definition }`. Returns `{ ok, errors }`.",
				"summary": "Validate a survey definition",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/draft": {
			"put": {
				"operationId": "SaveDraft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Save the Surveys 2.0 draft. Body `{ definition, baseRevision?, allowEmpty? }`. Invalid logic is saved\nand returned as `warnings`; a malformed definition answers 422 `{ errors }`. Live surveys keep serving\nthe published version. Returns `{ definition, draftRevision, warnings }`.\n\nEvery save bumps the draft's `draftRevision`. With `baseRevision` (the revision you loaded) a save over\na newer draft answers 409 `{ code: 'draft_changed', draftRevision }`. A save that would remove every\nquestion of a draft that has some answers 409 `{ code: 'draft_would_remove_all_questions' }` unless\n`allowEmpty: true`.",
				"summary": "Save a survey draft",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/kai-edit": {
			"post": {
				"operationId": "KaiEdit",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Ask Kai to edit the draft. Body `{ instruction, definition?, selectedId?, lang? }`: `definition` is the\neditor's working copy (default: the stored draft), `selectedId` the step \"this question\" refers to, `lang`\nthe language the teammate is viewing. Nothing is saved: returns `{ status: 'edited', summary, definition,\nchanges: [{ kind, step, id, number?, type?, title, details }], warnings, languagesAdded, languagesNotInProject }`\nfor review, or `{ status: 'unrelated' | 'unclear' | 'no_change' | 'failed', message }`. Existing questions keep\ntheir ids and answer keys. Uses AI credits (402 when out of AI usage); 429 when asked too often.",
				"summary": "Edit a survey draft with Kai",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/publish": {
			"post": {
				"operationId": "Publish",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Publish the draft as the next version. The page and emails serve it; it shows in the app only\nwhile the survey is live there (`{ goLive: true }` also switches that on). Returns\n`{ version, publishedAt, status }`; 422 `{ errors }` when the draft is invalid.",
				"summary": "Publish a survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/versions": {
			"get": {
				"operationId": "Versions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The published versions of a survey, newest first: `[{ version, createdAt, createdBy }]`.",
				"summary": "List survey versions",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/versions/{version}": {
			"get": {
				"operationId": "Version",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "One published version with its definition: `{ version, definition, createdAt, createdBy }`.",
				"summary": "Get a survey version",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "version",
						"required": true,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/page": {
			"put": {
				"operationId": "SavePage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Save the survey page settings (`SurveyPageSettings`); the slug is unique per project (409 `slug_taken`).",
				"summary": "Save survey page settings",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/personal-links": {
			"post": {
				"operationId": "PersonalLinks",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Personal survey links, one per contact. Body `{ userIds?: string[], contactIds?: string[], csv?: string,\nexpiresInDays?: number, format?: 'json'|'csv' }` (≤ 5000). `format: 'csv'` answers text/csv\n`userId,email,name,url`. Returns `{ links: [{ userId, email?, name?, url }], expiresAt, skipped }`;\nurl = help center domain + `/s/<slug>?t=<token>`.",
				"summary": "Create personal survey links",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/stats": {
			"get": {
				"operationId": "Stats",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Survey results from the daily counters. Query `from`, `to` (YYYY-MM-DD) and `version`. Returns\n`{ version, totals: { shown, started, completed, partial, avgDurationMs }, nps?, perBlock, edges, endings,\nchannels, themes, daily }`.",
				"summary": "Get survey stats",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/paths": {
			"get": {
				"operationId": "Paths",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "How respondents moved through the survey, for the Results flow chart. Query `from`, `to` (YYYY-MM-DD) and\n`version`. Returns `{ responses, other, sampled, paths: [{ path, status, nps?, count }] }`: identical paths\ngrouped (biggest 300), `path` = block ids in order (a completed one may end with its ending id, an open one\nends where it stopped), `nps` = detractor | passive | promoter on the first NPS question. Reads the newest\n20,000 responses (`sampled: true` beyond that).",
				"summary": "Get survey respondent paths",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/analytics": {
			"get": {
				"operationId": "Analytics",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Survey step analytics from ClickHouse (`survey_events`), Typeform-style. Query `from`, `to` (YYYY-MM-DD,\nUTC, inclusive; default the last 30 days, at most 400), `version`, `channel`, `device`\n(phone|tablet|desktop), `interval` (day|week), `tz` (IANA zone for the weekday × hour heatmap).\nReturns `{ available, range, header: { views, uniqueViews, starts, submissions, completionRate, startRate,\navgTimeToCompleteMs, welcomeViews, welcomeStartRate } (each `{ value, previous, byDevice }`), funnel, worstStepBlockId, dismissed, timing,\nbackNavigation, closePoints, series, breakdowns, heatmap, versions, score, reminders, email, sources,\nquality }`. `available: false` when no events were recorded in the range. Cached 60 seconds.",
				"summary": "Get survey analytics",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/insights": {
			"get": {
				"operationId": "Insights",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The stored AI insights: `{ themes, summary, drivers, segments, alerts, updatedAt }`. Never runs the model.\nQuery `version` (a positive integer, the Results page's version filter): each theme's `count` is that\nversion's mentions and the result carries `version: N`; summary, drivers, segments and alerts stay\nacross all versions.",
				"summary": "Get survey insights",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "version",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/insights/links": {
			"post": {
				"operationId": "LinkThemeItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Link a bug / feature request (`ticketId`) or a Kai Code session (`cloudSessionId`, or the `clientLaunchId`\nof a Kai Code draft that is not sent yet) to an AI theme (`themeId`) and/or a finding of the brief\n(`finding`: its title). The ticket or session must belong to the survey's project. Linking the same item\ntwice returns the existing link. Returns `{ link }`; `GET /insights` returns every link as `links` and\nper theme as `themes[].links`.",
				"summary": "Link an item to a survey theme",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/insights/links/{linkId}": {
			"delete": {
				"operationId": "UnlinkThemeItem",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Remove a link between a theme / finding and a bug, feature request or Kai Code session. The item itself\nstays.",
				"summary": "Unlink an item from a survey theme",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "linkId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/insights/refresh": {
			"post": {
				"operationId": "RefreshInsights",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Queue a rebuild of the AI insights (at most every 5 minutes). Returns `{ queued, retryAfterSeconds? }`.",
				"summary": "Refresh survey insights",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/insights/ask": {
			"post": {
				"operationId": "Ask",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Ask Kai about the results. Body `{ question, version? }`; with `version` (a positive integer, the Results\npage's version filter) the answers, totals and theme counts are that version's only. Returns `{ answer\n(markdown), citations: [{ responseId, quote }], basedOn, version? }`. Uses AI credits (402 when out of AI usage).",
				"summary": "Ask about survey results",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/themes": {
			"put": {
				"operationId": "Themes",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Rename, add, merge or delete AI themes. Body `{ themes?: [{ id?, label, description?, polarity? }],\nmerge?: [{ from, into }], delete?: [id] }`. Returns `{ themes }`.",
				"summary": "Edit survey themes",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/responses/{responseId}": {
			"get": {
				"operationId": "Response",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "One response with its contact and the definition of the version it answered:\n`{ response, contact, definition }`.",
				"summary": "Get a survey response",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "responseId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "DeleteResponse",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete a response (its counts are taken out of the stats).",
				"summary": "Delete a survey response",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "responseId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/responses/{responseId}/reach-out": {
			"post": {
				"operationId": "ReachOut",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Start a conversation with the respondent. Body `{ channel: 'messenger'|'email', message (TipTap JSON or\nmarkdown text), subject?, assignToMe? }`. The ticket carries `surveyResponse`; returns\n`{ ticketId, ticketShareToken }`.",
				"summary": "Reach out to a respondent",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "responseId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagement/surveys/{surveyId}/migrate": {
			"post": {
				"operationId": "Migrate",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Convert a legacy survey to Surveys 2.0 (published as version 1) and move its answer tickets into\nsurvey responses. Idempotent. Up to 1000 tickets move in the request; the rest continue in the\nbackground. Returns the outbound (with `survey`) and `migration: { status: 'done'|'running',\nresponses?, warnings? }`; 422 `{ errors }` when the legacy form cannot be converted.",
				"summary": "Migrate a legacy survey",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/email-recipients": {
			"get": {
				"operationId": "EmailRecipients",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Per-recipient tracking of a survey email campaign: query `campaign` (the EMAIL outbound id), `cursor`,\n`limit` (≤ 100). Returns `{ items: [{ contact, sentAt, opened, openedAt, answered, answeredFromEmail,\nresponseId, responseStatus }], nextCursor? }`, newest send first. Email surveys are a paid channel:\n402 on Free (who answered would name respondents beyond the survey's first 10 responses).",
				"summary": "Survey email recipients",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/surveys/{surveyId}/email-campaigns": {
			"get": {
				"operationId": "EmailCampaigns",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The project's email campaigns about this survey (Share → Email), newest first, at most\n100, without the email bodies.",
				"summary": "Survey email campaigns",
				"tags": [
					"Engagement Survey"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "surveyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/tooltips": {
			"post": {
				"operationId": "CreateTooltip",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement tooltip. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new tooltip",
				"tags": [
					"Engagement Tooltip"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetTooltips",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement tooltips of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all tooltips",
				"tags": [
					"Engagement Tooltip"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/tooltips/{tooltipId}": {
			"put": {
				"operationId": "UpdateTooltip",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement tooltip. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a tooltip",
				"tags": [
					"Engagement Tooltip"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "tooltipId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteTooltip",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement tooltip",
				"summary": "Delete a tooltip",
				"tags": [
					"Engagement Tooltip"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "tooltipId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetTooltip",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement tooltip",
				"summary": "Get a tooltip",
				"tags": [
					"Engagement Tooltip"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "tooltipId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/whatsapp-messages": {
			"post": {
				"operationId": "CreateWhatsappMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement WhatsApp message. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new whatsapp message",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetWhatsappMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement WhatsApp messages of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all WhatsApp messages",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/whatsapp-messages/{whatsappMessageId}": {
			"put": {
				"operationId": "UpdateWhatsappMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement WhatsApp message. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a whatsapp message",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "whatsappMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteWhatsappMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Permanently delete an engagement WhatsApp message, including its delivery records. This cannot be\nundone.",
				"summary": "Delete a whatsapp message",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "whatsappMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetWhatsappMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement whatsapp message",
				"summary": "Get a whatsapp message",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "whatsappMessageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/whatsapp-messages/send-template": {
			"post": {
				"operationId": "SendWhatsappTemplateMessage",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Send a WhatsApp template message to a phone number with optional custom variable values.\nThe customValues keys must match the templateVariable names from your variable mapping. In addition,\nthe reserved keys `header_image`, `header_video`, `header_document` and `header_media` override the\ntemplate's configured header media URL and do not need a variable-mapping entry.\nWhen a custom value is provided for a variable, it takes priority over the mapped field resolution and fallback value.\nMissing required fields or an unknown channel return 400; a send rejected by WhatsApp returns 409 with\n`{ success: false, message }`.",
				"summary": "Send a whatsapp template message",
				"tags": [
					"Engagement Whatsapp Messages"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"customValues": {
										"description": "Key-value map of template variable overrides. Keys must match the templateVariable names from your variable mapping (e.g. { \"order_number\": \"ORD-123\", \"customer_name\": \"John\" }). The reserved keys `header_image`, `header_video`, `header_document` and `header_media` override the template's header media URL."
									},
									"languageCode": {
										"type": "string",
										"description": "Language code (e.g. \"en_US\"). Only used as a fallback: the message is sent in the language Meta reports for the template. If omitted, defaults to the contact's language, then \"en_US\"."
									},
									"templateName": {
										"type": "string",
										"description": "Name of the WhatsApp template registered with Meta"
									},
									"channelId": {
										"type": "string",
										"description": "The WhatsApp channel ID from your project"
									},
									"to": {
										"type": "string",
										"description": "Recipient phone number (E.164 format, e.g. \"+14155552671\")"
									}
								},
								"required": [
									"templateName",
									"channelId",
									"to"
								],
								"type": "object"
							},
							"example": {
								"to": "+14155552671",
								"channelId": "6620f1a2b3c4d5e6f7890123",
								"templateName": "order_confirmation",
								"languageCode": "en_US",
								"customValues": {
									"order_number": "ORD-2026-4821",
									"delivery_date": "March 15, 2026",
									"customer_name": "John Doe"
								}
							}
						}
					}
				}
			}
		},
		"/engagement/checklists": {
			"post": {
				"operationId": "CreateChecklist",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement checklist. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new checklist",
				"tags": [
					"Engagement Checklist"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetChecklists",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement checklists of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all checklists",
				"tags": [
					"Engagement Checklist"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/checklists/{checklistId}": {
			"put": {
				"operationId": "UpdateChecklist",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement checklist. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a checklist",
				"tags": [
					"Engagement Checklist"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "checklistId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteChecklist",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement checklist",
				"summary": "Delete a checklist",
				"tags": [
					"Engagement Checklist"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "checklistId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetChecklist",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement checklist",
				"summary": "Get a checklist",
				"tags": [
					"Engagement Checklist"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "checklistId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/activities": {
			"get": {
				"operationId": "GetEngagementActivities",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the activities recorded for a single engagement, paginated via `skip`/`limit`.",
				"summary": "Get engagement activities",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/activities/count": {
			"get": {
				"operationId": "GetEngagementActivitiesCount",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the number of activities recorded for a single engagement. Returns `{ count }`.",
				"summary": "Get engagement activities count",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/recipients": {
			"get": {
				"operationId": "FindEngagementRecipients",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the recipients of a single engagement. Returns `{ data, total }`.",
				"summary": "Find engagement recipients",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/recipients/export": {
			"get": {
				"operationId": "ExportEngagementRecipients",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Export the recipients of a single engagement as CSV (`Content-Type: text/csv`, sent as an attachment\nnamed after the engagement). Accepts the same `filter` query as the recipients list, so a filtered\nview (e.g. only recipients who opened) exports exactly what is shown.",
				"summary": "Export engagement recipients",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/statistics": {
			"get": {
				"operationId": "GetEngagementStatistics",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get delivery and response statistics for a single engagement. Responds 404 for an unknown engagement.",
				"summary": "Get engagement statistics",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagements/{engagementId}/fixed-audience-samples": {
			"post": {
				"operationId": "GetEngagementFixedAudienceSamples",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Estimate the fixed audience of an engagement. Send `targetAudience` and `conditions` in the body to\npreview a candidate audience without saving it. `csvContacts` may be sent as well: an object with\n`sessionIds` previews that (possibly unsaved) uploaded list, `null` previews the rules-based audience,\nand omitting it uses the stored list. `emailCategory` (conversational, marketing or service) may be sent to preview an unsaved category; omitting it uses the stored one. Returns `{ sample, count, limitReached, limit, marketingUnsubscribedCount }`; `marketingUnsubscribedCount` is only non-zero for a service notice (contacts it reaches that unsubscribed from marketing email).",
				"summary": "Get engagement fixed audience samples",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/engagements/{engagementId}/clone": {
			"post": {
				"operationId": "CloneEngagement",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Clone an engagement. The copy is always created as a draft named \"Copy of <original name>\"; `name` and\n`status` sent in the body are ignored. Any other body fields override the cloned values.",
				"summary": "Clone engagement",
				"tags": [
					"Engagement"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/aicontent": {
			"post": {
				"operationId": "Create",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create an AI content entry. If an entry with the same contentId already exists in the project it is\nupdated instead.",
				"summary": "Create AI content",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateAIContentDto"
							}
						}
					}
				}
			}
		},
		"/aicontent/{contentId}": {
			"get": {
				"operationId": "FindByContentId",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get AI content by contentId\n\nRetrieve a single AI content entry by its contentId",
				"summary": "Get AI content by contentId",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "contentId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateByContentId",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an AI content entry by its contentId. If no entry with that contentId exists, one is created\n(upsert).",
				"summary": "Update AI content by contentId",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "contentId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateAIContentDto"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "RemoveByContentId",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"properties": {
												"message": {
													"type": "string"
												},
												"success": {
													"type": "boolean"
												}
											},
											"required": [
												"message",
												"success"
											],
											"type": "object"
										},
										{
											"properties": {
												"message": {},
												"success": {
													"type": "boolean"
												}
											},
											"required": [
												"success"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Delete AI content by contentId\n\nRemove an AI content entry by its contentId",
				"summary": "Delete AI content by contentId",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "contentId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/aicontent/oldbatches": {
			"delete": {
				"operationId": "RemoveOldBatches",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"deleted": {},
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"deleted",
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete all AI content except the current batch\n\nRemove all AI content entries except those with the current batch ID, optionally filtered by type",
				"summary": "Delete old AI content batches",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"type": {
										"type": "string"
									},
									"currentBatchId": {
										"type": "string"
									}
								},
								"required": [
									"currentBatchId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/aicontent/batch/{batchId}": {
			"delete": {
				"operationId": "RemoveByBatchId",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"deleted": {},
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"deleted",
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete all AI content by batchId\n\nRemove all AI content entries with the specified batchId",
				"summary": "Delete AI content by batchId",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "batchId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/modals": {
			"post": {
				"operationId": "CreateModal",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a new engagement modal. `type`, `project`, `organisation` and `createdBy` are set server-side\nand ignored if supplied.",
				"summary": "Create a new modal",
				"tags": [
					"Engagement Modal"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"get": {
				"operationId": "GetModals",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the engagement modals of a project, newest first. Supports filtering by any field via query\nparameters, plus `skip`, `limit` and `sort` (e.g. `sort=-createdAt`). `limit` defaults to 1000 when\nomitted; when supplied, values above 100 are clamped to 100. Filtering by `project` or `organisation`\nis rejected.",
				"summary": "Get all modals",
				"tags": [
					"Engagement Modal"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/modals/{modalId}": {
			"put": {
				"operationId": "UpdateModal",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an engagement modal. Any pending (not yet sent) deliveries for this engagement are discarded\nand re-queued from the updated document. While an engagement is live, its audience, targeting and\nscheduling fields cannot be changed (for `fixed` frequency engagements neither can its content); pause\nit first or the request fails with 409. Setting `status` to `live` starts delivery. `type`, `project`,\n`organisation` and `createdBy` are set server-side and ignored if supplied.",
				"summary": "Update a modal",
				"tags": [
					"Engagement Modal"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "modalId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteModal",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Delete an engagement modal",
				"summary": "Delete a modal",
				"tags": [
					"Engagement Modal"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "modalId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetModal",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get an engagement modal",
				"summary": "Get a modal",
				"tags": [
					"Engagement Modal"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "modalId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/invitations": {
			"get": {
				"operationId": "GetMyInvitations",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/InvitationDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get all invitations for a user.",
				"summary": "Get all invitations for a user",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/invitations/{invitationId}": {
			"delete": {
				"operationId": "DeleteInvitation",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Delete an invitation. The person it was sent to can decline it this way; anyone else needs the rights to\nsend it: organisation admin or manager for an organisation invitation, invitation permissions on the\nproject for a project invitation. Fails with 403 for other members of that organisation or project, and\nwith 404 for everyone else.",
				"summary": "Delete an invitation",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "invitationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateInvitation",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Accept or decline an invitation addressed to the authenticated user. On accept the user is added to\nthe organisation or project with the invitation's role. The invitation is consumed (deleted) either\nway. Fails with 409 if the invitation was issued to a different email, the user has not confirmed their\nemail, or the target organisation has no seats left.",
				"summary": "Accept or decline an invitation",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "invitationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"accept": {
										"type": "boolean"
									}
								},
								"required": [
									"accept"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/invitations/{invitationId}/role": {
			"put": {
				"operationId": "UpdateInvitationRole",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"organisation": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"email": {
													"type": "string"
												},
												"role": {
													"type": "string"
												},
												"name": {
													"type": "string"
												},
												"type": {
													"type": "string",
													"enum": [
														"organisation",
														"project"
													]
												}
											},
											"required": [
												"role",
												"name",
												"type"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Change the role an invitation will grant when accepted. Invitations are created with the `user` role, or\n`AGENT` when the inviter's role could not grant `user`, so this is the way to grant a different role\nbefore acceptance. Requires invitation permissions on the project given in the `project` header.",
				"summary": "Update an invitation's role",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "invitationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"role": {
										"type": "string"
									}
								},
								"required": [
									"role"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/invitations/organisations/{organisationId}": {
			"get": {
				"operationId": "GetOrganisationInvitations",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/InvitationDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get all invitations for an organisation.",
				"summary": "Get all invitations for an organisation",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "organisationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateOrganisationInvitation",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Invite one or more people (body: `{ \"emails\": [...] }`) to an organisation. Each invitation is created\nwith the `user` role and an invitation email is sent. Returns the subset of submitted email addresses\nthat were SKIPPED because they are already members; an empty array means every address was invited.",
				"summary": "Invite people to an organisation",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "organisationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"emails": {
										"items": {
											"type": "string"
										},
										"type": "array"
									}
								},
								"required": [
									"emails"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/invitations/projects": {
			"get": {
				"operationId": "GetProjectInvitations",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/InvitationDocument"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get all invitations for a project. The project is taken from the required `project` header; requires\ninvitation permissions on it, like inviting.",
				"summary": "Get all invitations for a project",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			},
			"post": {
				"operationId": "CreateProjectInvitation",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Invite one or more people (body: `{ \"emails\": [...] }`) to the project given in the required `project`\nheader. Each invitation is created with the `user` role, or `AGENT` when the inviter's role could not grant\n`user`, and an invitation email is sent. Returns the subset of submitted email addresses that were SKIPPED\nbecause they already belong to the project or its organisation; an empty array means every address was\ninvited. Fails with 403 if the inviter's role cannot grant even `AGENT`, and with a plan error if the\norganisation cannot seat that many additional teammates.",
				"summary": "Invite people to a project",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"access": {},
									"emails": {
										"items": {
											"type": "string"
										},
										"type": "array"
									}
								},
								"required": [
									"emails"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/invitations/{invitationId}/access": {
			"put": {
				"operationId": "UpdateInvitationAccess",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"access": {
											"$ref": "#/components/schemas/MemberAccess"
										},
										"id": {
											"type": "string"
										}
									},
									"required": [
										"access",
										"id"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Set (or lift, with `access: null`) the boards and agents a pending project invitation limits its invitee to.",
				"summary": "Update an invitation's board-only access",
				"tags": [
					"Invitation"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "invitationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"access": {}
								},
								"required": [
									"access"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/projects/users": {
			"get": {
				"operationId": "GetUsers",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get everyone who can access this project: direct project members plus all members of its organisation.\nEach entry carries `type` (`project` or `organisation`) and `role`. Service accounts are excluded.",
				"summary": "Get all users for a project",
				"tags": [
					"Project"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/projects/users/{userId}": {
			"put": {
				"operationId": "UpdateUser",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Change a member's role within the project given in the required `project` header. Only the project\ncreator or an admin of the project/organisation may do this, and you cannot change your own role (403).\nReturns `true`.",
				"summary": "Update a project member's role",
				"tags": [
					"Project"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"role": {
										"type": "string"
									}
								},
								"required": [
									"role"
								],
								"type": "object"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteUser",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Remove a member from the project given in the required `project` header. The user is also removed from\nevery team in that project. The user account itself is not deleted. Returns 404 if the user is not a\ndirect member of the project (organisation-level members cannot be removed here).",
				"summary": "Remove a member from a project",
				"tags": [
					"Project"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/projects/users/{userId}/access": {
			"put": {
				"operationId": "UpdateUserAccess",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"access": {
											"$ref": "#/components/schemas/MemberAccess"
										},
										"userId": {
											"type": "string"
										}
									},
									"required": [
										"access",
										"userId"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Limit a direct project member to some boards ('edit' or 'view') and agents, or lift it with `access: null`\n(boardMember.logic). Organisation members cannot be limited; nobody limits themselves.",
				"summary": "Set a member's board-only access",
				"tags": [
					"Project"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"access": {}
								},
								"required": [
									"access"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/users/me": {
			"get": {
				"operationId": "GetMe",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get the authenticated user. Credentials and internal fields (`password`, `code`,\n`serviceAccountApiToken`, `marketingTracking`, WebAuthn key material) are never included in the\nresponse.",
				"summary": "Get current user.",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/users/me/reassign-tickets": {
			"post": {
				"operationId": "ReassignTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Hands over the authenticated user's open conversations to their teammates. Only OPEN tickets that are\ncurrently assigned to the user AND belong to a team are affected, at most 100 per call; teams using\nmanual assignment are skipped. Returns `{ success: true }`.",
				"summary": "Hand over the user's open tickets to their team",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/users/unified-inbox": {
			"get": {
				"operationId": "GetUnifiedInboxTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get open conversations from every project the authenticated user can access. Only INQUIRY tickets are\nreturned unless `boards=all` asks for every board the user may see (without automated conversations and\nsurvey answers; `hiddenBoards`, JSON by project id with `*` for every other project, takes ticket types out; the answer then also holds `boards`, the boards the user may list by project id); done, snoozed, archived, spam, hidden and merged-duplicate tickets are excluded. Returns\n`{ tickets: [...] }`. Query parameters: `type` is a filter preset, one of `my` (or `personalinbox`),\n`unassigned`, `unread` (also where an AI agent's card waits on a person: the card marks its ticket unread),\n`mentioned`, `needsinput`, `overdue`, `team` (the open tickets of `teamId` on every board of its project;\n`assignee` `nobody` or `me` narrows them), `view` (the saved view `viewId` on its boards) (`needsyou` is gone\nand returns nothing; any other value returns all accessible open conversations); `filteredProjectId` restricts\nto one project; `page` (1-based) and `limit` should be\npassed together.",
				"summary": "Get unified inbox tickets",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "type",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "filteredProjectId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "page",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "boards",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "hiddenBoards",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "teamId",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "assignee",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "viewId",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/unified-inbox/sidebar": {
			"get": {
				"operationId": "GetUnifiedInboxSidebar",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The unified inbox's sidebar: the teams of every project the authenticated user lists, each with its open\ntickets on every board (left out when they could not be counted in time) and whether the user is a member,\nand the saved views the user may see there. Cached for a minute per user.",
				"summary": "Get unified inbox sidebar",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/users/unified-inbox/{ticketId}": {
			"get": {
				"operationId": "GetUnifiedInboxTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get a single ticket of the unified inbox. Returns 404 for automated conversations and survey answers, and\nif the authenticated user cannot see the ticket's board in its project.",
				"summary": "Get unified inbox ticket",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/users/{userId}": {
			"put": {
				"operationId": "Update",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update the authenticated user's own profile. The `{userId}` path segment is ignored; you can only ever\nupdate yourself. Sending an empty string for a field clears it; omitted fields are left untouched.",
				"summary": "Update the current user",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateUserDto"
							}
						}
					}
				}
			}
		},
		"/users/me/permissions": {
			"get": {
				"operationId": "GetMyPermissions",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"permissions": {
											"items": {
												"type": "string"
											},
											"type": "array"
										},
										"roles": {
											"items": {
												"type": "string"
											},
											"type": "array"
										}
									},
									"required": [
										"permissions",
										"roles"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Returns the roles and effective permissions of the authenticated user, scoped to the `organisationId`\nquery parameter if given, otherwise to the organisation owning the `project` header, otherwise to the\nfirst organisation the user is a member of. Responds 404 when the organisation, project or role cannot\nbe resolved.",
				"summary": "Get current user's role permissions.",
				"tags": [
					"User"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/users": {
			"post": {
				"operationId": "Create",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Register a new dashboard user. Sends a 6-digit verification code by email and returns a JWT plus the\ncreated (still unconfirmed) user. `email`, `name` and `turnstileToken` are required in practice; a\n`name` containing a URL is rejected as spam. Rate limited to 30 requests per hour per IP.",
				"summary": "Sign up a new user",
				"tags": [
					"User"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateUserDto"
							}
						}
					}
				}
			}
		},
		"/users/verify": {
			"post": {
				"operationId": "Verify",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Confirm a new user's email address with the 6-digit code sent at signup. The code expires 10 minutes\nafter it was issued. On success any pending invitations for that email are accepted and a JWT plus the\nconfirmed user is returned. Rate limited to 30 requests per hour per IP and 5 per 10 minutes per email address.",
				"summary": "Verify a user's email address",
				"tags": [
					"User"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"code": {
										"type": "string"
									},
									"email": {
										"type": "string"
									}
								},
								"required": [
									"code",
									"email"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/users/resend": {
			"post": {
				"operationId": "Resend",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"type": "boolean"
								}
							}
						}
					}
				},
				"description": "Resend a verification code to the user's email.",
				"summary": "Resend a verification code to the user's email.",
				"tags": [
					"User"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"id": {
										"type": "string"
									}
								},
								"required": [
									"id"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/users/me/session-auth": {
			"post": {
				"operationId": "AuthenticateUserPusherSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Authenticate a widget session for websocket use. Authenticated with the project's public API key\n(`api-token` header) plus a signed session identity (`gleap-id`/`gleap-hash` headers), not with a\ndashboard JWT.",
				"summary": "Authenticate a session for websockets",
				"tags": [
					"User"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"socket_id": {
										"type": "string"
									}
								},
								"required": [
									"socket_id"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/users/me/session-channel-auth": {
			"post": {
				"operationId": "AuthenticateUserPusherChannelSession",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Authorize a websocket subscription to the caller's own `private-session-<gleapId>` channel. Any other\nchannel name returns `{ \"valid\": false }` with HTTP 200. Authenticated with the project's public API\nkey (`api-token` header) plus a signed session identity (`gleap-id`/`gleap-hash` headers).",
				"summary": "Authorize a session channel subscription",
				"tags": [
					"User"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"socket_id": {
										"type": "string"
									},
									"channel_name": {
										"type": "string"
									}
								},
								"required": [
									"socket_id",
									"channel_name"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/statistics/scope": {
			"get": {
				"operationId": "GetReportScope",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportScopeSummary"
								}
							}
						}
					}
				},
				"description": "What the requesting teammate can see in Reports: how many boards are left out of their numbers (a\ncount, never names) and which capability-gated reports they can open. `enforced` is false while\nviewer scoping is switched off; the values are then what the teammate would get once it is on.",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/statistics/bar-chart": {
			"get": {
				"operationId": "GetChartData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Get bar chart data for various statistics",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Type of chart data to retrieve (e.g., NEW_TICKETS_COUNT, MEDIAN_FIRST_RESPONSE_TIME)",
						"in": "query",
						"name": "chartType",
						"required": true,
						"schema": {}
					},
					{
						"description": "- Timezone for date calculations (e.g., \"America/New_York\")",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Grouping interval (\"hour\", \"day\", \"month\", \"year\")",
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Aggregation type (\"MEDIAN\", \"AVERAGE\")",
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Start date for filtering (ISO format)",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- End date for filtering (ISO format)",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "outbound",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/facts": {
			"get": {
				"operationId": "GetFactData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Get fact data for various statistics",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Type of fact data to retrieve (e.g., NEW_TICKETS_COUNT, MEDIAN_TIME_TO_CLOSE)",
						"in": "query",
						"name": "chartType",
						"required": true,
						"schema": {}
					},
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Aggregation type (\"MEDIAN\", \"AVERAGE\")",
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Start date for filtering (ISO format)",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- End date for filtering (ISO format)",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "outbound",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/lists": {
			"get": {
				"operationId": "GetListData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Get list data for various statistics",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Type of list data to retrieve (e.g., TEAM_PERFORMANCE_LIST, ARTICLE_SEARCH_RESULT_LIST)",
						"in": "query",
						"name": "chartType",
						"required": true,
						"schema": {}
					},
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"description": "- Not supported; statistics endpoints are not paginated.",
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"description": "- Not supported; each list returns its full result set (some lists apply a fixed internal cap).",
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Whether to use working hours calculations",
						"in": "query",
						"name": "useWorkingHours",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/statistics/lists/export": {
			"get": {
				"operationId": "ExportListData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Export list data as CSV. Returns a UTF-8 CSV file as an attachment (`Content-Disposition: attachment`),\nnot JSON.",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- List to export. Only `TEAM_PERFORMANCE_LIST` and `SLA_REPORTS_LIST` are supported; other values fail.",
						"in": "query",
						"name": "chartType",
						"required": true,
						"schema": {}
					},
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Whether to use working hours calculations",
						"in": "query",
						"name": "useWorkingHours",
						"required": false,
						"schema": {
							"type": "boolean"
						}
					}
				]
			}
		},
		"/statistics/heatmap": {
			"get": {
				"operationId": "GetHeatmapData",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Get heatmap data for activity patterns",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Type of heatmap data (BUSIEST_HOURS_PER_WEEKDAY, BUSIEST_COMMENTS_PER_WEEKDAY)",
						"in": "query",
						"name": "chartType",
						"required": true,
						"schema": {
							"$ref": "#/components/schemas/HeatmapTypes"
						}
					},
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Start date for filtering (ISO format)",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- End date for filtering (ISO format)",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/email-overview": {
			"get": {
				"operationId": "GetEmailOverviewStats",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get email overview statistics. Pass `outboundId` (query) to restrict the statistics to a single outbound\ncampaign.",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. Start date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. End date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Ignored; the server key is resolved from the project's email settings.",
						"in": "query",
						"name": "emailServerKey",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/email-client-usage": {
			"get": {
				"operationId": "GetEmailClientUsageStats",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get email client usage statistics. Pass `outboundId` (query) to restrict the statistics to a single\noutbound campaign.",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. Start date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. End date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Ignored; the server key is resolved from the project's email settings.",
						"in": "query",
						"name": "emailServerKey",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/email-client-bounces": {
			"get": {
				"operationId": "GetEmailClientBouncesStats",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get email client bounce statistics. Pass `outboundId` (query) to restrict the statistics to a single\noutbound campaign.",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Timezone for date calculations",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. Start date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Required. End date (`YYYY-MM-DD`), forwarded to the email provider as the report range",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Ignored; the server key is resolved from the project's email settings.",
						"in": "query",
						"name": "emailServerKey",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/statistics/raw-data": {
			"get": {
				"operationId": "GetRawStatistics",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					},
					"403": {
						"description": "Report locked",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ReportLockedResponse"
								}
							}
						}
					}
				},
				"description": "Get raw statistics data. Filterable fields: `actionType` (e.g. `HOME_MENU_CLICK`), `resourceType`\n(e.g. `WIDGET`), `actionUser`, `associatedEntity`, `description`, `first`, `rowId`, and the `data.*`\nfields (`data.type`, `data.tags`, `data.processingUser`, `data.ticketId`, …).\nSuffix a filter with `_gte`, `_lte`, `_gt`, `_lt`, `_ne`, `_in` or `_nin` for range/set operators.\nRows are sorted by `actionType`, then `createdAt`, then `rowId`. One page holds at most 10000 rows\n(`limit`, default and max 10000). When more rows match, the response carries an `X-Next-Cursor`\nheader: pass it back as `cursor` with the same filters for the next page, until a response has no\nsuch header. `skip` is not supported (400). Limited to 30 requests a minute per project.\nA filter on a field this table\ndoesn't have is rejected with a 400 naming the field and listing the supported ones.\nRow timestamps are UTC; `timezone` does not apply here (it only affects bucketed endpoints).",
				"tags": [
					"Statistics"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"description": "- Ignored on this endpoint; raw rows carry UTC timestamps",
						"in": "query",
						"name": "timezone",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "groupInterval",
						"required": false,
						"schema": {
							"type": "string",
							"enum": [
								"hour",
								"day",
								"month",
								"year"
							]
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "groupedBy",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "aggsType",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Start date for filtering (ISO format)",
						"in": "query",
						"name": "startDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- End date for filtering (ISO format)",
						"in": "query",
						"name": "endDate",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "createdAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "updatedAt",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- Not a filter on this endpoint (`stats_events` has no `type` column) — passing it\nreturns 400. The per-message kind lives in `data.type` (e.g. SHARED_COMMENT, USER_TEXT, BOT_REPLY).",
						"in": "query",
						"name": "type",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"description": "- The `X-Next-Cursor` header of the previous page, unchanged",
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/knowledge/search": {
			"post": {
				"operationId": "SearchKnowledge",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/KnowledgeSearchResponse"
								}
							}
						}
					}
				},
				"description": "Search through knowledge base documents using vector search and reranking.\nReturns matching documents from help-center articles, FAQs/snippets, websites, news, YouTube videos,\nand code knowledge. `limit` caps the number of returned documents; retrieval returns at most 10\ndocuments regardless of a higher limit.",
				"summary": "Search knowledge documents",
				"tags": [
					"Knowledge"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/KnowledgeSearchDto"
							}
						}
					}
				}
			}
		},
		"/knowledge/similar-tickets": {
			"post": {
				"operationId": "FindSimilarTickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/SimilarTicketsResponse"
								}
							}
						}
					}
				},
				"description": "Search for similar tickets using vector similarity search.\nReturns tickets with a similarity score of at least 0.3.",
				"summary": "Find similar tickets",
				"tags": [
					"Knowledge"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SimilarTicketsSearchDto"
							}
						}
					}
				}
			}
		},
		"/knowledge/content-tags": {
			"get": {
				"operationId": "GetContentTagsInUse",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"type": "string"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Get the distinct set of content tags actually in use across the project's\nknowledge content (snippets/FAQ/files/youtube answers, help-center articles, and\nweb-crawler pages). Read-only — does not read or modify the project's tag registry.",
				"summary": "Get content tags in use",
				"tags": [
					"Knowledge"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/translations/entries": {
			"get": {
				"operationId": "ListEntries",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns `{ entries: [...] }` containing every translatable entity for the project (help-center\narticles, collections, email templates and static translations), each with its field list, source\nlanguage and available languages.\nUse the `type` query parameter to filter by entity type.",
				"summary": "List all translatable entries",
				"tags": [
					"Translations"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "type",
						"required": false,
						"schema": {
							"$ref": "#/components/schemas/TranslationEntryType"
						}
					}
				]
			}
		},
		"/translations/entries/{entryId}": {
			"get": {
				"operationId": "GetEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Returns the full content of a single translatable entry in the specified language.\nThe entry ID uses the format \"type:id\" as returned by GET /translations/entries. The id part is a\nMongo id for `article`, `collection` and `emailtemplate` (e.g. \"article:507f1f77bcf86cd799439011\") and\nthe translation key for `statictranslation` (e.g. \"statictranslation:welcomeText\").\nIf no language is specified, the project's primary language is used.",
				"summary": "Get a single translatable entry",
				"tags": [
					"Translations"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "language",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "PutEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Pushes a translation for a specific entry and language.\nThe entry ID uses the format \"type:id\" as returned by GET /translations/entries. The id part is a\nMongo id for `article`, `collection` and `emailtemplate` (e.g. \"article:507f1f77bcf86cd799439011\") and\nthe translation key for `statictranslation` (e.g. \"statictranslation:welcomeText\").\nOnly the specified language is updated; other languages are not affected.",
				"summary": "Update a translatable entry",
				"tags": [
					"Translations"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PutTranslationEntryDto"
							}
						}
					}
				}
			}
		},
		"/ai/models": {
			"get": {
				"operationId": "GetModels",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AiModelsPublicResponse"
								}
							}
						}
					}
				},
				"description": "Returns the full model catalog, the curated picker lists (Kai agent, Kai Code cloud, Kai Code\nOpenCode, transcription), and the per-runtime default model ids. Internal fields and markup metadata\nare not exposed; customer-facing cost figures are pre-computed.",
				"summary": "Get AI model catalog",
				"tags": [
					"AiModels"
				],
				"security": [],
				"parameters": []
			}
		},
		"/code/ask": {
			"post": {
				"operationId": "AskCode",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"answer": {
											"type": "string"
										}
									},
									"required": [
										"answer"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Forwards the question to the code analyzer, which clones all\nrepositories connected to this project, investigates them, and returns a\nuser-facing answer (logic, behavior, click paths). The analyzer's system prompt enforces that no code,\nidentifiers or secrets are included in answers. With no repositories connected the endpoint returns 200\nwith a canned no-repositories answer; it fails with 409 when the AI usage limit is reached.",
				"summary": "Ask a question about the project's connected source repositories",
				"tags": [
					"Code"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CodeKnowledgeAskDto"
							}
						}
					}
				}
			}
		},
		"/sessions/{sessionId}/memory": {
			"get": {
				"operationId": "ListEntries",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/ContactMemoryListItem"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List memory entries (no content) for a contact session.",
				"summary": "List contact memory entries",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContactMemoryWriteResult"
								}
							}
						}
					}
				},
				"description": "Create or upsert a memory entry by name. Returns `{ ok: true, entries: <count after the write> }`;\ninvalid input returns 400 and an unknown session 404. Staff writes work even when the project's\ncontact-memory feature is disabled.",
				"summary": "Create or update a contact memory entry",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ContactMemoryEntryBody"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "ClearAll",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContactMemoryWriteResult"
								}
							}
						}
					}
				},
				"description": "Clear all memory entries for a contact.",
				"summary": "Clear all contact memory entries",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/sessions/{sessionId}/memory/{entryName}": {
			"get": {
				"operationId": "GetEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContactMemoryEntry"
								}
							}
						}
					}
				},
				"description": "Get the full content of a single memory entry.",
				"summary": "Get one contact memory entry",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "entryName",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContactMemoryWriteResult"
								}
							}
						}
					}
				},
				"description": "Create or replace the memory entry with this name; the entry is upserted, so a PUT to a name that does\nnot exist yet creates it. This is a full replace, not a patch: omitting `description` clears the stored\ndescription. Returns `{ ok: true, entries: <count after the write> }`; invalid input returns 400 and an\nunknown session 404. Staff writes work even when the project's contact-memory feature is disabled.",
				"summary": "Update a contact memory entry",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "entryName",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ContactMemoryUpdateBody"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/ContactMemoryWriteResult"
								}
							}
						}
					}
				},
				"description": "Delete one memory entry by name.",
				"summary": "Delete a contact memory entry",
				"tags": [
					"ContactMemory"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "entryName",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/youtube-source": {
			"post": {
				"operationId": "ImportVideo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"status": {
											"type": "string"
										},
										"videoId": {
											"type": "string"
										},
										"jobId": {
											"type": "string"
										}
									},
									"required": [
										"status",
										"videoId",
										"jobId"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Import a single YouTube video for AI content analysis",
				"summary": "Import YouTube video",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ImportYouTubeVideoDto"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "List",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"total": {
											"type": "number",
											"format": "double"
										},
										"videos": {
											"items": {
												"properties": {
													"createdAt": {},
													"durationSeconds": {},
													"channelName": {},
													"batchId": {},
													"error": {},
													"status": {},
													"url": {},
													"thumbnailUrl": {},
													"title": {},
													"videoId": {},
													"id": {}
												},
												"required": [
													"createdAt",
													"durationSeconds",
													"channelName",
													"batchId",
													"error",
													"status",
													"url",
													"thumbnailUrl",
													"title",
													"videoId",
													"id"
												],
												"type": "object"
											},
											"type": "array"
										}
									},
									"required": [
										"total",
										"videos"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "List the project's imported YouTube video content (acknowledged, non-skipped entries), newest first.",
				"summary": "List YouTube content",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/youtube-source/preview": {
			"post": {
				"operationId": "Preview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"properties": {
												"allowance": {
													"$ref": "#/components/schemas/YouTubeAllowanceView"
												},
												"estimatedCostCents": {
													"type": "number",
													"format": "double"
												},
												"video": {
													"allOf": [
														{
															"$ref": "#/components/schemas/VideoMetadata"
														},
														{
															"properties": {
																"alreadyImported": {
																	"type": "boolean"
																}
															},
															"required": [
																"alreadyImported"
															],
															"type": "object"
														}
													]
												},
												"type": {
													"type": "string",
													"enum": [
														"video"
													],
													"nullable": false
												}
											},
											"required": [
												"allowance",
												"estimatedCostCents",
												"video",
												"type"
											],
											"type": "object"
										},
										{
											"properties": {
												"allowance": {
													"$ref": "#/components/schemas/YouTubeAllowanceView"
												},
												"estimatedCostCents": {
													"type": "number",
													"format": "double"
												},
												"videos": {
													"items": {
														"allOf": [
															{
																"$ref": "#/components/schemas/VideoMetadata"
															},
															{
																"properties": {
																	"alreadyImported": {
																		"type": "boolean"
																	}
																},
																"required": [
																	"alreadyImported"
																],
																"type": "object"
															}
														]
													},
													"type": "array"
												},
												"alreadyImportedCount": {
													"type": "number",
													"format": "double"
												},
												"billableDurationSeconds": {
													"type": "number",
													"format": "double"
												},
												"totalDurationSeconds": {
													"type": "number",
													"format": "double"
												},
												"videoCount": {
													"type": "number",
													"format": "double"
												},
												"thumbnailUrl": {
													"type": "string"
												},
												"channelName": {
													"type": "string"
												},
												"title": {
													"type": "string"
												},
												"type": {
													"type": "string",
													"enum": [
														"channel",
														"playlist"
													]
												}
											},
											"required": [
												"allowance",
												"estimatedCostCents",
												"videos",
												"alreadyImportedCount",
												"billableDurationSeconds",
												"totalDurationSeconds",
												"videoCount",
												"thumbnailUrl",
												"channelName",
												"title",
												"type"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Preview a YouTube URL before importing. Fetches metadata + an exact\ncost estimate (in cents) for the video or full playlist/channel, and on\nthe new terms the plan's YouTube allowance and whether the import fits.\nFor large playlists this can take a few seconds; the client is\nexpected to show a spinner.",
				"summary": "Preview YouTube URL",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PreviewYouTubeDto"
							}
						}
					}
				}
			}
		},
		"/youtube-source/allowance": {
			"get": {
				"operationId": "Allowance",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"properties": {
												"allowance": {},
												"message": {
													"type": "string"
												},
												"requiredPlan": {
													"$ref": "#/components/schemas/RequiredPlan"
												},
												"allowed": {
													"type": "boolean"
												}
											},
											"required": [
												"allowance",
												"message",
												"requiredPlan",
												"allowed"
											],
											"type": "object"
										},
										{
											"properties": {
												"allowance": {
													"$ref": "#/components/schemas/YouTubeAllowanceView"
												},
												"message": {},
												"requiredPlan": {},
												"allowed": {
													"type": "boolean"
												}
											},
											"required": [
												"allowance",
												"message",
												"requiredPlan",
												"allowed"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "The workspace's YouTube allowance (new terms): video per period, used,\nleft, the per-video maximum and the playlist size. `allowance` is null on\nthe old terms (no limits); `allowed` is false when the plan has no\nYouTube sources (Free), with the plan that has them.",
				"summary": "YouTube allowance",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/youtube-source/batch": {
			"post": {
				"operationId": "ImportBatch",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"properties": {
												"status": {
													"type": "string"
												},
												"batchId": {
													"type": "string"
												}
											},
											"required": [
												"status",
												"batchId"
											],
											"type": "object"
										},
										{
											"properties": {
												"notImportedCount": {
													"type": "number",
													"format": "double"
												},
												"unavailableCount": {
													"type": "number",
													"format": "double"
												},
												"tooLongCount": {
													"type": "number",
													"format": "double"
												},
												"alreadyImportedCount": {
													"type": "number",
													"format": "double"
												},
												"durationSeconds": {
													"type": "number",
													"format": "double"
												},
												"videoCount": {
													"type": "number",
													"format": "double"
												},
												"status": {
													"type": "string"
												},
												"batchId": {
													"type": "string"
												}
											},
											"required": [
												"notImportedCount",
												"unavailableCount",
												"tooLongCount",
												"alreadyImportedCount",
												"durationSeconds",
												"videoCount",
												"status",
												"batchId"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Import a YouTube playlist or channel for bulk AI content analysis",
				"summary": "Import YouTube playlist/channel",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ImportYouTubeBatchDto"
							}
						}
					}
				}
			}
		},
		"/youtube-source/{videoId}": {
			"delete": {
				"operationId": "DeleteVideo",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a single YouTube video's content",
				"summary": "Delete YouTube video content",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "videoId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/youtube-source/batch/{batchId}": {
			"delete": {
				"operationId": "DeleteBatch",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"deleted": {},
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"deleted",
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete all YouTube content from a batch",
				"summary": "Delete YouTube batch content",
				"tags": [
					"AI content"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "batchId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/editor/precheck": {
			"post": {
				"operationId": "Precheck",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/EditorPrecheckResult"
								}
							}
						}
					}
				},
				"description": "Server-side precheck for the tooltip / product-tour editor.\nFetches the given URL (SSRF-guarded) and reports blockers (COOP, CSP\nframe-src, login/cross-origin redirect, invalid URL) so the dashboard can\ngive the user actionable feedback instead of opening a blank editor.",
				"summary": "Check whether the visual editor will work on a URL",
				"tags": [
					"Engagement Editor"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/EditorPrecheckBody"
							}
						}
					}
				}
			}
		},
		"/frontend-tools/result": {
			"post": {
				"operationId": "DeliverResult",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/DeliverFrontendToolResultResponse"
								}
							}
						}
					}
				},
				"description": "Deliver the result of a frontend tool execution from the customer's app. Called by the Gleap SDK.\nRequires the project API key in the `api-token` header plus a valid widget session\n(`gleap-id`/`gleap-hash` headers); returns 401 otherwise and 403 if the calling domain is not an\nallowed widget domain. `result`/`error` payloads above 50,000 characters are rejected with 400;\naccepted payloads are truncated to 20,000 characters before being handed to the agent.\n(Gleap.registerAgentTool handler) back to the awaiting agent.",
				"summary": "Deliver a frontend tool execution result.",
				"tags": [
					"FrontendTools"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"error": {
										"type": "string"
									},
									"result": {},
									"toolCallId": {
										"type": "string"
									}
								},
								"required": [
									"toolCallId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/companies": {
			"get": {
				"operationId": "List",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/CompanyRecord"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List a project's companies, most recently seen first. Paginated via `skip` (default 0) and `limit`\n(default 50, maximum 200); `search` filters by a case-insensitive substring match on the company name.\nReturns a summary of each company (`companyId`, `name`, `plan`, `value`, `domain`, `lastSeenAt`,\n`createdAt`); use GET /companies/{companyId} for the full record.",
				"summary": "List companies",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/count": {
			"get": {
				"operationId": "Count",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"count": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"count"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Number of companies matching the same `search` and `conditions` the list route accepts.\nDrives the live match count in the pipeline bulk-add filter.",
				"summary": "Count companies",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/search": {
			"get": {
				"operationId": "Search",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/CompanySearchHit"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Free-text company search for the dashboard's global search, backed by OpenSearch. Matches an exact\n`companyId` or `domain`, then the company name (whole words, prefix, and a fuzzy fallback), ranked\nby relevance and capped at 25 hits. Use GET /companies for paginated browsing and filtering.\n\nDeclared before GET /companies/{companyId} on purpose — tsoa registers routes in declaration order,\nso the reverse would make `/companies/search` resolve as a company whose id is literally \"search\".",
				"summary": "Search companies",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/importer": {
			"post": {
				"operationId": "Importer",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyImportResult"
								}
							}
						}
					}
				},
				"description": "Create or update many companies at once, matched by `companyId` (the dashboard's CSV importer). Body:\n`{ companies: [{ companyId, name, plan, domain, value, sla, tags, address, customData, ownerEmail }] }`,\nat most 1000 rows per call. Each row is written like PUT /companies/{companyId}; rows sharing a\n`companyId` are collapsed (the last one wins) and `lastSeenAt` is not touched. Answers how many were\nimported, the positions of rows without a `companyId`, and the companies that failed. Re-sending rows\nis safe.",
				"summary": "Import companies",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {}
						}
					}
				}
			}
		},
		"/companies/{companyId}": {
			"get": {
				"operationId": "Detail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyRecord"
								}
							}
						}
					}
				},
				"description": "Get one company by its external `companyId`, the identifier your app sends via the SDK, not the\nGleap `_id`.",
				"summary": "Get a company",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "Update",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/CompanyRecord"
								}
							}
						}
					}
				},
				"description": "Create or update a company by its external `companyId` (upsert). Only `name`, `plan`, `domain`, `value`,\n`sla`, `tags`, `address`, `customData` and the account owner (`owner` or `ownerEmail`) are accepted; any\nother field is ignored. `tags` REPLACES the stored list (an empty array clears it), while `address` and\n`customData` are merged into the existing values rather than replaced. `customData` accepts up to 100\nprimitive values, `tags` up to 50. Setting a non-empty `name` here marks it authoritative, so names sent\nby the SDK will no longer overwrite it. `owner` is the id of a user in this project (`ownerEmail` their\nemail address); `null` or `\"\"` clears it. An owner that is not a project member's id or email is ignored\n(the rest of the update still applies), so check `owner` in the response.",
				"summary": "Create or update a company",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CompanyUpsertBody"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "Remove",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {},
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a company by its external `companyId`. Contacts keep their `companyId` link and\nconversations keep their historical company stamp, so an SDK that still sends this\n`companyId` will lazily re-create the company on the next identify.",
				"summary": "Delete a company",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyId}/members": {
			"get": {
				"operationId": "Members",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"allOf": [
											{
												"properties": {
													"eventData": {},
													"checklistTasks": {},
													"lastSurveySentAt": {
														"type": "string",
														"format": "date-time"
													},
													"lastOutboundSentAt": {
														"properties": {
															"push": {
																"type": "string",
																"format": "date-time"
															},
															"whatsapp": {
																"type": "string",
																"format": "date-time"
															},
															"email": {
																"type": "string",
																"format": "date-time"
															}
														},
														"type": "object"
													},
													"outboundPending": {},
													"outboundHistory": {},
													"plan": {
														"type": "string"
													},
													"discordUsername": {
														"type": "string"
													},
													"discordId": {
														"type": "string"
													},
													"telegramUsername": {
														"type": "string"
													},
													"telegramChatId": {
														"type": "string"
													},
													"instagramUsername": {
														"type": "string"
													},
													"instagramId": {
														"type": "string"
													},
													"facebookId": {
														"type": "string"
													},
													"sla": {
														"type": "number",
														"format": "double"
													},
													"companyName": {
														"type": "string"
													},
													"mergedInto": {
														"$ref": "#/components/schemas/ObjectId"
													},
													"emailLinkedFor": {
														"type": "string"
													},
													"authTokensOldestAt": {
														"type": "string",
														"format": "date-time"
													},
													"hasAuthTokens": {
														"type": "boolean"
													},
													"authTokens": {},
													"signed": {},
													"signedUserId": {
														"type": "string"
													},
													"emailVerifiedFor": {
														"type": "string"
													},
													"emailVerifiedAt": {
														"type": "string",
														"format": "date-time"
													},
													"emailVerified": {
														"type": "boolean"
													},
													"portalShowIdentity": {
														"type": "boolean"
													},
													"portalVerifiedEmail": {
														"type": "string"
													},
													"portalEmailVerifiedAt": {
														"type": "string",
														"format": "date-time"
													},
													"deviceType": {
														"type": "string"
													},
													"companyId": {
														"type": "string"
													},
													"avatar": {
														"type": "string"
													},
													"location": {},
													"lastPageView": {},
													"emailOptInAllAt": {
														"type": "string",
														"format": "date-time"
													},
													"emailOptInAllBy": {
														"type": "string"
													},
													"emailOptOutAllReason": {
														"type": "string"
													},
													"emailOptOutAllAt": {
														"type": "string",
														"format": "date-time"
													},
													"emailOptOutAll": {
														"type": "boolean"
													},
													"emailBounceStream": {
														"type": "string"
													},
													"emailBouncedAt": {
														"type": "string",
														"format": "date-time"
													},
													"emailBounced": {
														"type": "boolean"
													},
													"unsubscribedAt": {
														"type": "string",
														"format": "date-time"
													},
													"unsubscribeReason": {
														"type": "string"
													},
													"lastFeedbackReport": {
														"type": "string",
														"format": "date-time"
													},
													"lastActivity": {
														"type": "string",
														"format": "date-time"
													},
													"lastHeardFrom": {
														"type": "string",
														"format": "date-time"
													},
													"gleapHash": {
														"type": "string"
													},
													"gleapId": {
														"type": "string"
													},
													"customData": {},
													"project": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"organisation": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"phone": {
														"type": "string"
													},
													"email": {
														"type": "string"
													},
													"platform": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"userId": {
														"type": "string"
													},
													"countFeedbackComments": {
														"type": "number",
														"format": "double"
													},
													"countFeedbackReports": {
														"type": "number",
														"format": "double"
													},
													"identityHistory": {
														"items": {
															"properties": {
																"changes": {
																	"properties": {
																		"email": {
																			"properties": {
																				"to": {
																					"type": "string"
																				},
																				"from": {
																					"type": "string"
																				}
																			},
																			"type": "object"
																		},
																		"name": {
																			"properties": {
																				"to": {
																					"type": "string"
																				},
																				"from": {
																					"type": "string"
																				}
																			},
																			"type": "object"
																		},
																		"userId": {
																			"properties": {
																				"to": {
																					"type": "string"
																				},
																				"from": {
																					"type": "string"
																				}
																			},
																			"type": "object"
																		}
																	},
																	"type": "object"
																},
																"by": {
																	"properties": {
																		"referer": {
																			"type": "string"
																		},
																		"originalUrl": {
																			"type": "string"
																		},
																		"hasApiKey": {
																			"type": "boolean"
																		},
																		"userEmail": {
																			"type": "string"
																		},
																		"source": {
																			"type": "string"
																		},
																		"method": {
																			"type": "string"
																		},
																		"userId": {
																			"type": "string"
																		}
																	},
																	"type": "object"
																},
																"_id": {},
																"at": {
																	"type": "string",
																	"format": "date-time"
																}
															},
															"required": [
																"at"
															],
															"type": "object"
														},
														"type": "array"
													},
													"memory": {
														"items": {
															"properties": {
																"actorUserId": {
																	"properties": {
																		"isValid": {
																			"properties": {},
																			"type": "object"
																		},
																		"createFromHexString": {
																			"properties": {},
																			"type": "object"
																		},
																		"createFromTime": {
																			"properties": {},
																			"type": "object"
																		},
																		"generate": {
																			"properties": {},
																			"type": "object"
																		},
																		"cacheHexString": {},
																		"prototype": {
																			"$ref": "#/components/schemas/ObjectId"
																		}
																	},
																	"type": "object"
																},
																"actor": {
																	"type": "string"
																},
																"updatedAt": {
																	"type": "string",
																	"format": "date-time"
																},
																"content": {
																	"type": "string"
																},
																"createdAt": {
																	"type": "string",
																	"format": "date-time"
																},
																"description": {
																	"type": "string"
																},
																"name": {
																	"type": "string"
																}
															},
															"required": [
																"actor",
																"updatedAt",
																"content",
																"createdAt",
																"description",
																"name"
															],
															"type": "object"
														},
														"type": "array"
													},
													"sessions": {
														"type": "number",
														"format": "double"
													},
													"emailOnly": {
														"type": "boolean"
													},
													"blocked": {
														"type": "boolean"
													},
													"unsubscribed": {
														"type": "boolean"
													},
													"firstActivity": {
														"type": "string",
														"format": "date-time"
													},
													"lang": {
														"type": "string"
													},
													"value": {
														"type": "number",
														"format": "double"
													},
													"updatedAt": {
														"type": "string",
														"format": "date-time"
													},
													"createdAt": {
														"type": "string",
														"format": "date-time"
													},
													"tags": {
														"items": {
															"type": "string"
														},
														"type": "array"
													},
													"_id": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													}
												},
												"required": [
													"countFeedbackComments",
													"countFeedbackReports",
													"identityHistory",
													"memory",
													"sessions",
													"emailOnly",
													"blocked",
													"unsubscribed",
													"firstActivity",
													"lang",
													"value",
													"updatedAt",
													"createdAt",
													"tags",
													"_id"
												],
												"type": "object"
											},
											{
												"$ref": "#/components/schemas/Document_any.any.any_"
											},
											{
												"properties": {
													"_id": {
														"$ref": "#/components/schemas/ObjectId"
													}
												},
												"required": [
													"_id"
												],
												"type": "object"
											}
										]
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the contacts linked to a company, most recently active first. Paginated via `skip` (default 0) and\n`limit` (default 50, maximum 200). Each row contains only `_id`, `name`, `email`, `userId`, `avatar` and\n`lastActivity`.",
				"summary": "Get company members",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "AddMember",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"migrationTruncated": {
											"type": "boolean"
										},
										"migratedConversations": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"migrationTruncated",
										"migratedConversations"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Link a contact to this company. `migrateTickets` opts into re-stamping the\ncontact's existing conversations onto this company — off by default, since\nthe stamp records which company a past conversation was had with.",
				"summary": "Add a company member",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"migrateTickets": {
										"type": "boolean"
									},
									"sessionId": {
										"type": "string"
									}
								},
								"required": [
									"sessionId"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/companies/{companyId}/tickets": {
			"get": {
				"operationId": "Tickets",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List conversations stamped with this company at creation time, newest activity first. Paginated via\n`skip` (default 0) and `limit` (default 25, maximum 100). Conversations a contact had before being linked\nto the company are not included unless they were migrated. `surveyResponses=only` lists the survey\nresponses of the company's contacts instead (newest first, `limit` default 10), as on the contact.",
				"summary": "Get company conversations",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/companies/{companyId}/members/{sessionId}": {
			"delete": {
				"operationId": "RemoveMember",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {},
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Unlink a contact from this company. Existing conversations keep their\noriginal company stamp.",
				"summary": "Remove a company member",
				"tags": [
					"Company"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "companyId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "sessionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/uploads": {
			"post": {
				"operationId": "UploadFile",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/UploadedFileResponse"
								}
							}
						}
					}
				},
				"description": "Upload a file and get back its permanent public URL on the Gleap CDN. Send the\nrequest as `multipart/form-data` with the file in a form field named `file`\n(maximum size 100 MB). Files are stored in a folder scoped to the project passed\nin the `project` header.\n\nThe returned `fileUrl` can be used anywhere a URL is accepted — most commonly as\nthe image source inside help center article `content`, which is TipTap JSON where\nimages are nodes of the shape `{ \"type\": \"image\", \"attrs\": { \"src\": \"<fileUrl>\" } }`.\nTo add images to articles in bulk (e.g. UI screenshots for many articles), call\nthis endpoint once per file, collect the returned URLs, and reference them in the\narticle content when creating or updating articles.",
				"summary": "Upload a file",
				"tags": [
					"Uploads"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/uploads/from-url": {
			"post": {
				"operationId": "UploadImageFromUrl",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/UploadedFileResponse"
								}
							}
						}
					}
				},
				"description": "Import an image that is already hosted at a publicly reachable http(s) URL. The\nserver downloads the image, verifies it really is one (PNG, JPEG, GIF, WebP, SVG\nor BMP; maximum 100 MB), stores a copy on the Gleap CDN, and returns the new\npermanent `fileUrl`. Useful for migrating help center article images in bulk when\nthe files are already hosted elsewhere — import each image, then reference the\nreturned URLs in the article `content`. URLs that resolve to private or internal\nnetwork addresses are rejected.",
				"summary": "Import an image from a URL",
				"tags": [
					"Uploads"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UploadFromUrlRequest"
							}
						}
					}
				}
			}
		},
		"/pipelines": {
			"get": {
				"operationId": "FindPipelines",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"allOf": [
											{
												"properties": {
													"updatedAt": {
														"$ref": "#/components/schemas/NativeDate"
													},
													"createdAt": {
														"$ref": "#/components/schemas/NativeDate"
													}
												},
												"required": [
													"updatedAt",
													"createdAt"
												],
												"type": "object"
											},
											{
												"properties": {
													"sortBy": {},
													"icon": {
														"type": "string"
													},
													"color": {
														"type": "string"
													},
													"organisation": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"name": {
														"type": "string"
													},
													"columns": {
														"items": {},
														"type": "array"
													},
													"lanes": {
														"items": {},
														"type": "array"
													},
													"recordType": {
														"$ref": "#/components/schemas/PipelineRecordType"
													},
													"viewType": {
														"type": "string",
														"enum": [
															"board",
															"table"
														]
													},
													"isPublic": {
														"type": "boolean"
													},
													"project": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"users": {
														"items": {
															"$ref": "#/components/schemas/ObjectId"
														},
														"type": "array"
													}
												},
												"required": [
													"columns",
													"lanes",
													"recordType",
													"viewType",
													"isPublic",
													"project",
													"users"
												],
												"type": "object"
											},
											{
												"$ref": "#/components/schemas/Document_any.any.any_"
											},
											{
												"properties": {
													"_id": {
														"$ref": "#/components/schemas/ObjectId"
													}
												},
												"required": [
													"_id"
												],
												"type": "object"
											}
										]
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the pipelines visible to the authenticated user, most recently updated first. A pipeline\nis visible when it is public or explicitly shared with the user — an API service account only\nsees public pipelines and those it was added to. Each pipeline carries its stages in `lanes`\n(`id`, `title`, `color`, `order`, `archived`); pass a lane's `id` as `laneId` when adding or\nmoving entries.",
				"summary": "List pipelines",
				"tags": [
					"Pipelines"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/pipelines/{pipelineId}": {
			"get": {
				"operationId": "GetPipeline",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"sortBy": {},
												"icon": {
													"type": "string"
												},
												"color": {
													"type": "string"
												},
												"organisation": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"name": {
													"type": "string"
												},
												"columns": {
													"items": {},
													"type": "array"
												},
												"lanes": {
													"items": {},
													"type": "array"
												},
												"recordType": {
													"$ref": "#/components/schemas/PipelineRecordType"
												},
												"viewType": {
													"type": "string",
													"enum": [
														"board",
														"table"
													]
												},
												"isPublic": {
													"type": "boolean"
												},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"users": {
													"items": {
														"$ref": "#/components/schemas/ObjectId"
													},
													"type": "array"
												}
											},
											"required": [
												"columns",
												"lanes",
												"recordType",
												"viewType",
												"isPublic",
												"project",
												"users"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Get one pipeline by its id, including its stages (`lanes`) and column configuration. A pipeline\nholds records of exactly one type: companies or contacts (`recordType`).",
				"summary": "Get a pipeline",
				"tags": [
					"Pipelines"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pipelineId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/pipelines/{pipelineId}/properties": {
			"get": {
				"operationId": "PipelineProperties",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/ResolvedPipelineField"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "The fields of one pipeline, in column order. A field's `source` says where its value lives:\n`ENTRY` fields are stored on the entry — their `fieldId`s are the keys entry `values` accept —\nwhile `RECORD` fields read (and write through to) an attribute of the company or contact and\narrive on entries as `recordValues`. `type`, `unit` and `calculation` say how to render a value\nand what the stage footers total.",
				"summary": "List pipeline fields",
				"tags": [
					"Pipelines"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pipelineId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/pipelines/{pipelineId}/entries": {
			"get": {
				"operationId": "ListEntries",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"allOf": [
											{
												"properties": {
													"updatedAt": {
														"$ref": "#/components/schemas/NativeDate"
													},
													"createdAt": {
														"$ref": "#/components/schemas/NativeDate"
													}
												},
												"required": [
													"updatedAt",
													"createdAt"
												],
												"type": "object"
											},
											{
												"properties": {
													"laneChangedAt": {
														"type": "string",
														"format": "date-time"
													},
													"recordSnapshot": {
														"properties": {
															"subtitle": {
																"type": "string"
															},
															"externalId": {
																"type": "string"
															},
															"name": {
																"type": "string"
															}
														},
														"type": "object"
													},
													"laneId": {
														"type": "string"
													},
													"dueDate": {
														"type": "string",
														"format": "date-time"
													},
													"lexorank": {
														"type": "string"
													},
													"createdBy": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"recordId": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"recordType": {
														"$ref": "#/components/schemas/PipelineRecordType"
													},
													"pipeline": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"project": {
														"properties": {
															"isValid": {
																"properties": {},
																"type": "object"
															},
															"createFromHexString": {
																"properties": {},
																"type": "object"
															},
															"createFromTime": {
																"properties": {},
																"type": "object"
															},
															"generate": {
																"properties": {},
																"type": "object"
															},
															"cacheHexString": {},
															"prototype": {
																"$ref": "#/components/schemas/ObjectId"
															}
														},
														"type": "object"
													},
													"values": {}
												},
												"required": [
													"recordId",
													"recordType",
													"pipeline",
													"project",
													"values"
												],
												"type": "object"
											},
											{
												"$ref": "#/components/schemas/Document_any.any.any_"
											},
											{
												"properties": {
													"recordOwner": {
														"type": "string"
													},
													"recordValues": {
														"$ref": "#/components/schemas/Record_string.any_"
													}
												},
												"type": "object"
											},
											{
												"properties": {
													"_id": {
														"$ref": "#/components/schemas/ObjectId"
													}
												},
												"required": [
													"_id"
												],
												"type": "object"
											}
										]
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the entries of one stage, ordered by their board position. `laneId` is the stage's id\nfrom the pipeline's `lanes`. Paginated via `skip` (default 0) and `limit` (default 50,\nmaximum 200). `filter` is an optional JSON array of `{field, operator, value}` rules; `field`\nis `dueDate`, `owner` (company pipelines, user ids), `values.<fieldId>` or `record.<fieldId>`\nfor one of the pipeline's fields. Rules that don't apply are ignored.",
				"summary": "List entries of a stage",
				"tags": [
					"Pipelines"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pipelineId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "laneId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "skip",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					},
					{
						"in": "query",
						"name": "filter",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "AddEntry",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"laneChangedAt": {
													"type": "string",
													"format": "date-time"
												},
												"recordSnapshot": {
													"properties": {
														"subtitle": {
															"type": "string"
														},
														"externalId": {
															"type": "string"
														},
														"name": {
															"type": "string"
														}
													},
													"type": "object"
												},
												"laneId": {
													"type": "string"
												},
												"dueDate": {
													"type": "string",
													"format": "date-time"
												},
												"lexorank": {
													"type": "string"
												},
												"createdBy": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordId": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordType": {
													"$ref": "#/components/schemas/PipelineRecordType"
												},
												"pipeline": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"values": {}
											},
											"required": [
												"recordId",
												"recordType",
												"pipeline",
												"project",
												"values"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"recordOwner": {
													"type": "string"
												},
												"recordValues": {
													"$ref": "#/components/schemas/Record_string.any_"
												}
											},
											"type": "object"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Add a company or contact to a pipeline. `recordId` is the Gleap id of the record — a\ncompany's `_id` (see GET /companies) or a contact's `id`, matching the pipeline's\n`recordType`. `laneId` picks the stage and defaults to the pipeline's first stage; `values`\nsets initial field values keyed by `fieldId` (see GET /pipelines/{pipelineId}/properties).\n\nA record sits on a pipeline at most once: adding one that is already present returns the\nexisting entry unchanged instead of creating a duplicate. Pipeline automations configured for\n\"record added\" run on a genuine add.",
				"summary": "Add a record to a pipeline",
				"tags": [
					"Pipelines"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "pipelineId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/PipelineEntryDTO"
							}
						}
					}
				}
			}
		},
		"/pipeline-entries/{entryId}/move": {
			"put": {
				"operationId": "Move",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"laneChangedAt": {
													"type": "string",
													"format": "date-time"
												},
												"recordSnapshot": {
													"properties": {
														"subtitle": {
															"type": "string"
														},
														"externalId": {
															"type": "string"
														},
														"name": {
															"type": "string"
														}
													},
													"type": "object"
												},
												"laneId": {
													"type": "string"
												},
												"dueDate": {
													"type": "string",
													"format": "date-time"
												},
												"lexorank": {
													"type": "string"
												},
												"createdBy": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordId": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordType": {
													"$ref": "#/components/schemas/PipelineRecordType"
												},
												"pipeline": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"values": {}
											},
											"required": [
												"recordId",
												"recordType",
												"pipeline",
												"project",
												"values"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"recordOwner": {
													"type": "string"
												},
												"recordValues": {
													"$ref": "#/components/schemas/Record_string.any_"
												}
											},
											"type": "object"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Move an entry to another stage of its pipeline. `laneId` is the target stage's id from the\npipeline's `lanes`; an id that does not exist on the entry's pipeline is ignored rather than\nerrored. Omit `lexorank` to place the entry at the end of the target stage — it is the board\nposition rank and only needs to be sent for an exact drag-and-drop position. Moving to a new\nstage runs the pipeline automations configured for that stage.",
				"summary": "Move an entry",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/MovePipelineEntryDTO"
							}
						}
					}
				}
			}
		},
		"/pipeline-entries/{entryId}/values": {
			"put": {
				"operationId": "SetValues",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update an entry's field values. Keys are the pipeline's field `fieldId`s (see\nGET /pipelines/{pipelineId}/properties). Sent keys are merged into the existing values —\nfields you do not send are left untouched — and sending `null` clears a field. Values must be\nprimitives (string, number, boolean); anything else is dropped.",
				"summary": "Update entry values",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateEntryValuesDTO"
							}
						}
					}
				}
			}
		},
		"/pipeline-entries/{entryId}/record-values": {
			"put": {
				"operationId": "SetRecordValues",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"laneChangedAt": {
													"type": "string",
													"format": "date-time"
												},
												"recordSnapshot": {
													"properties": {
														"subtitle": {
															"type": "string"
														},
														"externalId": {
															"type": "string"
														},
														"name": {
															"type": "string"
														}
													},
													"type": "object"
												},
												"laneId": {
													"type": "string"
												},
												"dueDate": {
													"type": "string",
													"format": "date-time"
												},
												"lexorank": {
													"type": "string"
												},
												"createdBy": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordId": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordType": {
													"$ref": "#/components/schemas/PipelineRecordType"
												},
												"pipeline": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"values": {}
											},
											"required": [
												"recordId",
												"recordType",
												"pipeline",
												"project",
												"values"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"recordOwner": {
													"type": "string"
												},
												"recordValues": {
													"$ref": "#/components/schemas/Record_string.any_"
												}
											},
											"type": "object"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Update the company or contact behind an entry through the pipeline's RECORD fields. Keys are\nthe `fieldId`s of fields with `source: 'RECORD'` (see GET /pipelines/{pipelineId}/properties);\nthe value is written to the record itself, so every pipeline showing that attribute — and the\nrecord's own page — reflect it. `null` clears the attribute. A key that is not a writable\nrecord field of this pipeline is rejected with 400.",
				"summary": "Update record values through an entry",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateEntryRecordValuesDTO"
							}
						}
					}
				}
			}
		},
		"/pipeline-entries/{entryId}/due-date": {
			"put": {
				"operationId": "SetDueDate",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Set or clear the entry's due date — when the next step on it is due. Send an ISO date\nstring to set it, or `null` to clear it. The board shows it on the card and turns the card\nred once the date has passed; the table can sort by it.",
				"summary": "Set an entry's due date",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/SetEntryDueDateDTO"
							}
						}
					}
				}
			}
		},
		"/pipeline-entries/{entryId}": {
			"delete": {
				"operationId": "Remove",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"allOf": [
										{
											"properties": {
												"updatedAt": {
													"$ref": "#/components/schemas/NativeDate"
												},
												"createdAt": {
													"$ref": "#/components/schemas/NativeDate"
												}
											},
											"required": [
												"updatedAt",
												"createdAt"
											],
											"type": "object"
										},
										{
											"properties": {
												"laneChangedAt": {
													"type": "string",
													"format": "date-time"
												},
												"recordSnapshot": {
													"properties": {
														"subtitle": {
															"type": "string"
														},
														"externalId": {
															"type": "string"
														},
														"name": {
															"type": "string"
														}
													},
													"type": "object"
												},
												"laneId": {
													"type": "string"
												},
												"dueDate": {
													"type": "string",
													"format": "date-time"
												},
												"lexorank": {
													"type": "string"
												},
												"createdBy": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordId": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"recordType": {
													"$ref": "#/components/schemas/PipelineRecordType"
												},
												"pipeline": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"project": {
													"properties": {
														"isValid": {
															"properties": {},
															"type": "object"
														},
														"createFromHexString": {
															"properties": {},
															"type": "object"
														},
														"createFromTime": {
															"properties": {},
															"type": "object"
														},
														"generate": {
															"properties": {},
															"type": "object"
														},
														"cacheHexString": {},
														"prototype": {
															"$ref": "#/components/schemas/ObjectId"
														}
													},
													"type": "object"
												},
												"values": {}
											},
											"required": [
												"recordId",
												"recordType",
												"pipeline",
												"project",
												"values"
											],
											"type": "object"
										},
										{
											"$ref": "#/components/schemas/Document_any.any.any_"
										},
										{
											"properties": {
												"recordOwner": {
													"type": "string"
												},
												"recordValues": {
													"$ref": "#/components/schemas/Record_string.any_"
												}
											},
											"type": "object"
										},
										{
											"properties": {
												"_id": {
													"$ref": "#/components/schemas/ObjectId"
												}
											},
											"required": [
												"_id"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Remove an entry from its pipeline. Only the pipeline membership is deleted — the underlying\ncompany or contact is untouched.",
				"summary": "Remove an entry",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"get": {
				"operationId": "GetOne",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Get one entry together with its pipeline, as `{ entry, pipeline }`. Also powers the ticket\nsidebar's \"Pipeline\" panel and the board's entry route (…/entries/:entryId). 404 when the\nentry isn't in this project.\n\nMUST stay the LAST @Get of this controller: tsoa registers routes in\ndeclaration order, and `{entryId}` declared above `for-record` would\nswallow it (entryId = \"for-record\").",
				"summary": "Get an entry",
				"tags": [
					"Pipeline entries"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "entryId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/agentevals": {
			"post": {
				"operationId": "CreateExample",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"tags": [
					"AgentEvals"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateAgentEvalExampleBody"
							}
						}
					}
				}
			}
		},
		"/records/{recordType}/{recordId}/counts": {
			"get": {
				"operationId": "Counts",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"total": {
											"type": "number",
											"format": "double"
										},
										"open": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"total",
										"open"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Open and total conversation counts for a record, so a tab can show a real\nnumber instead of the size of whatever page happens to be loaded.",
				"summary": "Conversation counts for a record",
				"tags": [
					"Records"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "recordType",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "recordId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/records/{recordType}/{recordId}/upcoming": {
			"get": {
				"operationId": "Upcoming",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/UpcomingItem"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Everything on the record with a date in the future — snoozed conversations\nwaking, pipeline due dates and date-typed attributes, merged and sorted.",
				"summary": "What is coming up on a record",
				"tags": [
					"Records"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "recordType",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "recordId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/records/{recordType}/{recordId}/waiting": {
			"get": {
				"operationId": "Waiting",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/WaitingItem"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "The record's open conversations, longest-waiting first. Team-wide by\ndefinition — unlike the per-agent visit stamp this replaced.",
				"summary": "Conversations waiting on us",
				"tags": [
					"Records"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "recordType",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "recordId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/records/{recordType}/{recordId}/summary": {
			"get": {
				"operationId": "Summary",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/SummaryResult"
								}
							}
						}
					}
				},
				"description": "The written brief for a record. Never precomputed: this route is the only\nthing that ever generates one, so a record nobody opens costs nothing.\nReturns `status` — `disabled` (feature off), `not-enough-data`, or `ok` with\nthe summary, optionally flagged `stale` when the cooldown is holding a\nsummary the record has since moved past.",
				"summary": "Record summary",
				"tags": [
					"Records"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "recordType",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "recordId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/records/{recordType}/{recordId}/summary/refresh": {
			"post": {
				"operationId": "RefreshSummary",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/SummaryResult"
								}
							}
						}
					}
				},
				"description": "Regenerates the summary, bypassing the staleness cooldown. Rate limited to\nonce a minute per record — the cooldown is what bounds automatic spend, so\nthe manual path needs its own floor or it becomes the way around it.",
				"summary": "Refresh a record summary",
				"tags": [
					"Records"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "recordType",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "recordId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/contacts/{userId}": {
			"put": {
				"operationId": "Upsert",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SContact"
								}
							}
						}
					}
				},
				"description": "Create or update a contact. Returns the full contact including its unread\nconversation count.",
				"summary": "Upsert contact",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SUpsertContactBody"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "Get",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SContact"
								}
							}
						}
					}
				},
				"description": "Fetch a contact including its unread conversation count.",
				"summary": "Get contact",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"delete": {
				"operationId": "Remove",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"status": {
											"type": "string"
										}
									},
									"required": [
										"status"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a contact and their conversations (the platform's standard\ncontact deletion — same behaviour as the admin API).",
				"summary": "Delete contact",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/contacts/{userId}/events": {
			"post": {
				"operationId": "TrackEvents",
				"responses": {
					"202": {
						"description": "Accepted",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"received": {
											"type": "number",
											"format": "double"
										}
									},
									"required": [
										"received"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Track events for a contact (drives outbound messaging and workflows).",
				"summary": "Track contact events",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2STrackEventsBody"
							}
						}
					}
				}
			}
		},
		"/s2s/contacts/{userId}/conversations": {
			"post": {
				"operationId": "CreateConversation",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SConversation"
								}
							}
						}
					}
				},
				"description": "Open a conversation for a contact, authored as the contact. Pass\nworkflowId to start a workflow, or agentId to engage an AI agent.\nThe contact is created on the fly if it does not exist yet.",
				"summary": "Create conversation",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SCreateConversationBody"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "ListConversations",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"next_cursor": {
											"type": "string",
											"nullable": true
										},
										"has_more": {
											"type": "boolean"
										},
										"items": {
											"items": {
												"$ref": "#/components/schemas/S2SConversation"
											},
											"type": "array"
										}
									},
									"required": [
										"next_cursor",
										"has_more",
										"items"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "List the contact's conversations, most recent activity first.\nBot-only conversations without human interaction are hidden — exactly the\nwidget's conversation list.",
				"summary": "List contact conversations",
				"tags": [
					"S2S Contacts"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "userId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "cursor",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}": {
			"get": {
				"operationId": "Get",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SConversation"
								}
							}
						}
					}
				},
				"description": "Fetch a conversation. Attributes are filtered to customer-visible ones.",
				"summary": "Get conversation",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"patch": {
				"operationId": "Patch",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SConversation"
								}
							}
						}
					}
				},
				"description": "Update conversation title and/or attributes (merge semantics).",
				"summary": "Update conversation",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SPatchConversationBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/close": {
			"post": {
				"operationId": "Close",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SConversation"
								}
							}
						}
					}
				},
				"description": "Close the conversation for the contact. Further contact messages are\nrejected with `conversation_closed` until it is reopened.",
				"summary": "Close conversation",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}/reopen": {
			"post": {
				"operationId": "Reopen",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SConversation"
								}
							}
						}
					}
				},
				"description": "Reopen a closed conversation.",
				"summary": "Reopen conversation",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}/read": {
			"post": {
				"operationId": "Read",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Mark the conversation read for the contact (explicit read receipt).\nClears the contact's unread state for this conversation.",
				"summary": "Mark conversation read",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}/typing": {
			"post": {
				"operationId": "Typing",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Signal that the contact is typing (or stopped typing). Debounce on your\nside; send only while a conversation is on screen.",
				"summary": "Typing indicator",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2STypingBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/network-logs": {
			"put": {
				"operationId": "SetNetworkLogs",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Attach a network log snapshot to the conversation — the same logs\n`Gleap.logNetwork()` collects in the SDK flow. Shown to agents in the\nconversation's \"Logs\" panel. Each call replaces the previous snapshot\n(max 100 requests, 2 MB). Not delivered via webhooks or the stream.",
				"summary": "Set network logs",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SPutNetworkLogsBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/events": {
			"put": {
				"operationId": "SetEvents",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Attach an event log snapshot to the conversation — the same events\n`Gleap.trackEvent()` buffers in the SDK flow and attaches when a\nconversation is created. Scoped to this conversation only (not the\ncontact), so events from other sessions never mix in. Shown to agents in\nthe conversation's \"Logs\" panel. Each call replaces the previous snapshot\n(max 500 events, 2 MB). Not delivered via webhooks or the stream.\nFor contact-level events that drive outbound rules, use\n`POST /contacts/{userId}/events` instead.",
				"summary": "Set conversation events",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SPutConversationEventsBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/rating": {
			"post": {
				"operationId": "Rate",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Rate the conversation (CSAT), integer 0–10.",
				"summary": "Rate conversation",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SConversationRatingBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/messages": {
			"post": {
				"operationId": "SendMessage",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SMessage"
								}
							}
						}
					}
				},
				"description": "Send a message into the conversation, authored as the contact.",
				"summary": "Send message",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SSendMessageBody"
							}
						}
					}
				}
			},
			"get": {
				"operationId": "ListMessages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"next_after": {
											"type": "string",
											"nullable": true
										},
										"has_more": {
											"type": "boolean"
										},
										"items": {
											"items": {
												"$ref": "#/components/schemas/S2SMessage"
											},
											"type": "array"
										}
									},
									"required": [
										"next_after",
										"has_more",
										"items"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Read the conversation's messages, oldest first, cursor-paginated\n(max 100 per page). Pass `after` = the last message id you have.\nReading messages does NOT mark the conversation read — use the explicit\nread receipt.",
				"summary": "List messages",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "after",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "limit",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}/workflow": {
			"get": {
				"operationId": "PendingWorkflowStep",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"step": {
											"allOf": [
												{
													"$ref": "#/components/schemas/S2SWorkflowStep"
												}
											],
											"nullable": true
										}
									},
									"required": [
										"step"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The workflow step currently waiting for the contact, if any.",
				"summary": "Get pending workflow step",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/conversations/{conversationId}/workflow/answer": {
			"post": {
				"operationId": "AnswerWorkflowStep",
				"responses": {
					"202": {
						"description": "Accepted"
					}
				},
				"description": "Answer the pending workflow step (text, selection, rating, attachments) or\nrequest a human with botAction \"humanHandoff\".",
				"summary": "Answer workflow step",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SWorkflowAnswerBody"
							}
						}
					}
				}
			}
		},
		"/s2s/conversations/{conversationId}/workflow/{workflowId}/run": {
			"post": {
				"operationId": "RunConversationWorkflow",
				"responses": {
					"202": {
						"description": "Accepted"
					}
				},
				"description": "Run a specific workflow on this conversation (replaces any active one).",
				"summary": "Run workflow",
				"tags": [
					"S2S Conversations"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "conversationId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "workflowId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/messages/{messageId}": {
			"get": {
				"operationId": "Get",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SMessage"
								}
							}
						}
					}
				},
				"description": "Fetch a single message.",
				"summary": "Get message",
				"tags": [
					"S2S Messages"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/messages/{messageId}/rating": {
			"post": {
				"operationId": "Rate",
				"responses": {
					"204": {
						"description": "No Content"
					}
				},
				"description": "Rate a message (thumbs up / down) — typically an AI answer.",
				"summary": "Rate message",
				"tags": [
					"S2S Messages"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "messageId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SMessageRatingBody"
							}
						}
					}
				}
			}
		},
		"/s2s/stream/config": {
			"get": {
				"operationId": "Config",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SStreamConfig"
								}
							}
						}
					}
				},
				"description": "Connection parameters. Read these at startup instead of hardcoding —\nif the realtime infrastructure moves, your client follows automatically.",
				"summary": "Get stream config",
				"tags": [
					"S2S Stream"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": []
			}
		},
		"/s2s/stream/auth": {
			"post": {
				"operationId": "Auth",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Channel authorization — point your Pusher client's channel auth here with\nyour server key as the Authorization header. A new consumerId takes over\nfrom the previous consumer (its connection is terminated).",
				"summary": "Authorize channel subscription",
				"tags": [
					"S2S Stream"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SStreamAuthBody"
							}
						}
					}
				}
			}
		},
		"/s2s/stream/user-auth": {
			"post": {
				"operationId": "UserAuth",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "User authentication (Pusher signin) — REQUIRED for server-side takeover\ntermination to reach your connection. Configure it as the client's\nuserAuthentication endpoint.",
				"summary": "Authenticate stream user",
				"tags": [
					"S2S Stream"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SStreamUserAuthBody"
							}
						}
					}
				}
			}
		},
		"/s2s/webhooks": {
			"get": {
				"operationId": "List",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/S2SWebhookListItem"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List webhook endpoints (secrets masked).",
				"summary": "List webhooks",
				"tags": [
					"S2S Webhooks"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": []
			},
			"post": {
				"operationId": "Create",
				"responses": {
					"201": {
						"description": "Created",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/S2SWebhookListItem"
								}
							}
						}
					}
				},
				"description": "Register a webhook endpoint. The signing secret is returned exactly once.",
				"summary": "Create webhook",
				"tags": [
					"S2S Webhooks"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/S2SWebhookCreateBody"
							}
						}
					}
				}
			}
		},
		"/s2s/webhooks/{webhookId}": {
			"delete": {
				"operationId": "Remove",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a webhook endpoint.",
				"summary": "Delete webhook",
				"tags": [
					"S2S Webhooks"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "webhookId",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/s2s/workflows": {
			"get": {
				"operationId": "List",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {
										"$ref": "#/components/schemas/S2SWorkflowListItem"
									},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the project's live workflows.",
				"summary": "List workflows",
				"tags": [
					"S2S Workflows"
				],
				"security": [
					{
						"s2s": []
					}
				],
				"parameters": []
			}
		},
		"/uploads/links": {
			"post": {
				"operationId": "CreateUploadLink",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/UploadLinkResponse"
								}
							}
						}
					}
				},
				"description": "Create a single-use link that accepts one image upload into this project,\nfor tools that can run `curl` but hold no Gleap credentials (e.g. an AI agent\nconnected through the Gleap MCP server). The link expires after 15 minutes\nand works once:\n\n`curl -sS -F \"file=@cover.png\" \"<uploadUrl>\"`\n\nAccepts PNG, JPEG, GIF and WebP up to 20 MB (judged by the file's bytes, not\nits name). The response carries the image's permanent public `fileUrl`.",
				"summary": "Create an image upload link",
				"tags": [
					"Uploads"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/ticket-types": {
			"get": {
				"operationId": "FindTicketTypes",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "List the boards (ticket types) of the project in sidebar order. Each board carries its\n`type` (the value stored on tickets), `name`, `path`, `renderType` and its columns in\n`options.possibleLanes` (`key` is the ticket status). Boards limited to some members list\nthem in `restrictedToUsers`, and the AI agents whose runs may still read them in\n`restrictedToAgents`. A built-in board renamed on 2026-10-18 (Inquiry → Conversation,\nRoadmap / Feature request → Idea) also carries `legacyName` / `legacyMenuName`, its names\nbefore the rename; its contact events keep the legacy name (\"Inquiry submitted\").\n\nOnly the boards the caller may see are listed: a board limited to some members or teams\n(`restrictedToUsers`, `restrictedToTeams`) is left out for everyone else except admins.",
				"summary": "List boards",
				"tags": [
					"Ticket types"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"post": {
				"operationId": "CreateTicketType",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Create a board. The `type` (stored on tickets) and URL `path` are derived from the name.",
				"summary": "Create a board",
				"tags": [
					"Ticket types"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/CreateTicketTypeDTO"
							}
						}
					}
				}
			},
			"put": {
				"operationId": "ReorderTicketTypes",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"items": {},
									"type": "array"
								}
							}
						}
					}
				},
				"description": "Set the sidebar order of the boards. Boards missing from `types` keep their relative order\nafter the listed ones. Answers the boards the caller may see, in the new order.",
				"summary": "Reorder boards",
				"tags": [
					"Ticket types"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/ReorderTicketTypesDTO"
							}
						}
					}
				}
			}
		},
		"/ticket-types/{type}": {
			"put": {
				"operationId": "UpdateTicketType",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Update one board. Only the fields sent are changed. Removing a column from\n`options.possibleLanes` moves its tickets to the Open column (or the first remaining one).",
				"summary": "Update a board",
				"tags": [
					"Ticket types"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "type",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateTicketTypeDTO"
							}
						}
					}
				}
			},
			"delete": {
				"operationId": "DeleteTicketType",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"success": {
											"type": "boolean"
										}
									},
									"required": [
										"success"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Delete a board. Refused with 409 (`code: PROJECT_TYPE_NOT_EMPTY`) while it still has\nnon-archived tickets.",
				"summary": "Delete a board",
				"tags": [
					"Ticket types"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "type",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/engagement/emails/{engagementEmailId}/kai/sample": {
			"post": {
				"operationId": "SampleKaiEmails",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Writes Kai emails for a few sample recipients with the saved Kai config. Nothing is sent or\nstored; the model calls are billed as AI usage.",
				"summary": "Preview Kai-written emails",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/KaiSampleBody"
							}
						}
					}
				}
			}
		},
		"/engagement/emails/{engagementEmailId}/kai/review": {
			"get": {
				"operationId": "ListKaiReview",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The Kai-written emails of this email, newest first, 25 per page, with per-status counts.",
				"summary": "List Kai-written emails for review",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "status",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "page",
						"required": false,
						"schema": {
							"format": "double",
							"type": "number"
						}
					}
				]
			}
		},
		"/engagement/emails/{engagementEmailId}/kai/review/bulk": {
			"post": {
				"operationId": "BulkReviewKaiEmails",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Approve or reject several Kai-written emails that wait for review. Edits are not possible here.",
				"summary": "Approve or reject Kai-written emails in bulk",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/KaiBulkReviewBody"
							}
						}
					}
				}
			}
		},
		"/engagement/emails/{engagementEmailId}/kai/review/{actionId}": {
			"post": {
				"operationId": "ReviewKaiEmail",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Approve (optionally with an edited subject and body) or reject one Kai-written email that\nwaits for review. An approved email is sent at its send time through the email's look.",
				"summary": "Review a Kai-written email",
				"tags": [
					"Engagement Email"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "engagementEmailId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "path",
						"name": "actionId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/KaiReviewDecisionBody"
							}
						}
					}
				}
			}
		},
		"/settings/pages": {
			"get": {
				"operationId": "GetSettingPages",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"pages": {
											"items": {
												"properties": {
													"canChange": {
														"type": "boolean"
													},
													"description": {
														"type": "string"
													},
													"path": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"key": {
														"type": "string"
													},
													"whyNot": {},
													"items": {
														"properties": {
															"ops": {
																"items": {
																	"type": "string"
																},
																"type": "array"
															},
															"nameKey": {
																"type": "string"
															}
														},
														"required": [
															"ops",
															"nameKey"
														],
														"type": "object"
													},
													"perSite": {
														"type": "boolean"
													},
													"fields": {
														"items": {
															"properties": {
																"description": {
																	"type": "string"
																},
																"type": {
																	"$ref": "#/components/schemas/SettingType"
																},
																"label": {
																	"type": "string"
																},
																"key": {
																	"type": "string"
																},
																"values": {
																	"items": {
																		"type": "string"
																	},
																	"type": "array"
																},
																"min": {
																	"type": "number",
																	"format": "double"
																},
																"max": {
																	"type": "number",
																	"format": "double"
																},
																"needsConfirmation": {
																	"type": "string"
																},
																"secret": {
																	"type": "boolean"
																},
																"readOnly": {
																	"type": "boolean"
																}
															},
															"required": [
																"description",
																"type",
																"label",
																"key"
															],
															"type": "object"
														},
														"type": "array"
													},
													"notCovered": {
														"type": "string"
													}
												},
												"required": [
													"canChange",
													"description",
													"path",
													"name",
													"key",
													"fields"
												],
												"type": "object"
											},
											"type": "array"
										},
										"notForYou": {
											"items": {
												"properties": {
													"whyNot": {
														"type": "string"
													},
													"name": {
														"type": "string"
													},
													"key": {
														"type": "string"
													}
												},
												"required": [
													"whyNot",
													"name",
													"key"
												],
												"type": "object"
											},
											"type": "array"
										}
									},
									"required": [
										"pages"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The settings pages you may see, with each field's key, type, allowed values and whether a change\nneeds your confirmation. Secrets (keys, tokens, signing secrets) are never returned.",
				"summary": "List settings pages",
				"tags": [
					"Settings"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/settings": {
			"get": {
				"operationId": "GetSettings",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"settings": {
											"items": {},
											"type": "array"
										},
										"unknownKeys": {
											"items": {
												"type": "string"
											},
											"type": "array"
										}
									},
									"required": [
										"settings"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Current values of one page (`page`, a key from GET /settings/pages) or of named `keys`\n(comma-separated). Pages of items (teams, macros, help center sites, webhooks) list their items.",
				"summary": "Get settings",
				"tags": [
					"Settings"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "page",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "keys",
						"required": false,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "site",
						"required": false,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateSettings",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/SettingsChangeResult"
								}
							}
						}
					}
				},
				"description": "Change settings with your role's rights. Returns what changed (old → new) and what was refused\nand why. Risky changes run only with `confirmed: true`; without it nothing runs and\n`needsConfirmation` says what to confirm.",
				"summary": "Update settings",
				"tags": [
					"Settings"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateSettingsDto"
							}
						}
					}
				}
			}
		},
		"/ai-provenance/verify": {
			"post": {
				"operationId": "Verify",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/AiProvenanceAnswer"
								}
							}
						}
					}
				},
				"description": "Checks whether a message was written by Gleap's AI (Kai) for a workspace\nthat enforces the EU AI Act. Answers only yes or no and the day; never\nthe message, the workspace or the conversation. Texts under 20\ncharacters always answer no.",
				"summary": "Was this written by Gleap's AI?",
				"tags": [
					"AI provenance"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/VerifyAiProvenanceDto"
							}
						}
					}
				}
			}
		},
		"/onboarding/sales-demo/{id}/claim": {
			"post": {
				"operationId": "Claim",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"status": {
											"type": "string"
										}
									},
									"required": [
										"status"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"tags": [
					"Onboarding"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "id",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/onboarding/sales-demo/status": {
			"get": {
				"operationId": "Status",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"status": {
											"type": "string"
										}
									},
									"required": [
										"status"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"tags": [
					"Onboarding"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			}
		},
		"/hard-tickets/settings": {
			"get": {
				"operationId": "GetSettings",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HardTicketsSettingsView"
								}
							}
						}
					}
				},
				"description": "The project's hard-ticket and Done settings (effective values: the defaults applied).",
				"summary": "Get the hard tickets settings",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			},
			"put": {
				"operationId": "UpdateSettings",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/HardTicketsSettingsView"
								}
							}
						}
					}
				},
				"description": "Change the hard-ticket and Done settings. Partial: a key left out keeps its value, `null` resets it to the\ndefault. Turning automatic starts on records who did (escalated tickets run as that person); turning automatic\ncode fixes on, or choosing where they run, records who code fixes run as.",
				"summary": "Update the hard tickets settings",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/HardTicketsSettingsUpdateDto"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/tickets/{ticketId}": {
			"get": {
				"operationId": "GetTicketState",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "One ticket's hard-ticket state: the agent assignee and the human owner, the one active session, the docked\ncard, and the Work-on-it menu (Kai Code Cloud, the Bridge machines with their online state, the apps).",
				"summary": "Get a ticket's hard-ticket state",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/tickets/{ticketId}/thread": {
			"get": {
				"operationId": "GetTicketThread",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"items": {
											"items": {},
											"type": "array"
										}
									},
									"required": [
										"items"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The Copilot pane's one thread, oldest first: Kai Support's hand-over, hand-over chips, agent turns with their\nsteps, messages to and from the customer, Gleap's own lines, solved checks, struck lines of dismissed cards,\nDone. Built from what is stored by ticket; `hardticket.thread` events only say \"re-read\".",
				"summary": "Get a ticket's pane thread",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/tickets/{ticketId}/start": {
			"post": {
				"operationId": "StartTicket",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Work on the ticket: Kai Support works on it (Kai Code Cloud, a Bridge machine) or it opens in an app on\nyour computer. One active session per ticket: a second start returns the running one (`alreadyRunning`).\nApps get `kickoff` for the deeplink (AgentHandoff.ts); no report within 3 minutes reads \"Not connected\".",
				"summary": "Start working on a hard ticket",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"runner": {
										"anyOf": [
											{
												"properties": {
													"kind": {
														"type": "string",
														"enum": [
															"cloud"
														],
														"nullable": false
													}
												},
												"required": [
													"kind"
												],
												"type": "object"
											},
											{
												"properties": {
													"deviceId": {
														"type": "string"
													},
													"kind": {
														"type": "string",
														"enum": [
															"bridge"
														],
														"nullable": false
													}
												},
												"required": [
													"deviceId",
													"kind"
												],
												"type": "object"
											},
											{
												"properties": {
													"app": {
														"type": "string",
														"enum": [
															"claude_code",
															"codex",
															"cursor",
															"antigravity"
														]
													},
													"kind": {
														"type": "string",
														"enum": [
															"app"
														],
														"nullable": false
													}
												},
												"required": [
													"app",
													"kind"
												],
												"type": "object"
											}
										]
									}
								},
								"required": [
									"runner"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/tickets/{ticketId}/assign-agent": {
			"post": {
				"operationId": "AssignAgent",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Assign Kai Support to the ticket again (hard-ticket mode): it resumes the same session and notes, and reads\nwhat the team wrote in between.",
				"summary": "Assign Kai Support",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/tickets/{ticketId}/unassign-agent": {
			"post": {
				"operationId": "UnassignAgent",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Unassign the agent: it stops at once (the episode bump first; a hosted run is cancelled, an app on a\nperson's own computer keeps running). The human owner drives.",
				"summary": "Unassign the agent",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/tickets/{ticketId}/handover/dismiss": {
			"post": {
				"operationId": "DismissHandover",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Close the pane's hand-over card (its X). It stays closed for this hand-over only: the next hand-over to a person\nshows its card again. Nothing else changes: the owner, the agent and the customer's conversation stay as they are.",
				"summary": "Dismiss a ticket's hand-over card",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/tickets/{ticketId}/tell": {
			"post": {
				"operationId": "TellAgent",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"ok": {
											"type": "boolean",
											"enum": [
												true
											],
											"nullable": false
										}
									},
									"required": [
										"ok"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "\"Tell Kai Support…\": the teammate's words go to the agent working the ticket (its running session's next\nturn, or its run resumes), booked to the person. Never a reply to the customer and never a stop. The same\npath and guards as the old `POST /agents/ticket/{id}/input` with `mode: 'send'` (the ticket's board, Kai\nCopilot-only roles, files on our storage only, 409 when nobody works on it), which stays for the app's\ninstalled bundles for one release.",
				"summary": "Tell the agent working on a ticket",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"attachments": {
										"items": {
											"properties": {
												"type": {
													"type": "string"
												},
												"url": {
													"type": "string"
												},
												"name": {
													"type": "string"
												}
											},
											"required": [
												"url"
											],
											"type": "object"
										},
										"type": "array"
									},
									"text": {
										"type": "string"
									}
								},
								"required": [
									"text"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/cards/{taskId}/send": {
			"post": {
				"operationId": "SendProposal",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Send a proposed reply (as proposed, or with `text` edited in the card): Kai Support's as Kai Support, Kai\nCopilot's as the person it was made for, only by them (403 for anyone else). Approval, not a\ntake-over: the agent keeps driving. Records the send for its kind (direct sending after 9 in 10 unedited).",
				"summary": "Send a proposed reply",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"text": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/cards/{taskId}/answer": {
			"post": {
				"operationId": "AnswerCard",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Answer the agent's question card: the answer goes straight back into its run. Not a take-over.",
				"summary": "Answer a question card",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"answer": {
										"type": "string"
									}
								},
								"required": [
									"answer"
								],
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/cards/{taskId}/approve": {
			"post": {
				"operationId": "ApproveCard",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Approve what waits for a person (money, deletes): the held action runs. Not a take-over.",
				"summary": "Approve an approval card",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"note": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/cards/{taskId}/reject": {
			"post": {
				"operationId": "RejectCard",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Decline what waits for a person; the agent is told why.",
				"summary": "Decline an approval card",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"properties": {
									"note": {
										"type": "string"
									}
								},
								"type": "object"
							}
						}
					}
				}
			}
		},
		"/hard-tickets/tickets/{ticketId}/copilot-drafts": {
			"get": {
				"operationId": "GetCopilotDrafts",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"drafts": {
											"items": {
												"$ref": "#/components/schemas/CopilotDraftView"
											},
											"type": "array"
										}
									},
									"required": [
										"drafts"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "The viewer's own Kai Copilot drafts on a ticket, newest first: each draft's words and where it is now (open on the\ncard, sent, replaced by a newer draft, not sent). The pane thread matches them to Copilot's proposals.",
				"summary": "List my Kai Copilot drafts on a ticket",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "ticketId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/cards/{taskId}/restore": {
			"post": {
				"operationId": "ShowCopilotDraftAgain",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"properties": {
										"taskId": {
											"type": "string"
										},
										"ok": {
											"type": "boolean",
											"enum": [
												true
											],
											"nullable": false
										}
									},
									"required": [
										"taskId",
										"ok"
									],
									"type": "object"
								}
							}
						}
					}
				},
				"description": "Show again: puts the viewer's Kai Copilot draft that was not sent (or that a newer draft replaced) back on the\ncard, with the same words. Only the person it was made for; a sent draft never comes back (409).",
				"summary": "Show a Kai Copilot draft again",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/cards/{taskId}/dismiss": {
			"post": {
				"operationId": "DismissCard",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "Close a card without answering it (it leaves a struck line in the pane thread).",
				"summary": "Dismiss a card",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "path",
						"name": "taskId",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/hard-tickets/report": {
			"get": {
				"operationId": "GetReport",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {}
							}
						}
					}
				},
				"description": "The Kai Support report's First line and Hard tickets tabs (from the done tickets' review rows).",
				"summary": "Get the Kai Support report tab",
				"tags": [
					"HardTickets"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [
					{
						"in": "query",
						"name": "tab",
						"required": true,
						"schema": {
							"type": "string",
							"enum": [
								"first_line",
								"hard_tickets"
							]
						}
					},
					{
						"in": "query",
						"name": "startDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "query",
						"name": "endDate",
						"required": true,
						"schema": {
							"type": "string"
						}
					},
					{
						"in": "header",
						"name": "project",
						"required": true,
						"schema": {
							"type": "string"
						}
					}
				]
			}
		},
		"/mobile-auth/microsoft": {
			"post": {
				"operationId": "SignInWithMicrosoft",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"anyOf": [
										{
											"$ref": "#/components/schemas/MicrosoftSignInResultDto"
										},
										{
											"properties": {
												"message": {
													"type": "string"
												},
												"type": {
													"type": "string"
												}
											},
											"required": [
												"message",
												"type"
											],
											"type": "object"
										}
									]
								}
							}
						}
					}
				},
				"description": "Sign in to the Gleap app with a Microsoft Entra access token for Gleap's API.\nThe session lives as long as the Microsoft token; the app calls this again\nwith a fresh token to renew it. 403 `microsoft_account_not_member` when no\norganisation of that tenant has this person as a member.",
				"summary": "Sign in with Microsoft (Gleap app)",
				"tags": [
					"Microsoft sign-in"
				],
				"security": [],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/MicrosoftSignInDto"
							}
						}
					}
				}
			}
		},
		"/sso/organisation/{organisationId}/mobile-app-protection": {
			"get": {
				"operationId": "GetMobileAppProtection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MobileAppProtectionSettingsDto"
								}
							}
						}
					}
				},
				"description": "The organisation's mobile app protection (Microsoft Intune): whether the\nGleap app reaches its data only through a Microsoft sign-in in its tenant.",
				"summary": "Get mobile app protection",
				"tags": [
					"Mobile app protection"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": []
			},
			"put": {
				"operationId": "UpdateMobileAppProtection",
				"responses": {
					"200": {
						"description": "Ok",
						"content": {
							"application/json": {
								"schema": {
									"$ref": "#/components/schemas/MobileAppProtectionSettingsDto"
								}
							}
						}
					}
				},
				"description": "Turn mobile app protection on (with the Entra tenant ID and email domains) or off, and\nwhether the dashboard in a browser needs \"Continue with Microsoft\" too.",
				"summary": "Update mobile app protection",
				"tags": [
					"Mobile app protection"
				],
				"security": [
					{
						"jwt": []
					}
				],
				"parameters": [],
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"$ref": "#/components/schemas/UpdateMobileAppProtectionDto"
							}
						}
					}
				}
			}
		}
	},
	"servers": [
		{
			"url": "https://api.gleap.io/v3"
		}
	]
}