{
  "openapi": "3.0.3",
  "info": {
    "title": "Teamyfy Public Integration API",
    "version": "1",
    "description": "Complete native Bot API and related human management/interaction surface mounted by ApplicationRouting. First-party application protocols, operator/admin and private worker/runtime APIs are separate. Schemas derive from source DTOs plus reviewed explicit wire bindings. Numeric string IDs must remain strings."
  },
  "servers": [
    {
      "url": "https://teamyfy.ru"
    }
  ],
  "paths": {
    "/api/bot/v1/capabilities": {
      "get": {
        "operationId": "GET_api_bot_v1_capabilities",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/capabilities",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCapabilitiesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 105,
          "routeBodySha256": "b3fc45449e766ba40910dc5147f78f4f00b91b15457192e4498a31d5f015fda7"
        }
      }
    },
    "/api/bot/v1/commands": {
      "get": {
        "operationId": "GET_api_bot_v1_commands",
        "tags": [
          "Команды"
        ],
        "summary": "GET /api/bot/v1/commands",
        "description": "Возвращает текущий авторизованный ресурс. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 15,
          "routeBodySha256": "cebb7d4b1598c96a57c92484960a3534a4b88c292261c3aa0ad69864520b7cc9"
        }
      },
      "put": {
        "operationId": "PUT_api_bot_v1_commands",
        "tags": [
          "Команды"
        ],
        "summary": "PUT /api/bot/v1/commands",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 19,
          "routeBodySha256": "157a97e5e7b4c4e948c0777478fd6a0f414c521316bebfeadbd79c940f50098b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceBotCommandsRequest"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_commands",
        "tags": [
          "Команды"
        ],
        "summary": "POST /api/bot/v1/commands",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 24,
          "routeBodySha256": "b12b1e8eae71b7fd24cc99c934161dd486a9ce795395be3e3922254224b8e0ee"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotCommandDefinition"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/commands/{commandId}": {
      "put": {
        "operationId": "PUT_api_bot_v1_commands_commandId",
        "tags": [
          "Команды"
        ],
        "summary": "PUT /api/bot/v1/commands/{commandId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 29,
          "routeBodySha256": "5813c90bf90323b2bf71d37d330f5f7bfb4374164fddd204a99941c6f9bdf5ec"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotCommandDefinition"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_commands_commandId",
        "tags": [
          "Команды"
        ],
        "summary": "DELETE /api/bot/v1/commands/{commandId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 34,
          "routeBodySha256": "4f3d1f25f06693a6c74330985a4930344e6d2aa4025a073f3a4895fd30ee9880"
        }
      }
    },
    "/api/bot/v1/compat/self": {
      "get": {
        "operationId": "GET_api_bot_v1_compat_self",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/compat/self",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatSelfResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 29,
          "routeBodySha256": "9a645ae8386c55235f5f7fb151302559171d2a32e7e4a5a54579171792d64766"
        }
      }
    },
    "/api/bot/v1/devices/managed": {
      "post": {
        "operationId": "POST_api_bot_v1_devices_managed",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/devices/managed",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotManagedDeviceResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 24,
          "routeBodySha256": "38ebf34003c66883dc400b95fb6b2efdba57de4fd1953331b43e977653c7df04"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "maxProperties": 0
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConversationPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 42,
          "routeBodySha256": "8a6858b143793eac62018dac6ccad4fc784b49d54fd77f703c5a344cc3dfbddc"
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConversationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 46,
          "routeBodySha256": "a9473df5bd33afbe463922897b97948d43dd01b11a1dc231fa4edde741e23915"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotDirectConversationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConversationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 55,
          "routeBodySha256": "4a1dbbb17caadf3308618dd9d1dd04c3fbf82ddbbc2fb9847288370c4d250455"
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_direct_conversations_conversationId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "DELETE /api/bot/v1/direct-conversations/{conversationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 56,
          "routeBodySha256": "52ba422dd11e382ca7a2b237253ac800571031cef151f3f80cdfd01621688208"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/actions": {
      "put": {
        "operationId": "PUT_api_bot_v1_direct_conversations_conversationId_actions",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "PUT /api/bot/v1/direct-conversations/{conversationId}/actions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotActionBindingView"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 70,
          "routeBodySha256": "299a19d47f715f49cbabe6b6c4d7d00ce0268b4786d2ebedbc39ce702aa7492c"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterBotActionsRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/admission": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_admission",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/admission",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotManagedAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 51,
          "routeBodySha256": "d440eb664670586dda3284734079a4b068a9707537fc53ea54739bf95c6deac9"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "maxProperties": 0
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/compat/by-id/{compatId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_compat_by_id_compatId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/compat/by-id/{compatId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "compatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 73,
          "routeBodySha256": "f6b3d720bd303cca6c289d15fa83f5d32858e6db58aa5def7e2f919448186194"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/compat/{kind}/{nativeId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_compat_kind_nativeId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/compat/{kind}/{nativeId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "USER",
                "APPLICATION",
                "COMMUNITY",
                "CHANNEL",
                "DIRECT",
                "ROLE",
                "SYSTEM_ROLE",
                "CHANNEL_MESSAGE",
                "CHANNEL_THREAD_MESSAGE",
                "DIRECT_MESSAGE",
                "DIRECT_THREAD_MESSAGE",
                "ATTACHMENT",
                "COMMAND",
                "INTERACTION",
                "INTERACTION_REPLY",
                "INTERACTION_ATTACHMENT"
              ]
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "nativeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 78,
          "routeBodySha256": "cbee83aad2b0bb98c41a59349e92d706568d184a010676b25032c61b6bfe6ced"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/events": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_events",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/events",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotEventPageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 60,
          "routeBodySha256": "898cd293527024b025c069d61da7d12a6e8de6aeb38a91f790a8b2a1e3579423"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_messages",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/messages",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "rootMessageId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageHistoryResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 64,
          "routeBodySha256": "15e527fe79fc0bc96c37c6bd30c3755704f96948e5a90060a4001504a1baeddd"
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_messages",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/messages",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 15,
          "routeBodySha256": "6525cb080d25f9f158c07a4ea06908683cc2c39b8113565572f8c70bd0ad36d9"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendDirectMessageRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_messages_messageId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "thread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Читать ответ в ветке сообщения."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageEventResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 69,
          "routeBodySha256": "cb92df67559bcbe8dea783d02c992b082b3ccdf4f3a6e6c1efbcfbf3b512674e"
        }
      },
      "patch": {
        "operationId": "PATCH_api_bot_v1_direct_conversations_conversationId_messages_messageId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "PATCH /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 19,
          "routeBodySha256": "f58586a47fe45b29aabf45746ad618ccaa5de729401767dcc6a4abb5f5924bc3"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDirectMessageRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_direct_conversations_conversationId_messages_messageId",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "DELETE /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 23,
          "routeBodySha256": "ae191b1226fefc4a5730cfc53e3e6b5ff106b5fffda7dcb204202f8a923b8a18"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/attachments/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_messages_messageId_attachments_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/attachments/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом. Этот метод возвращает только native/compat identity (BotCompatIdResponse); размеры, MIME и ключи не входят в этот ответ. Interaction attachments используют отдельную модель BotInteractionAttachmentMetadata.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "eventCursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "Точный сохранённый create/update event для метаданных вложения; не даёт права скачать удалённый файл."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 61,
          "routeBodySha256": "718deff30ed096dde0aac275accc0036bc0acdbaabdba81a4ccec703241ba2a4"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/attachments/{uploadId}/range": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_messages_messageId_attachments_uploadId_range",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/attachments/{uploadId}/range",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "length",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 1048576
            },
            "description": "Длина точного диапазона в байтах; SERVER_MANAGED_1 возвращает обычные байты, legacy — ciphertext. Это не HTTP Range."
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Смещение в байтах от начала файла; SERVER_MANAGED_1 не шифрует этот диапазон на уровне содержимого."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 66,
          "routeBodySha256": "b8ce5a482724c133759e4d749c6a0c57000ef81d392033a7dd9efdf2533ef8f3"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/interactions": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_messages_messageId_interactions",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/interactions",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageInteractions"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 31,
          "routeBodySha256": "0b1d12d04db652c6a5490d698a40769a61182298c4fdd8ec834b86f04f06ee91"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/reaction": {
      "put": {
        "operationId": "PUT_api_bot_v1_direct_conversations_conversationId_messages_messageId_reaction",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "PUT /api/bot/v1/direct-conversations/{conversationId}/messages/{messageId}/reaction",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageInteractions"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 27,
          "routeBodySha256": "02ba1e1ef353c1be794eb7177040923384b666ff7c82581619b3a3edb0466e7e"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessageReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/applications": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_secure_applications",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/secure/applications",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 100,
          "routeBodySha256": "519ec9d7c178da0b2ac96fbec3f040748ce486fb475683f4f0fe828ab953bfc3"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSecureApplicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/content-capabilities/query": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_secure_content_capabilities_query",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/secure/content-capabilities/query",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuerySecureContentCapabilitiesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 110,
          "routeBodySha256": "fc9880a33e5649a6be85b13ef4e76890e8b89fcef40174e04d97f1a2ea18b617"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySecureContentCapabilitiesRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/control": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_secure_control",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/secure/control",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "afterEpoch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureControlPageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 86,
          "routeBodySha256": "26eb1f218700c4594e7dbc27c04917c6f20a5e90a3d620a84d4e3f24051daf1e"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/key-packages/reserve": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_secure_key_packages_reserve",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/secure/key-packages/reserve",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureKeyPackageReservationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 92,
          "routeBodySha256": "bfe04b30796f2f2c496346a00700bc3042ac67a6bc1087d287831667d88516c4"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveSecureKeyPackagesRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/state": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_secure_state",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/secure/state",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureConversationStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 83,
          "routeBodySha256": "c3808e6d3296c4212dfb56fa5dafb89d06a195daafc0579bac0dfe67990d7b8b"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/secure/transitions": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_secure_transitions",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/secure/transitions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureTransitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 96,
          "routeBodySha256": "cb6ecb55954b3fb88a5ddd754912342f291ad27dedc80893d631ae55e4002e15"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSecureTransitionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/typing": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_typing",
        "tags": [
          "Личные сообщения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/typing",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectMessageRoutes.kt",
          "line": 34,
          "routeBodySha256": "60ab16f7d7ae214fcec6f5f6527ed3f26654aa36e28d2314b0d4161ee386b2bf"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/uploads": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_uploads",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/uploads",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 27,
          "routeBodySha256": "4ad0f90a5e9ed7b128bd6e1c8c0e0822928d332cfa5ea0191f932256513e4f1f"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChatUploadRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_direct_conversations_conversationId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 35,
          "routeBodySha256": "7d5710ad5f85c65c1b9052b3da6b2921b05370cd6de6f9fdefd5252625a7cf9e"
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_direct_conversations_conversationId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "DELETE /api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 39,
          "routeBodySha256": "95882693050839dde7c21e96a43d163698ab7b0ea0e991f768e5a117c1fbf4a5"
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}/chunks/{index}": {
      "put": {
        "operationId": "PUT_api_bot_v1_direct_conversations_conversationId_uploads_uploadId_chunks_index",
        "tags": [
          "Вложения"
        ],
        "summary": "PUT /api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}/chunks/{index}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 44,
          "routeBodySha256": "c95075dabd4b38eef2f68b87bc1ead84ac3974c1987aeb982659c0d64286feb5"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}/complete": {
      "post": {
        "operationId": "POST_api_bot_v1_direct_conversations_conversationId_uploads_uploadId_complete",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/direct-conversations/{conversationId}/uploads/{uploadId}/complete",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectAttachmentRoutes.kt",
          "line": 56,
          "routeBodySha256": "6e5274e20be4efb487b06d6dad1762ab20c7aeef54be461ffe56c8faf3c05e26"
        }
      }
    },
    "/api/bot/v1/e2ee/capability": {
      "get": {
        "operationId": "GET_api_bot_v1_e2ee_capability",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/e2ee/capability",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureMessagingCapabilityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 48,
          "routeBodySha256": "b09f8b0c9b4cd02b2816eb91e29cd21c232b98bc382f4fa33b36bc5656f9c26e"
        }
      }
    },
    "/api/bot/v1/e2ee/devices": {
      "post": {
        "operationId": "POST_api_bot_v1_e2ee_devices",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/e2ee/devices",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeIdentityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 44,
          "routeBodySha256": "793e7be41f3662475a1e37ee28cf9346834d95efd1e6c7746aed55ebe925682b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterE2eeDeviceRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/e2ee/devices/content-capability": {
      "get": {
        "operationId": "GET_api_bot_v1_e2ee_devices_content_capability",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/e2ee/devices/content-capability",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureDeviceContentCapabilityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 58,
          "routeBodySha256": "c1d2b599f9543e9e5ed66934131038ab58eb4b5dc502dcc00eb2b69e8ac5dea5"
        }
      },
      "put": {
        "operationId": "PUT_api_bot_v1_e2ee_devices_content_capability",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "PUT /api/bot/v1/e2ee/devices/content-capability",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureDeviceContentCapabilityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 59,
          "routeBodySha256": "077b8752f1d48b6fee2743e61337e5e2e26366c9968b8d81bf7d58015b09e863"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutSecureDeviceContentCapabilityRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/e2ee/devices/revoke": {
      "post": {
        "operationId": "POST_api_bot_v1_e2ee_devices_revoke",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/e2ee/devices/revoke",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 63,
          "routeBodySha256": "ed59c8b6f221208244b74efa6768b8213f1c14d7c3c93c9821f46b9dbfedb6a6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeSecureDeviceRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/e2ee/identity": {
      "get": {
        "operationId": "GET_api_bot_v1_e2ee_identity",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/e2ee/identity",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeBackupResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 36,
          "routeBodySha256": "e8732ce9f6f8d5507881ae1d253c8dbf8b83bc917d2f893f414595f8b1a39b16"
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_e2ee_identity",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/e2ee/identity",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeIdentityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 40,
          "routeBodySha256": "dcb1b2cb4d8056c0782305786409a99c0c8d5b66238d52bcceb13155a0751ee6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterE2eeIdentityRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/e2ee/key-packages": {
      "post": {
        "operationId": "POST_api_bot_v1_e2ee_key_packages",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/e2ee/key-packages",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureKeyPackageListResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 54,
          "routeBodySha256": "28b6cdad2b7ca5ec18e3a81e6af413af67c11112e29f1dd8a664ccef5f02aeec"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishSecureKeyPackagesRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/events/batch": {
      "post": {
        "operationId": "POST_api_bot_v1_events_batch",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/events/batch",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotEventBatchResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 25,
          "routeBodySha256": "737939b253e2ee4015316288fbf11c6594d06988406bb0bc6bfd8b6f60ddf0de"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotEventBatchRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/gateway/wait": {
      "post": {
        "operationId": "POST_api_bot_v1_gateway_wait",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/gateway/wait",
        "description": "Подсказка об изменении авторизованного состояния. Не подтверждает получение событий: после wakeup перечитайте соответствующие страницы и сохраните их курсоры.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotGatewayWaitResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotGatewayWaitRoutes.kt",
          "line": 18,
          "routeBodySha256": "06ba3d3a34fc20fe22ba564db0ab2b5e90ed25800e028134763d7f3c2403a4f5"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotGatewayWaitRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations": {
      "get": {
        "operationId": "GET_api_bot_v1_installations",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotInstallationResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 107,
          "routeBodySha256": "2d27c788f2e6ded7dbcabb69f5652811a07d1f3d019216e2311609736585dad4"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CommunityChannelResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 73,
          "routeBodySha256": "02e3845b5675fed863e9ae4cab0346e4c4ba40efbf9ab64d2ed6a42530e2da8c"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/actions": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_channels_channelId_actions",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/channels/{channelId}/actions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotActionBindingView"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 74,
          "routeBodySha256": "cd822b6d7463d48d1ffe26aaee2b02eef1ee0b1d0bf50a39946c5c6de5f5250b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterBotActionsRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/admission": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_admission",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/admission",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotManagedAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 29,
          "routeBodySha256": "86840bf84a5e87ec8162569bc6a09959eb7054cfd85805f927745336a9f72231"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "maxProperties": 0
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/bans": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_bans",
        "tags": [
          "Участники и роли"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/bans",
        "description": "Возвращает текущий авторизованный ресурс. members.moderate; права установившего человека, доступ канала и ограничения на роль цели проверяются заново.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "afterUserId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotBanPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModerationRoutes.kt",
          "line": 33,
          "routeBodySha256": "123879990393b289cb1162f5fea2495529c6c8a315287164837570ba0163fa97"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/compat/by-id/{compatId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_compat_by_id_compatId",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/compat/by-id/{compatId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "compatId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 63,
          "routeBodySha256": "0473b49c549e00cc6c559bbf671428a9ff33e3958558b1dc77b7a9138c5c3176"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/compat/{kind}/{nativeId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_compat_kind_nativeId",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/compat/{kind}/{nativeId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "USER",
                "APPLICATION",
                "COMMUNITY",
                "CHANNEL",
                "DIRECT",
                "ROLE",
                "SYSTEM_ROLE",
                "CHANNEL_MESSAGE",
                "CHANNEL_THREAD_MESSAGE",
                "DIRECT_MESSAGE",
                "DIRECT_THREAD_MESSAGE",
                "ATTACHMENT",
                "COMMAND",
                "INTERACTION",
                "INTERACTION_REPLY",
                "INTERACTION_ATTACHMENT"
              ]
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "nativeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 68,
          "routeBodySha256": "748725da432ec3d325964aaebcc2d87a67b35da192885891eac71b995dc88136"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/events": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_events",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/events",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotEventPageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 51,
          "routeBodySha256": "3fcd896f8e7f257db36bc7be2fe77c2609af62c4a7baa7de167a5d50f89aecef"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/history": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_history",
        "tags": [
          "История"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/history",
        "description": "Возвращает текущий авторизованный ресурс. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotHistoryStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 33,
          "routeBodySha256": "34201e5ee95d2b77999c8a9b96b2657f21d86bea71c05ba25adb320bbe9fca3c"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/history/epochs": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_history_epochs",
        "tags": [
          "История"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/history/epochs",
        "description": "Возвращает текущий авторизованный ресурс. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "afterEpoch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotHistoryEpochPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 34,
          "routeBodySha256": "c9bcf01327e44d525f2e754cf262d0806f03b299f1e118b2218e65a83c45c48a"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}": {
      "delete": {
        "operationId": "DELETE_api_bot_v1_installations_installationId_channels_channelId_members_userId",
        "tags": [
          "Участники и роли"
        ],
        "summary": "DELETE /api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModerationRoutes.kt",
          "line": 27,
          "routeBodySha256": "31a3347c07c40034321f036810d265d5597190a1fb018604a371d983dbe96145"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}/moderation": {
      "patch": {
        "operationId": "PATCH_api_bot_v1_installations_installationId_channels_channelId_members_userId_moderation",
        "tags": [
          "Участники и роли"
        ],
        "summary": "PATCH /api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}/moderation",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. members.moderate; права установившего человека, доступ канала и ограничения на роль цели проверяются заново.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotModerationMember"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModerationRoutes.kt",
          "line": 21,
          "routeBodySha256": "18652774ff916121d02b8a5546c0ade2cc1e3c68761f39271df2accef51bc5db"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommunityMemberModerationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}/roles/{roleId}": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_channels_channelId_members_userId_roles_roleId",
        "tags": [
          "Участники и роли"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}/roles/{roleId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. roles.assign: только выбранные allowedRoleIds и непривилегированный текущий участник. Идемпотентный результат также проверяет текущие права.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoleRoutes.kt",
          "line": 19,
          "routeBodySha256": "08e8cca75fce40f9623dfa1d278135c88b786225f263fccf3a1579615bad0098"
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_installations_installationId_channels_channelId_members_userId_roles_roleId",
        "tags": [
          "Участники и роли"
        ],
        "summary": "DELETE /api/bot/v1/installations/{installationId}/channels/{channelId}/members/{userId}/roles/{roleId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. roles.assign: только выбранные allowedRoleIds и непривилегированный текущий участник. Идемпотентный результат также проверяет текущие права.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoleRoutes.kt",
          "line": 20,
          "routeBodySha256": "df912a7e622c3d1b9752945f22afc2d45f52f5d5f9305a28958970d9d53b0d76"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_messages",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/messages",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "rootMessageId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageHistoryResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 55,
          "routeBodySha256": "d10c47282a2b30cb7426ea67a2c53e7c4e948c38585f58c4ac76588418028ee0"
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_messages",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/messages",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 23,
          "routeBodySha256": "8bd9842777baae4a9157ec07e77ee0e4a2e78ceffc49bf2b34f8877ac7862da1"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendChannelMessageRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/bulk-delete": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_messages_bulk_delete",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/bulk-delete",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 37,
          "routeBodySha256": "0af207de6c9f68e64e1fc0dcd395e2b0379f746c2be5e628262ceb70ecb65d8b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotBulkDeleteRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_messages_messageId",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "thread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Читать ответ в ветке сообщения."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageEventResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 59,
          "routeBodySha256": "17719ca9a7a33667aa80540d942b4ab51f6408a127bb73deceab03ebc4c3128b"
        }
      },
      "patch": {
        "operationId": "PATCH_api_bot_v1_installations_installationId_channels_channelId_messages_messageId",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "PATCH /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 27,
          "routeBodySha256": "f9bc0ac554d528352ec58d4735aaa839b0013c832440f99215632a0325061cb9"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannelMessageRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_installations_installationId_channels_channelId_messages_messageId",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "DELETE /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 31,
          "routeBodySha256": "6ece463f95649e5ebd096fd8bbb47f9f919b3581ed99778db607f6cddb0b616d"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/attachments/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_messages_messageId_attachments_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/attachments/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом. Этот метод возвращает только native/compat identity (BotCompatIdResponse); размеры, MIME и ключи не входят в этот ответ. Interaction attachments используют отдельную модель BotInteractionAttachmentMetadata.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "eventCursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "description": "Точный сохранённый create/update event для метаданных вложения; не даёт права скачать удалённый файл."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCompatIdResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 65,
          "routeBodySha256": "10370b164e56d30a2ba5641f604dc5a1906befaa1f49cdc8f617b1bdf2034ae2"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/attachments/{uploadId}/range": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_messages_messageId_attachments_uploadId_range",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/attachments/{uploadId}/range",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "length",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 1048576
            },
            "description": "Длина точного диапазона в байтах; SERVER_MANAGED_1 возвращает обычные байты, legacy — ciphertext. Это не HTTP Range."
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Смещение в байтах от начала файла; SERVER_MANAGED_1 не шифрует этот диапазон на уровне содержимого."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 71,
          "routeBodySha256": "1035165b8e20f5b9ae0140711d7e94106f08870325a1b1aa8aa66356413b1e4c"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/interactions": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_messages_messageId_interactions",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/interactions",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageInteractions"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 50,
          "routeBodySha256": "3443e659bc418c8ec7bc810fd69e09fd4aaeeb504d9d9d9cc5e1239f6a22d5f8"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/pin": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_channels_channelId_messages_messageId_pin",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/pin",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageInteractions"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 46,
          "routeBodySha256": "2b873e07b178cb5b4fb8a863ffcbb1e698b0d017f1f632551c25ea477bd81e09"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessagePinRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/reaction": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_channels_channelId_messages_messageId_reaction",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/channels/{channelId}/messages/{messageId}/reaction",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageInteractions"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 42,
          "routeBodySha256": "23eea30f1f35f06b374f01c9f665cba02b9dc52a1420430874946686bfdb41fa"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetMessageReactionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/permissions": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_permissions",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/permissions",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotOwnPermissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 48,
          "routeBodySha256": "2f0b2ec87fc7f99017ec7e868543076b547d6e566e57c56a518305277e52a441"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/pins": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_pins",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/pins",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotPinnedMessages"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 53,
          "routeBodySha256": "4b67de3557de39df0a1ba9c079b24bd14307ad0cbd83996af11917dd48517e3f"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/applications": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_applications",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/applications",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 94,
          "routeBodySha256": "c5a12522b9e25ff5070613423f65e29dcb606e15fcc9b5a9cf7d5fae2d8d0bc6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSecureApplicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/content-capabilities/query": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_content_capabilities_query",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/content-capabilities/query",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuerySecureContentCapabilitiesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 103,
          "routeBodySha256": "46cc7fb66a45501c02f67d877fd5fa10cbc90b0a486df5258e1d43094889d4e8"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySecureContentCapabilitiesRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/control": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_secure_control",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/control",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "afterEpoch",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureControlPageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 81,
          "routeBodySha256": "60c525c88debd8e4a069919d5445f7ffbdc5539c60fa0de15cc3253b0ca921c5"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 108,
          "routeBodySha256": "62d9aee22c4df2159cef17d45cd5cda94b44ffd524ef67ef476b64d805fe36e1"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSecureCooperativeAdmissionRequest"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionListResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 112,
          "routeBodySha256": "6f39f7e1f6064a6756c90bf2b8a8087183be60ac5d7021340f5d5ba7e66c90c2"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions_requestId",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 113,
          "routeBodySha256": "50d359adf553c8e321f64b0d06b627ce49b171a4442a7dbb46c0b9a946d6f1bd"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/approve": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions_requestId_approve",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/approve",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 119,
          "routeBodySha256": "03fe8ec0d892696c99a508b0c092c83349255f06fea8ef5773797a154c75559f"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApproveSecureCooperativeAdmissionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/cancel": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions_requestId_cancel",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/cancel",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 123,
          "routeBodySha256": "c15951b80399603ced9bf1df59737c2897d6d82abee540048066dd78a073044a"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/claim": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions_requestId_claim",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/claim",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 114,
          "routeBodySha256": "84e278f13749bbd6ca73772f060e41e0a0e59eedb25bf93f6694aefbd453fce7"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/proposal": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_cooperative_admissions_requestId_proposal",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/cooperative-admissions/{requestId}/proposal",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 115,
          "routeBodySha256": "ea2b63be5f5acb3d431b861326fb04bcab2f93f2af8cef2d1885a81878594006"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProposeSecureCooperativeAdmissionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/history-grants/query": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_history_grants_query",
        "tags": [
          "История"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/history-grants/query",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureHistoryGrantsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 39,
          "routeBodySha256": "1986d34835b36d9b36dd7a6ed77ff3707c93870234c8a9e1469926d6780a3c30"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuerySecureHistoryGrantsRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/key-packages/reserve": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_key_packages_reserve",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/key-packages/reserve",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureKeyPackageReservationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 86,
          "routeBodySha256": "7337bffdded6aad0c29c269d629a805225dd0361ff5413825764a223059cd52f"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReserveSecureKeyPackagesRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/state": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_secure_state",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/state",
        "description": "Возвращает текущий авторизованный ресурс. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureConversationStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 78,
          "routeBodySha256": "d47de9caf6c211d047accbec18ad616137ca5af6709e5934b14f64bbe2b27d36"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/secure/transitions": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_secure_transitions",
        "tags": [
          "Допуск и совместимость"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/secure/transitions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Устаревший MLS API не заменяет managed admission/messages. Для SERVER_MANAGED_1 используйте negotiated capability и обычные content routes; не создавайте фиктивные epoch, key grant или envelope.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SecureTransitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 90,
          "routeBodySha256": "7dd37000b466ec9125648fcaaa61d3e1f86bd4623cccfd75ee3907990c0bc875"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitSecureTransitionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/typing": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_typing",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/typing",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageRoutes.kt",
          "line": 56,
          "routeBodySha256": "a7df3b464858e458350aaae71cdf720cea9a81f5c550ba9b34d13dd9c8c80cc3"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/uploads": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_uploads",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/uploads",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 27,
          "routeBodySha256": "3394b9bf1dac007d97eac75b1e472d51bc612f3366e6ab995c05db3231f8dd32"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChatUploadRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_channels_channelId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 36,
          "routeBodySha256": "755bf7f84613be408ee5eb554802fc8308c743001a59347a93106110a8b407aa"
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_installations_installationId_channels_channelId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "DELETE /api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 41,
          "routeBodySha256": "edcacce1379a92415884e8bf281d3b772bc6d3646804dd7d9bf56888d990fad0"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}/chunks/{index}": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_channels_channelId_uploads_uploadId_chunks_index",
        "tags": [
          "Вложения"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}/chunks/{index}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 47,
          "routeBodySha256": "81bcf17d4240c405cda2eae4bf57decf2da436c28b76354a4e1589555cf96ec1"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}/complete": {
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_channels_channelId_uploads_uploadId_complete",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/channels/{channelId}/uploads/{uploadId}/complete",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotAttachmentRoutes.kt",
          "line": 59,
          "routeBodySha256": "565a67883478af2838746d8a94d192f6273669c13fa092e53268e0c3ace147fc"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/commands": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_commands",
        "tags": [
          "Команды"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/commands",
        "description": "Возвращает текущий авторизованный ресурс. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 15,
          "routeBodySha256": "cebb7d4b1598c96a57c92484960a3534a4b88c292261c3aa0ad69864520b7cc9"
        }
      },
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_commands",
        "tags": [
          "Команды"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/commands",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 19,
          "routeBodySha256": "157a97e5e7b4c4e948c0777478fd6a0f414c521316bebfeadbd79c940f50098b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceBotCommandsRequest"
              }
            }
          }
        }
      },
      "post": {
        "operationId": "POST_api_bot_v1_installations_installationId_commands",
        "tags": [
          "Команды"
        ],
        "summary": "POST /api/bot/v1/installations/{installationId}/commands",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 24,
          "routeBodySha256": "b12b1e8eae71b7fd24cc99c934161dd486a9ce795395be3e3922254224b8e0ee"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotCommandDefinition"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/commands/{commandId}": {
      "put": {
        "operationId": "PUT_api_bot_v1_installations_installationId_commands_commandId",
        "tags": [
          "Команды"
        ],
        "summary": "PUT /api/bot/v1/installations/{installationId}/commands/{commandId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 29,
          "routeBodySha256": "5813c90bf90323b2bf71d37d330f5f7bfb4374164fddd204a99941c6f9bdf5ec"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotCommandDefinition"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_installations_installationId_commands_commandId",
        "tags": [
          "Команды"
        ],
        "summary": "DELETE /api/bot/v1/installations/{installationId}/commands/{commandId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Требуется commands.manage; каталог не создаёт message/history authority. PUT коллекции заменяет весь каталог, POST добавляет/обновляет одну команду.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "commandId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandRoutes.kt",
          "line": 34,
          "routeBodySha256": "4f3d1f25f06693a6c74330985a4930344e6d2aa4025a073f3a4895fd30ee9880"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/community": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_community",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/community",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSecureRoutes.kt",
          "line": 69,
          "routeBodySha256": "b9d5c46f67ea4ece3cfb22bef9555781fd5e6d1e09172c48ef59d935795ae261"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/members": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_members",
        "tags": [
          "Участники и роли"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/members",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMemberPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 39,
          "routeBodySha256": "490786a5b52cfe2be473c19eddf09000acde6a86c9cdfad5ac1447da68d59204"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/members/{userId}": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_members_userId",
        "tags": [
          "Участники и роли"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/members/{userId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotPublicMember"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 43,
          "routeBodySha256": "7ab7973b609773ef71568b9ca8d8d5583af6e86afd216897fcabef6bb0817f34"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/metadata/changes": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_metadata_changes",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/metadata/changes",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMetadataChangesResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 31,
          "routeBodySha256": "55122a09db77be00d6fc8964029977f3c900ff0d87b452e4597c67928c068d4b"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/roles": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_roles",
        "tags": [
          "Участники и роли"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/roles",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotPublicRole"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 46,
          "routeBodySha256": "e7c23dc44cb8ea854ccd162759761a113ff1f3c8d07ab9b2d37563123a003d21"
        }
      }
    },
    "/api/bot/v1/installations/{installationId}/voice-states": {
      "get": {
        "operationId": "GET_api_bot_v1_installations_installationId_voice_states",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/installations/{installationId}/voice-states",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "afterChannelId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "afterUserId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Максимальное число элементов страницы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotVoiceStatePage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventRoutes.kt",
          "line": 35,
          "routeBodySha256": "d50d5887b49df5a1b5f0fa5a84bd9eeefc083b0a08d40608bb02b3a6e3d80fb0"
        }
      }
    },
    "/api/bot/v1/interactions": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 10
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 90,
          "routeBodySha256": "75a0d7ecfd945792a94ef29b2367372879690bf6d9fb9de210b1d37f44f60a30"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 136,
          "routeBodySha256": "d80bc185fb1959737bde573a1bcb58d3a48601fe12629b89b234c7f5cfa3e3c1"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/attachments/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_attachments_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/attachments/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionAttachmentMetadata"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 48,
          "routeBodySha256": "97fea645435e565afd2c695ca042f0a105b2c65eb58e196aa50c132f68aea2a1"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/attachments/{uploadId}/range": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_attachments_uploadId_range",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/attachments/{uploadId}/range",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "length",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 1048576
            },
            "description": "Длина точного диапазона в байтах; SERVER_MANAGED_1 возвращает обычные байты, legacy — ciphertext. Это не HTTP Range."
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Смещение в байтах от начала файла; SERVER_MANAGED_1 не шифрует этот диапазон на уровне содержимого."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 49,
          "routeBodySha256": "bbc7f83993fedfb209007d75fe52a3815f82b40aee566852b6e009de2d84d747"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/command": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_command",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/command",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 122,
          "routeBodySha256": "652676b1e0b3b206b5707fc95a53e18d23455a9d5d9ebeb574df53b803b093cd"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/context": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_context",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/context",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "includeSnapshot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Добавить текущий interaction и авторизованный source (managedBody в SERVER_MANAGED_1) в ту же context-транзакцию. Только одно строгое true/false; snapshot не даёт права на mutation."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionContextResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 126,
          "routeBodySha256": "3de469ca90d81c7f9e49f411f522fcd2e059e2ddd86312616b9a41c4927449a8"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/public-responses": {
      "post": {
        "operationId": "POST_api_bot_v1_interactions_interactionId_public_responses",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "POST /api/bot/v1/interactions/{interactionId}/public-responses",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicBotInteractionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 100,
          "routeBodySha256": "071ae2f616958abb109462586648c5ab6dd78d9c11d1b82f7ce5cf6833c0d5e4"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespondPublicBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/replies/{replyId}": {
      "patch": {
        "operationId": "PATCH_api_bot_v1_interactions_interactionId_replies_replyId",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "PATCH /api/bot/v1/interactions/{interactionId}/replies/{replyId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "replyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 80,
          "routeBodySha256": "35753f1d02c22020c90aa048033b85bb09caed4ddc777dd1b9da86455cf86e9e"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditPrivateBotReplyRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_interactions_interactionId_replies_replyId",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "DELETE /api/bot/v1/interactions/{interactionId}/replies/{replyId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "replyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 85,
          "routeBodySha256": "62bd5dae69437c9702f6e3b269deeae68a445d6c382a30075dde7a9bc489e4a2"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeletePrivateBotReplyRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/responses": {
      "post": {
        "operationId": "POST_api_bot_v1_interactions_interactionId_responses",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "POST /api/bot/v1/interactions/{interactionId}/responses",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 96,
          "routeBodySha256": "926231390dee8a285b5fa6586d24d64c0f7baf249b4b33062f38fbb573c4c897"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespondBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/source-envelope": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_source_envelope",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/source-envelope",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotMessageEventResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 132,
          "routeBodySha256": "5b5b14e7bbe0e816d3702a35e838472267d49fd01b40ceade4414b61243a914d"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/source-operations": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_source_operations",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/source-operations",
        "description": "Возвращает только метаданные точной принятой source-операции из атомарного interaction receipt. Текущие actor/application/install-or-consent/channel/audience/device и права private/modal ancestors сохраняются; изменившаяся source revision не стирает исторический факт. sourceCurrent=false означает принятую, но уже заменённую/удалённую генерацию. Отсутствующий receipt — неизвестный исход; ни этот ответ, ни старый receipt не разрешают новую команду или повторную запись. Срок исходного interaction не продлевается.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "requestId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Точная native операция; передаётся вместе с requestSha256. Не SDK operation UUID, если их mapping различается."
          },
          {
            "name": "requestSha256",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "description": "SHA256 точного канонического native запроса; передаётся вместе с requestId. Без обоих параметров проверяется только текущая eligibility. Отсутствие receipt — неизвестный исход, не разрешение повторить запись."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSourceOperationStatus"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 112,
          "routeBodySha256": "bb6f80236dd8576d067639651ba2c390583b68dac041b82e4dde8a9ff4300124"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/source-response": {
      "post": {
        "operationId": "POST_api_bot_v1_interactions_interactionId_source_response",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "POST /api/bot/v1/interactions/{interactionId}/source-response",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSourceInteractionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 104,
          "routeBodySha256": "26f171bab6e337f84807911768b4f12f452ebab756698ec1fc9254ec764699f9"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RespondSourceBotInteractionRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_interactions_interactionId_source_response",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "DELETE /api/bot/v1/interactions/{interactionId}/source-response",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSourceInteractionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 118,
          "routeBodySha256": "1b7bc5b150d692042eda2e9e5caebf212577ed5dfe30c39ab57ebc86b0009863"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteSourceBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/source-target": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_source_target",
        "tags": [
          "Взаимодействия"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/source-target",
        "description": "Возвращает текущий авторизованный ресурс. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotSourceInteractionTarget"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 108,
          "routeBodySha256": "1ef1d249df764de1a9ba7d1b840dc6f30365949eaf4da34f7ae719214b86abb7"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/uploads": {
      "post": {
        "operationId": "POST_api_bot_v1_interactions_interactionId_uploads",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/interactions/{interactionId}/uploads",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 39,
          "routeBodySha256": "f93e183da8d1e616b988c3038c2e1abb07604e0d962412981de3e346cfa3d66b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChatUploadRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/uploads/{uploadId}": {
      "get": {
        "operationId": "GET_api_bot_v1_interactions_interactionId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "GET /api/bot/v1/interactions/{interactionId}/uploads/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 56,
          "routeBodySha256": "48d1571b3f3464fe8b7533742092f7c8ef984f824d2f6ffbb307976cde418f05"
        }
      },
      "delete": {
        "operationId": "DELETE_api_bot_v1_interactions_interactionId_uploads_uploadId",
        "tags": [
          "Вложения"
        ],
        "summary": "DELETE /api/bot/v1/interactions/{interactionId}/uploads/{uploadId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 57,
          "routeBodySha256": "049208f613bbafd0adbdec0c3c527f5aedbee92e9bbf68d43844937e392f30b5"
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/uploads/{uploadId}/chunks/{index}": {
      "put": {
        "operationId": "PUT_api_bot_v1_interactions_interactionId_uploads_uploadId_chunks_index",
        "tags": [
          "Вложения"
        ],
        "summary": "PUT /api/bot/v1/interactions/{interactionId}/uploads/{uploadId}/chunks/{index}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 59,
          "routeBodySha256": "dcbfe0f765ce23e0ff95b60081ea9218e4159e8f4e6da693286f813b0d788956"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/interactions/{interactionId}/uploads/{uploadId}/complete": {
      "post": {
        "operationId": "POST_api_bot_v1_interactions_interactionId_uploads_uploadId_complete",
        "tags": [
          "Вложения"
        ],
        "summary": "POST /api/bot/v1/interactions/{interactionId}/uploads/{uploadId}/complete",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. В SERVER_MANAGED_1 передаются обычные байты файла и фактический MIME; текущие attachments.write/messages.write, точный владелец, scope и custody проверяются сервером. Старый application/vnd.teamyfy.e2ee не является managed MIME. Срок действия, requestId и точная source/reply revision обязательны там, где они есть в модели. В SERVER_MANAGED_1 вызовы/ответы содержат server-readable managedBody; авторизация actor/device/install-or-consent/generation и точные retry receipts сохраняются.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 58,
          "routeBodySha256": "134fd0cfa7bf5bbf8a45b76121cae105e478cab126f08256f05c721119ceb6a0"
        }
      }
    },
    "/api/bot/v1/me": {
      "get": {
        "operationId": "GET_api_bot_v1_me",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "GET /api/bot/v1/me",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotIdentityResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 106,
          "routeBodySha256": "90adb5218d8c58d478295264d5f1c15af9b3f9871c8e43911de66c786242f3b8"
        }
      }
    },
    "/api/bot/v1/presence": {
      "put": {
        "operationId": "PUT_api_bot_v1_presence",
        "tags": [
          "Метаданные и события"
        ],
        "summary": "PUT /api/bot/v1/presence",
        "description": "Продлевает device-qualified lease присутствия. Используйте heartbeatIntervalSeconds/expiresAt из ответа; установка приложения сама по себе не делает бота online.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotPresenceResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPresenceRoutes.kt",
          "line": 14,
          "routeBodySha256": "4c826b19cce9da3bef38628a52d64eb248101089f67f52a981d1675702c3ce14"
        }
      }
    },
    "/api/bot/v1/voice/sessions": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotVoiceSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 23,
          "routeBodySha256": "13a42b0d0529e1d44dfcee84a48d0a7c45e7cbd2b91c85fdb01c68502c0a30db"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JoinBotVoiceRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}": {
      "delete": {
        "operationId": "DELETE_api_bot_v1_voice_sessions_reservationId",
        "tags": [
          "Голос"
        ],
        "summary": "DELETE /api/bot/v1/voice/sessions/{reservationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 32,
          "routeBodySha256": "2490b2c7e46f99aa6817196a752eb0ba58df3ed2ff09043dec82686ed44326b3"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotVoiceGenerationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/heartbeat": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_heartbeat",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/heartbeat",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotVoiceHeartbeatResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 28,
          "routeBodySha256": "765e2508f1d69d9e07c6254976b83248a1357db5cfacf3c0b0ec338729a705d5"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BotVoiceGenerationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/epoch": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_media_epoch",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/media/epoch",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён. Этот endpoint относится только к legacy protocol 1 и не вызывается новым подключением media protocol 0.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeRoomEpochResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 45,
          "routeBodySha256": "ccaae48e4b85f570cb16e50333eb54510239714c42c14ddd83a981ada49b7cdc"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/E2eeRoomStateRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/key": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_media_key",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/media/key",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён. Этот endpoint относится только к legacy protocol 1 и не вызывается новым подключением media protocol 0.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeRoomStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 49,
          "routeBodySha256": "364e74e3e1d91a9c1dd25f79474fc4583055508fa1df8324a0131277a62b3dbe"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishE2eeRoomKeyRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/publication": {
      "put": {
        "operationId": "PUT_api_bot_v1_voice_sessions_reservationId_media_publication",
        "tags": [
          "Голос"
        ],
        "summary": "PUT /api/bot/v1/voice/sessions/{reservationId}/media/publication",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaPublicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 61,
          "routeBodySha256": "5f0e07d62044edb3863fa4290351ec5587597841935966a2eee16cd9a50f5bd7"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMediaPublicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/state": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_media_state",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/media/state",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён. Этот endpoint относится только к legacy protocol 1 и не вызывается новым подключением media protocol 0.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/E2eeRoomStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 41,
          "routeBodySha256": "f2a7bbfa18bb525bcb38d972dd3b8270e7092e5237d35d4ae692291e83cb36db"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/E2eeRoomStateRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/voice/publisher-key": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_media_voice_publisher_key",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/media/voice/publisher-key",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён. Legacy protocol 2: подписанная publisher head связана с точными sessionId, leaseId, generation и сертифицированным roster. keyIndex=0; переходы INITIAL, ADD_RATCHET, REMOVE_RESEED. Для legacy publisher head успешный ответ требует ACK текущей provider policy после фиксации head. При 503/потере ответа допускается точный повтор того же envelope; нельзя молча выпускать следующее поколение. ACK может подтвердить законный moderator DENY и не означает слышимый звук.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoicePublisherKeyStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 57,
          "routeBodySha256": "2ef78339e029645002a4ace883dafbbd108ae0475f906c4051e2d3aa486bf1f6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublishVoicePublisherKeyRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/media/voice/state": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_media_voice_state",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/media/voice/state",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён. Legacy protocol 2: подписанная publisher head связана с точными sessionId, leaseId, generation и сертифицированным roster. keyIndex=0; переходы INITIAL, ADD_RATCHET, REMOVE_RESEED.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoicePublisherKeyStateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 53,
          "routeBodySha256": "356b7b7b91cdaa4956e55704c8fa12392c09852a1a29ed07322dceae30e5b810"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoicePublisherKeyStateRequest"
              }
            }
          }
        }
      }
    },
    "/api/bot/v1/voice/sessions/{reservationId}/move": {
      "post": {
        "operationId": "POST_api_bot_v1_voice_sessions_reservationId_move",
        "tags": [
          "Голос"
        ],
        "summary": "POST /api/bot/v1/voice/sessions/{reservationId}/move",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. REST управляет reservation, generation и публикацией; аудио передаётся через отдельный RTC transport. voice.connect/voice.speak и, для прослушивания, voice.listen проверяются сервером. Новые VOICE/SPEAKER reservations требуют явного encryptionProtocolVersion=0 до входа; TLS/WebRTC transport защищён, сервер может обрабатывать media-содержимое. Тип канала берётся из разрешённого каталога; откат версии после ошибки запрещён.",
        "security": [
          {
            "BotAuthorization": []
          }
        ],
        "parameters": [
          {
            "name": "reservationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotVoiceSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Общий budget бота или локальный лимит ожидания. Соблюдайте Retry-After; retry_after в теле указан в секундах.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/BotRateLimitError"
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceRoutes.kt",
          "line": 37,
          "routeBodySha256": "53175e9a5b1b47d7eeed0cd7d524259e773dd7f2e3cb3f8bb58dca9d3289aae6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoveBotVoiceRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications": {
      "get": {
        "operationId": "GET_api_v1_bot_applications",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/bot-applications",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotApplicationResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 25,
          "routeBodySha256": "69e12cd1673e2e3623d64c690af42e7da5edb7eb5b5c42b2ffc1d053162fc128"
        }
      },
      "post": {
        "operationId": "POST_api_v1_bot_applications",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/bot-applications",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 26,
          "routeBodySha256": "dc0d70366e28130e71f0b0f572cc5ddfa2ffffcc0809c8749767d47c1eef6955"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotApplicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications/public": {
      "get": {
        "operationId": "GET_api_v1_bot_applications_public",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/bot-applications/public",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": ""
            },
            "description": "Строка поиска публичных приложений."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotPublicApplicationPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 31,
          "routeBodySha256": "9e79e5ab3b5d5a524a1b6a6db4f21a168c588768621645913a4ca01114a0b56a"
        }
      }
    },
    "/api/v1/bot-applications/resolve-install-key": {
      "post": {
        "operationId": "POST_api_v1_bot_applications_resolve_install_key",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/bot-applications/resolve-install-key",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInstallableApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 39,
          "routeBodySha256": "f1410175d515930f3cf579d25e5639ab68e8067270209e50a352d1ae33f8d00d"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveBotInstallationKeyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications/{applicationId}": {
      "patch": {
        "operationId": "PATCH_api_v1_bot_applications_applicationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "PATCH /api/v1/bot-applications/{applicationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotApplicationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 44,
          "routeBodySha256": "ed67976ebacbe05d4a3d65561a090c94eab3f3286885551c1c1b3e512f943ccb"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBotApplicationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications/{applicationId}/credentials": {
      "get": {
        "operationId": "GET_api_v1_bot_applications_applicationId_credentials",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/bot-applications/{applicationId}/credentials",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotCredentialResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 72,
          "routeBodySha256": "9ad57213d59fbf998755455e449bcfa6d31f383c1b1697aa80f70c1b2a29b4e9"
        }
      },
      "post": {
        "operationId": "POST_api_v1_bot_applications_applicationId_credentials",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/bot-applications/{applicationId}/credentials",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedBotCredentialResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 73,
          "routeBodySha256": "ee1cab98c0d42f5f57cdafbcd3ead4c7dc9eed73539488976bbba33bab9336d0"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotCredentialRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications/{applicationId}/credentials/{credentialId}": {
      "delete": {
        "operationId": "DELETE_api_v1_bot_applications_applicationId_credentials_credentialId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/bot-applications/{applicationId}/credentials/{credentialId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "credentialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 78,
          "routeBodySha256": "26acbf8c984857db9339d109870089d7226745e64735b492a88729be900340a6"
        }
      }
    },
    "/api/v1/bot-applications/{applicationId}/installation-keys": {
      "get": {
        "operationId": "GET_api_v1_bot_applications_applicationId_installation_keys",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/bot-applications/{applicationId}/installation-keys",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotInstallationKeyResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 50,
          "routeBodySha256": "6d976f0d9c0003de4490b8f236be992546f998fedf27488cc270cd87e3ff547d"
        }
      },
      "post": {
        "operationId": "POST_api_v1_bot_applications_applicationId_installation_keys",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/bot-applications/{applicationId}/installation-keys",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssuedBotInstallationKeyResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 54,
          "routeBodySha256": "990e0102fcf9558f911bc3c9311cd275fcf846ed4eb7078d0d8f4e1c035a85d3"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotInstallationKeyRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/bot-applications/{applicationId}/installation-keys/{keyId}": {
      "delete": {
        "operationId": "DELETE_api_v1_bot_applications_applicationId_installation_keys_keyId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/bot-applications/{applicationId}/installation-keys/{keyId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "expectedRevision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Точная наблюдаемая ревизия; при конфликте перечитайте ресурс."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 61,
          "routeBodySha256": "6c28bf7a163b4a68591591a12b7385ed054f4f21f69b19a363585dae273fc07a"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-actions/inspect": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_actions_inspect",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-actions/inspect",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotActionBindingView"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 36,
          "routeBodySha256": "20d7b2ccd2d97256b04d0057598a8a6e23615586be58a31f8d5b9538d0e936d3"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InspectBotActionsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-actions/prepare": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_actions_prepare",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-actions/prepare",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 40,
          "routeBodySha256": "1ad451a86e1ddf7996c8770d45f1e4983ac6b2a3014135672e405eb1592f1760"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareBotActionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-commands": {
      "get": {
        "operationId": "GET_api_v1_channels_channelId_bot_commands",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/channels/{channelId}/bot-commands",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5,
              "default": 5
            },
            "description": "Максимальное число элементов страницы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotChannelCommandPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 44,
          "routeBodySha256": "8cea6f4c535a9fad5294fd0d997117ea612dc0cb6f61214ce9f1fcabb10f1190"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interaction-uploads": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_interaction_uploads",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-interaction-uploads",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 20,
          "routeBodySha256": "57e25b8a44f491a4a28dfa9898eeebc12f16357c6cd7a372124e2c7d5f852a44"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotInteractionDraftUpload"
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}": {
      "get": {
        "operationId": "GET_api_v1_channels_channelId_bot_interaction_uploads_uploadId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 56,
          "routeBodySha256": "48d1571b3f3464fe8b7533742092f7c8ef984f824d2f6ffbb307976cde418f05"
        }
      },
      "delete": {
        "operationId": "DELETE_api_v1_channels_channelId_bot_interaction_uploads_uploadId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 57,
          "routeBodySha256": "049208f613bbafd0adbdec0c3c527f5aedbee92e9bbf68d43844937e392f30b5"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}/chunks/{index}": {
      "put": {
        "operationId": "PUT_api_v1_channels_channelId_bot_interaction_uploads_uploadId_chunks_index",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "PUT /api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}/chunks/{index}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 59,
          "routeBodySha256": "dcbfe0f765ce23e0ff95b60081ea9218e4159e8f4e6da693286f813b0d788956"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/octet-stream": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}/complete": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_interaction_uploads_uploadId_complete",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-interaction-uploads/{uploadId}/complete",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatUploadSessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 58,
          "routeBodySha256": "134fd0cfa7bf5bbf8a45b76121cae105e478cab126f08256f05c721119ceb6a0"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interactions/prepare": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_interactions_prepare",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-interactions/prepare",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 51,
          "routeBodySha256": "ec649ab2769d994cb88fed37f9edf6b0aab3dda8ed010273bcc8d8abfc9ec1e0"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interactions/{interactionId}": {
      "get": {
        "operationId": "GET_api_v1_channels_channelId_bot_interactions_interactionId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/channels/{channelId}/bot-interactions/{interactionId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 56,
          "routeBodySha256": "851e86bb28c169883aa74a8cacd7e95fe1090d619f4dc6b371a9d5f512ca1ce6"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interactions/{interactionId}/attachments/{uploadId}": {
      "get": {
        "operationId": "GET_api_v1_channels_channelId_bot_interactions_interactionId_attachments_uploadId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/channels/{channelId}/bot-interactions/{interactionId}/attachments/{uploadId}",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionAttachmentMetadata"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 29,
          "routeBodySha256": "f8477263b5fd99ebfce02ece800f365f3a6270deeb74dab7b40304f1d30adaf1"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interactions/{interactionId}/attachments/{uploadId}/range": {
      "get": {
        "operationId": "GET_api_v1_channels_channelId_bot_interactions_interactionId_attachments_uploadId_range",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/channels/{channelId}/bot-interactions/{interactionId}/attachments/{uploadId}/range",
        "description": "Возвращает текущий авторизованный ресурс. Чтение требует attachments.read, текущий допуск и читаемое сообщение/взаимодействие. В SERVER_MANAGED_1 range возвращает обычные авторизованные байты, связанные с content digest и исходным ресурсом.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "length",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 1,
              "maximum": 1048576
            },
            "description": "Длина точного диапазона в байтах; SERVER_MANAGED_1 возвращает обычные байты, legacy — ciphertext. Это не HTTP Range."
          },
          {
            "name": "offset",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Смещение в байтах от начала файла; SERVER_MANAGED_1 не шифрует этот диапазон на уровне содержимого."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentRoutes.kt",
          "line": 31,
          "routeBodySha256": "cc102a46589085c6dd250f35af14d0e06840ae7fad671d75e40e8100b8603f40"
        }
      }
    },
    "/api/v1/channels/{channelId}/bot-interactions/{interactionId}/submit": {
      "post": {
        "operationId": "POST_api_v1_channels_channelId_bot_interactions_interactionId_submit",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/channels/{channelId}/bot-interactions/{interactionId}/submit",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 60,
          "routeBodySha256": "3aa3026a0978ab1072f27b7da7fdcb4e05a02c080cc0546fd6423e883a2faeb6"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/communities/{communityId}/bot-installations": {
      "get": {
        "operationId": "GET_api_v1_communities_communityId_bot_installations",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/communities/{communityId}/bot-installations",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotInstallationResponse"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 85,
          "routeBodySha256": "b141c00b4b175ede068878bc5be4797b100bf115bbf6261305f5ad000d35346d"
        }
      },
      "post": {
        "operationId": "POST_api_v1_communities_communityId_bot_installations",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/communities/{communityId}/bot-installations",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "201": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInstallationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 86,
          "routeBodySha256": "24d50d01ca2230ed796008ebaebc52b36dbcfc628d597cd3db15d8d39f512936"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutBotInstallationRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/communities/{communityId}/bot-installations/{installationId}": {
      "patch": {
        "operationId": "PATCH_api_v1_communities_communityId_bot_installations_installationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "PATCH /api/v1/communities/{communityId}/bot-installations/{installationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInstallationResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 91,
          "routeBodySha256": "fc54f088f2febf9555c3a1a0ef6f5e7f6f4885df67505b99bae091c0b2a4e2fd"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBotInstallationRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_v1_communities_communityId_bot_installations_installationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/communities/{communityId}/bot-installations/{installationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRoutes.kt",
          "line": 96,
          "routeBodySha256": "ae081ac1376907e87d7e4127bca829fd0a516c3b21d0235e8805745a00bdd2f3"
        }
      }
    },
    "/api/v1/communities/{communityId}/bot-installations/{installationId}/audit": {
      "get": {
        "operationId": "GET_api_v1_communities_communityId_bot_installations_installationId_audit",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/communities/{communityId}/bot-installations/{installationId}/audit",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Курсор/граница страницы; берите следующий курсор из ответа."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            },
            "description": "Максимальное число элементов страницы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInstallationAuditPage"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspectionRoutes.kt",
          "line": 20,
          "routeBodySha256": "415e95b4de0b6d4a91567760e5894a85265e06ee52764b4682194dd95676e90e"
        }
      }
    },
    "/api/v1/communities/{communityId}/bot-installations/{installationId}/channels/{channelId}/history": {
      "get": {
        "operationId": "GET_api_v1_communities_communityId_bot_installations_installationId_channels_channelId_history",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/communities/{communityId}/bot-installations/{installationId}/channels/{channelId}/history",
        "description": "Возвращает текущий авторизованный ресурс. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotHistoryStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 19,
          "routeBodySha256": "d428debd86f05833b6123a2763044515c9d8954b9473b99d2be0fc320f8459b8"
        }
      },
      "put": {
        "operationId": "PUT_api_v1_communities_communityId_bot_installations_installationId_channels_channelId_history",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "PUT /api/v1/communities/{communityId}/bot-installations/{installationId}/channels/{channelId}/history",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotHistoryStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 20,
          "routeBodySha256": "0c96fe48c774a160f9335c153295228b21e9d816b238bce30d9b1a58ce87de81"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutBotHistoryGrantRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_v1_communities_communityId_bot_installations_installationId_channels_channelId_history",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/communities/{communityId}/bot-installations/{installationId}/channels/{channelId}/history",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта. SERVER_MANAGED_1: полный доступ требует отдельного действующего history.read/messages.read grant, installation revision, текущего ACL и historyGeneration; status=available не зависит от ключей. Без grant действует installation/consent boundary. Epoch/key-grant API для managed content возвращает 426.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "expectedRevision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Точная наблюдаемая ревизия; при конфликте перечитайте ресурс."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotHistoryStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryRoutes.kt",
          "line": 24,
          "routeBodySha256": "c7b82a4184a516207da988ca9cffa0082807d6a7ae4c2169baac429fa83f3f97"
        }
      }
    },
    "/api/v1/communities/{communityId}/bot-installations/{installationId}/status": {
      "get": {
        "operationId": "GET_api_v1_communities_communityId_bot_installations_installationId_status",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/communities/{communityId}/bot-installations/{installationId}/status",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "communityId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "installationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInstallationStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspectionRoutes.kt",
          "line": 16,
          "routeBodySha256": "97d844eeec78299ce1c005f85cecebeba6d6c5bb98e4a3f2ebb7f881d6bb122b"
        }
      }
    },
    "/api/v1/conversations/{conversationId}/bot-actions/inspect": {
      "post": {
        "operationId": "POST_api_v1_conversations_conversationId_bot_actions_inspect",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/conversations/{conversationId}/bot-actions/inspect",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotActionBindingView"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 18,
          "routeBodySha256": "a3874d539385e71e059d1be403d6de006ad3a3693ce7cd209cd5914ffa610454"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InspectBotActionsRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{conversationId}/bot-actions/prepare": {
      "post": {
        "operationId": "POST_api_v1_conversations_conversationId_bot_actions_prepare",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/conversations/{conversationId}/bot-actions/prepare",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 22,
          "routeBodySha256": "8e4dfdd61367ee3a23b8580118d34f58586b4cd6852f1b3021259d3b21115af7"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareBotActionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{conversationId}/bot-interactions/{interactionId}": {
      "get": {
        "operationId": "GET_api_v1_conversations_conversationId_bot_interactions_interactionId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/conversations/{conversationId}/bot-interactions/{interactionId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 27,
          "routeBodySha256": "77b16cc4a6cb49800ea8ee13a1ef522101510c8c4f7676c82cb702030d2f2a01"
        }
      }
    },
    "/api/v1/conversations/{conversationId}/bot-interactions/{interactionId}/submit": {
      "post": {
        "operationId": "POST_api_v1_conversations_conversationId_bot_interactions_interactionId_submit",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "POST /api/v1/conversations/{conversationId}/bot-interactions/{interactionId}/submit",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "interactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "X-XChat-Device-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Стабильный ID текущего аутентифицированного устройства. В SERVER_MANAGED_1 регистрация не требует E2EE-ключей или сертификата пользователя."
          },
          {
            "name": "X-Teamyfy-Content-Protocol",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Явный server-managed content protocol; не версия TLS, WebRTC или URL API."
          },
          {
            "name": "X-Teamyfy-Content-Generation",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Текущая historyGeneration из capability/bootstrap; несовпадение даёт 409 до выделения content-ресурсов."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotInteractionView"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionRoutes.kt",
          "line": 31,
          "routeBodySha256": "e1b650a69f3c1bb072b2eaa18d41ab14e8b00527098b4c9c1bde032e88676d2f"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitBotInteractionRequest"
              }
            }
          }
        }
      }
    },
    "/api/v1/users/me/bot-consents/by-user/{botUserId}": {
      "get": {
        "operationId": "GET_api_v1_users_me_bot_consents_by_user_botUserId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/users/me/bot-consents/by-user/{botUserId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "botUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConsentResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 17,
          "routeBodySha256": "3a839219534ef3fc255862e7613386b1b6619a577a2946a1c8803ed483a05c13"
        }
      }
    },
    "/api/v1/users/me/bot-consents/{applicationId}": {
      "get": {
        "operationId": "GET_api_v1_users_me_bot_consents_applicationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "GET /api/v1/users/me/bot-consents/{applicationId}",
        "description": "Возвращает текущий авторизованный ресурс.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConsentResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 22,
          "routeBodySha256": "08fda72bc5bd2a521cf0cdbd99e2d9cf02bc7bf91fe92d383efd675d7d6d4f94"
        }
      },
      "put": {
        "operationId": "PUT_api_v1_users_me_bot_consents_applicationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "PUT /api/v1/users/me/bot-consents/{applicationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          }
        ],
        "responses": {
          "200": {
            "description": "Успех; default-valued/null поля могут отсутствовать в JSON.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotDirectConsentResponse"
                }
              }
            }
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 26,
          "routeBodySha256": "97cbcd022200b1351d7847c8397ec48334d7e8b005e3a63f96eb988d2f45db8b"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PutBotDirectConsentRequest"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DELETE_api_v1_users_me_bot_consents_applicationId",
        "tags": [
          "Управление и пользовательские взаимодействия"
        ],
        "summary": "DELETE /api/v1/users/me/bot-consents/{applicationId}",
        "description": "Выполняет операцию от имени текущего авторизованного субъекта.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Идентификатор текущего ресурса. Native и compatibility ID не взаимозаменяемы."
          },
          {
            "name": "expectedRevision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "description": "Точная наблюдаемая ревизия; при конфликте перечитайте ресурс."
          }
        ],
        "responses": {
          "204": {
            "description": "Нет тела ответа."
          },
          "default": {
            "description": "Ошибка валидации (400/413), авторизации (401/403), отсутствующий ресурс (404), конфликт ревизии/допуска (409) или истёкший ресурс (410). Код и message определяет конкретный service; не каждый статус возможен для каждого маршрута. См. руководство об ошибках.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectRoutes.kt",
          "line": 30,
          "routeBodySha256": "5db2ea6ef8f0d2358e359d8b9a4712e6adb6cc53b6560be5098810c93aba0ea5"
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BotAuthorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Exact value: Bot <native tmb_ credential>. This is not a human Bearer JWT or local SDK token."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Human user access token; never use a Bot credential."
      }
    },
    "schemas": {
      "ApproveSecureCooperativeAdmissionRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedApproval": {
            "type": "string"
          }
        },
        "required": [
          "signedApproval"
        ]
      },
      "BotActionBindingView": {
        "type": "object",
        "properties": {
          "bindingId": {
            "type": "string"
          },
          "bindingRevision": {
            "type": "integer",
            "format": "int64"
          },
          "actionId": {
            "type": "string"
          },
          "componentType": {
            "type": "integer",
            "format": "int32"
          },
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "expiresAt": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "bindingId",
          "bindingRevision",
          "actionId",
          "componentType",
          "source"
        ]
      },
      "BotActionDefinition": {
        "type": "object",
        "properties": {
          "actionId": {
            "type": "string"
          },
          "componentType": {
            "type": "integer",
            "format": "int32"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 10
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "actionId",
          "componentType"
        ]
      },
      "BotActionSource": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int32"
          },
          "encryptedEnvelopeSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "interactionId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 11
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "kind",
          "id",
          "revision"
        ]
      },
      "BotApplicationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "createdAt": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "visibility": {
            "type": "string",
            "default": "PRIVATE",
            "x-kotlin-default": "\"PRIVATE\""
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "default": 1,
            "x-kotlin-default": "1"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 50
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "botUserId",
          "name",
          "scopes",
          "createdAt",
          "enabled"
        ]
      },
      "BotBanPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotModerationMember"
            }
          },
          "nextAfterUserId": {
            "type": "string",
            "nullable": true
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModerationService.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "items"
        ]
      },
      "BotBulkDeleteRequest": {
        "type": "object",
        "properties": {
          "messageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageService.kt",
          "line": 17
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "messageIds"
        ]
      },
      "BotCapabilitiesResponse": {
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string"
          },
          "implemented": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 65
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "apiVersion",
          "implemented"
        ]
      },
      "BotChannelCommandApplication": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "installationId": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "botName": {
            "type": "string"
          },
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotCommandDefinitionResponse"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionService.kt",
          "line": 17
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "installationId",
          "botUserId",
          "botName",
          "commands"
        ]
      },
      "BotChannelCommandPage": {
        "type": "object",
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotChannelCommandApplication"
            }
          },
          "nextAfter": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionService.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applications",
          "hasMore"
        ]
      },
      "BotChannelEnrollmentResponse": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "channelName": {
            "type": "string"
          },
          "secureEnrollment": {
            "type": "string"
          },
          "historyMode": {
            "type": "string",
            "default": "FROM_JOIN_EPOCH",
            "x-kotlin-default": "\"FROM_JOIN_EPOCH\""
          },
          "joinedEpoch": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "admittedAt": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentProtocol": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspection.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "channelId",
          "channelName",
          "secureEnrollment"
        ]
      },
      "BotCommandChoice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "value": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              {
                "type": "number"
              }
            ],
            "description": "Matches option type: string for 3, integral number for 4, finite number for 10."
          }
        }
      },
      "BotCommandDefinition": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "description": {
            "type": "string",
            "maxLength": 100
          },
          "type": {
            "type": "integer",
            "enum": [
              1,
              2,
              3
            ],
            "default": 1
          },
          "options": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/BotCommandOption"
            },
            "default": []
          },
          "defaultMemberPermissions": {
            "type": "string",
            "nullable": true,
            "pattern": "^(0|[1-9][0-9]{0,19})$"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandCatalog.kt",
          "line": 10
        },
        "description": "Public command metadata. At most 100 distinct (type,name) definitions, encoded collection <=131072 bytes. Type 1 chat input needs a lowercase Unicode name and description; types 2/3 user/message context commands require empty description and options. Required options precede optional options. Metadata contains no private invocation arguments.",
        "required": [
          "name",
          "description"
        ]
      },
      "BotCommandDefinitionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "installationId": {
            "type": "string",
            "nullable": true
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "definition": {
            "$ref": "#/components/schemas/BotCommandDefinition"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandCatalog.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "compatId",
          "applicationId",
          "revision",
          "definition"
        ]
      },
      "BotCommandOption": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "name",
          "description"
        ],
        "description": "Source validator: BotCommandCatalog.kt validateOptions. Types: 1 = subcommand, 2 = subcommand group, 3 = string, 4 = integer, 5 = boolean, 6 = user, 7 = channel, 8 = role, 9 = mentionable, 10 = number, 11 = attachment. Depth <= 2; group only at depth 0 and contains subcommands. Subcommands/groups cannot mix with scalar options. choices/autocomplete only types 3/4/10, mutually exclusive. channel_types only type 7; numeric bounds only 4/10; length bounds only 3. These cross-field rules are checked by the server.",
        "properties": {
          "type": {
            "type": "integer",
            "minimum": 1,
            "maximum": 11
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "required": {
            "type": "boolean",
            "default": false
          },
          "options": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/BotCommandOption"
            }
          },
          "choices": {
            "type": "array",
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/BotCommandChoice"
            }
          },
          "autocomplete": {
            "type": "boolean",
            "default": false
          },
          "channel_types": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "integer",
              "enum": [
                0,
                2
              ]
            }
          },
          "min_value": {
            "type": "number"
          },
          "max_value": {
            "type": "number"
          },
          "min_length": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6000
          },
          "max_length": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6000
          }
        }
      },
      "BotCompatIdResponse": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "nativeId": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventModels.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "kind",
          "nativeId",
          "compatId",
          "createdAt"
        ]
      },
      "BotCompatSelfResponse": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/BotCompatIdResponse"
          },
          "application": {
            "$ref": "#/components/schemas/BotCompatIdResponse"
          },
          "owner": {
            "$ref": "#/components/schemas/BotPublicUser"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 23
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "user",
          "application",
          "owner"
        ]
      },
      "BotCredentialResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "createdAt": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "revoked": {
            "type": "boolean"
          },
          "neverExpires": {
            "type": "boolean",
            "default": false,
            "x-kotlin-default": "false"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 53
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "scopes",
          "createdAt",
          "expiresAt",
          "revoked"
        ]
      },
      "BotDirectConsentResponse": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string",
            "nullable": true
          },
          "compatConversationId": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "blocked": {
            "type": "boolean"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "consentGeneration": {
            "type": "string",
            "nullable": true
          },
          "requiredEpoch": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "historyMode": {
            "type": "string",
            "default": "FROM_JOIN_EPOCH",
            "x-kotlin-default": "\"FROM_JOIN_EPOCH\""
          },
          "secureEnrollment": {
            "type": "string",
            "default": "pending_keys",
            "x-kotlin-default": "\"pending_keys\""
          },
          "botName": {
            "type": "string",
            "default": "",
            "x-kotlin-default": "\"\""
          },
          "availableScopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "default": [],
            "x-kotlin-default": "emptySet()"
          },
          "contentProtocol": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectModels.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "botUserId",
          "enabled",
          "blocked",
          "revision",
          "scopes"
        ]
      },
      "BotDirectConversationPage": {
        "type": "object",
        "properties": {
          "conversations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotDirectConversationResponse"
            }
          },
          "nextAfter": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectModels.kt",
          "line": 24
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "conversations",
          "hasMore"
        ]
      },
      "BotDirectConversationResponse": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "human": {
            "$ref": "#/components/schemas/BotPublicUser"
          },
          "consentGeneration": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "requiredEpoch": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "closed": {
            "type": "boolean"
          },
          "historyMode": {
            "type": "string",
            "default": "FROM_JOIN_EPOCH",
            "x-kotlin-default": "\"FROM_JOIN_EPOCH\""
          },
          "contentProtocol": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectModels.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "conversationId",
          "compatId",
          "human",
          "consentGeneration",
          "revision",
          "scopes",
          "closed"
        ]
      },
      "BotEventBatchPage": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "page": {
            "$ref": "#/components/schemas/BotEventPageResponse"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 31
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationId",
          "channelId",
          "page"
        ]
      },
      "BotEventBatchRequest": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotEventBatchScope"
            }
          },
          "limitPerChannel": {
            "type": "integer",
            "format": "int32",
            "default": 20,
            "x-kotlin-default": "20"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 30
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "channels"
        ]
      },
      "BotEventBatchResponse": {
        "type": "object",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotEventBatchPage"
            }
          },
          "deferred": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotEventBatchScope"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 32
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "channels",
          "deferred"
        ]
      },
      "BotEventBatchScope": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "after": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 29
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationId",
          "channelId",
          "after"
        ]
      },
      "BotEventPageResponse": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotMessageEventResponse"
            }
          },
          "nextCursor": {
            "type": "string"
          },
          "highWatermark": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventModels.kt",
          "line": 32
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "events",
          "nextCursor",
          "highWatermark",
          "hasMore"
        ]
      },
      "BotGatewayWaitRequest": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "x-kotlin-default": "1"
          },
          "after": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "waitMillis": {
            "type": "integer",
            "format": "int64",
            "default": 10000,
            "x-kotlin-default": "10_000"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotGatewayWait.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer."
      },
      "BotGatewayWaitResponse": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "x-kotlin-default": "1"
          },
          "stamp": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotGatewayWait.kt",
          "line": 20
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "stamp"
        ]
      },
      "BotHistoryEpoch": {
        "type": "object",
        "properties": {
          "epoch": {
            "type": "integer",
            "format": "int64"
          },
          "keyAvailable": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryModels.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "epoch",
          "keyAvailable"
        ]
      },
      "BotHistoryEpochPage": {
        "type": "object",
        "properties": {
          "grantId": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "conversationId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "epochs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotHistoryEpoch"
            }
          },
          "nextAfterEpoch": {
            "type": "integer",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryModels.kt",
          "line": 22
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "grantId",
          "revision",
          "conversationId",
          "historyGeneration",
          "epochs",
          "nextAfterEpoch",
          "hasMore"
        ]
      },
      "BotHistoryStatusResponse": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "installationRevision": {
            "type": "integer",
            "format": "int64"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "enabled": {
            "type": "boolean"
          },
          "effective": {
            "type": "boolean"
          },
          "state": {
            "type": "string"
          },
          "historyMode": {
            "type": "string",
            "default": "FROM_JOIN_EPOCH",
            "x-kotlin-default": "\"FROM_JOIN_EPOCH\""
          },
          "grantId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "conversationId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "historyGeneration": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "availableEpochCount": {
            "type": "integer",
            "format": "int64",
            "default": 0,
            "x-kotlin-default": "0"
          },
          "contentProtocol": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryModels.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationId",
          "channelId",
          "installationRevision",
          "revision",
          "enabled",
          "effective",
          "state"
        ]
      },
      "BotIdentityResponse": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "publicIdentifier": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "displayName": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 63
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "botUserId",
          "name",
          "scopes"
        ]
      },
      "BotInstallableApplicationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "visibility": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 11
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "botUserId",
          "name",
          "scopes",
          "visibility"
        ]
      },
      "BotInstallationAuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "actorUserId": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspection.kt",
          "line": 22
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "actorUserId",
          "action",
          "createdAt"
        ]
      },
      "BotInstallationAuditPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotInstallationAuditEvent"
            }
          },
          "nextBefore": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspection.kt",
          "line": 23
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "events",
          "hasMore"
        ]
      },
      "BotInstallationKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "revokedAt": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "applicationId",
          "createdAt"
        ]
      },
      "BotInstallationResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "communityId": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "revoked": {
            "type": "boolean"
          },
          "secureEnrollment": {
            "type": "string",
            "default": "required",
            "x-kotlin-default": "\"required\""
          },
          "allowedRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "default": [],
            "x-kotlin-default": "emptySet()"
          },
          "botName": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentProtocol": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 58
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "applicationId",
          "communityId",
          "scopes",
          "channelIds",
          "revision",
          "revoked"
        ]
      },
      "BotInstallationStatusResponse": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "botName": {
            "type": "string"
          },
          "revision": {
            "type": "integer",
            "format": "int64"
          },
          "revoked": {
            "type": "boolean"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotChannelEnrollmentResponse"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInstallationInspection.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationId",
          "applicationId",
          "botUserId",
          "botName",
          "revision",
          "revoked",
          "channels"
        ]
      },
      "BotInteractionAttachmentMetadata": {
        "type": "object",
        "properties": {
          "uploadId": {
            "type": "string"
          },
          "nativeId": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "ciphertextBytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "expiresAt": {
            "type": "string"
          },
          "contentProtocol": {
            "type": "string",
            "default": "MLS_1",
            "x-kotlin-default": "\"MLS_1\""
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedDescriptor": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentModels.kt",
          "line": 11
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "uploadId",
          "nativeId",
          "compatId",
          "expiresAt"
        ]
      },
      "BotInteractionChannel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "communityId": {
            "type": "string",
            "nullable": true
          },
          "compatCommunityId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionContext.kt",
          "line": 10
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "compatId",
          "name",
          "type"
        ]
      },
      "BotInteractionContextResponse": {
        "type": "object",
        "properties": {
          "command": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotCommandDefinitionResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "actor": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotPublicMember"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "channel": {
            "$ref": "#/components/schemas/BotInteractionChannel"
          },
          "actorPermissions": {
            "type": "string"
          },
          "source": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionSource"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "directUser": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotPublicUser"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "snapshot": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionContextSnapshot"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionContext.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "channel",
          "actorPermissions"
        ]
      },
      "BotInteractionContextSnapshot": {
        "type": "object",
        "properties": {
          "interaction": {
            "$ref": "#/components/schemas/BotInteractionView"
          },
          "target": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotSourceInteractionTarget"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "message": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotMessageEventResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionContext.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interaction"
        ]
      },
      "BotInteractionPage": {
        "type": "object",
        "properties": {
          "interactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotInteractionView"
            }
          },
          "nextAfter": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 34
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interactions",
          "hasMore"
        ]
      },
      "BotInteractionReply": {
        "type": "object",
        "properties": {
          "sequence": {
            "type": "integer",
            "format": "int32"
          },
          "requestId": {
            "type": "string"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "compatId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "visibility": {
            "type": "string",
            "default": "private",
            "x-kotlin-default": "\"private\""
          },
          "publicMessageId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "publicCompatMessageId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "publicMessageRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "publicApplicationHash": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "revision": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "x-kotlin-default": "0"
          },
          "contentRequestId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "updatedAt": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "deleted": {
            "type": "boolean",
            "default": false,
            "x-kotlin-default": "false"
          },
          "originalType": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "originalEnvelopeSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "sourceUpdate": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionSourceUpdate"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "sourceDeletion": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionSourceDeletion"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentProtocol": {
            "type": "string",
            "default": "MLS_1",
            "x-kotlin-default": "\"MLS_1\""
          },
          "originalContentSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 25
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "sequence",
          "requestId",
          "type",
          "createdAt"
        ]
      },
      "BotInteractionSource": {
        "type": "object",
        "properties": {
          "bindingId": {
            "type": "string"
          },
          "bindingRevision": {
            "type": "integer",
            "format": "int64"
          },
          "actionId": {
            "type": "string"
          },
          "componentType": {
            "type": "integer",
            "format": "int32"
          },
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "actorDeviceId": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "bindingId",
          "bindingRevision",
          "actionId",
          "componentType",
          "source",
          "actorDeviceId"
        ]
      },
      "BotInteractionSourceDeletion": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "compatId": {
            "type": "string"
          },
          "requestSha256": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceDeletion.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "source",
          "compatId",
          "requestSha256"
        ]
      },
      "BotInteractionSourceUpdate": {
        "type": "object",
        "properties": {
          "original": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "current": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "compatId": {
            "type": "string"
          },
          "requestSha256": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "original",
          "current",
          "compatId",
          "requestSha256"
        ]
      },
      "BotInteractionView": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "installationId": {
            "type": "string",
            "nullable": true
          },
          "channelId": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "botUserId": {
            "type": "string"
          },
          "commandId": {
            "type": "string",
            "nullable": true
          },
          "commandRevision": {
            "type": "integer",
            "format": "int64"
          },
          "kind": {
            "type": "integer",
            "format": "int32"
          },
          "state": {
            "type": "string"
          },
          "clientMessageId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "acknowledgementDeadline": {
            "type": "string",
            "nullable": true
          },
          "audience": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/E2eeAudienceResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotInteractionReply"
            }
          },
          "source": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionSource"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "scopeType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ChatScopeType"
              }
            ],
            "x-kotlin-default": "ChatScopeType.CHANNEL"
          },
          "consentGeneration": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentProtocol": {
            "type": "string",
            "default": "MLS_1",
            "x-kotlin-default": "\"MLS_1\""
          },
          "historyGeneration": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 17
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "compatId",
          "applicationId",
          "channelId",
          "actorId",
          "botUserId",
          "commandRevision",
          "kind",
          "state",
          "clientMessageId",
          "expiresAt",
          "responses"
        ]
      },
      "BotManagedAdmissionResponse": {
        "type": "object",
        "properties": {
          "scopeType": {
            "$ref": "#/components/schemas/ChatScopeType"
          },
          "scopeId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "afterMessageId": {
            "type": "integer",
            "format": "int64"
          },
          "afterThreadMessageId": {
            "type": "integer",
            "format": "int64"
          },
          "admittedAt": {
            "type": "string"
          },
          "contentProtocol": {
            "type": "string",
            "default": "SERVER_MANAGED_1",
            "x-kotlin-default": "\"SERVER_MANAGED_1\""
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotManagedContentModels.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "scopeType",
          "scopeId",
          "conversationId",
          "historyGeneration",
          "afterMessageId",
          "afterThreadMessageId",
          "admittedAt"
        ]
      },
      "BotManagedDeviceResponse": {
        "type": "object",
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "contentProtocol": {
            "type": "string",
            "default": "SERVER_MANAGED_1",
            "x-kotlin-default": "\"SERVER_MANAGED_1\""
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotManagedContentModels.kt",
          "line": 8
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "deviceId",
          "historyGeneration"
        ]
      },
      "BotMemberPage": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotPublicMember"
            }
          },
          "nextAfter": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 20
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "members",
          "hasMore"
        ]
      },
      "BotMessageEventResponse": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "nativeMessageId": {
            "type": "string",
            "nullable": true
          },
          "compatMessageId": {
            "type": "string",
            "nullable": true
          },
          "threadRootMessageId": {
            "type": "string",
            "nullable": true
          },
          "compatThreadRootMessageId": {
            "type": "string",
            "nullable": true
          },
          "authorId": {
            "type": "string"
          },
          "compatAuthorId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "epoch": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "revision": {
            "type": "integer",
            "format": "int32"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true
          },
          "replyToMessageId": {
            "type": "string",
            "nullable": true
          },
          "attachmentUploadIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "author": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotPublicUser"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "actorId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "compatActorId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "actor": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotPublicUser"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "emoji": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "pinned": {
            "type": "boolean",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "occurredAt": {
            "type": "string",
            "x-kotlin-default": "createdAt"
          },
          "contentProtocol": {
            "type": "string",
            "default": "MLS_1",
            "x-kotlin-default": "\"MLS_1\""
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentSha256": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventModels.kt",
          "line": 22
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "cursor",
          "eventType",
          "authorId",
          "compatAuthorId",
          "conversationId",
          "historyGeneration",
          "revision",
          "createdAt",
          "attachmentUploadIds"
        ]
      },
      "BotMessageHistoryResponse": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotMessageEventResponse"
            }
          },
          "highWatermark": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotEventModels.kt",
          "line": 34
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "messages",
          "highWatermark",
          "hasMore"
        ]
      },
      "BotMessageInteractions": {
        "type": "object",
        "properties": {
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotMessageReaction"
            }
          },
          "pinned": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageService.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "reactions",
          "pinned"
        ]
      },
      "BotMessageReaction": {
        "type": "object",
        "properties": {
          "emoji": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "reactedByCurrentUser": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageService.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "emoji",
          "count",
          "reactedByCurrentUser"
        ]
      },
      "BotMetadataChangesResponse": {
        "type": "object",
        "properties": {
          "revision": {
            "type": "string"
          },
          "changed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "revision",
          "changed"
        ]
      },
      "BotModerationMember": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/BotPublicUser"
          },
          "role": {
            "type": "string"
          },
          "joinedAt": {
            "type": "string"
          },
          "mutedUntil": {
            "type": "string",
            "nullable": true
          },
          "banned": {
            "type": "boolean"
          },
          "microphoneMuted": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModerationService.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "user",
          "role",
          "joinedAt",
          "banned",
          "microphoneMuted"
        ]
      },
      "BotOwnPermissionResponse": {
        "type": "object",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "compatChannelId": {
            "type": "string"
          },
          "communityId": {
            "type": "string"
          },
          "compatCommunityId": {
            "type": "string"
          },
          "nativeRole": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "mutedUntil": {
            "type": "string",
            "nullable": true
          },
          "microphoneMuted": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 25
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "channelId",
          "compatChannelId",
          "communityId",
          "compatCommunityId",
          "nativeRole",
          "scopes",
          "microphoneMuted"
        ]
      },
      "BotPinnedMessage": {
        "type": "object",
        "properties": {
          "messageId": {
            "type": "string"
          },
          "compatMessageId": {
            "type": "string"
          },
          "pinnedAt": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageService.kt",
          "line": 20
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "messageId",
          "compatMessageId",
          "pinnedAt"
        ]
      },
      "BotPinnedMessages": {
        "type": "object",
        "properties": {
          "messageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compatMessageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotPinnedMessage"
            },
            "default": [],
            "x-kotlin-default": "emptyList()"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMessageService.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "messageIds",
          "compatMessageIds"
        ]
      },
      "BotPresenceResponse": {
        "type": "object",
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "heartbeatIntervalSeconds": {
            "type": "integer",
            "format": "int32",
            "default": 30,
            "x-kotlin-default": "30"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPresenceService.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "expiresAt"
        ]
      },
      "BotPublicApplicationPage": {
        "type": "object",
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotInstallableApplicationResponse"
            }
          },
          "nextAfter": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 13
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applications",
          "hasMore"
        ]
      },
      "BotPublicMember": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/BotPublicUser"
          },
          "role": {
            "type": "string"
          },
          "roleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compatRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "joinedAt": {
            "type": "string"
          },
          "mutedUntil": {
            "type": "string",
            "nullable": true
          },
          "microphoneMuted": {
            "type": "boolean"
          },
          "online": {
            "type": "boolean",
            "default": false,
            "x-kotlin-default": "false"
          },
          "presenceRevision": {
            "type": "string",
            "default": "0",
            "x-kotlin-default": "\"0\""
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 17
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "user",
          "role",
          "roleIds",
          "compatRoleIds",
          "joinedAt",
          "microphoneMuted"
        ]
      },
      "BotPublicRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "kind": {
            "type": "string",
            "default": "ROLE",
            "x-kotlin-default": "\"ROLE\""
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "compatId",
          "name",
          "color",
          "position",
          "permissions"
        ]
      },
      "BotPublicUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "compatId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "bot": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "publicIdentifier": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataService.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "compatId",
          "username",
          "displayName",
          "bot",
          "createdAt"
        ]
      },
      "BotPublicVoiceState": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string"
          },
          "compatUserId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "compatChannelId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "participationId": {
            "type": "string"
          },
          "selfMute": {
            "type": "boolean"
          },
          "selfDeaf": {
            "type": "boolean"
          },
          "cameraEnabled": {
            "type": "boolean"
          },
          "screenSharePublished": {
            "type": "boolean"
          },
          "serverMute": {
            "type": "boolean"
          },
          "stageRole": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 22
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "userId",
          "compatUserId",
          "channelId",
          "compatChannelId",
          "sessionId",
          "participationId",
          "selfMute",
          "selfDeaf",
          "cameraEnabled",
          "screenSharePublished",
          "serverMute",
          "stageRole"
        ]
      },
      "BotRateLimitError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "default": "RATE_LIMITED",
            "x-kotlin-default": "\"RATE_LIMITED\""
          },
          "message": {
            "type": "string",
            "default": "Bot request budget exhausted",
            "x-kotlin-default": "\"Bot request budget exhausted\""
          },
          "retry_after": {
            "type": "number",
            "format": "double"
          },
          "global": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotRateLimitRoutes.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "retry_after",
          "global"
        ]
      },
      "BotSourceActionSet": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotActionDefinition"
            }
          },
          "expiresAt": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "actions",
          "expiresAt"
        ]
      },
      "BotSourceInteractionResponse": {
        "type": "object",
        "properties": {
          "interaction": {
            "$ref": "#/components/schemas/BotInteractionView"
          },
          "application": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SecureApplicationResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "sourceInteraction": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionView"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "operation": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotSourceOperationReceipt"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 20
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interaction"
        ]
      },
      "BotSourceInteractionTarget": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "sourceInteraction": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotInteractionView"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 23
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "source"
        ]
      },
      "BotSourceOperationReceipt": {
        "type": "object",
        "properties": {
          "interactionId": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "requestSha256": {
            "type": "string"
          },
          "previousSource": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "currentSource": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "compatId": {
            "type": "string"
          },
          "sourceCurrent": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 25
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interactionId",
          "requestId",
          "requestSha256",
          "previousSource",
          "currentSource",
          "compatId",
          "sourceCurrent"
        ]
      },
      "BotSourceOperationStatus": {
        "type": "object",
        "properties": {
          "receipt": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotSourceOperationReceipt"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 27
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer."
      },
      "BotVoiceGenerationRequest": {
        "type": "object",
        "properties": {
          "generation": {
            "type": "integer",
            "format": "int64"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceService.kt",
          "line": 19
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "generation"
        ]
      },
      "BotVoiceHeartbeatResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "generation": {
            "type": "integer",
            "format": "int64"
          },
          "authorityExpiresAt": {
            "type": "string"
          },
          "media": {
            "$ref": "#/components/schemas/MediaLeaseHeartbeatResponse"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceService.kt",
          "line": 23
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "generation",
          "authorityExpiresAt",
          "media"
        ]
      },
      "BotVoiceSessionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "generation": {
            "type": "integer",
            "format": "int64"
          },
          "installationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "participationId": {
            "type": "string"
          },
          "authorityExpiresAt": {
            "type": "string"
          },
          "media": {
            "$ref": "#/components/schemas/MediaLeaseResponse"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceService.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "generation",
          "installationId",
          "channelId",
          "participationId",
          "authorityExpiresAt",
          "media"
        ]
      },
      "BotVoiceStatePage": {
        "type": "object",
        "properties": {
          "states": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotPublicVoiceState"
            }
          },
          "nextAfterChannelId": {
            "type": "string",
            "nullable": true
          },
          "nextAfterUserId": {
            "type": "string",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotMetadataDeltaModels.kt",
          "line": 26
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "states",
          "hasMore"
        ]
      },
      "ChannelMessageResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "channelId": {
            "type": "integer",
            "format": "int64"
          },
          "authorId": {
            "type": "integer",
            "format": "int64"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "editedAt": {
            "type": "string",
            "nullable": true
          },
          "messageType": {
            "$ref": "#/components/schemas/ChannelMessageType"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true
          },
          "authorIdentifier": {
            "type": "string",
            "nullable": true
          },
          "authorDisplayName": {
            "type": "string",
            "nullable": true
          },
          "authorAvatarUrl": {
            "type": "string",
            "nullable": true
          },
          "authorCommunityRole": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CommunityRole"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "authorCustomRoleName": {
            "type": "string",
            "nullable": true
          },
          "authorRoleColorHex": {
            "type": "string",
            "nullable": true
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageReactionResponse"
            }
          },
          "pinned": {
            "type": "boolean"
          },
          "pinnedByUserId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pinnedAt": {
            "type": "string",
            "nullable": true
          },
          "threadReplyCount": {
            "type": "integer",
            "format": "int32"
          },
          "threadRevision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatAttachmentResponse"
            }
          },
          "delivery": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MessageReceiptSummaryResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "forwardedFrom": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ForwardedMessageAttribution"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy encrypted-content field; managed writes omit it."
          },
          "encryptionRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "authorIsBot": {
            "type": "boolean"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server-readable structured content, validated by the owning message operation. Managed writers omit legacy encryptedEnvelope; transport encryption and server ACL still apply.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentRevision": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "x-kotlin-default": "0"
          }
        },
        "required": [
          "id",
          "channelId",
          "authorId",
          "content",
          "createdAt"
        ]
      },
      "ChannelMessageType": {
        "type": "string",
        "enum": [
          "TEXT",
          "ATTACHMENT",
          "SYSTEM"
        ]
      },
      "ChatAttachmentResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "fileName",
          "contentType",
          "sizeBytes",
          "mediaUrl"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "mediaUrl": {
            "type": "string"
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "enum": [
              "FILE",
              "VOICE",
              "VIDEO"
            ],
            "default": "FILE"
          },
          "durationMs": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "downloadUrl": {
            "type": "string"
          },
          "inlineImage": {
            "type": "boolean",
            "default": false,
            "description": "Explicit image presentation intent, default false for legacy/file uploads. Only FILE raster attachments may set true; MIME alone never changes presentation."
          },
          "previewWidth": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "minimum": 1,
            "maximum": 640,
            "description": "Width of the real decoded preview in pixels, paired with previewHeight; absent for legacy or generic placeholder previews."
          },
          "previewHeight": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "minimum": 1,
            "maximum": 420,
            "description": "Height of the real decoded preview in pixels, paired with previewWidth; absent for legacy or generic placeholder previews."
          },
          "sourceUploadId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        }
      },
      "ChatScopeType": {
        "type": "string",
        "enum": [
          "DIRECT",
          "CHANNEL"
        ]
      },
      "ChatUploadSessionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "fileName",
          "contentType",
          "sizeBytes",
          "chunkSize",
          "totalChunks",
          "uploadedChunks",
          "uploadedBytes",
          "status",
          "expiresAt"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "chunkSize": {
            "type": "integer",
            "format": "int32"
          },
          "totalChunks": {
            "type": "integer",
            "format": "int32"
          },
          "uploadedChunks": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "uploadedBytes": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "enum": [
              "UPLOADING",
              "READY",
              "RESERVED",
              "CONSUMED",
              "CANCELLED"
            ]
          },
          "mediaUrl": {
            "type": "string",
            "nullable": true
          },
          "thumbnailUrl": {
            "type": "string",
            "nullable": true
          },
          "expiresAt": {
            "type": "string"
          },
          "inlineImage": {
            "type": "boolean",
            "default": false,
            "description": "Explicit image presentation intent, default false for legacy/file uploads. Only FILE raster attachments may set true; MIME alone never changes presentation."
          },
          "previewWidth": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "minimum": 1,
            "maximum": 640,
            "description": "Width of the real decoded preview in pixels, paired with previewHeight; absent for legacy or generic placeholder previews."
          },
          "previewHeight": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "minimum": 1,
            "maximum": 420,
            "description": "Height of the real decoded preview in pixels, paired with previewWidth; absent for legacy or generic placeholder previews."
          }
        }
      },
      "CommunityAccessResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "restricted": {
            "type": "boolean"
          },
          "allowedSystemRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunityRole"
            }
          },
          "allowedCustomRoleIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          },
          "allowedUserIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "required": [
          "restricted"
        ]
      },
      "CommunityChannelResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "communityId": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "topic": {
            "type": "string",
            "nullable": true
          },
          "createdBy": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string"
          },
          "sectionId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "channelType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommunityChannelType"
              }
            ],
            "description": "Legacy wire adapter only; channelKind is canonical and explicit channelKind wins."
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "systemPurpose": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CommunityChannelSystemPurpose"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "access": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CommunityAccessResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "broadcastAccess": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CommunityAccessResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "canBroadcast": {
            "type": "boolean"
          },
          "speakerAccess": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CommunityAccessResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "canBecomeSpeaker": {
            "type": "boolean"
          },
          "speakerModeEnabled": {
            "type": "boolean",
            "description": "Legacy wire adapter only; channelKind is canonical and explicit channelKind wins."
          },
          "iconUrl": {
            "type": "string",
            "nullable": true
          },
          "channelKind": {
            "$ref": "#/components/schemas/CommunityChannelType"
          }
        },
        "required": [
          "id",
          "communityId",
          "name",
          "createdBy",
          "createdAt"
        ]
      },
      "CommunityChannelSystemPurpose": {
        "type": "string",
        "enum": [
          "MEMBER_AUDIT",
          "MODERATION_AUDIT"
        ]
      },
      "CommunityChannelType": {
        "type": "string",
        "enum": [
          "TEXT",
          "VOICE",
          "SPEAKER",
          "STREAM"
        ]
      },
      "CommunityContentVisibility": {
        "type": "string",
        "enum": [
          "PUBLIC",
          "MEMBERS"
        ],
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/domain/Models.kt",
          "line": 21
        }
      },
      "CommunityJoinMode": {
        "type": "string",
        "enum": [
          "OPEN",
          "CLOSED"
        ],
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/domain/Models.kt",
          "line": 15
        }
      },
      "CommunityResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "publicIdentifier": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "detailedDescription": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "ownerId": {
            "type": "integer",
            "format": "int64"
          },
          "createdAt": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "joinMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommunityJoinMode"
              }
            ],
            "x-kotlin-default": "CommunityJoinMode.OPEN"
          },
          "newsVisibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommunityContentVisibility"
              }
            ],
            "x-kotlin-default": "CommunityContentVisibility.PUBLIC"
          },
          "eventVisibility": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CommunityContentVisibility"
              }
            ],
            "x-kotlin-default": "CommunityContentVisibility.PUBLIC"
          },
          "metadataRevision": {
            "type": "integer",
            "format": "int64",
            "default": 0,
            "x-kotlin-default": "0"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/community/CommunityDtos.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "publicIdentifier",
          "name",
          "ownerId",
          "createdAt"
        ]
      },
      "CommunityRole": {
        "type": "string",
        "enum": [
          "OWNER",
          "ADMIN",
          "MODERATOR",
          "MEMBER"
        ]
      },
      "CreateBotApplicationRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "visibility": {
            "type": "string",
            "default": "PRIVATE",
            "x-kotlin-default": "\"PRIVATE\""
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 41
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "name",
          "scopes"
        ]
      },
      "CreateBotCredentialRequest": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "expiresInSeconds": {
            "type": "integer",
            "format": "int64",
            "default": 7776000,
            "x-kotlin-default": "7_776_000"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 43
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "scopes"
        ]
      },
      "CreateBotDirectConversationRequest": {
        "type": "object",
        "properties": {
          "humanUserId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "humanCompatId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectModels.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer."
      },
      "CreateBotInstallationKeyRequest": {
        "type": "object",
        "properties": {
          "expectedRevision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "expectedRevision"
        ]
      },
      "CreateBotInteractionDraftUpload": {
        "type": "object",
        "properties": {
          "interaction": {
            "$ref": "#/components/schemas/PrepareBotInteractionRequest"
          },
          "upload": {
            "$ref": "#/components/schemas/CreateChatUploadRequest"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionAttachmentModels.kt",
          "line": 9
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interaction",
          "upload"
        ]
      },
      "CreateChatUploadRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fileName",
          "sizeBytes"
        ],
        "properties": {
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "inlineImage": {
            "type": "boolean",
            "default": false,
            "description": "Explicit image presentation intent, default false for legacy/file uploads. Only FILE raster attachments may set true; MIME alone never changes presentation."
          }
        },
        "description": "Shared source DTO. SERVER_MANAGED_1 uploads use actual filename/MIME and ordinary bytes; old application/vnd.teamyfy.e2ee is rejected. Current actor, installation/consent, scope, size, digest and READY-to-message custody remain required. Follow returned chunkSize and expiry."
      },
      "CreateSecureCooperativeAdmissionRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedRequest": {
            "type": "string"
          }
        },
        "required": [
          "signedRequest"
        ]
      },
      "DeletePrivateBotReplyRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int32"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPrivateReplyMutations.kt",
          "line": 11
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId",
          "expectedRevision"
        ]
      },
      "DeleteSourceBotInteractionRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "expectedSource": {
            "$ref": "#/components/schemas/BotActionSource"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceDeletion.kt",
          "line": 10
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId",
          "expectedSource"
        ]
      },
      "DirectCallOutcome": {
        "type": "string",
        "enum": [
          "RINGING",
          "COMPLETED",
          "NO_ANSWER",
          "DECLINED_BY_PEER",
          "CANCELLED_BY_CALLER"
        ]
      },
      "DirectMessageResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "conversationId": {
            "type": "integer",
            "format": "int64"
          },
          "authorId": {
            "type": "integer",
            "format": "int64"
          },
          "content": {
            "type": "string"
          },
          "messageType": {
            "$ref": "#/components/schemas/DirectMessageTypeResponse"
          },
          "friendRequestId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "mediaContentType": {
            "type": "string",
            "nullable": true
          },
          "mediaThumbnailUrl": {
            "type": "string",
            "nullable": true
          },
          "friendRequestRequesterId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "friendRequestRequesterDisplayName": {
            "type": "string",
            "nullable": true
          },
          "friendRequestTargetUserId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "friendRequestStatus": {
            "type": "string",
            "nullable": true
          },
          "communityInviteId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "communityInviteIdentifier": {
            "type": "string",
            "nullable": true
          },
          "communityInviteName": {
            "type": "string",
            "nullable": true
          },
          "communityInviteDescription": {
            "type": "string",
            "nullable": true
          },
          "directCallSessionId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "directCallOutcome": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DirectCallOutcome"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "directCallDurationSeconds": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "directCallHadVideo": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "editedAt": {
            "type": "string",
            "nullable": true
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true
          },
          "reactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageReactionResponse"
            }
          },
          "pinned": {
            "type": "boolean"
          },
          "pinnedByUserId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "pinnedAt": {
            "type": "string",
            "nullable": true
          },
          "threadReplyCount": {
            "type": "integer",
            "format": "int32"
          },
          "threadRevision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatAttachmentResponse"
            }
          },
          "delivery": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MessageReceiptSummaryResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "forwardedFrom": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ForwardedMessageAttribution"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "deprecated": true,
            "description": "Legacy encrypted-content field; managed writes omit it."
          },
          "encryptionRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "authorIsBot": {
            "type": "boolean"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server-readable structured content, validated by the owning message operation. Managed writers omit legacy encryptedEnvelope; transport encryption and server ACL still apply.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentRevision": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "x-kotlin-default": "0"
          }
        },
        "required": [
          "id",
          "conversationId",
          "authorId",
          "content",
          "messageType",
          "createdAt"
        ]
      },
      "DirectMessageTypeResponse": {
        "type": "string",
        "enum": [
          "TEXT",
          "IMAGE",
          "ATTACHMENT",
          "FRIEND_REQUEST_SYSTEM",
          "VOICE_CALL_SYSTEM",
          "COMMUNITY_INVITE_SYSTEM"
        ]
      },
      "E2eeAudienceResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "identities"
        ],
        "properties": {
          "identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeIdentityResponse"
            }
          }
        }
      },
      "E2eeBackupResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "identity": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/E2eeIdentityResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "recoveryBackup": {
            "type": "string",
            "nullable": true,
            "maxLength": 65536,
            "x-sensitive": true
          }
        }
      },
      "E2eeDeviceResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deviceId",
          "certificate"
        ],
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "certificate": {
            "type": "string"
          }
        }
      },
      "E2eeIdentityResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "userId",
          "rootSigningKey",
          "recoveryEncryptionKey",
          "identityProof",
          "devices"
        ],
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "rootSigningKey": {
            "type": "string"
          },
          "recoveryEncryptionKey": {
            "type": "string"
          },
          "identityProof": {
            "type": "string"
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeDeviceResponse"
            }
          },
          "previousDeviceCertificates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "E2eeRoomEpochResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contextType",
          "sessionId",
          "leaseId",
          "generation",
          "epoch"
        ],
        "properties": {
          "protocolVersion": {
            "type": "integer",
            "format": "int32"
          },
          "contextType": {
            "$ref": "#/components/schemas/MediaContextType"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "epoch": {
            "type": "string"
          }
        }
      },
      "E2eeRoomMember": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "userId",
          "deviceId",
          "leaseId",
          "generation",
          "participationId",
          "identity"
        ],
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "deviceId": {
            "type": "string"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "participationId": {
            "type": "string"
          },
          "identity": {
            "$ref": "#/components/schemas/E2eeIdentityResponse"
          }
        }
      },
      "E2eeRoomStateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contextType",
          "sessionId",
          "leaseId",
          "generation"
        ],
        "properties": {
          "contextType": {
            "$ref": "#/components/schemas/MediaContextType"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "E2eeRoomStateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contextType",
          "sessionId",
          "epoch",
          "leaderUserId",
          "leaderDeviceId",
          "members"
        ],
        "properties": {
          "protocolVersion": {
            "type": "integer",
            "format": "int32"
          },
          "contextType": {
            "$ref": "#/components/schemas/MediaContextType"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "epoch": {
            "type": "string"
          },
          "leaderUserId": {
            "type": "integer",
            "format": "int64"
          },
          "leaderDeviceId": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeRoomMember"
            }
          },
          "envelope": {
            "type": "string",
            "nullable": true,
            "maxLength": 262144,
            "x-sensitive": true
          }
        }
      },
      "EditPrivateBotReplyRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int32"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPrivateReplyMutations.kt",
          "line": 9
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId",
          "expectedRevision"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ForwardedMessageAttribution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "authorId",
          "authorDisplayName",
          "authorPublicIdentifier"
        ],
        "properties": {
          "authorId": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "authorDisplayName": {
            "type": "string"
          },
          "authorPublicIdentifier": {
            "type": "string"
          },
          "communityId": {
            "type": "integer",
            "format": "int64",
            "minimum": 1,
            "nullable": true
          },
          "communityName": {
            "type": "string",
            "nullable": true
          },
          "communityPublicIdentifier": {
            "type": "string",
            "nullable": true
          },
          "authorIsBot": {
            "type": "boolean"
          }
        },
        "description": "Immutable public identity snapshot from the original author and source community. Reforwarding preserves it. Private aliases, conversation ids and source message ids are never exposed."
      },
      "InspectBotActionsRequest": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "actionIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "source",
          "actionIds"
        ]
      },
      "IssuedBotCredentialResponse": {
        "type": "object",
        "properties": {
          "credential": {
            "$ref": "#/components/schemas/BotCredentialResponse"
          },
          "token": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 55
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "credential",
          "token"
        ]
      },
      "IssuedBotInstallationKeyResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "applicationId": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "id",
          "applicationId",
          "key",
          "createdAt"
        ]
      },
      "JoinBotVoiceRequest": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "listen": {
            "type": "boolean",
            "default": false,
            "x-kotlin-default": "false"
          },
          "encryptionProtocolVersion": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "x-kotlin-default": "1"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceService.kt",
          "line": 17
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationId",
          "channelId"
        ]
      },
      "MediaContextType": {
        "type": "string",
        "enum": [
          "STREAM",
          "VOICE_CHANNEL"
        ]
      },
      "MediaLeaseHeartbeatResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "generation",
          "leaseExpiresAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "leaseExpiresAt": {
            "type": "string"
          },
          "credentials": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MediaTransportCredentialsResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "description": "Fresh credentials for the same authorized lease and generation; clients retain them for transport recovery."
          },
          "microphoneAdmission": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoiceMicrophoneAdmissionResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "mediaEncryptionVersion": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "default": 1,
            "description": "Protocol persisted on this exact lease. Explicit 0 uses TLS/WebRTC without application media E2EE. Values 1/2 identify legacy leases and require an update; omission means 1 and must never enable mode 0."
          }
        }
      },
      "MediaLeaseResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "generation",
          "contextType",
          "sessionId",
          "leaseExpiresAt",
          "capabilities",
          "credentials"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "contextType": {
            "$ref": "#/components/schemas/MediaContextType"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseExpiresAt": {
            "type": "string"
          },
          "capabilities": {
            "$ref": "#/components/schemas/MediaTransportCapabilitiesResponse"
          },
          "credentials": {
            "$ref": "#/components/schemas/MediaTransportCredentialsResponse"
          },
          "microphoneAdmission": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoiceMicrophoneAdmissionResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "mediaEncryptionVersion": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0,
              1,
              2
            ],
            "default": 1,
            "description": "Protocol persisted on this exact lease. Explicit 0 uses TLS/WebRTC without application media E2EE. Values 1/2 identify legacy leases and require an update; omission means 1 and must never enable mode 0."
          }
        }
      },
      "MediaPublicationKind": {
        "type": "string",
        "enum": [
          "AUDIO",
          "VIDEO"
        ]
      },
      "MediaPublicationResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "leaseId",
          "generation",
          "kind",
          "source",
          "status",
          "updatedAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaPublicationKind"
          },
          "source": {
            "$ref": "#/components/schemas/MediaPublicationSource"
          },
          "status": {
            "$ref": "#/components/schemas/MediaPublicationStatus"
          },
          "codec": {
            "type": "string",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "frameRate": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bitrateKbps": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "spatialLayers": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "updatedAt": {
            "type": "string"
          }
        }
      },
      "MediaPublicationSource": {
        "type": "string",
        "enum": [
          "MICROPHONE",
          "CAMERA",
          "SCREEN_SHARE",
          "SCREEN_SHARE_AUDIO"
        ]
      },
      "MediaPublicationStatus": {
        "type": "string",
        "enum": [
          "PREPARING",
          "ACTIVE",
          "MUTED",
          "ENDED",
          "FAILED"
        ]
      },
      "MediaTransportCapabilitiesResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "canPublishAudio",
          "canPublishVideo",
          "canSubscribe",
          "allowedSources"
        ],
        "properties": {
          "canPublishAudio": {
            "type": "boolean"
          },
          "canPublishVideo": {
            "type": "boolean"
          },
          "canSubscribe": {
            "type": "boolean"
          },
          "allowedSources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaPublicationSource"
            }
          }
        }
      },
      "MediaTransportCredentialsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "provider",
          "serverUrl",
          "roomName",
          "participantIdentity",
          "accessToken",
          "expiresAt"
        ],
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/MediaTransportProvider"
          },
          "serverUrl": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "participantIdentity": {
            "type": "string"
          },
          "accessToken": {
            "type": "string",
            "x-sensitive": true
          },
          "expiresAt": {
            "type": "string"
          }
        }
      },
      "MediaTransportProvider": {
        "type": "string",
        "enum": [
          "LIVEKIT"
        ]
      },
      "MessageDeliveryStatus": {
        "type": "string",
        "enum": [
          "SENT",
          "DELIVERED",
          "READ"
        ]
      },
      "MessageReactionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "emoji": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "reactedByMe": {
            "type": "boolean"
          },
          "reactors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MessageReactionUserResponse"
            }
          }
        },
        "required": [
          "emoji",
          "count",
          "reactedByMe"
        ]
      },
      "MessageReactionUserResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "displayName": {
            "type": "string"
          },
          "isBot": {
            "type": "boolean"
          }
        },
        "required": [
          "userId",
          "displayName"
        ]
      },
      "MessageReceiptSummaryResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "status": {
            "$ref": "#/components/schemas/MessageDeliveryStatus"
          },
          "recipientCount": {
            "type": "integer",
            "format": "int32"
          },
          "deliveredCount": {
            "type": "integer",
            "format": "int32"
          },
          "readCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "required": [
          "status",
          "recipientCount",
          "deliveredCount",
          "readCount"
        ]
      },
      "MessageThreadReplyResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "rootMessageId",
          "authorId",
          "content",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "rootMessageId": {
            "type": "integer",
            "format": "int64"
          },
          "authorId": {
            "type": "integer",
            "format": "int64"
          },
          "authorIdentifier": {
            "type": "string",
            "nullable": true
          },
          "authorDisplayName": {
            "type": "string",
            "nullable": true
          },
          "authorAvatarUrl": {
            "type": "string",
            "nullable": true
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "editedAt": {
            "type": "string",
            "nullable": true
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "maxLength": 262144,
            "x-sensitive": true,
            "deprecated": true,
            "description": "Legacy encrypted-content field; managed writes omit it."
          },
          "encryptionRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "authorIsBot": {
            "type": "boolean"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server-readable structured content, validated by the owning message operation. Managed writers omit legacy encryptedEnvelope; transport encryption and server ACL still apply.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "contentRevision": {
            "type": "integer",
            "format": "int32",
            "default": 0,
            "x-kotlin-default": "0"
          }
        }
      },
      "MoveBotVoiceRequest": {
        "type": "object",
        "properties": {
          "generation": {
            "type": "integer",
            "format": "int64"
          },
          "channelId": {
            "type": "string"
          },
          "encryptionProtocolVersion": {
            "type": "integer",
            "format": "int32",
            "default": 1,
            "x-kotlin-default": "1"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotVoiceService.kt",
          "line": 20
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "generation",
          "channelId"
        ]
      },
      "PrepareBotActionRequest": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "actionId": {
            "type": "string"
          },
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "requestId": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "actionId",
          "source",
          "requestId"
        ]
      },
      "PrepareBotInteractionRequest": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "commandId": {
            "type": "string"
          },
          "commandRevision": {
            "type": "integer",
            "format": "int64"
          },
          "requestId": {
            "type": "string"
          },
          "kind": {
            "type": "integer",
            "format": "int32",
            "default": 2,
            "x-kotlin-default": "2"
          },
          "attachmentUploadIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "default": [],
            "x-kotlin-default": "emptyList()"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 12
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "commandId",
          "commandRevision",
          "requestId"
        ]
      },
      "ProposeSecureCooperativeAdmissionRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedManifest": {
            "type": "string"
          }
        },
        "required": [
          "signedManifest"
        ]
      },
      "PublicBotInteractionResponse": {
        "type": "object",
        "properties": {
          "interaction": {
            "$ref": "#/components/schemas/BotInteractionView"
          },
          "application": {
            "$ref": "#/components/schemas/SecureApplicationResponse"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPublicInteractions.kt",
          "line": 16
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "interaction",
          "application"
        ]
      },
      "PublishE2eeRoomKeyRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contextType",
          "sessionId",
          "leaseId",
          "generation",
          "epoch",
          "envelope"
        ],
        "properties": {
          "contextType": {
            "$ref": "#/components/schemas/MediaContextType"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "epoch": {
            "type": "string"
          },
          "envelope": {
            "type": "string",
            "maxLength": 262144,
            "x-sensitive": true
          }
        }
      },
      "PublishSecureKeyPackagesRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedKeyPackages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "signedKeyPackages"
        ]
      },
      "PublishVoicePublisherKeyRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "expectedRosterDigest": {
            "type": "string"
          },
          "keyGeneration": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "previousKeyGeneration": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "keyIndex": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0
            ]
          },
          "transition": {
            "$ref": "#/components/schemas/VoicePublisherKeyTransition"
          },
          "envelope": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 52
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "sessionId",
          "leaseId",
          "generation",
          "expectedRosterDigest",
          "keyGeneration",
          "previousKeyGeneration",
          "keyIndex",
          "transition",
          "envelope"
        ],
        "additionalProperties": false
      },
      "PutBotDirectConsentRequest": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotDirectModels.kt",
          "line": 14
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "scopes",
          "expectedRevision"
        ]
      },
      "PutBotHistoryGrantRequest": {
        "type": "object",
        "properties": {
          "expectedInstallationRevision": {
            "type": "integer",
            "format": "int64"
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotHistoryModels.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "expectedInstallationRevision",
          "expectedRevision"
        ]
      },
      "PutBotInstallationRequest": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "allowedRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "default": [],
            "x-kotlin-default": "emptySet()"
          },
          "installationKey": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 44
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "applicationId",
          "scopes",
          "channelIds"
        ]
      },
      "PutSecureDeviceContentCapabilityRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedCapability": {
            "type": "string"
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        },
        "required": [
          "signedCapability",
          "expectedRevision"
        ]
      },
      "QuerySecureContentCapabilitiesRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requiredFeatures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "media-renditions-v2"
              ]
            },
            "minItems": 1,
            "maxItems": 1
          }
        },
        "required": [
          "requiredFeatures"
        ]
      },
      "QuerySecureContentCapabilitiesResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ready": {
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SecureContentCapabilityNotReadyReason"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "serverTimeEpochMillis": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "snapshot": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SecureContentCapabilitySnapshot"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "snapshotSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "nullable": true
          }
        },
        "required": [
          "ready",
          "serverTimeEpochMillis"
        ]
      },
      "QuerySecureHistoryGrantsRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "epochs": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64",
              "minimum": 1
            },
            "minItems": 1,
            "maxItems": 8,
            "description": "Distinct historical epochs; duplicate values are rejected."
          },
          "expectedEpoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "expectedCommitHash": {
            "type": "string"
          }
        },
        "required": [
          "epochs",
          "expectedEpoch",
          "expectedCommitHash"
        ]
      },
      "RegisterBotActionsRequest": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotActionDefinition"
            }
          },
          "expiresAt": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionActions.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "source",
          "actions"
        ]
      },
      "RegisterE2eeDeviceRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "certificate"
        ],
        "properties": {
          "certificate": {
            "type": "string"
          },
          "expectedPredecessorCertificateSha256": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 of the exact current certificate. Null or omitted permits creation only, or an exact retry of the current live certificate."
          }
        }
      },
      "RegisterE2eeIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "identityProof",
          "rootSigningKey",
          "recoveryEncryptionKey",
          "recoveryBackup",
          "deviceCertificate"
        ],
        "properties": {
          "identityProof": {
            "type": "string"
          },
          "rootSigningKey": {
            "type": "string"
          },
          "recoveryEncryptionKey": {
            "type": "string"
          },
          "recoveryBackup": {
            "type": "string",
            "maxLength": 65536,
            "x-sensitive": true
          },
          "deviceCertificate": {
            "type": "string"
          },
          "expectedPredecessorCertificateSha256": {
            "type": "string",
            "nullable": true,
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 of the exact current certificate. Null or omitted permits creation only, or an exact retry of the current live certificate."
          }
        }
      },
      "ReplaceBotCommandsRequest": {
        "type": "object",
        "properties": {
          "commands": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BotCommandDefinition"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotCommandCatalog.kt",
          "line": 14
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "commands"
        ]
      },
      "ReserveSecureKeyPackagesRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requestId": {
            "type": "string"
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureDeviceRef"
            }
          },
          "allowPartial": {
            "type": "boolean",
            "default": false,
            "description": "When true, return available certified target packages. No available packages returns MLS_KEY_PACKAGE_NOT_READY without saving a reservation. An initial DIRECT reservation must still cover both accounts including the creator. Retries with a successful requestId replay its original subset; use a new requestId to reserve additional packages that become available later."
          }
        },
        "required": [
          "requestId",
          "devices"
        ]
      },
      "ResolveBotInstallationKeyRequest": {
        "type": "object",
        "properties": {
          "installationKey": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotApplicationDiscovery.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "installationKey"
        ]
      },
      "RespondBotInteractionRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 15
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId",
          "type"
        ]
      },
      "RespondPublicBotInteractionRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "application": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SubmitSecureApplicationRequest"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotPublicInteractions.kt",
          "line": 14
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId"
        ]
      },
      "RespondSourceBotInteractionRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string"
          },
          "expectedSource": {
            "$ref": "#/components/schemas/BotActionSource"
          },
          "application": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SubmitSecureApplicationRequest"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "sourceActions": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BotSourceActionSet"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ],
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotSourceInteractions.kt",
          "line": 14
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "requestId",
          "expectedSource"
        ]
      },
      "RevokeSecureDeviceRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deviceId": {
            "type": "string"
          },
          "signedRevocation": {
            "type": "string"
          }
        },
        "required": [
          "deviceId",
          "signedRevocation"
        ]
      },
      "SecureApplicationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "messageId": {
            "type": "integer",
            "format": "int64"
          },
          "revision": {
            "type": "integer",
            "format": "int32"
          },
          "inserted": {
            "type": "boolean"
          },
          "directMessage": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/DirectMessageResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "channelMessage": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ChannelMessageResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          },
          "threadReply": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MessageThreadReplyResponse"
                  }
                ]
              },
              {
                "type": "object",
                "nullable": true,
                "enum": [
                  null
                ]
              }
            ]
          }
        },
        "required": [
          "messageId",
          "revision",
          "inserted"
        ]
      },
      "SecureContentCapabilityNotReadyReason": {
        "type": "string",
        "enum": [
          "NOT_ACTIVE",
          "AUDIENCE_TOO_LARGE",
          "DEVICE_NOT_READY",
          "CAPABILITY_NOT_READY"
        ]
      },
      "SecureContentCapabilitySnapshot": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "version": {
            "type": "integer",
            "format": "int32",
            "minimum": 1,
            "maximum": 1
          },
          "purpose": {
            "type": "string",
            "enum": [
              "mls-content-capability-snapshot"
            ]
          },
          "scopeType": {
            "$ref": "#/components/schemas/ChatScopeType"
          },
          "scopeId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "epoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "commitHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "rosterHash": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "requiredFeatures": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "media-renditions-v2"
              ]
            },
            "minItems": 1,
            "maxItems": 1
          },
          "eligibleUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 512
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureDeviceContentCapabilityProof"
            },
            "minItems": 1,
            "maxItems": 512
          },
          "expiresAtEpochMillis": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        },
        "required": [
          "scopeType",
          "scopeId",
          "conversationId",
          "historyGeneration",
          "epoch",
          "commitHash",
          "rosterHash",
          "requiredFeatures",
          "eligibleUserIds",
          "devices",
          "expiresAtEpochMillis"
        ]
      },
      "SecureControlPageResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureTransitionResponse"
            }
          },
          "nextAfterEpoch": {
            "type": "integer",
            "format": "int64"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "required": [
          "transitions",
          "nextAfterEpoch",
          "hasMore"
        ]
      },
      "SecureConversationStateResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "protocol": {
            "type": "string"
          },
          "scopeType": {
            "$ref": "#/components/schemas/ChatScopeType"
          },
          "scopeId": {
            "type": "string"
          },
          "conversationId": {
            "type": "string"
          },
          "historyGeneration": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "communityId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "epoch": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "commitHash": {
            "type": "string",
            "nullable": true
          },
          "rosterHash": {
            "type": "string",
            "nullable": true
          },
          "roster": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureRosterMember"
            }
          },
          "authorityUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "identities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeIdentityResponse"
            }
          },
          "openSelfJoinEligible": {
            "type": "boolean"
          }
        },
        "required": [
          "scopeType",
          "scopeId",
          "conversationId",
          "historyGeneration",
          "status",
          "roster",
          "authorityUserIds",
          "identities"
        ]
      },
      "SecureCooperativeAdmissionListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requests": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/SecureCooperativeAdmissionResponse"
            }
          }
        },
        "required": [
          "requests"
        ]
      },
      "SecureCooperativeAdmissionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requestId": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SecureCooperativeAdmissionStatus"
          },
          "signedRequest": {
            "type": "string"
          },
          "targetUserId": {
            "type": "string"
          },
          "targetDeviceId": {
            "type": "string"
          },
          "expiresAtEpochMillis": {
            "type": "integer",
            "format": "int64"
          },
          "serverTimeEpochMillis": {
            "type": "integer",
            "format": "int64"
          },
          "helperUserId": {
            "type": "string",
            "nullable": true
          },
          "helperDeviceId": {
            "type": "string",
            "nullable": true
          },
          "helperCertificateSha256": {
            "type": "string",
            "nullable": true
          },
          "signedManifest": {
            "type": "string",
            "nullable": true
          },
          "signedApproval": {
            "type": "string",
            "nullable": true
          },
          "verificationIdentities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeIdentityResponse"
            }
          }
        },
        "required": [
          "requestId",
          "status",
          "signedRequest",
          "targetUserId",
          "targetDeviceId",
          "expiresAtEpochMillis",
          "serverTimeEpochMillis"
        ]
      },
      "SecureCooperativeAdmissionStatus": {
        "type": "string",
        "enum": [
          "REQUESTED",
          "CLAIMED",
          "PROPOSED",
          "APPROVED",
          "COMMITTED",
          "CANCELLED",
          "EXPIRED",
          "SUPERSEDED"
        ]
      },
      "SecureDeviceContentCapabilityProof": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string",
            "maxLength": 128
          },
          "certificateSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "signedCapability": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "deviceId",
          "certificateSha256",
          "revision",
          "signedCapability"
        ]
      },
      "SecureDeviceContentCapabilityResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "certificateSha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "signedCapability": {
            "type": "string",
            "nullable": true
          },
          "serverTimeEpochMillis": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        },
        "required": [
          "certificateSha256",
          "revision",
          "serverTimeEpochMillis"
        ]
      },
      "SecureDeviceRef": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          }
        },
        "required": [
          "userId",
          "deviceId"
        ]
      },
      "SecureHistoryGrantResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "epoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "signedGrant": {
            "type": "string",
            "maxLength": 16384
          }
        },
        "required": [
          "epoch",
          "signedGrant"
        ]
      },
      "SecureHistoryGrantTarget": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "epoch": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "recipientUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 16
          }
        },
        "required": [
          "epoch",
          "recipientUserIds"
        ]
      },
      "SecureHistoryGrantsResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "grants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureHistoryGrantResponse"
            },
            "maxItems": 8
          },
          "pending": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureHistoryGrantTarget"
            },
            "maxItems": 12,
            "description": "At most 16 recipients in total across these targets."
          }
        }
      },
      "SecureKeyPackageListResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "keyPackages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureKeyPackageResponse"
            }
          }
        },
        "required": [
          "keyPackages"
        ]
      },
      "SecureKeyPackageReservationResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requestId": {
            "type": "string"
          },
          "expiresAtEpochMillis": {
            "type": "integer",
            "format": "int64"
          },
          "keyPackages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SecureKeyPackageResponse"
            }
          }
        },
        "required": [
          "requestId",
          "expiresAtEpochMillis",
          "keyPackages"
        ]
      },
      "SecureKeyPackageResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedKeyPackage": {
            "type": "string"
          }
        },
        "required": [
          "signedKeyPackage"
        ]
      },
      "SecureMessagingCapabilityResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "protocol": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "historyGeneration": {
            "type": "string"
          },
          "minimumContentProtocolVersion": {
            "type": "integer",
            "format": "int32",
            "x-kotlin-default": "com.xchat.server.message.CONTENT_PROTOCOL_VERSION",
            "minimum": 1
          }
        },
        "required": [
          "enabled",
          "historyGeneration"
        ],
        "description": "SERVER_MANAGED_1 with enabled=false selects server-managed content; historyGeneration and minimumContentProtocolVersion fence current writes. This does not disable HTTPS/WSS or WebRTC transport encryption."
      },
      "SecureRosterMember": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "string"
          },
          "deviceId": {
            "type": "string"
          },
          "certificateSha256": {
            "type": "string"
          },
          "credential": {
            "type": "string"
          },
          "keyPackageSha256": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "userId",
          "deviceId",
          "certificateSha256",
          "credential"
        ]
      },
      "SecureTransitionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "epoch": {
            "type": "integer",
            "format": "int64"
          },
          "commitHash": {
            "type": "string"
          },
          "rosterHash": {
            "type": "string"
          },
          "signedManifest": {
            "type": "string"
          },
          "membershipApprovals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "verificationIdentities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/E2eeIdentityResponse"
            }
          }
        },
        "required": [
          "epoch",
          "commitHash",
          "rosterHash",
          "signedManifest",
          "membershipApprovals",
          "verificationIdentities"
        ]
      },
      "SendChannelMessageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/channel/ChannelDtos.kt",
          "line": 62
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "content"
        ]
      },
      "SendDirectMessageRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "clientMessageId": {
            "type": "string",
            "nullable": true
          },
          "replyToMessageId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "maxLength": 262144,
            "x-sensitive": true,
            "deprecated": true,
            "description": "Legacy encrypted-content field; managed writes omit it."
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server-readable structured content, validated by the owning message operation. Managed writers omit legacy encryptedEnvelope; transport encryption and server ACL still apply.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        }
      },
      "SetMessagePinRequest": {
        "type": "object",
        "properties": {
          "pinned": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/message/MessageDtos.kt",
          "line": 32
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "pinned"
        ]
      },
      "SetMessageReactionRequest": {
        "type": "object",
        "properties": {
          "emoji": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/message/MessageDtos.kt",
          "line": 21
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "emoji",
          "active"
        ]
      },
      "SubmitBotInteractionRequest": {
        "type": "object",
        "properties": {
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotInteractionModels.kt",
          "line": 14
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer."
      },
      "SubmitSecureApplicationRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedContentRequirement": {
            "type": "string",
            "nullable": true,
            "description": "Optional device-signed requirement bound to the exact encrypted envelope and current content-capability snapshot. Required for fresh inventories above ten resources and all future rendition writes; accepted exact replay is resolved before this admission proof."
          },
          "signedNotificationIntent": {
            "type": "string",
            "nullable": true,
            "description": "Optional device-signed collective mention intent bound to the exact encrypted envelope, sender, scope and client message ID. Notification routing only; existing MLS application bytes and recipient authority are unchanged."
          },
          "encryptedEnvelope": {
            "type": "string"
          }
        },
        "required": [
          "encryptedEnvelope"
        ]
      },
      "SubmitSecureTransitionRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signedManifest": {
            "type": "string"
          },
          "membershipApprovals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "signedManifest",
          "membershipApprovals"
        ]
      },
      "UpdateBotApplicationRequest": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "visibility": {
            "type": "string"
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int64"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 42
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "scopes",
          "visibility",
          "expectedRevision"
        ]
      },
      "UpdateBotInstallationRequest": {
        "type": "object",
        "properties": {
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "channelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "expectedRevision": {
            "type": "integer",
            "format": "int64"
          },
          "allowedRoleIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true,
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/bot/BotModels.kt",
          "line": 48
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "scopes",
          "channelIds",
          "expectedRevision"
        ]
      },
      "UpdateChannelMessageRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Explicit kotlinx.serialization JsonObject wire value; see the operation-specific content rules.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "expectedContentRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/channel/ChannelDtos.kt",
          "line": 70
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "content"
        ]
      },
      "UpdateCommunityMemberModerationRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mutedMinutes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 525600,
            "nullable": true,
            "description": "Null or omitted preserves the chat mute. Zero clears it; positive minutes mute new messages, edits and replies."
          },
          "banned": {
            "type": "boolean",
            "nullable": true
          },
          "microphoneMuted": {
            "type": "boolean",
            "nullable": true,
            "description": "Null or omitted preserves microphone permission. True revokes this community voice/stream audio grants; false allows the user to enable their microphone voluntarily."
          }
        }
      },
      "UpdateDirectMessageRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "encryptedEnvelope": {
            "type": "string",
            "nullable": true,
            "maxLength": 262144,
            "x-sensitive": true,
            "deprecated": true,
            "description": "Legacy encrypted-content field; managed writes omit it."
          },
          "managedBody": {
            "type": "object",
            "additionalProperties": true,
            "description": "Server-readable structured content, validated by the owning message operation. Managed writers omit legacy encryptedEnvelope; transport encryption and server ACL still apply.",
            "nullable": true,
            "x-kotlin-default": "null"
          },
          "expectedContentRevision": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "x-kotlin-default": "null"
          }
        }
      },
      "UpdateMediaPublicationRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "generation",
          "kind",
          "source",
          "status"
        ],
        "properties": {
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaPublicationKind"
          },
          "source": {
            "$ref": "#/components/schemas/MediaPublicationSource"
          },
          "status": {
            "$ref": "#/components/schemas/MediaPublicationStatus"
          },
          "codec": {
            "type": "string",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "frameRate": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bitrateKbps": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "spatialLayers": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "VoiceMicrophoneAdmissionResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          },
          "participationId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/VoiceMicrophoneAdmissionState"
          },
          "revision": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          }
        },
        "required": [
          "leaseId",
          "generation",
          "participationId",
          "state",
          "revision"
        ]
      },
      "VoiceMicrophoneAdmissionState": {
        "type": "string",
        "enum": [
          "PENDING",
          "GRANTED",
          "DENIED"
        ]
      },
      "VoicePublisherBinding": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "integer",
            "format": "int64"
          },
          "deviceId": {
            "type": "string"
          },
          "participationId": {
            "type": "string"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseGeneration": {
            "type": "integer",
            "format": "int32"
          },
          "providerParticipantIdentity": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 8
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "userId",
          "deviceId",
          "participationId",
          "leaseId",
          "leaseGeneration",
          "providerParticipantIdentity"
        ],
        "additionalProperties": false
      },
      "VoicePublisherKeyHead": {
        "type": "object",
        "properties": {
          "publisher": {
            "$ref": "#/components/schemas/VoicePublisherBinding"
          },
          "keyGeneration": {
            "type": "integer",
            "format": "int64",
            "minimum": 1
          },
          "previousKeyGeneration": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "keyIndex": {
            "type": "integer",
            "format": "int32",
            "enum": [
              0
            ]
          },
          "transition": {
            "$ref": "#/components/schemas/VoicePublisherKeyTransition"
          },
          "rosterDigest": {
            "type": "string"
          },
          "envelope": {
            "type": "string"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 27
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "publisher",
          "keyGeneration",
          "previousKeyGeneration",
          "keyIndex",
          "transition",
          "rosterDigest",
          "envelope"
        ],
        "additionalProperties": false
      },
      "VoicePublisherKeyMember": {
        "type": "object",
        "properties": {
          "publisher": {
            "$ref": "#/components/schemas/VoicePublisherBinding"
          },
          "identity": {
            "$ref": "#/components/schemas/E2eeIdentityResponse"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 18
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "publisher",
          "identity"
        ],
        "additionalProperties": false
      },
      "VoicePublisherKeyStateRequest": {
        "type": "object",
        "properties": {
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "leaseId": {
            "type": "integer",
            "format": "int64"
          },
          "generation": {
            "type": "integer",
            "format": "int32"
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 38
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "sessionId",
          "leaseId",
          "generation"
        ],
        "additionalProperties": false
      },
      "VoicePublisherKeyStateResponse": {
        "type": "object",
        "properties": {
          "protocolVersion": {
            "type": "integer",
            "format": "int32",
            "default": 2,
            "x-kotlin-default": "2"
          },
          "sessionId": {
            "type": "integer",
            "format": "int64"
          },
          "receiverLeaseId": {
            "type": "integer",
            "format": "int64"
          },
          "receiverGeneration": {
            "type": "integer",
            "format": "int32"
          },
          "rosterDigest": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoicePublisherKeyMember"
            }
          },
          "publishers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoicePublisherKeyHead"
            }
          }
        },
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 41
        },
        "description": "Default-valued and null response fields may be omitted by the production JSON serializer.",
        "required": [
          "sessionId",
          "receiverLeaseId",
          "receiverGeneration",
          "rosterDigest",
          "members",
          "publishers"
        ],
        "additionalProperties": false
      },
      "VoicePublisherKeyTransition": {
        "type": "string",
        "enum": [
          "INITIAL",
          "ADD_RATCHET",
          "REMOVE_RESEED"
        ],
        "x-source": {
          "path": "src/main/kotlin/com/xchat/server/voice/crypto/VoicePublisherKeyModels.kt",
          "line": 24
        }
      }
    }
  }
}
