{
  "openapi": "3.0.3",
  "info": {
    "title": "云星美「通话记录短信模拟」Android API",
    "version": "1.0.0",
    "description": "Android 正式包名 com.tonghuajilu.yxm。已认证的接口使用 Authorization: Bearer <access_token>。JSON 请求使用 Content-Type: application/json。成功响应通常包含 data。反馈接口保留安卓正在使用的独立响应格式。每个响应有 X-Request-Id。"
  },
  "servers": [
    {
      "url": "https://www.api.yunxingmei.cn",
      "description": "计划生产地址"
    }
  ],
  "tags": [
    {
      "name": "应用与配置"
    },
    {
      "name": "验证与登录"
    },
    {
      "name": "账号与资料"
    },
    {
      "name": "上传与反馈"
    },
    {
      "name": "会员与订单"
    }
  ],
  "paths": {
    "/v1/health": {
      "get": {
        "operationId": "health",
        "summary": "服务状态",
        "description": "",
        "tags": [
          "应用与配置"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "description": "服务状态",
                          "example": "ok"
                        }
                      },
                      "required": [
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/app/config": {
      "get": {
        "operationId": "getConfig",
        "summary": "安卓应用配置",
        "description": "安卓同意协议后，每次进程启动按渠道和 versionCode 读取一次。生成菜单的优先级为禁用渠道、审核模式、非会员不展示渠道和会员状态。配置读取失败时安卓隐藏两个生成菜单。渠道启用、审核开关开启且版本匹配时，review_mode 为 true，login_methods 不包含 guest。安卓此时隐藏游客入口，不发起自动游客登录。审核模式仅显示在相应渠道名单中勾选的菜单。review_call_preview 为 true 时通话入口只打开即时模拟演示。review_sms_generation 为 true 时显示短信生成入口。两份名单默认空。普通模式下，无有效会话且本机上次以游客登录时，安卓调用游客会话接口。首次使用须先同意协议。上次以手机号或微信登录时，安卓展示登录页和对应提示。",
        "tags": [
          "应用与配置"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "channel",
            "schema": {
              "type": "string",
              "description": "打包时的渠道代码",
              "example": "vivo",
              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
            }
          },
          {
            "in": "query",
            "name": "version_code",
            "schema": {
              "type": "integer",
              "description": "安装包的 versionCode",
              "example": 100,
              "minimum": 1,
              "maximum": 2100000000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "application_id": {
                          "type": "string",
                          "description": "正式安卓包名",
                          "example": "com.tonghuajilu.yxm"
                        },
                        "platform": {
                          "type": "string",
                          "description": "平台",
                          "example": "android"
                        },
                        "review_mode": {
                          "type": "boolean",
                          "description": "当前渠道和版本是否进入审核模式",
                          "example": false
                        },
                        "review_call_preview": {
                          "type": "boolean",
                          "description": "审核模式下是否向当前渠道开放即时模拟通话演示",
                          "example": false
                        },
                        "review_sms_generation": {
                          "type": "boolean",
                          "description": "审核模式下是否向当前渠道展示短信生成",
                          "example": false
                        },
                        "generation_menus": {
                          "type": "object",
                          "properties": {
                            "call_generate": {
                              "type": "string",
                              "description": "hidden 隐藏，members 仅会员，everyone 包含非会员",
                              "example": "members",
                              "enum": [
                                "hidden",
                                "members",
                                "everyone"
                              ]
                            },
                            "sms_generate": {
                              "type": "string",
                              "description": "hidden 隐藏，members 仅会员，everyone 包含非会员",
                              "example": "members",
                              "enum": [
                                "hidden",
                                "members",
                                "everyone"
                              ]
                            }
                          },
                          "required": [
                            "call_generate",
                            "sms_generate"
                          ]
                        },
                        "login_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "登录方式",
                            "example": "guest",
                            "enum": [
                              "guest",
                              "phone",
                              "wechat",
                              "carrier"
                            ]
                          }
                        },
                        "sms_requires_challenge": {
                          "type": "boolean",
                          "description": "短信需要图形验证",
                          "example": true
                        },
                        "wechat_app_id": {
                          "type": "string",
                          "description": "已启用微信授权的公开移动应用 AppID",
                          "example": null,
                          "nullable": true
                        },
                        "support_wechat_id": {
                          "type": "string",
                          "description": "全 App 使用的客服微信号",
                          "example": "wxkefu12345",
                          "pattern": "^[A-Za-z][A-Za-z0-9_-]{5,19}$"
                        },
                        "payment_channels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "支付渠道",
                            "example": "wechat",
                            "enum": [
                              "wechat",
                              "alipay"
                            ]
                          },
                          "description": "当前可为安卓新订单收款的渠道。后台关闭方式、账号停用或凭据未就绪时不返回该渠道。"
                        },
                        "feedback_images": {
                          "type": "integer",
                          "description": "反馈图片上限",
                          "example": 3
                        },
                        "feedback_videos": {
                          "type": "integer",
                          "description": "反馈视频上限",
                          "example": 1
                        },
                        "image_max_bytes": {
                          "type": "integer",
                          "description": "单张图片上限",
                          "example": 2000000
                        },
                        "video_max_bytes": {
                          "type": "integer",
                          "description": "单段视频上限",
                          "example": 300000000
                        },
                        "privacy_url": {
                          "type": "string",
                          "description": "线上隐私政策。为空时使用安卓内置协议",
                          "example": null,
                          "nullable": true
                        },
                        "terms_url": {
                          "type": "string",
                          "description": "线上用户协议。为空时使用安卓内置协议",
                          "example": null,
                          "nullable": true
                        }
                      },
                      "required": [
                        "application_id",
                        "platform",
                        "review_mode",
                        "review_call_preview",
                        "review_sms_generation",
                        "generation_menus",
                        "login_methods",
                        "sms_requires_challenge",
                        "wechat_app_id",
                        "support_wechat_id",
                        "payment_channels",
                        "feedback_images",
                        "feedback_videos",
                        "image_max_bytes",
                        "video_max_bytes",
                        "privacy_url",
                        "terms_url"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/config/customer-support": {
      "get": {
        "operationId": "getCustomerSupport",
        "summary": "查询微信客服配置",
        "description": "应用配置页的微信客服号。新库和既有库首次升级默认使用 wxkefu12345。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "wechat_id": {
                          "type": "string",
                          "description": "全 App 使用的客服微信号",
                          "example": "wxkefu12345",
                          "pattern": "^[A-Za-z][A-Za-z0-9_-]{5,19}$"
                        },
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "wechat_id",
                        "revision"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "saveCustomerSupport",
        "summary": "保存微信客服配置",
        "description": "需要后台登录 Cookie 和同源 Origin。版本冲突返回 CUSTOMER_SUPPORT_CONFIG_CHANGED。App 在下次进程启动时随 /v1/app/config 更新本地缓存。客服页面和复制操作直接使用缓存。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "wechat_id": {
                    "type": "string",
                    "description": "全 App 使用的客服微信号",
                    "example": "wxkefu12345",
                    "pattern": "^[A-Za-z][A-Za-z0-9_-]{5,19}$"
                  },
                  "revision": {
                    "type": "integer",
                    "description": "配置版本，从查询接口取值",
                    "example": 0,
                    "minimum": 0
                  }
                },
                "required": [
                  "wechat_id",
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "wechat_id": {
                          "type": "string",
                          "description": "全 App 使用的客服微信号",
                          "example": "wxkefu12345",
                          "pattern": "^[A-Za-z][A-Za-z0-9_-]{5,19}$"
                        },
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "wechat_id",
                        "revision"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/config/generation-menus": {
      "get": {
        "operationId": "getGenerationMenus",
        "summary": "查询生成菜单渠道配置",
        "description": "需要后台登录 Cookie。返回应用渠道选项、两个菜单的审核展示、非会员不展示和禁用名单及配置版本。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        },
                        "menus": {
                          "type": "object",
                          "properties": {
                            "call_generate": {
                              "type": "object",
                              "properties": {
                                "review_visible_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                                },
                                "members_only_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                                },
                                "blocked_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "优先级最高的禁用渠道"
                                }
                              },
                              "required": [
                                "review_visible_channels",
                                "members_only_channels",
                                "blocked_channels"
                              ]
                            },
                            "sms_generate": {
                              "type": "object",
                              "properties": {
                                "review_visible_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                                },
                                "members_only_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                                },
                                "blocked_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "优先级最高的禁用渠道"
                                }
                              },
                              "required": [
                                "review_visible_channels",
                                "members_only_channels",
                                "blocked_channels"
                              ]
                            }
                          },
                          "required": [
                            "call_generate",
                            "sms_generate"
                          ]
                        },
                        "channels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "安装包渠道代码",
                                "example": "huawei",
                                "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                              },
                              "name": {
                                "type": "string",
                                "description": "后台渠道名称",
                                "example": "华为"
                              }
                            },
                            "required": [
                              "code",
                              "name"
                            ]
                          },
                          "description": "来自应用渠道的选项"
                        }
                      },
                      "required": [
                        "revision",
                        "menus",
                        "channels"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "saveGenerationMenus",
        "summary": "保存生成菜单渠道配置",
        "description": "需要后台登录 Cookie 和同源 Origin。一次保存两个菜单各自的审核展示、非会员不展示和禁用名单，只接收应用渠道中已有的代码。禁用名单优先。配置版本冲突返回 GENERATION_MENUS_CHANGED。新版安卓在下一次进程启动获取配置。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "description": "配置版本，从查询接口取值",
                    "example": 0,
                    "minimum": 0
                  },
                  "menus": {
                    "type": "object",
                    "properties": {
                      "call_generate": {
                        "type": "object",
                        "properties": {
                          "review_visible_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                          },
                          "members_only_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                          },
                          "blocked_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "优先级最高的禁用渠道"
                          }
                        },
                        "required": [
                          "review_visible_channels",
                          "members_only_channels",
                          "blocked_channels"
                        ]
                      },
                      "sms_generate": {
                        "type": "object",
                        "properties": {
                          "review_visible_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                          },
                          "members_only_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                          },
                          "blocked_channels": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "安装包渠道代码",
                              "example": "huawei",
                              "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                            },
                            "description": "优先级最高的禁用渠道"
                          }
                        },
                        "required": [
                          "review_visible_channels",
                          "members_only_channels",
                          "blocked_channels"
                        ]
                      }
                    },
                    "required": [
                      "call_generate",
                      "sms_generate"
                    ]
                  }
                },
                "required": [
                  "revision",
                  "menus"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        },
                        "menus": {
                          "type": "object",
                          "properties": {
                            "call_generate": {
                              "type": "object",
                              "properties": {
                                "review_visible_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                                },
                                "members_only_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                                },
                                "blocked_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "优先级最高的禁用渠道"
                                }
                              },
                              "required": [
                                "review_visible_channels",
                                "members_only_channels",
                                "blocked_channels"
                              ]
                            },
                            "sms_generate": {
                              "type": "object",
                              "properties": {
                                "review_visible_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "审核模式下显示该菜单的渠道，禁用名单优先"
                                },
                                "members_only_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "普通模式下仅会员可见的渠道，其他未禁用渠道对非会员也展示"
                                },
                                "blocked_channels": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "安装包渠道代码",
                                    "example": "huawei",
                                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                                  },
                                  "description": "优先级最高的禁用渠道"
                                }
                              },
                              "required": [
                                "review_visible_channels",
                                "members_only_channels",
                                "blocked_channels"
                              ]
                            }
                          },
                          "required": [
                            "call_generate",
                            "sms_generate"
                          ]
                        },
                        "channels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "安装包渠道代码",
                                "example": "huawei",
                                "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                              },
                              "name": {
                                "type": "string",
                                "description": "后台渠道名称",
                                "example": "华为"
                              }
                            },
                            "required": [
                              "code",
                              "name"
                            ]
                          },
                          "description": "来自应用渠道的选项"
                        }
                      },
                      "required": [
                        "revision",
                        "menus",
                        "channels"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/config/sms-login": {
      "get": {
        "operationId": "getSmsLoginConfig",
        "summary": "查询短信验证码设置",
        "description": "返回当前发送方式和非密钥参数。发送凭据由服务器提供。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sign_name": {
                          "type": "string",
                          "description": "阿里云短信签名原文",
                          "example": "深圳市运星美贸易"
                        },
                        "template_code": {
                          "type": "string",
                          "description": "验证码短信模板 CODE",
                          "example": "SMS_512940222",
                          "pattern": "^SMS_[0-9]+$"
                        },
                        "code_field": {
                          "type": "string",
                          "description": "模板中的验证码变量名",
                          "example": "code"
                        },
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        },
                        "credential_source": {
                          "type": "string",
                          "description": "发送凭据来源",
                          "example": "server",
                          "enum": [
                            "server",
                            "local"
                          ],
                          "nullable": true
                        },
                        "credential_editable": {
                          "type": "boolean",
                          "description": "当前是否可在后台录入短信密钥",
                          "example": false
                        },
                        "delivery_mode": {
                          "type": "string",
                          "description": "后台当前发送方式",
                          "example": "aliyun",
                          "enum": [
                            "aliyun",
                            "development",
                            "unconfigured"
                          ]
                        }
                      },
                      "required": [
                        "sign_name",
                        "template_code",
                        "code_field",
                        "revision",
                        "credential_source",
                        "credential_editable",
                        "delivery_mode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "saveSmsLoginConfig",
        "summary": "保存短信验证码设置",
        "description": "需要后台登录 Cookie 和同源 Origin。保存后下一条验证码使用新的签名、模板和变量名。仅本地开发环境可提交 credentials，两项必须同时提供。配置版本冲突返回 SMS_LOGIN_CONFIG_CHANGED。",
        "tags": [
          "应用与配置"
        ],
        "security": [
          {
            "AdminSession": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sign_name": {
                    "type": "string",
                    "description": "阿里云短信签名原文",
                    "example": "深圳市运星美贸易"
                  },
                  "template_code": {
                    "type": "string",
                    "description": "验证码短信模板 CODE",
                    "example": "SMS_512940222",
                    "pattern": "^SMS_[0-9]+$"
                  },
                  "code_field": {
                    "type": "string",
                    "description": "模板中的验证码变量名",
                    "example": "code"
                  },
                  "revision": {
                    "type": "integer",
                    "description": "配置版本，从查询接口取值",
                    "example": 0,
                    "minimum": 0
                  },
                  "credentials": {
                    "type": "object",
                    "properties": {
                      "access_key_id": {
                        "type": "string",
                        "description": "本地可选，AccessKey ID，写入后不返回",
                        "writeOnly": true
                      },
                      "access_key_secret": {
                        "type": "string",
                        "description": "本地可选，AccessKey Secret，写入后不返回",
                        "writeOnly": true
                      }
                    },
                    "required": [
                      "access_key_id",
                      "access_key_secret"
                    ]
                  }
                },
                "required": [
                  "sign_name",
                  "template_code",
                  "code_field",
                  "revision"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "sign_name": {
                          "type": "string",
                          "description": "阿里云短信签名原文",
                          "example": "深圳市运星美贸易"
                        },
                        "template_code": {
                          "type": "string",
                          "description": "验证码短信模板 CODE",
                          "example": "SMS_512940222",
                          "pattern": "^SMS_[0-9]+$"
                        },
                        "code_field": {
                          "type": "string",
                          "description": "模板中的验证码变量名",
                          "example": "code"
                        },
                        "revision": {
                          "type": "integer",
                          "description": "配置版本，从查询接口取值",
                          "example": 0,
                          "minimum": 0
                        },
                        "credential_source": {
                          "type": "string",
                          "description": "发送凭据来源",
                          "example": "server",
                          "enum": [
                            "server",
                            "local"
                          ],
                          "nullable": true
                        },
                        "credential_editable": {
                          "type": "boolean",
                          "description": "当前是否可在后台录入短信密钥",
                          "example": false
                        },
                        "delivery_mode": {
                          "type": "string",
                          "description": "后台当前发送方式",
                          "example": "aliyun",
                          "enum": [
                            "aliyun",
                            "development",
                            "unconfigured"
                          ]
                        }
                      },
                      "required": [
                        "sign_name",
                        "template_code",
                        "code_field",
                        "revision",
                        "credential_source",
                        "credential_editable",
                        "delivery_mode"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/app/authorize": {
      "post": {
        "operationId": "authorizeApp",
        "summary": "安卓应用接入校验",
        "description": "用于启动时核对包名、平台和版本格式。用户权限由登录会话决定。客户端无需保存应用密钥。",
        "tags": [
          "应用与配置"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string",
                    "description": "安卓包名",
                    "example": "com.tonghuajilu.yxm"
                  },
                  "platform": {
                    "type": "string",
                    "description": "平台",
                    "example": "android",
                    "enum": [
                      "android"
                    ]
                  },
                  "build_number": {
                    "type": "integer",
                    "description": "实际 versionCode",
                    "example": 1,
                    "minimum": 1
                  }
                },
                "required": [
                  "application_id",
                  "platform",
                  "build_number"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "accepted": {
                          "type": "boolean",
                          "description": "客户端标识已接受",
                          "example": true
                        },
                        "api_version": {
                          "type": "integer",
                          "description": "API 主版本",
                          "example": 1
                        }
                      },
                      "required": [
                        "accepted",
                        "api_version"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/challenges/image": {
      "post": {
        "operationId": "createCaptcha",
        "summary": "获取短信图形验证码",
        "description": "一次性校验。登录或绑定手机号时，可在发送短信前请求。",
        "tags": [
          "验证与登录"
        ],
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "challenge_id": {
                          "type": "string",
                          "description": "不透明值，保持原样传递",
                          "example": "opaque_value_example"
                        },
                        "image_base64": {
                          "type": "string",
                          "description": "Base64 编码的 240×96 PNG，直接解码为图片",
                          "example": "iVBORw0KGgo…"
                        },
                        "image_type": {
                          "type": "string",
                          "description": "媒体类型",
                          "example": "image/png"
                        },
                        "expires_in": {
                          "type": "integer",
                          "description": "有效期，秒",
                          "example": 300
                        }
                      },
                      "required": [
                        "challenge_id",
                        "image_base64",
                        "image_type",
                        "expires_in"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/challenges/sms": {
      "post": {
        "operationId": "sendSms",
        "summary": "发送短信验证码",
        "description": "同签名、同手机号的登录和绑定验证码共用额度，按北京时间每自然分钟 1 条、每自然小时 3 条、每自然日 5 条。图形验证码通过后进入发送步骤的请求计入额度。App 根据 retry_after 或本服务频控 429 返回的 Retry-After 响应头等待，短信平台也可能独立返回 429。账号禁用时返回 403。短信服务调用失败时返回 503 PROVIDER_UNAVAILABLE，重新发送时需要新的图形验证码。",
        "tags": [
          "验证与登录"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mobile": {
                    "type": "string",
                    "description": "中国大陆 11 位手机号",
                    "example": "13800000000",
                    "pattern": "^1[3-9][0-9]{9}$"
                  },
                  "challenge_id": {
                    "type": "string",
                    "description": "不透明值，保持原样传递",
                    "example": "opaque_value_example"
                  },
                  "challenge_answer": {
                    "type": "string",
                    "description": "用户输入的 5 位图形验证码",
                    "example": "12345"
                  },
                  "purpose": {
                    "type": "string",
                    "description": "用途。绑定时携带当前登录会话",
                    "example": "sign_in",
                    "enum": [
                      "sign_in",
                      "bind"
                    ],
                    "default": "sign_in"
                  }
                },
                "required": [
                  "mobile",
                  "challenge_id",
                  "challenge_answer"
                ]
              }
            }
          }
        },
        "x-service-integration": true,
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "verification_id": {
                          "type": "string",
                          "description": "不透明值，保持原样传递",
                          "example": "opaque_value_example"
                        },
                        "expires_in": {
                          "type": "integer",
                          "description": "有效期，秒",
                          "example": 300
                        },
                        "retry_after": {
                          "type": "integer",
                          "description": "距可再次发送的秒数，可能跨至下一整点或午夜",
                          "example": 60
                        }
                      },
                      "required": [
                        "verification_id",
                        "expires_in",
                        "retry_after"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "账号不可用或文件链接已失效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "本服务手机号限流时返回，表示距可重发的秒数。",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/sessions/guest": {
      "post": {
        "operationId": "guest",
        "summary": "游客登录或注册",
        "description": "相同设备摘要返回同一游客账号。首次提交有效摘要时创建账号。没有有效设备摘要时返回 GUEST_DEVICE_ID_REQUIRED。旧客户端附带的 installation_key 不参与登录。",
        "tags": [
          "验证与登录"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "guest_device_id": {
                    "type": "string",
                    "description": "Android ID 用途隔离的 SHA-256 摘要，游客账号的唯一查找标识",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "client_info": {
                    "type": "object",
                    "properties": {
                      "installation_id": {
                        "type": "string",
                        "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                        "example": "852745d4-be11-43e3-a550-075dba096d76",
                        "format": "uuid"
                      },
                      "channel": {
                        "type": "string",
                        "description": "打包渠道标识",
                        "example": "vivo"
                      },
                      "version_name": {
                        "type": "string",
                        "description": "安卓版本名",
                        "example": "1.0.0"
                      },
                      "version_code": {
                        "type": "integer",
                        "description": "安卓版本号 versionCode",
                        "example": 1,
                        "minimum": 1
                      }
                    },
                    "required": [
                      "installation_id",
                      "channel",
                      "version_name",
                      "version_code"
                    ]
                  }
                },
                "required": [
                  "guest_device_id"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Session"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "账号不可用或文件链接已失效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/sessions/phone": {
      "post": {
        "operationId": "phoneLogin",
        "summary": "手机号登录或注册",
        "description": "成功后，安卓可用 user.phone_hint 保存上次登录的脱敏号码，例如 138****0000。",
        "tags": [
          "验证与登录"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mobile": {
                    "type": "string",
                    "description": "中国大陆 11 位手机号",
                    "example": "13800000000",
                    "pattern": "^1[3-9][0-9]{9}$"
                  },
                  "verification_id": {
                    "type": "string",
                    "description": "不透明值，保持原样传递",
                    "example": "opaque_value_example"
                  },
                  "sms_code": {
                    "type": "string",
                    "description": "短信中的 6 位数字",
                    "example": "123456",
                    "pattern": "^[0-9]{6}$"
                  },
                  "client_info": {
                    "type": "object",
                    "properties": {
                      "installation_id": {
                        "type": "string",
                        "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                        "example": "852745d4-be11-43e3-a550-075dba096d76",
                        "format": "uuid"
                      },
                      "channel": {
                        "type": "string",
                        "description": "打包渠道标识",
                        "example": "vivo"
                      },
                      "version_name": {
                        "type": "string",
                        "description": "安卓版本名",
                        "example": "1.0.0"
                      },
                      "version_code": {
                        "type": "integer",
                        "description": "安卓版本号 versionCode",
                        "example": 1,
                        "minimum": 1
                      }
                    },
                    "required": [
                      "installation_id",
                      "channel",
                      "version_name",
                      "version_code"
                    ]
                  }
                },
                "required": [
                  "mobile",
                  "verification_id",
                  "sms_code"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Session"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "账号不可用或文件链接已失效",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/sessions/wechat": {
      "post": {
        "operationId": "wechatLogin",
        "summary": "微信登录或注册",
        "description": "提交微信 Android OpenSDK 返回的一次性 code。成功后，安卓可用 user.wechat_nickname 记录上次登录提示。",
        "tags": [
          "验证与登录"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authorization_code": {
                    "type": "string",
                    "description": "Android 服务商 SDK 返回的一次性授权码",
                    "example": "provider_code_example"
                  },
                  "client_info": {
                    "type": "object",
                    "properties": {
                      "installation_id": {
                        "type": "string",
                        "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                        "example": "852745d4-be11-43e3-a550-075dba096d76",
                        "format": "uuid"
                      },
                      "channel": {
                        "type": "string",
                        "description": "打包渠道标识",
                        "example": "vivo"
                      },
                      "version_name": {
                        "type": "string",
                        "description": "安卓版本名",
                        "example": "1.0.0"
                      },
                      "version_code": {
                        "type": "integer",
                        "description": "安卓版本号 versionCode",
                        "example": 1,
                        "minimum": 1
                      }
                    },
                    "required": [
                      "installation_id",
                      "channel",
                      "version_name",
                      "version_code"
                    ]
                  }
                },
                "required": [
                  "authorization_code"
                ]
              }
            }
          }
        },
        "x-service-integration": true,
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Session"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/sessions/carrier": {
      "post": {
        "operationId": "carrierLogin",
        "summary": "手机号一键登录或注册",
        "description": "提交阿里云号码认证 Android SDK 的 token，服务端验证后取得手机号。",
        "tags": [
          "验证与登录"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authorization_code": {
                    "type": "string",
                    "description": "Android 服务商 SDK 返回的一次性授权码",
                    "example": "provider_code_example"
                  },
                  "client_info": {
                    "type": "object",
                    "properties": {
                      "installation_id": {
                        "type": "string",
                        "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                        "example": "852745d4-be11-43e3-a550-075dba096d76",
                        "format": "uuid"
                      },
                      "channel": {
                        "type": "string",
                        "description": "打包渠道标识",
                        "example": "vivo"
                      },
                      "version_name": {
                        "type": "string",
                        "description": "安卓版本名",
                        "example": "1.0.0"
                      },
                      "version_code": {
                        "type": "integer",
                        "description": "安卓版本号 versionCode",
                        "example": 1,
                        "minimum": 1
                      }
                    },
                    "required": [
                      "installation_id",
                      "channel",
                      "version_name",
                      "version_code"
                    ]
                  }
                },
                "required": [
                  "authorization_code"
                ]
              }
            }
          }
        },
        "x-service-integration": true,
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Session"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "会话过期或授权凭证校验失败",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/session": {
      "get": {
        "operationId": "checkSession",
        "summary": "检查会话是否有效",
        "description": "",
        "tags": [
          "验证与登录"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean",
                          "description": "当前会话有效",
                          "example": true
                        },
                        "expires_at": {
                          "type": "string",
                          "description": "UTC ISO 8601 时间",
                          "example": "2026-11-26T08:30:00.000Z",
                          "format": "date-time"
                        },
                        "account_id": {
                          "type": "string",
                          "description": "服务端内部账号标识",
                          "example": "usr_0e0664cb1fed40ec85803de2c45c8c6a"
                        },
                        "user_id": {
                          "type": "integer",
                          "description": "App 和管理后台展示的顺序用户 ID",
                          "example": 1000000,
                          "minimum": 1000000,
                          "format": "int64"
                        }
                      },
                      "required": [
                        "valid",
                        "expires_at",
                        "account_id",
                        "user_id"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "logout",
        "summary": "退出登录",
        "description": "撤销当前 Bearer，会话失效后清除本地登录凭证。",
        "tags": [
          "验证与登录"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getCurrentUser",
        "summary": "用户信息",
        "description": "",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patchProfile",
        "summary": "修改昵称和头像",
        "description": "至少提交一项。头像先按 avatar 用途完成上传。avatar_id 为 null 时移除头像。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nickname": {
                    "type": "string",
                    "description": "1 至 24 个字符",
                    "example": "云星美用户",
                    "minLength": 1,
                    "maxLength": 24
                  },
                  "avatar_id": {
                    "type": "string",
                    "description": "上传凭证 ID",
                    "example": "med_afe0dcdb9dca4f929d13bcf8ff32c828",
                    "nullable": true
                  }
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/activity": {
      "post": {
        "operationId": "reportActivity",
        "summary": "更新渠道版本与活跃信息",
        "description": "登录后启动或前台定时上报。每个账号、安装标识和北京时间日期保留一条最近活跃记录，明细保存 30 天。IP 由服务器从连接确定。提供 sms_device_id 时同时返回短信生成限制，include_feedback_status 为 true 时附带反馈状态。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "installation_id": {
                    "type": "string",
                    "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                    "example": "852745d4-be11-43e3-a550-075dba096d76",
                    "format": "uuid"
                  },
                  "channel": {
                    "type": "string",
                    "description": "打包渠道标识",
                    "example": "vivo"
                  },
                  "version_name": {
                    "type": "string",
                    "description": "安卓版本名",
                    "example": "1.0.0"
                  },
                  "version_code": {
                    "type": "integer",
                    "description": "安卓版本号 versionCode",
                    "example": 1,
                    "minimum": 1
                  },
                  "sms_device_id": {
                    "type": "string",
                    "description": "可选的设备摘要，查询短信生成限制"
                  },
                  "include_feedback_status": {
                    "type": "boolean",
                    "description": "启动时附带反馈状态",
                    "example": true
                  },
                  "guest_device_id": {
                    "type": "string",
                    "description": "可选，为仍有有效会话且未登记设备的历史游客补记设备摘要"
                  }
                },
                "required": [
                  "installation_id",
                  "channel",
                  "version_name",
                  "version_code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/User"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "sms_generation": {
                              "type": "object",
                              "properties": {
                                "account_blocked": {
                                  "type": "boolean",
                                  "description": "账号受限",
                                  "example": false
                                },
                                "device_blocked": {
                                  "type": "boolean",
                                  "description": "设备受限",
                                  "example": false
                                }
                              },
                              "required": [
                                "account_blocked",
                                "device_blocked"
                              ]
                            },
                            "feedback_status": {
                              "type": "object",
                              "properties": {
                                "has_feedback": {
                                  "type": "boolean",
                                  "description": "当前账号是否提交过反馈",
                                  "example": true
                                },
                                "has_pending_feedback": {
                                  "type": "boolean",
                                  "description": "当前账号是否还有待回复的反馈",
                                  "example": true
                                },
                                "reply_ids": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "description": "回复 ID"
                                  },
                                  "description": "最近 100 条回复的 ID，App 用本地已读记录计算未读数量"
                                }
                              },
                              "required": [
                                "has_feedback",
                                "has_pending_feedback",
                                "reply_ids"
                              ]
                            }
                          },
                          "required": []
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/status": {
      "get": {
        "operationId": "getUserState",
        "summary": "账号和会员状态",
        "description": "",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "account_state": {
                          "type": "string",
                          "description": "账号状态",
                          "example": "active",
                          "enum": [
                            "active",
                            "suspended",
                            "deletion_requested",
                            "deleted"
                          ]
                        },
                        "membership": {
                          "$ref": "#/components/schemas/Membership"
                        }
                      },
                      "required": [
                        "account_state",
                        "membership"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/device": {
      "put": {
        "operationId": "updateDevice",
        "summary": "更新安装标识",
        "description": "",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "installation_id": {
                    "type": "string",
                    "description": "应用自己生成的随机安装标识，禁止传硬件标识",
                    "example": "random_installation_id",
                    "minLength": 8,
                    "maxLength": 80
                  }
                },
                "required": [
                  "installation_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/rating": {
      "put": {
        "operationId": "submitRating",
        "summary": "用户评分",
        "description": "保存用户的最新一次产品评分。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stars": {
                    "type": "integer",
                    "description": "1 至 5 星",
                    "example": 5,
                    "minimum": 1,
                    "maximum": 5
                  },
                  "note": {
                    "type": "string",
                    "description": "可选备注，最多 500 个字符",
                    "example": "",
                    "maxLength": 500
                  }
                },
                "required": [
                  "stars"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {},
                      "required": []
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/bindings/phone": {
      "post": {
        "operationId": "bindPhone",
        "summary": "绑定手机号",
        "description": "仅尚未绑定的游客可执行，使用 purpose=bind 的验证码。手机号已属于任何账号时返回 409。绑定成功后保持原用户 ID，可通过该手机号登录该游客账号。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mobile": {
                    "type": "string",
                    "description": "中国大陆 11 位手机号",
                    "example": "13800000000",
                    "pattern": "^1[3-9][0-9]{9}$"
                  },
                  "verification_id": {
                    "type": "string",
                    "description": "不透明值，保持原样传递",
                    "example": "opaque_value_example"
                  },
                  "sms_code": {
                    "type": "string",
                    "description": "短信中的 6 位数字",
                    "example": "123456",
                    "pattern": "^[0-9]{6}$"
                  }
                },
                "required": [
                  "mobile",
                  "verification_id",
                  "sms_code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/bindings/wechat": {
      "post": {
        "operationId": "bindWechat",
        "summary": "绑定微信",
        "description": "仅尚未绑定的游客可执行。微信已属于任何账号时返回 409。绑定成功后保持原用户 ID，可通过该微信登录该游客账号。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "authorization_code": {
                    "type": "string",
                    "description": "Android 服务商 SDK 返回的一次性授权码",
                    "example": "provider_code_example"
                  }
                },
                "required": [
                  "authorization_code"
                ]
              }
            }
          }
        },
        "x-service-integration": true,
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/User"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/deletion/challenge": {
      "post": {
        "operationId": "createDeletionCaptcha",
        "summary": "获取注销图形验证码",
        "description": "当前登录会话专用的一次性验证码。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "challenge_id": {
                          "type": "string",
                          "description": "不透明值，保持原样传递",
                          "example": "opaque_value_example"
                        },
                        "image_base64": {
                          "type": "string",
                          "description": "Base64 编码的 PNG",
                          "example": "iVBORw0KGgo…"
                        },
                        "image_type": {
                          "type": "string",
                          "description": "媒体类型",
                          "example": "image/png"
                        },
                        "expires_in": {
                          "type": "integer",
                          "description": "有效期，秒",
                          "example": 300
                        },
                        "wait_seconds": {
                          "type": "integer",
                          "description": "确认前等待秒数",
                          "example": 5
                        }
                      },
                      "required": [
                        "challenge_id",
                        "image_base64",
                        "image_type",
                        "expires_in",
                        "wait_seconds"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/me/deletion": {
      "post": {
        "operationId": "requestDeletion",
        "summary": "确认注销账号",
        "description": "校验验证码和等待时间后，将账号设置为 suspended，撤销全部登录会话。保留账号身份和资料，管理员可在用户管理中恢复。",
        "tags": [
          "账号与资料"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmed": {
                    "type": "boolean",
                    "description": "用户已经确认注销",
                    "example": true
                  },
                  "challenge_id": {
                    "type": "string",
                    "description": "不透明值，保持原样传递",
                    "example": "opaque_value_example"
                  },
                  "challenge_answer": {
                    "type": "string",
                    "description": "用户输入的 5 位图形验证码",
                    "example": "12345"
                  }
                },
                "required": [
                  "confirmed",
                  "challenge_id",
                  "challenge_answer"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "account_state": {
                          "type": "string",
                          "description": "账号状态",
                          "example": "active",
                          "enum": [
                            "active",
                            "suspended",
                            "deletion_requested",
                            "deleted"
                          ]
                        },
                        "deactivated_at": {
                          "type": "string",
                          "description": "UTC ISO 8601 时间",
                          "example": "2026-11-26T08:30:00.000Z",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "account_state",
                        "deactivated_at"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "signUpload",
        "summary": "获取 OSS 预签名上传地址",
        "description": "在客户端压缩后再申请。按 required_headers 发送 PUT，请求体为文件字节。OSS 模式会绑定文件大小。头像仅支持图片。",
        "tags": [
          "上传与反馈"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "usage": {
                    "type": "string",
                    "description": "使用场景",
                    "example": "feedback",
                    "enum": [
                      "feedback",
                      "avatar"
                    ]
                  },
                  "media_type": {
                    "type": "string",
                    "description": "支持的文件类型",
                    "example": "image/jpeg",
                    "enum": [
                      "image/jpeg",
                      "image/png",
                      "image/webp",
                      "video/mp4"
                    ]
                  },
                  "size_bytes": {
                    "type": "integer",
                    "description": "精确字节数",
                    "example": 102400,
                    "minimum": 1,
                    "maximum": 300000000
                  }
                },
                "required": [
                  "usage",
                  "media_type",
                  "size_bytes"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Upload"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploads/{upload_id}/complete": {
      "post": {
        "operationId": "finishUpload",
        "summary": "确认附件已上传",
        "description": "",
        "tags": [
          "上传与反馈"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "upload_id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "上传凭证 ID",
              "example": "med_afe0dcdb9dca4f929d13bcf8ff32c828"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "upload_id": {
                          "type": "string",
                          "description": "上传凭证 ID",
                          "example": "med_afe0dcdb9dca4f929d13bcf8ff32c828"
                        },
                        "status": {
                          "type": "string",
                          "description": "文件状态",
                          "example": "ready"
                        }
                      },
                      "required": [
                        "upload_id",
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "文件内容与声明的格式不一致",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/feedback": {
      "post": {
        "operationId": "submitFeedback",
        "summary": "提交问题反馈",
        "description": "支持 JSON 引用已上传附件，也支持当前安卓使用的 multipart。每账号每天最多 2 条，按上海时区计算。重复的幂等键返回原反馈 ID（200）。",
        "tags": [
          "上传与反馈"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "description": "同一次操作重试时复用同一个 UUID，重新发起时生成新 UUID。",
            "schema": {
              "type": "string",
              "description": "16 至 100 个字母、数字、下划线或连字符",
              "example": "852745d4-be11-43e3-a550-075dba096d76",
              "pattern": "^[A-Za-z0-9_-]{16,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "反馈正文，1 至 1000 字",
                    "example": "点击保存后提示失败",
                    "minLength": 1,
                    "maxLength": 1000
                  },
                  "upload_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "上传凭证 ID",
                      "example": "med_afe0dcdb9dca4f929d13bcf8ff32c828"
                    },
                    "description": "已完成上传的附件 ID，最多 3 张图片与 1 段视频"
                  }
                },
                "required": [
                  "description"
                ]
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "反馈正文",
                    "example": "点击保存后提示失败",
                    "maxLength": 1000
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "图片文件",
                      "format": "binary"
                    }
                  },
                  "video": {
                    "type": "string",
                    "description": "视频文件",
                    "format": "binary"
                  }
                },
                "required": [
                  "text"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "服务端反馈 ID",
                      "example": "fb_4732ca2f1a994569a763bb69595bf069"
                    }
                  },
                  "required": [
                    "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"
                }
              }
            }
          },
          "413": {
            "description": "请求体超出限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "文件内容与声明的格式不一致",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "readReplies",
        "summary": "获取当前账号的反馈回复",
        "description": "返回当前账号最近 100 条回复。回复附件上传满 7 天后过期。临时链接失效时重新请求本接口。",
        "tags": [
          "上传与反馈"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "feedback_status": {
                      "type": "object",
                      "properties": {
                        "has_feedback": {
                          "type": "boolean",
                          "description": "当前账号是否提交过反馈",
                          "example": true
                        },
                        "has_pending_feedback": {
                          "type": "boolean",
                          "description": "当前账号是否还有待回复的反馈",
                          "example": true
                        },
                        "reply_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "回复 ID"
                          },
                          "description": "最近 100 条回复的 ID，App 用本地已读记录计算未读数量"
                        }
                      },
                      "required": [
                        "has_feedback",
                        "has_pending_feedback",
                        "reply_ids"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "回复 ID",
                            "example": "rep_4732ca2f1a994569a763bb69595bf069"
                          },
                          "text": {
                            "type": "string",
                            "description": "回复正文",
                            "example": "已收到你的反馈"
                          },
                          "images": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "description": "回复图片临时链接"
                            },
                            "description": "最多 3 张，空数组表示没有可访问的图片"
                          },
                          "video": {
                            "type": "string",
                            "description": "回复视频临时链接",
                            "example": null,
                            "nullable": true
                          },
                          "attachments_expired": {
                            "type": "boolean",
                            "description": "此回复有一个或多个附件已过期",
                            "example": false
                          }
                        },
                        "required": [
                          "id",
                          "text",
                          "images",
                          "video",
                          "attachments_expired"
                        ]
                      }
                    }
                  },
                  "required": [
                    "feedback_status",
                    "items"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/feedback/status": {
      "get": {
        "operationId": "getFeedbackStatus",
        "summary": "查询当前账号的反馈及回复状态",
        "description": "用于待回复反馈的前台定时检查，只返回回复 ID 和待回复状态。",
        "tags": [
          "上传与反馈"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "has_feedback": {
                          "type": "boolean",
                          "description": "当前账号是否提交过反馈",
                          "example": true
                        },
                        "has_pending_feedback": {
                          "type": "boolean",
                          "description": "当前账号是否还有待回复的反馈",
                          "example": true
                        },
                        "reply_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "回复 ID"
                          },
                          "description": "最近 100 条回复的 ID，App 用本地已读记录计算未读数量"
                        }
                      },
                      "required": [
                        "has_feedback",
                        "has_pending_feedback",
                        "reply_ids"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/membership/offer": {
      "get": {
        "operationId": "membershipOffer",
        "summary": "原生会员页数据",
        "description": "安卓原生 UI 从此接口读取启用的套餐，按后台排序返回。原价和现价均为整数分，原价高于现价时可显示划线原价。支付渠道为空时仍可展示套餐。",
        "tags": [
          "会员与订单"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "title": {
                          "type": "string",
                          "description": "页面标题",
                          "example": "开通会员"
                        },
                        "currency": {
                          "type": "string",
                          "description": "币种",
                          "example": "CNY",
                          "enum": [
                            "CNY"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Plan"
                          },
                          "description": "当前有效套餐"
                        },
                        "payment_channels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "支付渠道",
                            "example": "wechat",
                            "enum": [
                              "wechat",
                              "alipay"
                            ]
                          },
                          "description": "当前可为安卓新订单收款的渠道。后台关闭方式、账号停用或凭据未就绪时不返回该渠道。"
                        },
                        "visible_payment_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "支付渠道",
                            "example": "wechat",
                            "enum": [
                              "wechat",
                              "alipay"
                            ]
                          },
                          "description": "会员页展示的支付方式，由后台配置控制"
                        },
                        "default_payment_method": {
                          "type": "string",
                          "description": "会员页默认方式。配置的默认项隐藏时使用另一个可见方式，两项都隐藏时为 null。",
                          "example": "wechat",
                          "enum": [
                            "wechat",
                            "alipay"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "title",
                        "currency",
                        "items",
                        "payment_channels",
                        "visible_payment_methods",
                        "default_payment_method"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/membership/plans": {
      "get": {
        "operationId": "membershipPlans",
        "summary": "会员套餐列表",
        "description": "返回后台启用的套餐，与会员页使用同一份配置。",
        "tags": [
          "会员与订单"
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string",
                          "description": "币种",
                          "example": "CNY",
                          "enum": [
                            "CNY"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Plan"
                          },
                          "description": "当前有效套餐"
                        },
                        "payment_channels": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "支付渠道",
                            "example": "wechat",
                            "enum": [
                              "wechat",
                              "alipay"
                            ]
                          },
                          "description": "当前可为安卓新订单收款的渠道。后台关闭方式、账号停用或凭据未就绪时不返回该渠道。"
                        },
                        "visible_payment_methods": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": "支付渠道",
                            "example": "wechat",
                            "enum": [
                              "wechat",
                              "alipay"
                            ]
                          },
                          "description": "会员页展示的支付方式，由后台配置控制"
                        },
                        "default_payment_method": {
                          "type": "string",
                          "description": "会员页默认方式。配置的默认项隐藏时使用另一个可见方式，两项都隐藏时为 null。",
                          "example": "wechat",
                          "enum": [
                            "wechat",
                            "alipay"
                          ],
                          "nullable": true
                        }
                      },
                      "required": [
                        "currency",
                        "items",
                        "payment_channels",
                        "visible_payment_methods",
                        "default_payment_method"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "参数错误、图形验证码或短信验证码错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "post": {
        "operationId": "createOrder",
        "summary": "创建会员订单",
        "description": "服务端按套餐报价和当前收款账号创建订单。停售套餐返回 PLAN_UNAVAILABLE，支付方式关闭返回 PAYMENT_METHOD_DISABLED，渠道无可用收款账号返回 PROVIDER_UNAVAILABLE。幂等重试、支付查询和回调均沿用下单时绑定的账号。客户端提交套餐、支付渠道及可选订单设备信息。收款账号及密钥由服务器管理。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "description": "同一次操作重试时复用同一个 UUID，重新发起时生成新 UUID。",
            "schema": {
              "type": "string",
              "description": "16 至 100 个字母、数字、下划线或连字符",
              "example": "852745d4-be11-43e3-a550-075dba096d76",
              "pattern": "^[A-Za-z0-9_-]{16,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "plan_id": {
                    "type": "string",
                    "description": "套餐 ID，由服务端报价",
                    "example": "week"
                  },
                  "payment_channel": {
                    "type": "string",
                    "description": "支付渠道",
                    "example": "wechat",
                    "enum": [
                      "wechat",
                      "alipay"
                    ]
                  },
                  "client_info": {
                    "type": "object",
                    "properties": {
                      "installation_id": {
                        "type": "string",
                        "description": "App 生成的随机安装 UUID，区别于游客登录凭证",
                        "example": "852745d4-be11-43e3-a550-075dba096d76",
                        "format": "uuid"
                      },
                      "channel": {
                        "type": "string",
                        "description": "打包渠道标识",
                        "example": "vivo"
                      },
                      "version_name": {
                        "type": "string",
                        "description": "安卓版本名",
                        "example": "1.0.0"
                      },
                      "version_code": {
                        "type": "integer",
                        "description": "安卓版本号 versionCode",
                        "example": 1,
                        "minimum": 1
                      },
                      "network": {
                        "type": "string",
                        "description": "可选网络类型",
                        "example": "Wi-Fi",
                        "maxLength": 24
                      },
                      "os_version": {
                        "type": "string",
                        "description": "可选系统版本",
                        "example": "Android 15",
                        "maxLength": 32
                      }
                    },
                    "required": [
                      "installation_id",
                      "channel",
                      "version_name",
                      "version_code"
                    ]
                  }
                },
                "required": [
                  "plan_id",
                  "payment_channel"
                ]
              }
            }
          }
        },
        "x-service-integration": true,
        "responses": {
          "201": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/Order"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "sdk_payload": {
                              "nullable": true,
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/WechatPay"
                                },
                                {
                                  "$ref": "#/components/schemas/AlipayPay"
                                }
                              ],
                              "description": "交给对应 Android SDK 的支付参数。已付款订单返回 null。"
                            }
                          },
                          "required": [
                            "sdk_payload"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "服务商未启用或上传繁忙",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}": {
      "get": {
        "operationId": "getOrder",
        "summary": "查询当前账号订单",
        "description": "",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "服务端订单 ID",
              "example": "ord_4ac8f26cbc7a4d17aa094ed74610"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{order_id}/verify": {
      "post": {
        "operationId": "verifyOrder",
        "summary": "验证订单与会员权益",
        "description": "服务端向支付渠道查询并核对交易信息，支付成功时只发放一次权益。然后调用 GET /v1/me/status 获取权益。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "order_id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "服务端订单 ID",
              "example": "ord_4ac8f26cbc7a4d17aa094ed74610"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Order"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "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"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trials/authorize": {
      "post": {
        "operationId": "authorizeTrial",
        "summary": "校验功能权限并预留试用次数",
        "description": "客户端提交安装包渠道和版本。生成请求命中禁用渠道时返回 GENERATION_CHANNEL_BLOCKED。服务端用渠道和版本号实时核对审核配置。审核模式放行并返回 review_mode，且不预留或扣除试用次数。付费游客未绑定时返回 binding_required，不预留次数。其他普通模式用户按当前会员权益及设备免费额度判断。客户端仅在 allowed 为 true 时继续操作。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "feature": {
                    "type": "string",
                    "description": "App 功能标识",
                    "example": "sms_backup",
                    "enum": [
                      "call_generate",
                      "sms_generate",
                      "sms_backup",
                      "sms_restore",
                      "contacts_backup",
                      "contacts_restore"
                    ]
                  },
                  "device_id": {
                    "type": "string",
                    "description": "App 对 Android ID 做 SHA-256 后的十六进制值",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[0-9a-f]{64}$",
                    "nullable": true
                  },
                  "request_id": {
                    "type": "string",
                    "description": "一次操作的 UUID，重试时保持相同",
                    "example": "852745d4-be11-43e3-a550-075dba096d76",
                    "format": "uuid"
                  },
                  "channel": {
                    "type": "string",
                    "description": "安装包的渠道代码",
                    "example": "huawei",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                  },
                  "version_code": {
                    "type": "integer",
                    "description": "安装包的整数版本号",
                    "example": 100,
                    "minimum": 1,
                    "maximum": 2100000000
                  }
                },
                "required": [
                  "feature",
                  "device_id",
                  "request_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "allowed": {
                          "type": "boolean",
                          "description": "是否可执行操作",
                          "example": true
                        },
                        "reason": {
                          "type": "string",
                          "description": "审核模式、会员、待绑定、未限制、试用、超额或请求已经结算",
                          "example": "trial",
                          "enum": [
                            "review_mode",
                            "member",
                            "binding_required",
                            "unrestricted",
                            "trial",
                            "limit_reached",
                            "completed"
                          ]
                        },
                        "reservation_id": {
                          "type": "string",
                          "description": "一次操作的 UUID，重试时保持相同",
                          "example": "852745d4-be11-43e3-a550-075dba096d76",
                          "format": "uuid",
                          "nullable": true
                        },
                        "remaining": {
                          "type": "integer",
                          "description": "预留后该设备本功能剩余次数，适用时返回",
                          "example": 2
                        }
                      },
                      "required": [
                        "allowed",
                        "reason",
                        "reservation_id"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trials/finish": {
      "post": {
        "operationId": "finishTrial",
        "summary": "结算一次试用操作",
        "description": "由预留试用次数的原账号会话提交。成功或有部分写入传 true，明确未发生有效写入传 false；相同结算可安全重试。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "description": "App 对 Android ID 做 SHA-256 后的十六进制值",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "request_id": {
                    "type": "string",
                    "description": "一次操作的 UUID，重试时保持相同",
                    "example": "852745d4-be11-43e3-a550-075dba096d76",
                    "format": "uuid"
                  },
                  "used": {
                    "type": "boolean",
                    "description": "是否已完成一次有效写入或备份",
                    "example": true
                  }
                },
                "required": [
                  "device_id",
                  "request_id",
                  "used"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "description": "结算状态",
                          "example": "used",
                          "enum": [
                            "used",
                            "released"
                          ]
                        }
                      },
                      "required": [
                        "state"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sms-generation/status": {
      "post": {
        "operationId": "smsGenerationStatus",
        "summary": "检查短信生成限制",
        "description": "App 启动、切换账号及点击生成时检查。设备限制不影响登录和查看客服。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "description": "App 对 Android ID 做 SHA-256 后的十六进制值",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                },
                "required": [
                  "device_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "account_blocked": {
                          "type": "boolean",
                          "description": "当前登录账号受限",
                          "example": false
                        },
                        "device_blocked": {
                          "type": "boolean",
                          "description": "设备上所有账号受限",
                          "example": false
                        }
                      },
                      "required": [
                        "account_blocked",
                        "device_blocked"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sms-generation/begin": {
      "post": {
        "operationId": "beginSmsGeneration",
        "summary": "保存待生成短信的审核记录",
        "description": "App 获得用户同意且准备写入时调用，提交安装包渠道。命中禁用渠道时返回 GENERATION_CHANNEL_BLOCKED。每个收件人保存独立记录，敏感字段加密留存 180 天。命中自动审核规则时保存拦截记录、限制账号并返回 SMS_GENERATION_BLOCKED，重试使用同一请求号。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "description": "一次操作的 UUID，重试时保持相同",
                    "example": "852745d4-be11-43e3-a550-075dba096d76",
                    "format": "uuid"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "App 对 Android ID 做 SHA-256 后的十六进制值",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "channel": {
                    "type": "string",
                    "description": "安装包渠道代码",
                    "example": "huawei",
                    "pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
                  },
                  "content": {
                    "type": "string",
                    "description": "最终写入的短信内容",
                    "example": "示例短信",
                    "maxLength": 6000
                  },
                  "targets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "姓名，可为空",
                          "example": "示例用户",
                          "maxLength": 128
                        },
                        "number": {
                          "type": "string",
                          "description": "原始收件号码",
                          "example": "13800000000",
                          "maxLength": 64
                        }
                      },
                      "required": [
                        "name",
                        "number"
                      ]
                    },
                    "description": "按执行顺序排列的收件人",
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "request_id",
                  "device_id",
                  "content",
                  "targets"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "description": "审核记录状态",
                          "example": "pending",
                          "enum": [
                            "pending",
                            "finished"
                          ]
                        }
                      },
                      "required": [
                        "state"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "请求体超出限制",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sms-generation/finish": {
      "post": {
        "operationId": "finishSmsGeneration",
        "summary": "提交每条短信的写入结果",
        "description": "账号和设备须与首次上报一致。重复提交相同结果安全。仍未收到结果的记录在后台显示待回报。",
        "tags": [
          "会员与订单"
        ],
        "security": [
          {
            "UserToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request_id": {
                    "type": "string",
                    "description": "一次操作的 UUID，重试时保持相同",
                    "example": "852745d4-be11-43e3-a550-075dba096d76",
                    "format": "uuid"
                  },
                  "device_id": {
                    "type": "string",
                    "description": "App 对 Android ID 做 SHA-256 后的十六进制值",
                    "example": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "results": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "每条写入结果",
                      "example": "written",
                      "enum": [
                        "written",
                        "failed",
                        "not_attempted"
                      ]
                    },
                    "description": "顺序与首次上报的收件人一致",
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "request_id",
                  "device_id",
                  "results"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "state": {
                          "type": "string",
                          "description": "审核记录状态",
                          "example": "pending",
                          "enum": [
                            "pending",
                            "finished"
                          ]
                        }
                      },
                      "required": [
                        "state"
                      ]
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "409": {
            "description": "重复绑定、订单幂等冲突或上传尚未完成",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "频率或反馈次数超限",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "内部错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "稳定的程序错误码",
                "example": "INVALID_SESSION"
              },
              "message": {
                "type": "string",
                "description": "适合展示的中文错误",
                "example": "请重新登录"
              },
              "request_id": {
                "type": "string",
                "description": "排查单次请求的追踪 ID",
                "example": "req_9e271e9b6a9f4489abbdf6419e7e054c"
              }
            },
            "required": [
              "code",
              "message",
              "request_id"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Membership": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "当前是否生效",
            "example": false
          },
          "lifetime": {
            "type": "boolean",
            "description": "是否永久会员",
            "example": false
          },
          "requires_recovery_binding": {
            "type": "boolean",
            "description": "付费游客已有会员权益，使用会员限制功能前须绑定手机号或微信",
            "example": false
          },
          "expires_at": {
            "type": "string",
            "description": "会员到期时刻，UTC ISO 8601，永久会员与无到期时间时为 null",
            "example": "2026-12-26T08:30:00.000Z",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "active",
          "lifetime",
          "requires_recovery_binding",
          "expires_at"
        ]
      },
      "User": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "服务端内部账号标识",
            "example": "usr_0e0664cb1fed40ec85803de2c45c8c6a"
          },
          "user_id": {
            "type": "integer",
            "description": "App 和管理后台展示的顺序用户 ID",
            "example": 1000000,
            "minimum": 1000000,
            "format": "int64"
          },
          "nickname": {
            "type": "string",
            "description": "展示昵称",
            "example": "游客"
          },
          "avatar_url": {
            "type": "string",
            "description": "头像短时链接",
            "example": null,
            "nullable": true
          },
          "mobile": {
            "type": "string",
            "description": "中国大陆 11 位手机号",
            "example": "13800000000",
            "pattern": "^1[3-9][0-9]{9}$",
            "nullable": true
          },
          "wechat_nickname": {
            "type": "string",
            "description": "微信授权返回的昵称",
            "example": null,
            "nullable": true
          },
          "can_bind_identity": {
            "type": "boolean",
            "description": "仅尚未绑定手机号或微信的游客账号可绑定",
            "example": true
          },
          "account_state": {
            "type": "string",
            "description": "账号状态",
            "example": "active",
            "enum": [
              "active",
              "suspended",
              "deletion_requested",
              "deleted"
            ]
          },
          "sign_in_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "已绑定的身份",
              "example": "guest",
              "enum": [
                "guest",
                "phone",
                "wechat"
              ]
            }
          },
          "phone_hint": {
            "type": "string",
            "description": "脱敏手机号",
            "example": "138****0000",
            "nullable": true
          },
          "membership": {
            "$ref": "#/components/schemas/Membership"
          }
        },
        "required": [
          "account_id",
          "user_id",
          "nickname",
          "avatar_url",
          "mobile",
          "wechat_nickname",
          "can_bind_identity",
          "account_state",
          "sign_in_methods",
          "phone_hint",
          "membership"
        ]
      },
      "Session": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          },
          "expires_at": {
            "type": "string",
            "description": "UTC ISO 8601 时间",
            "example": "2026-11-26T08:30:00.000Z",
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "access_token",
          "expires_at",
          "user"
        ]
      },
      "Plan": {
        "type": "object",
        "properties": {
          "plan_id": {
            "type": "string",
            "description": "服务端套餐标识",
            "example": "week"
          },
          "title": {
            "type": "string",
            "description": "套餐标题",
            "example": "7天会员"
          },
          "original_price_fen": {
            "type": "integer",
            "description": "展示原价，人民币分",
            "example": 2000,
            "minimum": 1
          },
          "price_fen": {
            "type": "integer",
            "description": "人民币金额，单位为分",
            "example": 1200,
            "minimum": 1
          },
          "duration_days": {
            "type": "integer",
            "description": "固定期限天数，永久会员为 null",
            "example": 7,
            "nullable": true
          },
          "bonus_days": {
            "type": "integer",
            "description": "额外赠送天数，永久会员为 0",
            "example": 0,
            "minimum": 0
          },
          "description": {
            "type": "string",
            "description": "套餐补充说明，可为空",
            "example": ""
          }
        },
        "required": [
          "plan_id",
          "title",
          "original_price_fen",
          "price_fen",
          "duration_days",
          "bonus_days",
          "description"
        ]
      },
      "Order": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string",
            "description": "服务端订单 ID",
            "example": "ord_4ac8f26cbc7a4d17aa094ed74610"
          },
          "plan_id": {
            "type": "string",
            "description": "套餐标识",
            "example": "week"
          },
          "title": {
            "type": "string",
            "description": "购买时的套餐标题",
            "example": "7天会员"
          },
          "price_fen": {
            "type": "integer",
            "description": "人民币金额，单位为分",
            "example": 1200,
            "minimum": 1
          },
          "currency": {
            "type": "string",
            "description": "币种",
            "example": "CNY",
            "enum": [
              "CNY"
            ]
          },
          "channel": {
            "type": "string",
            "description": "支付渠道",
            "example": "wechat",
            "enum": [
              "wechat",
              "alipay"
            ]
          },
          "status": {
            "type": "string",
            "description": "支付状态",
            "example": "pending",
            "enum": [
              "pending",
              "paid"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "UTC ISO 8601 时间",
            "example": "2026-11-26T08:30:00.000Z",
            "format": "date-time"
          },
          "paid_at": {
            "type": "string",
            "description": "UTC ISO 8601 时间",
            "example": "2026-11-26T08:30:00.000Z",
            "format": "date-time",
            "nullable": true
          }
        },
        "required": [
          "order_id",
          "plan_id",
          "title",
          "price_fen",
          "currency",
          "channel",
          "status",
          "created_at",
          "paid_at"
        ]
      },
      "WechatPay": {
        "type": "object",
        "properties": {
          "app_id": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          },
          "merchant_id": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          },
          "prepay_id": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          },
          "package_value": {
            "type": "string",
            "description": "固定值",
            "example": "Sign=WXPay"
          },
          "nonce": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          },
          "timestamp": {
            "type": "string",
            "description": "Unix 秒",
            "example": "1795681800"
          },
          "signature": {
            "type": "string",
            "description": "不透明值，保持原样传递",
            "example": "opaque_value_example"
          }
        },
        "required": [
          "app_id",
          "merchant_id",
          "prepay_id",
          "package_value",
          "nonce",
          "timestamp",
          "signature"
        ]
      },
      "AlipayPay": {
        "type": "object",
        "properties": {
          "order_string": {
            "type": "string",
            "description": "交给支付宝 Android SDK 的完整签名订单串",
            "example": "signed_order_example"
          }
        },
        "required": [
          "order_string"
        ]
      },
      "Upload": {
        "type": "object",
        "properties": {
          "upload_id": {
            "type": "string",
            "description": "上传凭证 ID",
            "example": "med_afe0dcdb9dca4f929d13bcf8ff32c828"
          },
          "upload_url": {
            "type": "string",
            "description": "短时上传 URL",
            "example": "https://example.invalid/file"
          },
          "method": {
            "type": "string",
            "description": "上传方法",
            "example": "PUT"
          },
          "required_headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "上传时按原样提供的请求头",
            "example": {
              "Content-Type": "image/jpeg"
            }
          },
          "expires_in": {
            "type": "integer",
            "description": "有效期，秒",
            "example": 600
          },
          "storage": {
            "type": "string",
            "description": "实际存储驱动",
            "example": "oss",
            "enum": [
              "oss",
              "local"
            ]
          }
        },
        "required": [
          "upload_id",
          "upload_url",
          "method",
          "required_headers",
          "expires_in",
          "storage"
        ]
      }
    },
    "securitySchemes": {
      "AdminSession": {
        "type": "apiKey",
        "in": "cookie",
        "name": "yxm_admin"
      },
      "UserToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "登录后获取的不透明用户令牌，30 天有效。"
      }
    }
  },
  "x-http-statuses": {
    "400": "参数错误、图形验证码或短信验证码错误",
    "401": "会话过期或授权凭证校验失败",
    "403": "账号不可用或文件链接已失效",
    "404": "资源不存在或不属于当前账号",
    "409": "重复绑定、订单幂等冲突或上传尚未完成",
    "413": "请求体超出限制",
    "415": "文件内容与声明的格式不一致",
    "429": "频率或反馈次数超限",
    "500": "内部错误",
    "502": "支付结果与订单不一致",
    "503": "服务商未启用或上传繁忙"
  }
}
