{
  "openapi": "3.1.0",
  "info": {
    "title": "BiliBridge 内网插件 API",
    "version": "1.7.0",
    "description": "多账号隔离；每个插件令牌只绑定一个账号。私有数据 AES-256-GCM，账号密钥分别封装。局域网强制 HTTPS，本机回环允许 HTTP。插件使用 Bearer；管理会话还需 X-Platform-Session。Cookie 不导出，备份恢复仅本地工具。"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:39108/api/v1"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "检查平台是否可达",
        "operationId": "get_health",
        "security": [],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/capabilities": {
      "get": {
        "summary": "发现版本、当前权限、接口、事件和限制",
        "operationId": "get_capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Capabilities"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events/catalog": {
      "get": {
        "summary": "发现实时事件类型和所需权限",
        "operationId": "get_events_catalog",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/EventCatalog"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "下载 OpenAPI 3.1 契约",
        "operationId": "get_openapi.json",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "原始 OpenAPI 3.1 JSON，不包裹业务 envelope",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "openapi",
                    "info",
                    "paths",
                    "components",
                    "servers"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "summary": "查看当前插件权限和房间",
        "operationId": "get_me",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account": {
      "get": {
        "summary": "读取已验证的账号状态（本地缓存）",
        "operationId": "get_account",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：account:read",
        "x-required-scopes": {
          "all": [
            "account:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "断开连接并清除本平台登录态",
        "operationId": "delete_account",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/session": {
      "get": {
        "summary": "读取登录态是否保存及是否需要校验；不导出凭据",
        "operationId": "get_account_session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：account:read",
        "x-required-scopes": {
          "all": [
            "account:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSession"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account/verify": {
      "post": {
        "summary": "校验已保存的登录态",
        "operationId": "post_account_verify",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/login": {
      "get": {
        "summary": "发现当前扫码挑战，不访问上游",
        "operationId": "get_login",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CurrentLogin"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/login/qr": {
      "post": {
        "summary": "创建或恢复一个扫码登录挑战",
        "operationId": "post_login_qr",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/login/qr/{id}": {
      "get": {
        "summary": "读取扫码状态，不访问上游",
        "operationId": "get_login_qr__id_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "summary": "取消扫码登录",
        "operationId": "delete_login_qr__id_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/login/qr/{id}/image": {
      "get": {
        "summary": "读取当前二维码 PNG",
        "operationId": "get_login_qr__id__image",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "二维码 PNG，需认证，仅在原挑战有效期内可取",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/login/qr/{id}/poll": {
      "post": {
        "summary": "轮询一次登录结果，最少间隔 3 秒",
        "operationId": "post_login_qr__id__poll",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms": {
      "get": {
        "summary": "读取授权房间及连接状态",
        "operationId": "get_rooms",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Connection"
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}": {
      "get": {
        "summary": "读取单房间概览；字段按权限投影",
        "operationId": "get_rooms__roomId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoomOverview"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/connection": {
      "get": {
        "summary": "读取共享连接状态，不发起连接",
        "operationId": "get_rooms__roomId__connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "summary": "关闭房间共享连接",
        "operationId": "delete_rooms__roomId__connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/statistics": {
      "get": {
        "summary": "读取本次连接期间获授权事件的计数",
        "operationId": "get_rooms__roomId__statistics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoomStatistics"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/state": {
      "get": {
        "summary": "读取已观测的开播/下播、标题及分区；未知时不推测",
        "operationId": "get_rooms__roomId__state",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：room:read",
        "x-required-scopes": {
          "all": [
            "room:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ObservedRoomState"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/gifts/prices": {
      "get": {
        "summary": "分页读取完整上游礼物价目表，包含尚未收到的礼物；不表示本房间均可赠送",
        "operationId": "get_rooms__roomId__gifts_prices",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftPriceList"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/gifts/{giftId}/price": {
      "get": {
        "summary": "按礼物 ID 查询标价及人民币换算，返回缓存来源与新鲜度",
        "operationId": "get_rooms__roomId__gifts__giftId__price",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftPriceDetail"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/gifts/{giftId}/assets": {
      "get": {
        "summary": "查询礼物静态图与可选动图，复用公开价目表缓存",
        "operationId": "get_rooms__roomId__gifts__giftId__assets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftAssetDetail"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/users/{uid}/profile": {
      "get": {
        "summary": "补查当前房间用户头像与大航海身份，返回观测时间和过期状态",
        "operationId": "get_rooms__roomId__users__uid__profile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 及账号、房间授权；优先复用该账号该房间的事件资料，缺失时匿名补查。大航海身份只取当前房间事件，或经 room_info 验证主播 UID 后的用户卡片 privilege_type；不使用佩戴粉丝牌的身份。0=明确无身份、1=总督、2=提督、3=舰长、null=未知或已过期。检查 stale、各字段观测时间和 lastError；上游受限立即停查。返回未知资料不代表无身份。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserProfile"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/users/profiles": {
      "post": {
        "summary": "批量补查最多 20 名用户，未知或受限项明确返回 null 和原因",
        "operationId": "post_rooms__roomId__users_profiles",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 及账号、房间授权；优先复用该账号该房间的事件资料，缺失时匿名补查。大航海身份只取当前房间事件，或经 room_info 验证主播 UID 后的用户卡片 privilege_type；不使用佩戴粉丝牌的身份。0=明确无身份、1=总督、2=提督、3=舰长、null=未知或已过期。检查 stale、各字段观测时间和 lastError；上游受限立即停查。返回未知资料不代表无身份。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserProfileBatch"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "uids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]{0,19}$"
                    }
                  }
                },
                "required": [
                  "uids"
                ]
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}/sending-policy": {
      "get": {
        "summary": "读取共享发送限制和当前能否发送（建议值）",
        "operationId": "get_rooms__roomId__sending-policy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/SendingPolicy"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/messages": {
      "get": {
        "summary": "分页读取本插件近期与归档回执；默认 50 条，不含正文",
        "operationId": "get_rooms__roomId__messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ReceiptList"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ]
      },
      "post": {
        "summary": "发送一条弹幕；需账号开启、权限、固定幂等键和发送代次",
        "operationId": "post_rooms__roomId__messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "202": {
            "description": "相同请求正在处理中，可按回执 ID 查询"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 96,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          },
          {
            "name": "X-Platform-Delivery-Epoch",
            "in": "header",
            "required": false,
            "description": "发送意图建立时固定的代次；备份恢复后必填。代次冲突不能自动换代次重试原请求。",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}/connect": {
      "post": {
        "summary": "启动房间的共享弹幕连接",
        "operationId": "post_rooms__roomId__connect",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "202": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/events": {
      "get": {
        "summary": "接收实时事件，按游标补收内存中的获授权事件与断档通知",
        "operationId": "get_rooms__roomId__events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "SSE：15 秒心跳、事件 ID、Last-Event-ID 内存补收及 gap 断档通知。仅补收平台实际收到且仍在缓冲内的获授权事件；重启不保留缓冲。",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          },
          {
            "name": "X-Platform-Events",
            "in": "header",
            "required": false,
            "description": "可选的逗号分隔业务事件过滤器，例如 gift,guard；每种事件均需授权。ready/connection/gap 始终保留。",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/pk": {
      "get": {
        "summary": "读取当前 PK 对手状态（本地缓存）",
        "operationId": "get_rooms__roomId__pk",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read",
        "x-required-scopes": {
          "all": [
            "pk:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/rooms/{roomId}/first-win": {
      "post": {
        "summary": "查询当前 PK 对手首胜；共享每轮一次及 60 秒限频",
        "operationId": "post_rooms__roomId__first-win",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read + firstwin:read",
        "x-required-scopes": {
          "all": [
            "pk:read",
            "firstwin:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pkId"
                ],
                "properties": {
                  "pkId": {
                    "type": "string",
                    "pattern": "^[1-9]\\d{0,17}$"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}/first-win/broadcast": {
      "post": {
        "summary": "复核当前 PK 和任务并播报；所有插件共享每轮一次",
        "operationId": "post_rooms__roomId__first-win_broadcast",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read + firstwin:read + danmaku:send",
        "x-required-scopes": {
          "all": [
            "pk:read",
            "firstwin:read",
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Platform-Delivery-Epoch",
            "in": "header",
            "required": false,
            "description": "发送意图建立时固定的代次；备份恢复后必填。代次冲突不能自动换代次重试原请求。",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pkId",
                  "armedAtUtc"
                ],
                "properties": {
                  "pkId": {
                    "type": "string",
                    "pattern": "^[1-9]\\d{0,17}$"
                  },
                  "armedAtUtc": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/rooms/{roomId}/messages/{receiptId}": {
      "get": {
        "summary": "读取本插件的发送回执",
        "operationId": "get_rooms__roomId__messages__receiptId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/plugin/config": {
      "get": {
        "summary": "读取本插件独立配置（必须使用插件身份）",
        "operationId": "get_plugin_config",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：storage:read",
        "x-required-scopes": {
          "all": [
            "storage:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/PluginConfig"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "配置超过 4 KiB 或请求体超过平台上限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-plugin-only": true
      },
      "put": {
        "summary": "按版本保存本插件配置，最大 4 KiB",
        "operationId": "put_plugin_config",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：storage:write",
        "x-required-scopes": {
          "all": [
            "storage:write"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/PluginConfig"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "配置超过 4 KiB 或请求体超过平台上限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-plugin-only": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expectedVersion",
                  "value"
                ],
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  },
                  "value": {
                    "type": "object",
                    "description": "JSON 对象，序列化 UTF-8 最多 4096 字节，最大深度 8；不接受原型属性键。"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "按版本清空本插件配置，保留递增版本",
        "operationId": "delete_plugin_config",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：storage:write",
        "x-required-scopes": {
          "all": [
            "storage:write"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/PluginConfig"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "配置超过 4 KiB 或请求体超过平台上限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-plugin-only": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "expectedVersion"
                ],
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740990
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/session": {
      "post": {
        "summary": "使用管理员 Bearer 密钥建立管理台会话",
        "operationId": "post_admin_session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "退出管理台",
        "operationId": "delete_admin_session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/rotate-key": {
      "post": {
        "summary": "轮换管理员密钥并撤销全部旧管理会话",
        "operationId": "post_admin_rotate-key",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/status": {
      "get": {
        "summary": "读取平台概览",
        "operationId": "get_admin_status",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/plugins": {
      "get": {
        "summary": "列出插件（不含令牌）",
        "operationId": "get_admin_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "登记插件并签发一次性可见的令牌",
        "operationId": "post_admin_plugins",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "201": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PluginManifest"
              }
            }
          }
        }
      }
    },
    "/admin/plugins/{id}/enable": {
      "post": {
        "summary": "启用插件",
        "operationId": "post_admin_plugins__id__enable",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/plugins/{id}/disable": {
      "post": {
        "summary": "停用插件并关闭事件流",
        "operationId": "post_admin_plugins__id__disable",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/plugins/{id}/rotate": {
      "post": {
        "summary": "轮换插件令牌并关闭旧事件流",
        "operationId": "post_admin_plugins__id__rotate",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/plugins/{id}/revoke": {
      "post": {
        "summary": "撤销插件令牌",
        "operationId": "post_admin_plugins__id__revoke",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/settings": {
      "patch": {
        "summary": "设置发送开关与账号发送间隔",
        "operationId": "patch_admin_settings",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "additionalProperties": false,
                "properties": {
                  "sendingEnabled": {
                    "type": "boolean"
                  },
                  "minimumIntervalMs": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 3600000,
                    "multipleOf": 1000,
                    "description": "账号发送间隔，1–3600 秒的整秒毫秒值，默认 60000；所有插件和手动发送共用，保存即生效。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/audit": {
      "get": {
        "summary": "读取不含弹幕内容和凭据的操作记录",
        "operationId": "get_admin_audit",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/accounts": {
      "get": {
        "summary": "列出账号槽、授权房间和版本",
        "operationId": "get_admin_accounts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountList"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "创建独立账号槽，不自动登录或发送",
        "operationId": "post_admin_accounts",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "201": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  }
                },
                "required": [
                  "label"
                ]
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}": {
      "patch": {
        "summary": "按版本调整账号标签与启停状态",
        "operationId": "patch_admin_accounts__accountId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expectedVersion"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "按版本停用并移除账号，撤销插件并清除会话",
        "operationId": "delete_admin_accounts__accountId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expectedVersion"
                ]
              }
            }
          }
        }
      }
    },
    "/admin/plugins/{id}": {
      "patch": {
        "summary": "按授权版本修改已有插件能力与房间；账号绑定不变",
        "operationId": "patch_admin_plugins__id_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "scopes": {
                    "type": "array",
                    "maxItems": 15,
                    "items": {
                      "enum": [
                        "account:read",
                        "login:manage",
                        "danmaku:read",
                        "danmaku:send",
                        "pk:read",
                        "firstwin:read",
                        "room:read",
                        "gifts:read",
                        "superchat:read",
                        "storage:read",
                        "storage:write",
                        "enter:read",
                        "follow:read",
                        "likes:read",
                        "medal:read"
                      ]
                    }
                  },
                  "roomIds": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "expectedVersion"
                ]
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}/status": {
      "get": {
        "summary": "读取指定账号的管理状态",
        "operationId": "get_admin_accounts__accountId__status",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/accounts/{accountId}/settings": {
      "patch": {
        "summary": "设置指定账号的发送开关与发送间隔",
        "operationId": "patch_admin_accounts__accountId__settings",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "minProperties": 1,
                "additionalProperties": false,
                "properties": {
                  "sendingEnabled": {
                    "type": "boolean"
                  },
                  "minimumIntervalMs": {
                    "type": "integer",
                    "minimum": 1000,
                    "maximum": 3600000,
                    "multipleOf": 1000,
                    "description": "账号发送间隔，1–3600 秒的整秒毫秒值，默认 60000；所有插件和手动发送共用，保存即生效。"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}/rooms": {
      "get": {
        "summary": "读取指定账号房间名单与版本",
        "operationId": "get_admin_accounts__accountId__rooms",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "按账号版本增加真实房间 ID，不自动授权插件",
        "operationId": "post_admin_accounts__accountId__rooms",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "roomId": {
                    "type": "string",
                    "pattern": "^[1-9]\\d{0,15}$"
                  }
                },
                "required": [
                  "expectedVersion",
                  "roomId"
                ]
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}/rooms/{roomId}": {
      "delete": {
        "summary": "按版本移除房间并清理其插件授权与恢复意图",
        "operationId": "delete_admin_accounts__accountId__rooms__roomId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "expectedVersion"
                ]
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}/rooms/{roomId}/recovery": {
      "put": {
        "summary": "按版本设置房间自动恢复策略",
        "operationId": "put_admin_accounts__accountId__rooms__roomId__recovery",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSlot"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expectedVersion": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "expectedVersion",
                  "enabled"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}/events": {
      "get": {
        "summary": "接收账号状态通知，不含凭据",
        "operationId": "get_accounts__accountId__events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：account:read",
        "x-required-scopes": {
          "all": [
            "account:read"
          ]
        },
        "responses": {
          "200": {
            "description": "SSE：15 秒心跳、事件 ID、Last-Event-ID 内存补收及 gap 断档通知。仅补收平台实际收到且仍在缓冲内的获授权事件；重启不保留缓冲。",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ]
      }
    },
    "/plugin/events": {
      "get": {
        "summary": "接收本插件授权与告警通知",
        "operationId": "get_plugin_events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "SSE：15 秒心跳、事件 ID、Last-Event-ID 内存补收及 gap 断档通知。仅补收平台实际收到且仍在缓冲内的获授权事件；重启不保留缓冲。",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ]
      }
    },
    "/admin/diagnostics": {
      "get": {
        "summary": "读取账号连接、恢复、事件缓冲和故障诊断",
        "operationId": "get_admin_diagnostics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/statistics": {
      "get": {
        "summary": "读取最近 24 小时的有界调用聚合",
        "operationId": "get_admin_statistics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CallStatistics"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/storage": {
      "get": {
        "summary": "读取加密存储、磁盘、备份和回执容量",
        "operationId": "get_admin_storage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/plugin/statistics": {
      "get": {
        "summary": "只读取本插件的调用聚合",
        "operationId": "get_plugin_statistics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要有效的平台令牌（health 除外）。",
        "x-required-scopes": {
          "all": []
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CallStatistics"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/accounts/{accountId}/receipts/archive": {
      "post": {
        "summary": "创建加密回执或首胜归档任务",
        "operationId": "post_admin_accounts__accountId__receipts_archive",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "202": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "kind": {
                    "enum": [
                      "receipts",
                      "firstwin"
                    ],
                    "default": "receipts"
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/admin/jobs/{jobId}": {
      "get": {
        "summary": "读取维护任务结果与脱敏错误",
        "operationId": "get_admin_jobs__jobId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/admin/accounts/{accountId}/delivery/review": {
      "post": {
        "summary": "核对结果不明回执并解除暂停；不重发、不清除上游限制",
        "operationId": "post_admin_accounts__accountId__delivery_review",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "deliveryEpoch": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "acknowledge": {
                    "const": true
                  },
                  "receiptIds": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  }
                },
                "required": [
                  "deliveryEpoch",
                  "acknowledge"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}": {
      "get": {
        "summary": "读取已验证的账号状态（本地缓存）",
        "operationId": "get_accounts__accountId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：account:read",
        "x-required-scopes": {
          "all": [
            "account:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "summary": "断开连接并清除本平台登录态",
        "operationId": "delete_accounts__accountId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/session": {
      "get": {
        "summary": "读取登录态是否保存及是否需要校验；不导出凭据",
        "operationId": "get_accounts__accountId__session",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：account:read",
        "x-required-scopes": {
          "all": [
            "account:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/AccountSession"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/verify": {
      "post": {
        "summary": "校验已保存的登录态",
        "operationId": "post_accounts__accountId__verify",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/login": {
      "get": {
        "summary": "发现当前扫码挑战，不访问上游",
        "operationId": "get_accounts__accountId__login",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/CurrentLogin"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/login/qr": {
      "post": {
        "summary": "创建或恢复一个扫码登录挑战",
        "operationId": "post_accounts__accountId__login_qr",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/login/qr/{id}": {
      "get": {
        "summary": "读取扫码状态，不访问上游",
        "operationId": "get_accounts__accountId__login_qr__id_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "summary": "取消扫码登录",
        "operationId": "delete_accounts__accountId__login_qr__id_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/login/qr/{id}/image": {
      "get": {
        "summary": "读取当前二维码 PNG",
        "operationId": "get_accounts__accountId__login_qr__id__image",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "二维码 PNG，需认证，仅在原挑战有效期内可取",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/login/qr/{id}/poll": {
      "post": {
        "summary": "轮询一次登录结果，最少间隔 3 秒",
        "operationId": "post_accounts__accountId__login_qr__id__poll",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：login:manage",
        "x-required-scopes": {
          "all": [
            "login:manage"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms": {
      "get": {
        "summary": "读取授权房间及连接状态",
        "operationId": "get_accounts__accountId__rooms",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Connection"
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}": {
      "get": {
        "summary": "读取单房间概览；字段按权限投影",
        "operationId": "get_accounts__accountId__rooms__roomId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoomOverview"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/connection": {
      "get": {
        "summary": "读取共享连接状态，不发起连接",
        "operationId": "get_accounts__accountId__rooms__roomId__connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "summary": "关闭房间共享连接",
        "operationId": "delete_accounts__accountId__rooms__roomId__connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：admin",
        "x-required-scopes": {
          "all": [
            "admin"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/statistics": {
      "get": {
        "summary": "读取本次连接期间获授权事件的计数",
        "operationId": "get_accounts__accountId__rooms__roomId__statistics",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/RoomStatistics"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/state": {
      "get": {
        "summary": "读取已观测的开播/下播、标题及分区；未知时不推测",
        "operationId": "get_accounts__accountId__rooms__roomId__state",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：room:read",
        "x-required-scopes": {
          "all": [
            "room:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ObservedRoomState"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/gifts/prices": {
      "get": {
        "summary": "分页读取完整上游礼物价目表，包含尚未收到的礼物；不表示本房间均可赠送",
        "operationId": "get_accounts__accountId__rooms__roomId__gifts_prices",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftPriceList"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 256
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/gifts/{giftId}/price": {
      "get": {
        "summary": "按礼物 ID 查询标价及人民币换算，返回缓存来源与新鲜度",
        "operationId": "get_accounts__accountId__rooms__roomId__gifts__giftId__price",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftPriceDetail"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/gifts/{giftId}/assets": {
      "get": {
        "summary": "查询礼物静态图与可选动图，复用公开价目表缓存",
        "operationId": "get_accounts__accountId__rooms__roomId__gifts__giftId__assets",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 和目标账号、房间授权；无需账号登录或连接弹幕。匿名读取上游完整配置，所有账号与插件共享 1 小时内存缓存；上游失败时旧数据标记 stale，限制后停止该端点请求。标价不代表实际消费或房间可赠送性；银瓜子不换算人民币。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/GiftAssetDetail"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "giftId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/users/{uid}/profile": {
      "get": {
        "summary": "补查当前房间用户头像与大航海身份，返回观测时间和过期状态",
        "operationId": "get_accounts__accountId__rooms__roomId__users__uid__profile",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 及账号、房间授权；优先复用该账号该房间的事件资料，缺失时匿名补查。大航海身份只取当前房间事件，或经 room_info 验证主播 UID 后的用户卡片 privilege_type；不使用佩戴粉丝牌的身份。0=明确无身份、1=总督、2=提督、3=舰长、null=未知或已过期。检查 stale、各字段观测时间和 lastError；上游受限立即停查。返回未知资料不代表无身份。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserProfile"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "uid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/users/profiles": {
      "post": {
        "summary": "批量补查最多 20 名用户，未知或受限项明确返回 null 和原因",
        "operationId": "post_accounts__accountId__rooms__roomId__users_profiles",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要 gifts:read 及账号、房间授权；优先复用该账号该房间的事件资料，缺失时匿名补查。大航海身份只取当前房间事件，或经 room_info 验证主播 UID 后的用户卡片 privilege_type；不使用佩戴粉丝牌的身份。0=明确无身份、1=总督、2=提督、3=舰长、null=未知或已过期。检查 stale、各字段观测时间和 lastError；上游受限立即停查。返回未知资料不代表无身份。",
        "x-required-scopes": {
          "all": [
            "gifts:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/UserProfileBatch"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "uids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 20,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]{0,19}$"
                    }
                  }
                },
                "required": [
                  "uids"
                ]
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/sending-policy": {
      "get": {
        "summary": "读取共享发送限制和当前能否发送（建议值）",
        "operationId": "get_accounts__accountId__rooms__roomId__sending-policy",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/SendingPolicy"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/messages": {
      "get": {
        "summary": "分页读取本插件近期与归档回执；默认 50 条，不含正文",
        "operationId": "get_accounts__accountId__rooms__roomId__messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/ReceiptList"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ]
      },
      "post": {
        "summary": "发送一条弹幕；需账号开启、权限、固定幂等键和发送代次",
        "operationId": "post_accounts__accountId__rooms__roomId__messages",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "202": {
            "description": "相同请求正在处理中，可按回执 ID 查询"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 96,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          },
          {
            "name": "X-Platform-Delivery-Epoch",
            "in": "header",
            "required": false,
            "description": "发送意图建立时固定的代次；备份恢复后必填。代次冲突不能自动换代次重试原请求。",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/connect": {
      "post": {
        "summary": "启动房间的共享弹幕连接",
        "operationId": "post_accounts__accountId__rooms__roomId__connect",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "202": {
            "description": "成功，JSON 返回 {ok,data,requestId}",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    },
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/events": {
      "get": {
        "summary": "接收实时事件，按游标补收内存中的获授权事件与断档通知",
        "operationId": "get_accounts__accountId__rooms__roomId__events",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：任意一项 danmaku:read / pk:read / gifts:read / superchat:read / room:read / enter:read / follow:read / likes:read",
        "x-required-scopes": {
          "any": [
            "danmaku:read",
            "pk:read",
            "gifts:read",
            "superchat:read",
            "room:read",
            "enter:read",
            "follow:read",
            "likes:read"
          ]
        },
        "responses": {
          "200": {
            "description": "SSE：15 秒心跳、事件 ID、Last-Event-ID 内存补收及 gap 断档通知。仅补收平台实际收到且仍在缓冲内的获授权事件；重启不保留缓冲。",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          },
          {
            "name": "X-Platform-Events",
            "in": "header",
            "required": false,
            "description": "可选的逗号分隔业务事件过滤器，例如 gift,guard；每种事件均需授权。ready/connection/gap 始终保留。",
            "schema": {
              "type": "string",
              "maxLength": 160
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/pk": {
      "get": {
        "summary": "读取当前 PK 对手状态（本地缓存）",
        "operationId": "get_accounts__accountId__rooms__roomId__pk",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read",
        "x-required-scopes": {
          "all": [
            "pk:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/first-win": {
      "post": {
        "summary": "查询当前 PK 对手首胜；共享每轮一次及 60 秒限频",
        "operationId": "post_accounts__accountId__rooms__roomId__first-win",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read + firstwin:read",
        "x-required-scopes": {
          "all": [
            "pk:read",
            "firstwin:read"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pkId"
                ],
                "properties": {
                  "pkId": {
                    "type": "string",
                    "pattern": "^[1-9]\\d{0,17}$"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/first-win/broadcast": {
      "post": {
        "summary": "复核当前 PK 和任务并播报；所有插件共享每轮一次",
        "operationId": "post_accounts__accountId__rooms__roomId__first-win_broadcast",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：pk:read + firstwin:read + danmaku:send",
        "x-required-scopes": {
          "all": [
            "pk:read",
            "firstwin:read",
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Platform-Delivery-Epoch",
            "in": "header",
            "required": false,
            "description": "发送意图建立时固定的代次；备份恢复后必填。代次冲突不能自动换代次重试原请求。",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pkId",
                  "armedAtUtc"
                ],
                "properties": {
                  "pkId": {
                    "type": "string",
                    "pattern": "^[1-9]\\d{0,17}$"
                  },
                  "armedAtUtc": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/accounts/{accountId}/rooms/{roomId}/messages/{receiptId}": {
      "get": {
        "summary": "读取本插件的发送回执",
        "operationId": "get_accounts__accountId__rooms__roomId__messages__receiptId_",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "需要权限：danmaku:send",
        "x-required-scopes": {
          "all": [
            "danmaku:send"
          ]
        },
        "responses": {
          "200": {
            "description": "成功，JSON 返回 {ok,data,requestId}"
          },
          "400": {
            "description": "输入不合法",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "未认证或令牌过期",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "权限不足、账号/房间未授权或非内网请求",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "账号、房间、回执或任务不存在",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "405": {
            "description": "方法不受支持",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "状态或幂等键冲突",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "上游受限或发送暂停",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "达到调用频率限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "上游错误或发送结果未知，禁止自动重发",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "存储、归档或服务暂不可用；发送不能自动重试",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "receiptId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "details": {
                "type": "object"
              }
            },
            "required": [
              "code"
            ],
            "additionalProperties": false
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "error",
          "requestId"
        ],
        "additionalProperties": false
      },
      "AccountSession": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string"
          },
          "credentialsSaved": {
            "type": "boolean"
          },
          "verified": {
            "type": "boolean"
          },
          "requiresVerification": {
            "type": "boolean"
          },
          "verifiedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "canBeginLogin": {
            "type": "boolean"
          },
          "verificationIntervalSeconds": {
            "const": 300
          },
          "verificationMaxAgeSeconds": {
            "const": 600
          },
          "lastVerificationAttemptAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "state",
          "credentialsSaved",
          "verified",
          "requiresVerification",
          "verifiedAtUtc",
          "canBeginLogin",
          "verificationIntervalSeconds",
          "verificationMaxAgeSeconds",
          "lastVerificationAttemptAtUtc"
        ],
        "additionalProperties": false
      },
      "Connection": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "disconnected",
              "connecting",
              "authenticating",
              "connected",
              "stopped"
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "connectedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "heartbeatAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "receivedMessages": {
            "type": "integer",
            "minimum": 0
          },
          "lastMessageAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastEventAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastAttemptAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "automaticRecovery": {
            "type": "boolean"
          },
          "recoveryDesired": {
            "type": "boolean"
          },
          "consecutiveFailures": {
            "type": "integer",
            "minimum": 0
          },
          "reconnectAttempts": {
            "type": "integer",
            "minimum": 0
          },
          "nextRetryAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recoveryHaltedReason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "roomId",
          "state",
          "reason",
          "connectedAtUtc",
          "heartbeatAtUtc"
        ],
        "additionalProperties": false
      },
      "ObservedRoomState": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "source": {
            "const": "observed_events"
          },
          "stale": {
            "type": "boolean"
          },
          "liveStatus": {
            "type": "string",
            "enum": [
              "unknown",
              "live",
              "offline"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "areaName": {
            "type": [
              "string",
              "null"
            ]
          },
          "parentAreaName": {
            "type": [
              "string",
              "null"
            ]
          },
          "lifecycleObservedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "metadataObservedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "roomId",
          "source",
          "stale",
          "liveStatus",
          "title",
          "areaName",
          "parentAreaName",
          "lifecycleObservedAtUtc",
          "metadataObservedAtUtc"
        ],
        "additionalProperties": false
      },
      "RoomStatistics": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "source": {
            "const": "current_connection"
          },
          "connectionState": {
            "type": "string"
          },
          "sinceUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "lastObservedAtUtc": {
            "type": "object",
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          },
          "totalObserved": {
            "type": "integer",
            "minimum": 0
          },
          "persistent": {
            "const": false
          }
        },
        "required": [
          "roomId",
          "source",
          "connectionState",
          "sinceUtc",
          "counts",
          "lastObservedAtUtc",
          "totalObserved",
          "persistent"
        ],
        "additionalProperties": false
      },
      "RoomOverview": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "connection": {
            "$ref": "#/components/schemas/Connection"
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ready",
                "connection",
                "danmaku",
                "pk",
                "gift",
                "guard",
                "superchat",
                "superchat_delete",
                "live",
                "room",
                "enter",
                "follow",
                "like",
                "gap"
              ]
            }
          },
          "state": {
            "$ref": "#/components/schemas/ObservedRoomState"
          },
          "pk": {
            "type": "object",
            "description": "仅在具有 pk:read 时返回的当前 PK 投影。"
          }
        },
        "required": [
          "roomId",
          "connection",
          "eventTypes"
        ],
        "additionalProperties": false
      },
      "SendingPolicy": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "enabled": {
            "type": "boolean"
          },
          "stopped": {
            "type": "boolean"
          },
          "minimumIntervalMs": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 3600000,
            "multipleOf": 1000
          },
          "maxCharacters": {
            "const": 20
          },
          "accountId": {
            "type": "string"
          },
          "deliveryEpoch": {
            "type": [
              "string",
              "null"
            ]
          },
          "deliveryEpochRequired": {
            "type": "boolean"
          },
          "platformAttemptsPerMinute": {
            "const": null,
            "description": "平台不设发送总量限制；各账号独立限速。"
          },
          "unresolvedReceipts": {
            "type": "integer",
            "minimum": 0
          },
          "nextAvailableAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "remainingCooldownMs": {
            "type": "integer",
            "minimum": 0
          },
          "canSend": {
            "type": "boolean"
          },
          "blockedReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "advisory": {
            "const": true
          }
        },
        "required": [
          "roomId",
          "enabled",
          "stopped",
          "minimumIntervalMs",
          "maxCharacters",
          "accountId",
          "deliveryEpoch",
          "deliveryEpochRequired",
          "platformAttemptsPerMinute",
          "unresolvedReceipts",
          "nextAvailableAtUtc",
          "remainingCooldownMs",
          "canSend",
          "blockedReasons",
          "advisory"
        ],
        "additionalProperties": false
      },
      "ReceiptList": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pluginId",
                "roomId",
                "kind",
                "createdAtUtc"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "pluginId": {
                  "type": "string"
                },
                "roomId": {
                  "type": "string",
                  "pattern": "^[1-9]\\d{0,15}$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "unknown",
                    "cancelled"
                  ]
                },
                "createdAtUtc": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "hasMore",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "PluginConfig": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "value": {
            "type": "object",
            "description": "最大 4096 字节 UTF-8 JSON；最大深度 8。"
          },
          "updatedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "version",
          "value",
          "updatedAtUtc"
        ],
        "additionalProperties": false
      },
      "CurrentLogin": {
        "type": "object",
        "properties": {
          "challenge": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "state",
                  "qrReady",
                  "account"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "state": {
                    "type": "string"
                  },
                  "qrReady": {
                    "type": "boolean"
                  },
                  "expiresAtUtc": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "account": {
                    "type": "object"
                  }
                },
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "challenge"
        ],
        "additionalProperties": false
      },
      "EventCatalog": {
        "type": "object",
        "properties": {
          "replay": {
            "const": true
          },
          "persistentHistory": {
            "const": false
          },
          "unsupportedEvents": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "ready",
                    "connection",
                    "danmaku",
                    "pk",
                    "gift",
                    "guard",
                    "superchat",
                    "superchat_delete",
                    "live",
                    "room",
                    "enter",
                    "follow",
                    "like",
                    "gap"
                  ]
                },
                "description": {
                  "type": "string"
                },
                "authorized": {
                  "type": "boolean"
                },
                "source": {
                  "type": "string"
                },
                "realRoomAcceptance": {
                  "const": "pending"
                },
                "requiredAll": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "requiredAny": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "type",
                "description",
                "authorized"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "replay",
          "persistentHistory",
          "unsupportedEvents",
          "events"
        ],
        "additionalProperties": false
      },
      "Capabilities": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "apiVersion": {
            "const": "v1"
          },
          "type": {
            "type": "string",
            "enum": [
              "admin",
              "plugin"
            ]
          },
          "accountId": {
            "type": [
              "string",
              "null"
            ]
          },
          "features": {
            "type": "object",
            "properties": {
              "blindBoxGiftDetails": {
                "const": true
              },
              "giftPriceCatalog": {
                "const": true
              },
              "giftEventPrices": {
                "const": true
              },
              "giftUserDetails": {
                "const": true
              },
              "roomUserProfiles": {
                "const": true
              },
              "giftAssets": {
                "const": true
              }
            },
            "required": [
              "blindBoxGiftDetails",
              "giftPriceCatalog",
              "giftEventPrices",
              "giftUserDetails",
              "roomUserProfiles",
              "giftAssets"
            ],
            "additionalProperties": false
          },
          "roomIds": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[1-9]\\d{0,15}$"
            }
          },
          "grantedScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "eventTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ready",
                "connection",
                "danmaku",
                "pk",
                "gift",
                "guard",
                "superchat",
                "superchat_delete",
                "live",
                "room",
                "enter",
                "follow",
                "like",
                "gap"
              ]
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "granted": {
                  "type": "boolean"
                }
              },
              "required": [
                "scope",
                "description",
                "granted"
              ],
              "additionalProperties": false
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "method": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "requiredAll": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "requiredAny": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "pluginOnly": {
                  "type": "boolean"
                },
                "authorized": {
                  "type": "boolean"
                }
              },
              "required": [
                "method",
                "path",
                "description",
                "requiredAll",
                "requiredAny",
                "pluginOnly",
                "authorized"
              ],
              "additionalProperties": false
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "requestBodyBytes": {
                "type": "integer",
                "minimum": 0
              },
              "pluginConfigBytes": {
                "type": "integer",
                "minimum": 0
              },
              "pluginConfigMaxDepth": {
                "type": "integer",
                "minimum": 0
              },
              "streamsPerCaller": {
                "type": "integer",
                "minimum": 0
              },
              "streamsPerPlatform": {
                "type": "integer",
                "minimum": 0
              },
              "streamHeartbeatSeconds": {
                "type": "integer",
                "minimum": 0
              },
              "messageCharacters": {
                "type": "integer",
                "minimum": 0
              },
              "minimumSendIntervalSeconds": {
                "type": "integer",
                "minimum": 0
              },
              "recentReceiptLimit": {
                "type": "integer",
                "minimum": 0
              },
              "maxAccounts": {
                "type": "integer",
                "minimum": 0
              },
              "maxUpstreamConnections": {
                "type": "integer",
                "minimum": 0
              },
              "platformSendAttemptsPerMinute": {
                "const": null
              },
              "eventBufferSeconds": {
                "type": "integer",
                "minimum": 0
              },
              "userProfileBatchMax": {
                "type": "integer",
                "minimum": 0
              },
              "userProfileGuardFreshSeconds": {
                "type": "integer",
                "minimum": 0
              },
              "userProfileLookupsPerMinute": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "requestBodyBytes",
              "pluginConfigBytes",
              "pluginConfigMaxDepth",
              "streamsPerCaller",
              "streamsPerPlatform",
              "streamHeartbeatSeconds",
              "messageCharacters",
              "minimumSendIntervalSeconds",
              "recentReceiptLimit",
              "maxAccounts",
              "maxUpstreamConnections",
              "platformSendAttemptsPerMinute",
              "eventBufferSeconds",
              "userProfileBatchMax",
              "userProfileGuardFreshSeconds",
              "userProfileLookupsPerMinute"
            ],
            "additionalProperties": false
          },
          "policy": {
            "type": "object",
            "properties": {
              "intranetOnly": {
                "const": true
              },
              "lanHttpsRequired": {
                "const": true
              },
              "exportsCookies": {
                "const": false
              },
              "executesPlugins": {
                "const": false
              },
              "eventReplay": {
                "const": true
              },
              "automaticReconnect": {
                "const": true
              },
              "automaticSendRetry": {
                "const": false
              },
              "eventPersistence": {
                "const": false
              },
              "tokenBoundToOneAccount": {
                "const": true
              },
              "backupsLocalOnly": {
                "const": true
              }
            },
            "required": [
              "intranetOnly",
              "lanHttpsRequired",
              "exportsCookies",
              "executesPlugins",
              "eventReplay",
              "automaticReconnect",
              "automaticSendRetry",
              "eventPersistence",
              "tokenBoundToOneAccount",
              "backupsLocalOnly"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "version",
          "apiVersion",
          "type",
          "accountId",
          "features",
          "roomIds",
          "grantedScopes",
          "eventTypes",
          "scopes",
          "operations",
          "limits",
          "policy"
        ],
        "additionalProperties": false
      },
      "Medal": {
        "type": "object",
        "properties": {
          "level": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "name": {
            "type": "string"
          },
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "anchorUid": {
            "type": "string"
          }
        },
        "required": [
          "level",
          "name",
          "roomId"
        ],
        "additionalProperties": false
      },
      "InteractionEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "uid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "source": {
            "const": "INTERACT_WORD_V2"
          },
          "followType": {
            "enum": [
              "normal",
              "special",
              "mutual"
            ]
          },
          "count": {
            "type": "null"
          },
          "aggregate": {
            "const": false
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "uid",
          "name",
          "source",
          "sentAtUtc"
        ],
        "additionalProperties": false
      },
      "AccountSlot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "removedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "uid": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "integer",
            "minimum": 0
          },
          "createdAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "rooms": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[1-9]\\d{0,15}$"
            }
          },
          "roomVersions": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 0
            }
          },
          "recovery": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        },
        "required": [
          "id",
          "label",
          "enabled",
          "removedAtUtc",
          "uid",
          "version",
          "createdAtUtc",
          "rooms",
          "roomVersions",
          "recovery"
        ],
        "additionalProperties": false
      },
      "AccountList": {
        "type": "object",
        "properties": {
          "defaultAccountId": {
            "type": "string"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountSlot"
            }
          }
        },
        "required": [
          "defaultAccountId",
          "accounts"
        ],
        "additionalProperties": false
      },
      "CallStatistics": {
        "type": "object",
        "properties": {
          "source": {
            "const": "current_process"
          },
          "persistent": {
            "const": false
          },
          "retentionHours": {
            "const": 24
          },
          "calls": {
            "type": "integer",
            "minimum": 0
          },
          "errors": {
            "type": "integer",
            "minimum": 0
          },
          "rateLimited": {
            "type": "integer",
            "minimum": 0
          },
          "buckets": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "principal",
                "route",
                "status",
                "calls",
                "sinceUtc",
                "averageDurationMs"
              ]
            }
          }
        },
        "required": [
          "source",
          "persistent",
          "retentionHours",
          "calls",
          "errors",
          "rateLimited",
          "buckets"
        ],
        "additionalProperties": false
      },
      "GiftUnitPrice": {
        "type": "object",
        "properties": {
          "coinType": {
            "enum": [
              "gold",
              "silver",
              null
            ]
          },
          "unitCoin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "瓜子整数的十进制字符串；null 表示上游未提供有效价格。"
          },
          "unitCny": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "人民币金额，保留三位小数；仅金瓜子按 1000:1 换算，银瓜子为 null。"
          }
        },
        "required": [
          "coinType",
          "unitCoin",
          "unitCny"
        ],
        "additionalProperties": false
      },
      "GiftEventPrice": {
        "type": "object",
        "properties": {
          "coinType": {
            "enum": [
              "gold",
              "silver",
              null
            ]
          },
          "unitCoin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "瓜子整数的十进制字符串；null 表示上游未提供有效价格。"
          },
          "unitCny": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "人民币金额，保留三位小数；仅金瓜子按 1000:1 换算，银瓜子为 null。"
          },
          "paidCoin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "瓜子整数的十进制字符串；null 表示上游未提供有效价格。"
          },
          "paidCny": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "人民币金额，保留三位小数；仅金瓜子按 1000:1 换算，银瓜子为 null。"
          },
          "valueCoin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "瓜子整数的十进制字符串；null 表示上游未提供有效价格。"
          },
          "valueCny": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "人民币金额，保留三位小数；仅金瓜子按 1000:1 换算，银瓜子为 null。"
          },
          "blindBoxUnitCoin": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(0|[1-9][0-9]{0,29})$",
            "description": "瓜子整数的十进制字符串；null 表示上游未提供有效价格。"
          },
          "blindBoxUnitCny": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[0-9]+\\.[0-9]{3}$",
            "description": "人民币金额，保留三位小数；仅金瓜子按 1000:1 换算，银瓜子为 null。"
          }
        },
        "required": [
          "coinType",
          "unitCoin",
          "unitCny",
          "paidCoin",
          "paidCny",
          "valueCoin",
          "valueCny",
          "blindBoxUnitCoin",
          "blindBoxUnitCny"
        ],
        "additionalProperties": false
      },
      "GiftAssets": {
        "type": "object",
        "properties": {
          "staticUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "animatedUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "staticUrl",
          "animatedUrl"
        ],
        "additionalProperties": false
      },
      "GiftPriceItem": {
        "type": "object",
        "properties": {
          "giftId": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,19}$"
          },
          "giftName": {
            "type": "string",
            "maxLength": 100
          },
          "price": {
            "$ref": "#/components/schemas/GiftUnitPrice"
          },
          "assets": {
            "$ref": "#/components/schemas/GiftAssets"
          }
        },
        "required": [
          "giftId",
          "giftName",
          "price",
          "assets"
        ],
        "additionalProperties": false
      },
      "GiftAssetDetail": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "source": {
            "const": "bilibili_gift_config"
          },
          "coverage": {
            "const": "upstream_catalog"
          },
          "roomAvailability": {
            "const": "not_checked"
          },
          "catalogId": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "fetchedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "persistent": {
            "const": false
          },
          "item": {
            "type": "object",
            "properties": {
              "giftId": {
                "type": "string"
              },
              "giftName": {
                "type": "string"
              },
              "staticUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "animatedUrl": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "giftId",
              "giftName",
              "staticUrl",
              "animatedUrl"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "roomId",
          "source",
          "coverage",
          "roomAvailability",
          "catalogId",
          "fetchedAtUtc",
          "expiresAtUtc",
          "stale",
          "lastError",
          "persistent",
          "item"
        ],
        "additionalProperties": false
      },
      "UserProfile": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "uid": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "guardLevel": {
            "enum": [
              0,
              1,
              2,
              3,
              null
            ]
          },
          "observedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "avatarObservedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "guardObservedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          },
          "avatarStale": {
            "type": "boolean"
          },
          "guardStale": {
            "type": "boolean"
          },
          "sources": {
            "type": "object",
            "properties": {
              "avatar": {
                "enum": [
                  "gift",
                  "guard",
                  "user_card",
                  null
                ]
              },
              "guard": {
                "enum": [
                  "gift",
                  "guard",
                  "user_card",
                  null
                ]
              }
            },
            "required": [
              "avatar",
              "guard"
            ],
            "additionalProperties": false
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "nextLookupAfterUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "roomId",
          "uid",
          "name",
          "avatarUrl",
          "guardLevel",
          "observedAtUtc",
          "avatarObservedAtUtc",
          "guardObservedAtUtc",
          "stale",
          "avatarStale",
          "guardStale",
          "sources",
          "lastError",
          "nextLookupAfterUtc"
        ],
        "additionalProperties": false
      },
      "UserProfileBatch": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserProfile"
            }
          },
          "complete": {
            "type": "boolean"
          }
        },
        "required": [
          "roomId",
          "items",
          "complete"
        ],
        "additionalProperties": false
      },
      "GiftPriceList": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "source": {
            "const": "bilibili_gift_config"
          },
          "coverage": {
            "const": "upstream_catalog"
          },
          "roomAvailability": {
            "const": "not_checked"
          },
          "catalogId": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "fetchedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "persistent": {
            "const": false
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GiftPriceItem"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "roomId",
          "source",
          "coverage",
          "roomAvailability",
          "catalogId",
          "fetchedAtUtc",
          "expiresAtUtc",
          "stale",
          "lastError",
          "persistent",
          "items",
          "total",
          "limit",
          "hasMore",
          "nextCursor"
        ],
        "additionalProperties": false
      },
      "GiftPriceDetail": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "source": {
            "const": "bilibili_gift_config"
          },
          "coverage": {
            "const": "upstream_catalog"
          },
          "roomAvailability": {
            "const": "not_checked"
          },
          "catalogId": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "fetchedAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expiresAtUtc": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          },
          "lastError": {
            "type": [
              "string",
              "null"
            ]
          },
          "persistent": {
            "const": false
          },
          "item": {
            "$ref": "#/components/schemas/GiftPriceItem"
          }
        },
        "required": [
          "roomId",
          "source",
          "coverage",
          "roomAvailability",
          "catalogId",
          "fetchedAtUtc",
          "expiresAtUtc",
          "stale",
          "lastError",
          "persistent",
          "item"
        ],
        "additionalProperties": false
      },
      "GiftEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "uid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "giftId": {
            "type": "string"
          },
          "giftName": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "transactionId": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "guardLevel": {
            "enum": [
              0,
              1,
              2,
              3,
              null
            ]
          },
          "giftIconUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBlindGift": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "coinType": {
            "enum": [
              "gold",
              "silver",
              null
            ]
          },
          "totalCoin": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          },
          "unitPriceGold": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "开出礼物的单价；totalCoin 为实付总额，不能作为盲盒产出价值。"
          },
          "price": {
            "$ref": "#/components/schemas/GiftEventPrice"
          },
          "blindGift": {
            "type": "object",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "unitPriceGold": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              }
            },
            "required": [
              "name",
              "unitPriceGold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "uid",
          "name",
          "giftId",
          "giftName",
          "count",
          "id",
          "transactionId",
          "avatarUrl",
          "guardLevel",
          "isBlindGift",
          "coinType",
          "totalCoin",
          "price",
          "sentAtUtc"
        ],
        "additionalProperties": false
      },
      "GuardEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "uid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "guardLevel": {
            "enum": [
              1,
              2,
              3
            ]
          },
          "giftName": {
            "type": [
              "string",
              "null"
            ]
          },
          "avatarUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "null"
          },
          "transactionId": {
            "type": "null"
          },
          "giftId": {
            "type": [
              "string",
              "null"
            ]
          },
          "isBlindGift": {
            "const": false
          },
          "priceGold": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "uid",
          "name",
          "count",
          "guardLevel",
          "giftName",
          "priceGold",
          "sentAtUtc"
        ],
        "additionalProperties": false
      },
      "SuperchatEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "id": {
            "type": "string"
          },
          "uid": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "text": {
            "type": "string",
            "maxLength": 1000
          },
          "priceCny": {
            "type": "integer",
            "minimum": 0
          },
          "startsAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "endsAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "id",
          "uid",
          "name",
          "text",
          "priceCny",
          "startsAtUtc",
          "endsAtUtc",
          "sentAtUtc"
        ],
        "additionalProperties": false
      },
      "SuperchatDeleteEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "maxItems": 256
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "ids"
        ],
        "additionalProperties": false
      },
      "LiveEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "liveStatus": {
            "enum": [
              "live",
              "offline"
            ]
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "liveStatus"
        ],
        "additionalProperties": false
      },
      "RoomEvent": {
        "type": "object",
        "properties": {
          "roomId": {
            "type": "string",
            "pattern": "^[1-9]\\d{0,15}$"
          },
          "receivedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "sentAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string"
          },
          "eventId": {
            "type": "string"
          },
          "bootId": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "medal": {
            "$ref": "#/components/schemas/Medal"
          },
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "areaName": {
            "type": "string",
            "maxLength": 100
          },
          "parentAreaName": {
            "type": "string",
            "maxLength": 100
          }
        },
        "required": [
          "roomId",
          "receivedAtUtc",
          "title",
          "areaName",
          "parentAreaName"
        ],
        "additionalProperties": false
      },
      "EventScopes": {
        "type": "object",
        "description": "{\"danmaku\":\"danmaku:read\",\"pk\":\"pk:read\",\"gift\":\"gifts:read\",\"guard\":\"gifts:read\",\"superchat\":\"superchat:read\",\"superchat_delete\":\"superchat:read\",\"live\":\"room:read\",\"room\":\"room:read\",\"enter\":\"enter:read\",\"follow\":\"follow:read\",\"like\":\"likes:read\"}"
      },
      "PluginManifest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "scopes",
          "roomIds"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "description": {
            "type": "string",
            "maxLength": 240
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "固定账号绑定；省略时绑定默认账号，之后不能通过修改授权改变。"
          },
          "version": {
            "type": "string",
            "pattern": "^\\d{1,4}\\.\\d{1,4}\\.\\d{1,4}$",
            "default": "1.0.0"
          },
          "scopes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "enum": [
                "account:read",
                "login:manage",
                "danmaku:read",
                "danmaku:send",
                "pk:read",
                "firstwin:read",
                "room:read",
                "gifts:read",
                "superchat:read",
                "storage:read",
                "storage:write",
                "enter:read",
                "follow:read",
                "likes:read",
                "medal:read"
              ]
            }
          },
          "roomIds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 8,
            "items": {
              "type": "string"
            }
          },
          "expiresInDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 30
          }
        }
      }
    }
  }
}
