Перейти к основному содержимому

custom.typing (выходной)

Выходной топик аккаунта канала: запись пишет Shtab Connect, читает система организации. Повтор записи несёт тот же event_id.

Схема outbound.typing.v1 собрана из src/backend/contracts/integrations/custom_channel/outbound.typing.v1.json при сборке портала.

Поля​

OperatorTyping​

ПолеТипОбязательноеОписание
authorAuthorда
conversation_idstring (uuid)да
customerCustomerда
event_idstring (uuid)да
occurred_atstring (date-time)да
schema_versionintegerнетПо умолчанию 1.
thread_idstringнетПо умолчанию "".
type"custom.typing"даВид варианта: всегда custom.typing.

Author​

ПолеТипОбязательноеОписание
kindAuthorKindда
namestringнетПо умолчанию "".

AuthorKind​

Значения: "bot", "operator", "system".

Customer​

Клиент в системе организации: по external_id Helpdesk находит его карточку.

ПолеТипОбязательноеОписание
external_idstringдаот 1 симв., до 100 симв..
namestringнетдо 255 симв.. По умолчанию "".

Пример​

{
"type": "custom.typing",
"schema_version": 1,
"event_id": "3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7",
"conversation_id": "6f1c2a8e-3b7d-4c55-9a10-2f4e8d1b7c01",
"customer": {
"external_id": "client-42",
"name": "Анна Петрова"
},
"thread_id": "order-77",
"author": {
"kind": "operator",
"name": "Мария"
},
"occurred_at": "2026-11-10T09:30:00Z"
}

JSON Schema​

{
"$defs": {
"Author": {
"properties": {
"kind": {
"$ref": "#/$defs/AuthorKind"
},
"name": {
"default": "",
"type": "string"
}
},
"required": [
"kind"
],
"title": "Author",
"type": "object"
},
"AuthorKind": {
"enum": [
"bot",
"operator",
"system"
],
"title": "AuthorKind"
},
"Customer": {
"description": "Клиент в системе организации: по ``external_id`` Helpdesk находит его карточку.",
"properties": {
"external_id": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"name": {
"default": "",
"maxLength": 255,
"type": "string"
}
},
"required": [
"external_id"
],
"title": "Customer",
"type": "object"
},
"OperatorTyping": {
"properties": {
"author": {
"$ref": "#/$defs/Author"
},
"conversation_id": {
"format": "uuid",
"type": "string"
},
"customer": {
"$ref": "#/$defs/Customer"
},
"event_id": {
"format": "uuid",
"type": "string"
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"schema_version": {
"default": 1,
"type": "integer"
},
"thread_id": {
"default": "",
"type": "string"
},
"type": {
"description": "Вид варианта: всегда `custom.typing`.",
"enum": [
"custom.typing"
]
}
},
"required": [
"type",
"event_id",
"conversation_id",
"customer",
"author",
"occurred_at"
],
"title": "OperatorTyping",
"type": "object"
}
},
"$ref": "#/$defs/OperatorTyping"
}