Чаты · Изменение
Чаты · Архивация
chats_archive
Попробуйте три запроса
Подготовить
- Вы указываетеЧат
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Чаты / Архивация». Для изменения нужны чат. Покажи объект и ожидаемый эффект до выполнения.
- chatId
- Чат
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Чаты / Архивация» с параметром chatId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- chatId
- DEMO-101
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Чаты / Архивация» по исходному ответу. Покажи чат, messageId. Объясни, чем подтвердить эффект для выбранного объекта.
- До измененияПрочитать версию
- При записиПередать выбранную версию
- После ответаПеречитать объект
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.
Описание разработчика
Archive a chat using its current revision. Only its authenticated creator can archive it. Messages remain readable but all ordinary metadata/message writes stop until restore.
Параметры запроса
- chatId
- Existing native chatai document ID in the authenticated company and participant list. обязательно по схеме · string
- expectedRevision
- Версия, прочитанная перед изменением. обязательно по схеме · string
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- chatId
- Existing native chatai document ID in the authenticated company and participant list. обязательно по схеме · string
- messageId
- Created message ID, otherwise null. обязательно по схеме · string / null
- operation
- Committed native operation. No business operation, provider or agent was run. обязательно по схеме · string · варианты chat_created, chat_updated, chat_archived, chat_restored, message_created
- changed
- Whether this operation changed native fields. обязательно по схеме · boolean
- appliedFromRevision
- Parent revision checked before the change; null for chat creation. Read again for the current revision. обязательно по схеме · string / null
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"chatId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing native chatai document ID in the authenticated company and participant list."
},
"expectedRevision": {
"type": "string",
"pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
"description": "Exact Firestore update-time revision returned by the corresponding get action. No revision field is stored in the native document."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable request identifier for these exact arguments. Keep it unchanged when retrying an uncertain response."
}
},
"required": [
"chatId",
"expectedRevision",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"chatId": {
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Existing native chatai document ID in the authenticated company and participant list."
},
"messageId": {
"anyOf": [
{
"type": "string",
"pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
"description": "Message ID under this exact chat; never a path into another chat."
},
{
"type": "null"
}
],
"description": "Created message ID, otherwise null."
},
"operation": {
"type": "string",
"enum": [
"chat_created",
"chat_updated",
"chat_archived",
"chat_restored",
"message_created"
],
"description": "Committed native operation. No business operation, provider or agent was run."
},
"changed": {
"type": "boolean",
"description": "Whether this operation changed native fields."
},
"appliedFromRevision": {
"anyOf": [
{
"type": "string",
"pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
"description": "Exact Firestore update-time revision returned by the corresponding get action. No revision field is stored in the native document."
},
{
"type": "null"
}
],
"description": "Parent revision checked before the change; null for chat creation. Read again for the current revision."
}
},
"required": [
"chatId",
"messageId",
"operation",
"changed",
"appliedFromRevision"
],
"additionalProperties": false
}