openapi: 3.1.0
info:
  title: Zealot API
  version: v1.4
  description: >
    文档可能提供或没有提供测试接口的工具，便于快速测试，你还可以使用如下工具：


    - [cURL](https://curl.se/) (推荐，命令行工具)

    - [Bruno](https://www.usebruno.com/)

    - [Postman](https://www.postman.com/downloads/)

    - 任意浏览器，如果你不需要设置 headers 或请求主体


    准备好工具，你可以通过 `GET` 请求 {host}/api/version 可看到 Zealot 版本信息：


    ```json

    {
      "version": "6.1.0",
      "vcs_ref": "effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d",
      "build_date": "2024-05-23T06:04:48.989Z"
    }

    ```


    ## 接口认证


    接口目前仅提供在用户密钥认证方式，参数是 `token`，请求接口时可在接口 query 或表单字段中传递此字段。


    ```

    https://tryzealot.ews.im/api/users?token={token}

    ```


    ### 用户密钥


    用户密钥在[用户详情](https://zealot.ews.im/zh-Hans/docs/user-guide/user_settings)最底部找到。
servers:
  - url: https://tryzealot.ews.im/api
    description: 演示服务器
paths:
  /apps:
    get:
      summary: 获取应用列表
      tags:
        - 应用
      description: 获取所有未归档应用列表详情，支持分页，按照最新创建时间倒序
      operationId: listApps
      parameters:
        - default: all
          name: scope
          in: query
          required: false
          description: 应用范围 / 可选值有 all, active, archived
          schema:
            type: string
        - $ref: '#/components/parameters/pageParam'
        - $ref: '#/components/parameters/perPageParam'
      responses:
        '200':
          description: 应用列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AppIndex'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
    post:
      summary: 创建应用
      tags:
        - 应用
      description: 根据应用名创建应用
      operationId: createApp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/AppOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/AppOptions'
      responses:
        '201':
          description: 应用详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
  /apps/version_exist:
    get:
      summary: 检查应用版本是否存在
      security: []
      tags:
        - 应用
      description: |
        根据以下两种查询条件组合查询应用单一渠道的版本是否存在：

        - 包名 `bundle_id` + 主版本号 `release_version` + 内部版本号 `build_verion`
        - 包名 `bundle_id` + Git 最后提交值 `git_commit`
      operationId: versionExistApps
      parameters:
        - required: true
          name: channel_key
          in: query
          description: 应用渠道 Key
          schema:
            type: string
        - required: true
          name: bundle_id
          in: query
          description: 应用的包名，iOS 取 bundle_id，Android 取 package_name
          schema:
            type: string
        - name: git_commit
          in: query
          required: false
          description: Git 提交哈希值
          schema:
            type: string
        - name: release_version
          in: query
          required: false
          description: 主版本号
          schema:
            type: string
        - name: build_version
          in: query
          required: false
          description: 内部版本号
          schema:
            type: string
      responses:
        '200':
          description: 应用详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/versions:
    get:
      summary: 应用渠道的上传版本列表
      security: []
      tags:
        - 应用
      description: 查询应用单一渠道的上传版本列表，版本列表按上传时间倒序
      operationId: listAppVersions
      parameters:
        - $ref: '#/components/parameters/channelKeyParam'
        - $ref: '#/components/parameters/pageParam'
        - $ref: '#/components/parameters/perPageParam'
      responses:
        '200':
          description: 应用详情及版本列表
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionsIndex'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/latest:
    get:
      summary: 搜索指定版本后面的应用版本列表
      security: []
      tags:
        - 应用
      description: 查询应用单一渠道的最新版本列表，版本列表按上传时间倒序
      operationId: getLatestApp
      parameters:
        - $ref: '#/components/parameters/channelKeyParam'
        - name: bundle_id
          in: query
          required: false
          description: 应用的包名，iOS 取 bundle_id，Android 取 package_name
          schema:
            type: string
        - name: release_version
          in: query
          required: false
          description: 主版本号
          schema:
            type: string
        - name: build_version
          in: query
          required: false
          description: 内部版本号
          schema:
            type: string
      responses:
        '200':
          description: 最新上传应用版本列表
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppVersionsIndex'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/upload:
    post:
      summary: 上传应用
      tags:
        - 应用
      description: 上传 iOS、Android、macOS、Linux 或 Windows 应用
      operationId: uploadApp
      parameters: []
      responses:
        '201':
          description: 已上传的应用版本详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/definitions/UploadAppOptions'
  /apps/{id}:
    get:
      summary: 获取应用详情
      tags:
        - 应用
      description: 获取应用详情
      operationId: getApp
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    put:
      summary: 创建应用
      tags:
        - 应用
      description: 根据应用名创建应用
      operationId: updateApp
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/AppOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/AppOptions'
      responses:
        '200':
          description: 应用详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/App'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除应用
      tags:
        - 应用
      description: 删除指定应用 ID 的所有数据，包括所有应用类型、渠道及已上传的应用版本
      operationId: destroyApp
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 已删除应用
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /schemes/{scheme_id}/channels:
    get:
      summary: 获取应用渠道详情
      tags:
        - 应用渠道
      description: 获取应用渠道详情
      operationId: getChannel
      parameters:
        - name: scheme_id
          in: path
          required: true
          description: 应用类型 id
          schema:
            type: string
      responses:
        '200':
          description: 应用渠道详情
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Channel'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    post:
      summary: 创建应用渠道
      tags:
        - 应用渠道
      description: 创建应用渠道
      operationId: createChannel
      parameters:
        - name: scheme_id
          in: path
          required: true
          description: 应用类型 id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/ChannelOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/ChannelOptions'
      responses:
        '201':
          description: 应用渠道详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Channel'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /channels/{id}:
    put:
      summary: 更新应用渠道
      tags:
        - 应用渠道
      description: 更新应用渠道的
      operationId: updateChannel
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/ChannelOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/ChannelOptions'
      responses:
        '200':
          description: 更新应用渠道信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Channel'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除应用渠道
      tags:
        - 应用渠道
      description: 从应用中删除指定应用渠道
      operationId: deleteChannel
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用渠道文件
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/{app_id}/collaborators/{user_id}:
    get:
      summary: 获取应用成员详情
      tags:
        - 应用成员
      description: 获取应用成员详情
      operationId: getCollaborator
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
        - name: user_id
          in: path
          required: true
          description: 用户 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用成员详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collaborator'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    put:
      summary: 更新应用成员权限
      tags:
        - 应用成员
      description: 更新应用成员的权限
      operationId: updateCollaborator
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
        - name: user_id
          in: path
          required: true
          description: 用户 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/CollaboratorOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/CollaboratorOptions'
      responses:
        '200':
          description: 更新应用成员信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collaborator'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除应用成员
      tags:
        - 应用成员
      description: 从应用中删除指定应用成员
      operationId: deleteCollaborator
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
        - name: user_id
          in: path
          required: true
          description: 用户 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用成员文件
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/{app_id}/collaborators:
    post:
      summary: 添加用户到应用成员
      tags:
        - 应用成员
      description: 添加指定用户到指定应用成员列表
      operationId: createCollaborator
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
        - name: user_id
          in: query
          required: false
          description: 用户 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/CollaboratorOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/CollaboratorOptions'
      responses:
        '201':
          description: 应用成员详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collaborator'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /debug_files:
    get:
      summary: 获取调试文件列表
      security: []
      tags:
        - 调试文件
      description: 获取所有调试文件列表详情，支持分页，按照最新创建时间倒序
      operationId: listDebugFiles
      parameters:
        - $ref: '#/components/parameters/channelKeyParam'
        - $ref: '#/components/parameters/pageParam'
        - $ref: '#/components/parameters/perPageParam'
      responses:
        '200':
          description: 调试文件列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DebugFile'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
  /debug_files/download:
    get:
      summary: 下载调试文件
      security: []
      tags:
        - 调试文件
      description: |
        下载 iOS 和 Android 的调试文件

        `channel_key` 和 `release_version` 作为必要条件，不传递 `build_version`
        参数可以使用 `order` 获取符合排序规则的第一个调试文件地址，排序方式有：

        - `version`: 最新版本
        - `upload_date`: 上传调试文件日期
      operationId: downloadDebugFiles
      parameters:
        - $ref: '#/components/parameters/channelKeyParam'
        - required: true
          name: release_version
          in: query
          description: 主版本号
          schema:
            type: string
        - name: build_version
          in: query
          required: false
          description: 内部版本号
          schema:
            type: string
        - default: version
          name: order
          in: query
          required: false
          description: 排序方式 / 可选值有 version, upload_date
          schema:
            type: string
      responses:
        '302':
          description: 跳转到二进制调试文件文件地址
          headers:
            Location:
              schema:
                type: string
              description: 跳转到二进制调试文件文件地址
        '404':
          description: 资源未找到
  /debug_files/{id}:
    get:
      summary: 获取调试文件详情
      tags:
        - 调试文件
      description: 获取调试文件详情
      operationId: getDebugFile
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 调试文件详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebugFile'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除调试文件
      tags:
        - 调试文件
      description: 删除指定调试文件 ID 的所有数据，包括上传的 dSYM 或 Proguard 文件
      operationId: destroyDebugFile
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 已删除调试文件
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /debug_files/upload:
    post:
      summary: 上传调试文件
      tags:
        - 调试文件
      description: |
        上传 dSYM 或 Proguard 打包成 zip 压缩调试文件

        - `iOS`: 使用 Zip 压缩后的 dSYM 文件
        - `Android`: 使用 Zip 压缩后包含 mapping.txt、R.txt 和 AndroidManifest.xml 的文件
      operationId: uploadDebugFile
      parameters: []
      responses:
        '200':
          description: 调试文件详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DebugFile'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/definitions/DebugFileOptions'
  /health:
    get:
      summary: 获取健康检查结果
      security: []
      tags:
        - 健康检查
      description: ''
      operationId: gethealthintext
      responses:
        '200':
          description: healthly
          content:
            text/plain:
              schema:
                type: string
                example: healthy
        '500':
          description: unhealthy
          content:
            text/plain:
              schema:
                type: string
                example: unhealthy
  /health.json:
    get:
      summary: 获取 JSON 格式健康检查结果
      security: []
      tags:
        - 健康检查
      description: ''
      operationId: gethealthinjson
      responses:
        '200':
          description: healthly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Health'
        '500':
          description: unhealthy
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unhealth'
  /releases/{id}:
    put:
      summary: 更新应用版本元信息
      tags:
        - 应用版本
      description: 更新应用版本的版本、自定义字段、变更日志等信息
      operationId: updateRelease
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/ReleaseOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/ReleaseOptions'
      responses:
        '200':
          description: 应用版本详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Release'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除应用版本
      tags:
        - 应用版本
      description: 删除应用版本
      operationId: destroyRelease
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 删除应用版本
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /apps/{app_id}/schemes:
    get:
      summary: 获取应用类型详情
      tags:
        - 应用类型
      description: 获取应用类型详情
      operationId: getScheme
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用类型详情
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Scheme'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    post:
      summary: 创建应用类型
      tags:
        - 应用类型
      description: 创建应用类型
      operationId: createScheme
      parameters:
        - name: app_id
          in: path
          required: true
          description: 应用 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/SchemeOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/SchemeOptions'
      responses:
        '201':
          description: 应用类型详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Scheme'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /schemes/{id}:
    put:
      summary: 更新应用类型
      tags:
        - 应用类型
      description: 更新应用类型的
      operationId: updateScheme
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/SchemeOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/SchemeOptions'
      responses:
        '200':
          description: 更新应用类型信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Scheme'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除应用类型
      tags:
        - 应用类型
      description: 从应用中删除指定应用类型
      operationId: deleteScheme
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 应用类型文件
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /users:
    get:
      summary: 获取用户列表
      tags:
        - 用户
      description: 获取用户信息的合集，不会返回敏感信息，比如密码
      operationId: listUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 用户列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    post:
      summary: 创建用户
      tags:
        - 用户
      description: 创建用户
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/UserOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/UserOptions'
      responses:
        '201':
          description: 用户详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /users/{id}:
    get:
      summary: 获取用户详情
      tags:
        - 用户
      description: 获取用户详情
      operationId: getUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 用户详情
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    put:
      summary: 更新用户
      tags:
        - 用户
      description: 更新用户的个性化设置、密码等
      operationId: updateUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/definitions/UserOptions'
          multipart/form-data:
            schema:
              $ref: '#/definitions/UserOptions'
      responses:
        '200':
          description: 更新用户信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
    delete:
      summary: 删除用户
      tags:
        - 用户
      description: 删除用户
      operationId: deleteUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '200':
          description: 用户文件
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Destroyed'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /users/search:
    get:
      summary: 搜索用户
      tags:
        - 用户
      description: 根据电子邮箱搜索用户
      operationId: searchUser
      parameters:
        - in: query
          required: true
          name: email
          description: 电子邮箱
          schema:
            type: path
      responses:
        '200':
          description: 搜索用户列表
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /users/{id}/lock:
    get:
      summary: 停用用户
      tags:
        - 用户
      description: 停用用户后不会影响之前已创建的数据、仅仅是无法再登录
      operationId: lockUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '202':
          description: 更新用户信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /users/{id}/unlock:
    delete:
      summary: 启用用户
      tags:
        - 用户
      description: 启用用户后可以重新登录系统
      operationId: unlockUser
      parameters:
        - name: id
          in: path
          required: true
          description: 主键 ID
          schema:
            type: string
      responses:
        '202':
          description: 更新用户信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: 用户密钥认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/responses/Unauthorized'
        '404':
          description: 资源未找到
          content:
            application/json:
              schema:
                $ref: '#/components/responses/NotFound'
  /version:
    get:
      summary: 获取版本信息
      security: []
      tags:
        - 版本
      description: ''
      operationId: getVersion
      responses:
        '200':
          description: 版本信息
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
security:
  - token: []
components:
  securitySchemes:
    token:
      type: apiKey
      name: token
      in: query
      description: 用户密钥
  parameters:
    channelKeyParam:
      in: query
      name: channel_key
      required: true
      description: 应用渠道 Key
      schema:
        type: string
    appScopeParam:
      scope:
        in: query
        name: scope
        required: false
        description: 'Translation missing: zh-CN.api.parameters.app_scope'
        schema:
          type: string
    pageParam:
      in: query
      name: page
      required: false
      description: 页码
      schema:
        type: integer
        format: int32
        minimum: 1
        default: 1
    perPageParam:
      in: query
      name: per_page
      required: false
      description: 单页数量
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
        default: 25
  schemas:
    AppIndex:
      description: 应用列表
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        name:
          type: string
          example: First App
        archived:
          type: boolean
          example: false
        schemes:
          type: array
          items:
            $ref: '#/components/schemas/Scheme'
    AppVersionsIndex:
      description: 应用版本列表
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        app_name:
          type: string
          example: First App
        bundle_id:
          type: string
          example: '*'
        git_url:
          type: string
          example: https://github.com/tryzealot/zealot
        app:
          $ref: '#/components/schemas/App'
        scheme:
          $ref: '#/components/schemas/Scheme'
        releases:
          type: array
          items:
            $ref: '#/components/schemas/Release'
    App:
      description: 应用
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        name:
          type: string
          example: First App
        schemes:
          type: array
          items:
            $ref: '#/components/schemas/Scheme'
        collaborators:
          type: array
          items:
            $ref: '#/components/schemas/Collaborator'
    Collaborator:
      description: 应用成员
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 2
        username:
          type: string
          example: foo
        email:
          type: string
          example: foo@example.com
        role:
          type: string
          example: developer
    Scheme:
      description: 应用类型
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 1
        name:
          type: string
          example: Production
        new_build_callout:
          type: boolean
          example: true
        retained_builds:
          type: integer
          format: int32
          example: 0
        channels:
          type: array
          items:
            $ref: '#/components/schemas/Channel'
    Channel:
      description: 应用渠道
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 4
        name:
          type: string
          example: App Store
        slug:
          type: string
          example: Sk3y
        device_type:
          type: string
          example: Android
        bundle_id:
          type: string
          example: '*'
        git_url:
          type: string
          example: https://github.com/tryzealot/zealot
        has_password:
          type: boolean
          example: false
        download_filename_type:
          type: string
          example: original
    Release:
      description: 应用版本
      type: object
      properties:
        version:
          type: integer
          format: int32
          example: 100
        app_name:
          type: string
          example: Zealot
        bundle_id:
          type: string
          example: im.ews.zealot
        source:
          type: string
          example: API
        branch:
          type: string
          example: develop
        git_commit:
          type: string
          example: bc58e308dd1caf2226a402291839afbbdabcabf0
        ci_url:
          type: string
          example: https://github.com/tryzealot/zealot/actions/runs/9211335126
        size:
          type: integer
          example: 392173
        platform:
          type: string
          example: iOS
        device_type:
          type: string
          example: iPhone
        icon_url:
          type: string
          example: https://tryzealot.ews.im/assets/zealot-icon-123e8c86.png
        install_url:
          type: string
          example: https://tryzealot.ews.im/M9DJa/681/download
        changelog:
          type: array
          items:
            $ref: '#/components/schemas/ReleaseChangelog'
        text_changelog:
          type: string
          example: '- bump 1.1\n-n fixes bugs'
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/ReleaseCustomField'
        created_at:
          type: date
          example: 2024-03-01 12:00:00 +0800
    ReleaseChangelog:
      description: 应用版本的更新日志
      type: object
      properties:
        date:
          type: string
          example: 2024-03-01 12:00:00 +0800
        author:
          type: string
          example: foo
        email:
          type: string
          example: foo@example.com
        message:
          type: string
          example: fixes bugs
    ReleaseCustomField:
      description: 应用版本的自定义字段
      type: object
      properties:
        icon:
          type: string
          example: fa-solid fa-flag
        name:
          type: string
          example: Country
        value:
          type: string
          example: China
    DebugFile:
      description: 调试文件
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 31
        app_name:
          type: string
          example: First App
        device_type:
          type: string
          enum:
            - ios
            - android
          example: iOS
        release_version:
          type: string
          example: 3.2.1
        build_version:
          type: string
          example: '8621'
        file_url:
          type: string
          example: http://tryzealt.ews.im/debug_files/31/download
        metadata:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/DebugFileMetadataDSYM'
              - $ref: '#/components/schemas/DebugFileMetadataProguard'
    DebugFileMetadataProguard:
      description: Proguard 类调试文件
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 100
        category:
          type: string
          example: Proguard
        uuid:
          type: string
          example: 2364df02-a44e-4859-9ea1-de25c93d54d5
        package_name:
          type: string
          example: im.ews.zealot.android.example
        files:
          type: array
          items:
            $ref: '#/components/schemas/MetadataProguardFile'
        created_at:
          type: date
          example: 2024-03-01 12:00:21 +0800
    MetadataProguardFile:
      description: Proguard 文件
      type: object
      properties:
        name:
          type: string
          example: AndroidManitest.xml
        size:
          type: integer
          example: 49241
    DebugFileMetadataDSYM:
      description: dSYM 类调试文件
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 200
        category:
          type: string
          example: dSYM
        uuid:
          type: string
          example: 2364df02-a44e-4859-9ea1-de25c93d54d5
        bundle_id:
          type: string
          example: im.ews.zealot.iphone.example
        name:
          type: string
          example: ExampleApp
        extension:
          type: boolean
          example: false
        size:
          type: integer
          example: 32048613
        created_at:
          type: date
          example: 2024-03-01 12:00:21 +0800
    User:
      description: 用户
      type: object
      properties:
        id:
          type: integer
          format: int32
          example: 101
        username:
          type: string
          example: foo
        email:
          type: string
          example: foo@example.com
        locale:
          type: string
          enum:
            - zh-CN
            - en
          example: zh-CN
        appearance:
          type: string
          enum:
            - light
            - dark
            - auto
          example: light
        timezone:
          type: string
          enum:
            - Etc/GMT+12
            - Pacific/Pago_Pago
            - Pacific/Midway
            - Pacific/Honolulu
            - America/Juneau
            - America/Los_Angeles
            - America/Tijuana
            - America/Phoenix
            - America/Mazatlan
            - America/Denver
            - America/Guatemala
            - America/Chicago
            - America/Chihuahua
            - America/Mexico_City
            - America/Monterrey
            - America/Regina
            - America/Bogota
            - America/New_York
            - America/Indiana/Indianapolis
            - America/Lima
            - America/Halifax
            - America/Caracas
            - America/Guyana
            - America/La_Paz
            - America/Puerto_Rico
            - America/Santiago
            - America/St_Johns
            - America/Sao_Paulo
            - America/Argentina/Buenos_Aires
            - America/Montevideo
            - America/Godthab
            - Atlantic/South_Georgia
            - Atlantic/Azores
            - Atlantic/Cape_Verde
            - Europe/London
            - Europe/Lisbon
            - Africa/Monrovia
            - Etc/UTC
            - Europe/Amsterdam
            - Europe/Belgrade
            - Europe/Berlin
            - Europe/Zurich
            - Europe/Bratislava
            - Europe/Brussels
            - Europe/Budapest
            - Africa/Casablanca
            - Europe/Copenhagen
            - Europe/Dublin
            - Europe/Ljubljana
            - Europe/Madrid
            - Europe/Paris
            - Europe/Prague
            - Europe/Rome
            - Europe/Sarajevo
            - Europe/Skopje
            - Europe/Stockholm
            - Europe/Vienna
            - Europe/Warsaw
            - Africa/Algiers
            - Europe/Zagreb
            - Europe/Athens
            - Europe/Bucharest
            - Africa/Cairo
            - Africa/Harare
            - Europe/Helsinki
            - Asia/Jerusalem
            - Europe/Kaliningrad
            - Europe/Kiev
            - Africa/Johannesburg
            - Europe/Riga
            - Europe/Sofia
            - Europe/Tallinn
            - Europe/Vilnius
            - Asia/Baghdad
            - Europe/Istanbul
            - Asia/Kuwait
            - Europe/Minsk
            - Europe/Moscow
            - Africa/Nairobi
            - Asia/Riyadh
            - Europe/Volgograd
            - Asia/Tehran
            - Asia/Muscat
            - Asia/Baku
            - Europe/Samara
            - Asia/Tbilisi
            - Asia/Yerevan
            - Asia/Kabul
            - Asia/Almaty
            - Asia/Yekaterinburg
            - Asia/Karachi
            - Asia/Tashkent
            - Asia/Kolkata
            - Asia/Colombo
            - Asia/Kathmandu
            - Asia/Dhaka
            - Asia/Urumqi
            - Asia/Rangoon
            - Asia/Bangkok
            - Asia/Jakarta
            - Asia/Krasnoyarsk
            - Asia/Novosibirsk
            - Asia/Shanghai
            - Asia/Chongqing
            - Asia/Hong_Kong
            - Asia/Irkutsk
            - Asia/Kuala_Lumpur
            - Australia/Perth
            - Asia/Singapore
            - Asia/Taipei
            - Asia/Ulaanbaatar
            - Asia/Tokyo
            - Asia/Seoul
            - Asia/Yakutsk
            - Australia/Adelaide
            - Australia/Darwin
            - Australia/Brisbane
            - Australia/Canberra
            - Pacific/Guam
            - Australia/Hobart
            - Australia/Melbourne
            - Pacific/Port_Moresby
            - Australia/Sydney
            - Asia/Vladivostok
            - Asia/Magadan
            - Pacific/Noumea
            - Pacific/Guadalcanal
            - Asia/Srednekolymsk
            - Pacific/Auckland
            - Pacific/Fiji
            - Asia/Kamchatka
            - Pacific/Majuro
            - Pacific/Chatham
            - Pacific/Tongatapu
            - Pacific/Apia
            - Pacific/Fakaofo
          example: Etc/GMT+12
        role:
          type: string
          enum:
            - member
            - developer
            - admin
          example: member
    Version:
      description: 版本信息
      type: object
      properties:
        version:
          type: integer
          format: int32
          example: 6.0.0
        vcs_ref:
          type: string
          example: effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d
        build_date:
          type: string
          example: '2024-05-23T06:04:48.989Z'
    Health:
      description: 健康检查
      type: object
      properties:
        healthy:
          type: boolean
          example: true
        message:
          type: string
          example: healthy
    Unhealth:
      description: 健康检查
      type: object
      properties:
        healthy:
          type: boolean
          example: false
        message:
          type: string
          example: unhealthy
  responses:
    Unauthorized:
      description: 用户密钥认证失败
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Unauthorized user token
    NotFound:
      description: 资源未找到
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Record not found
    Destroyed:
      description: 资源已被删除
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: OK
definitions:
  ListAppOptions: {}
  UploadAppOptions:
    description: 上传应用版本表单字段结构
    type: object
    required:
      - channel_key
      - file
    properties:
      channel_key:
        type: string
        description: 应用具体渠道的 Key，没有传此参数会字段创建对于的应用、类型和渠道
      file:
        type: file
        description: 本地支持上传类型的应用文件
      name:
        type: string
        description: 应用名称，为空时取 App 的信息
      password:
        type: string
        description: 设置访问密码，为空时清除密码
      release_type:
        type: string
        description: 应用类型，比如 debug, beta, adhoc, release, enterprise 等
      source:
        type: string
        description: 上传渠道名称，默认是 `api`
      changelog:
        type: array
        items:
          $ref: '#/components/schemas/ReleaseChangelog'
        description: 变更日志，接受纯文本或 JSON 格式化的数据
      branch:
        type: string
        description: 代码控制软件的分支名
      git_commit:
        type: string
        description: 代码控制软件提交哈希值
      ci_url:
        type: string
        description: 持续构建系统构建 URL
      custom_fields:
        type: array
        items:
          $ref: '#/components/schemas/ReleaseCustomField'
        description: 这是一个用 JSON 字符串定义的自定义字段，图标可接受 fontawesome
  AppOptions:
    description: 应用表单字段结构
    type: object
    required:
      - name
    properties:
      name:
        type: string
        description: 应用名
  SchemeOptions:
    description: 应用类型表单字段结构
    type: object
    required:
      - name
    properties:
      name:
        type: string
        description: 应用类型名
      new_build_callout:
        type: boolean
        default: true
        description: 是否开启新版本提示，默认开启
      retained_builds:
        type: integer
        format: int32
        default: 0
        description: 最大保留版本数，设置 `0` 关闭版本保留功能
  ChannelOptions:
    description: 应用渠道表单字段结构
    type: object
    required:
      - name
      - device_type
    properties:
      name:
        type: string
        description: 应用渠道名
      device_type:
        type: string
        enum:
          - ios
          - android
          - harmonyos
          - macos
          - windows
          - linux
        description: 设备类型
      slug:
        type: string
        description: URL 唯一标示，没有填随机生成
      bundle_id:
        type: string
        description: 包名校验， 默认是 `*` 不做校验 (iOS 指的是 bundle_id，Android 指的是 package name)
      git_url:
        type: string
        description: Git 仓库地址
      password:
        type: string
        description: 密码访问
      download_filename_type:
        type: string
        enum:
          - version_datetime
          - original_filename
        description: 下载文件的文件名生成规则
  ReleaseOptions:
    description: 应用版本元信息表单字段结构
    type: object
    properties:
      build_version:
        type: string
        description: 构建版本
      release_version:
        type: string
        description: 发布版本
      release_type:
        type: string
        description: 应用类型，比如 debug, beta, adhoc, release, enterprise 等
      source:
        type: string
        description: 上传渠道名称，默认是 `api`
      changelog:
        type: array
        items:
          $ref: '#/components/schemas/ReleaseChangelog'
        description: 变更日志，接受纯文本或 JSON 格式化的数据
      branch:
        type: string
        description: 代码控制软件的分支名
      git_commit:
        type: string
        description: 代码控制软件提交哈希值
      ci_url:
        type: string
        description: 持续构建系统构建 URL
      custom_fields:
        type: array
        items:
          $ref: '#/components/schemas/ReleaseCustomField'
        description: 这是一个用 JSON 字符串定义的自定义字段，图标可接受 fontawesome
  CollaboratorOptions:
    description: 应用成员表单字段结构
    type: object
    required:
      - role
    properties:
      role:
        type: string
        enum:
          - member
          - developer
          - admin
        description: 应用内成员权限
  UserOptions:
    description: 用户表单字段结构
    type: object
    required:
      - username
      - email
      - password
    properties:
      username:
        type: string
        description: 用户名
      email:
        type: string
        description: 电子邮箱
      password:
        type: string
        description: 密码
      locale:
        type: string
        enum:
          - zh-CN
          - en
        description: 语言设置
      appearance:
        type: string
        enum:
          - light
          - dark
          - auto
        description: 外观设置
      timezone:
        type: string
        enum:
          - Etc/GMT+12
          - Pacific/Pago_Pago
          - Pacific/Midway
          - Pacific/Honolulu
          - America/Juneau
          - America/Los_Angeles
          - America/Tijuana
          - America/Phoenix
          - America/Mazatlan
          - America/Denver
          - America/Guatemala
          - America/Chicago
          - America/Chihuahua
          - America/Mexico_City
          - America/Monterrey
          - America/Regina
          - America/Bogota
          - America/New_York
          - America/Indiana/Indianapolis
          - America/Lima
          - America/Halifax
          - America/Caracas
          - America/Guyana
          - America/La_Paz
          - America/Puerto_Rico
          - America/Santiago
          - America/St_Johns
          - America/Sao_Paulo
          - America/Argentina/Buenos_Aires
          - America/Montevideo
          - America/Godthab
          - Atlantic/South_Georgia
          - Atlantic/Azores
          - Atlantic/Cape_Verde
          - Europe/London
          - Europe/Lisbon
          - Africa/Monrovia
          - Etc/UTC
          - Europe/Amsterdam
          - Europe/Belgrade
          - Europe/Berlin
          - Europe/Zurich
          - Europe/Bratislava
          - Europe/Brussels
          - Europe/Budapest
          - Africa/Casablanca
          - Europe/Copenhagen
          - Europe/Dublin
          - Europe/Ljubljana
          - Europe/Madrid
          - Europe/Paris
          - Europe/Prague
          - Europe/Rome
          - Europe/Sarajevo
          - Europe/Skopje
          - Europe/Stockholm
          - Europe/Vienna
          - Europe/Warsaw
          - Africa/Algiers
          - Europe/Zagreb
          - Europe/Athens
          - Europe/Bucharest
          - Africa/Cairo
          - Africa/Harare
          - Europe/Helsinki
          - Asia/Jerusalem
          - Europe/Kaliningrad
          - Europe/Kiev
          - Africa/Johannesburg
          - Europe/Riga
          - Europe/Sofia
          - Europe/Tallinn
          - Europe/Vilnius
          - Asia/Baghdad
          - Europe/Istanbul
          - Asia/Kuwait
          - Europe/Minsk
          - Europe/Moscow
          - Africa/Nairobi
          - Asia/Riyadh
          - Europe/Volgograd
          - Asia/Tehran
          - Asia/Muscat
          - Asia/Baku
          - Europe/Samara
          - Asia/Tbilisi
          - Asia/Yerevan
          - Asia/Kabul
          - Asia/Almaty
          - Asia/Yekaterinburg
          - Asia/Karachi
          - Asia/Tashkent
          - Asia/Kolkata
          - Asia/Colombo
          - Asia/Kathmandu
          - Asia/Dhaka
          - Asia/Urumqi
          - Asia/Rangoon
          - Asia/Bangkok
          - Asia/Jakarta
          - Asia/Krasnoyarsk
          - Asia/Novosibirsk
          - Asia/Shanghai
          - Asia/Chongqing
          - Asia/Hong_Kong
          - Asia/Irkutsk
          - Asia/Kuala_Lumpur
          - Australia/Perth
          - Asia/Singapore
          - Asia/Taipei
          - Asia/Ulaanbaatar
          - Asia/Tokyo
          - Asia/Seoul
          - Asia/Yakutsk
          - Australia/Adelaide
          - Australia/Darwin
          - Australia/Brisbane
          - Australia/Canberra
          - Pacific/Guam
          - Australia/Hobart
          - Australia/Melbourne
          - Pacific/Port_Moresby
          - Australia/Sydney
          - Asia/Vladivostok
          - Asia/Magadan
          - Pacific/Noumea
          - Pacific/Guadalcanal
          - Asia/Srednekolymsk
          - Pacific/Auckland
          - Pacific/Fiji
          - Asia/Kamchatka
          - Pacific/Majuro
          - Pacific/Chatham
          - Pacific/Tongatapu
          - Pacific/Apia
          - Pacific/Fakaofo
        description: 时区设置
      role:
        type: string
        default: user
        enum:
          - member
          - developer
          - admin
        description: 用户权限
  DebugFileOptions:
    description: 调试文件表单字段结构
    type: object
    required:
      - channel_key
      - file
    properties:
      channel_key:
        type: string
        description: 调试文件归属的应用渠道，主要省去再传设备类型
      file:
        type: file
        description: 本地的调试文件
      release_version:
        type: string
        description: 主版本号 （Android 类型需要填写）
      build_version:
        type: string
        description: 内部版本号 （Android 类型需要填写）
