{
  "components": {
    "schemas": {
      "account.v1.ActivateTOTPReply": {
        "properties": {
          "recoveryCodes": {
            "description": "恢复码明文列表（共 10 个，仅展示一次，用户需自行保存）",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "account.v1.ActivateTOTPRequest": {
        "properties": {
          "code": {
            "description": "TOTP 6 位验证码，用于确认用户已正确配置 Authenticator App",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.AuthTokens": {
        "description": "AuthTokens 认证令牌信息",
        "properties": {
          "accessToken": {
            "description": "访问令牌（30 分钟有效）",
            "type": "string"
          },
          "expiresAt": {
            "description": "access_token 过期时间",
            "format": "date-time",
            "type": "string"
          },
          "refreshToken": {
            "description": "刷新令牌（普通登录默认 72 小时；rememberMe 有效期由后台设置控制）",
            "type": "string"
          },
          "tokenType": {
            "description": "令牌类型，固定为 \"Bearer\"",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.ChangePasswordReply": {
        "properties": {
          "message": {
            "description": "提示信息",
            "type": "string"
          },
          "success": {
            "description": "修改成功",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "account.v1.ChangePasswordRequest": {
        "properties": {
          "newPassword": {
            "description": "新密码（8-128 个字符，至少包含一个字母和一个数字）",
            "type": "string"
          },
          "oldPassword": {
            "description": "当前密码（用于验证身份）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.DeleteAccountReply": {
        "description": "DeleteAccountReply 自助删除账户响应。",
        "properties": {
          "userId": {
            "description": "被删除的用户 ID，用于前端确认或审计。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.DisableTOTPReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "account.v1.DisableTOTPRequest": {
        "properties": {
          "code": {
            "description": "TOTP 6 位码或恢复码（二选一）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Enable2FAReply": {
        "properties": {
          "backupCodes": {
            "description": "明文备份码列表（仅展示一次，用户需自行保存）",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "totpUri": {
            "description": "otpauth:// URI，供前端生成二维码",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Enable2FARequest": {
        "properties": {},
        "type": "object"
      },
      "account.v1.EnrollTOTPReply": {
        "properties": {
          "otpAuthUrl": {
            "description": "otpauth:// URI，供前端生成二维码",
            "type": "string"
          },
          "qrCodePngBase64": {
            "description": "QR 码 PNG 图片的 base64 编码（data:image/png;base64,...）",
            "type": "string"
          },
          "secret": {
            "description": "TOTP 原文 secret（base32 编码），仅此一次展示，用户须存入 Authenticator App",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.EnrollTOTPRequest": {
        "properties": {},
        "type": "object"
      },
      "account.v1.GetProfileReply": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/account.v1.UserInfo"
          }
        },
        "type": "object"
      },
      "account.v1.GetReferralRewardConfigReply": {
        "properties": {
          "inviteeRewardMicros": {
            "description": "新用户可获积分（单位 micros，0 表示\"暂不发放\"）",
            "type": "string"
          },
          "inviterRewardMicros": {
            "description": "邀请人可获积分（单位 micros，0 表示\"暂不发放\"）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.GetReferralStatsReply": {
        "properties": {
          "pendingRewardsMicros": {
            "description": "待发放奖励（单位：micros）",
            "type": "string"
          },
          "successfulInvites": {
            "description": "成功邀请（已注册）",
            "format": "int32",
            "type": "integer"
          },
          "totalInvites": {
            "description": "总邀请人数",
            "format": "int32",
            "type": "integer"
          },
          "totalRewardsMicros": {
            "description": "累计奖励（单位：micros，1,000,000 micros = 1 元）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.HandleSSOCallbackReply": {
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.InitiateSSOLoginReply": {
        "properties": {
          "redirectUrl": {
            "description": "重定向 URL",
            "type": "string"
          },
          "state": {
            "description": "状态参数（用于回调验证）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.ListReferralsReply": {
        "properties": {
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/account.v1.ReferralRecord"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "account.v1.ListSSOProvidersReply": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/account.v1.SSOProviderInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "account.v1.ListSessionsReply": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/account.v1.SessionInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "account.v1.Login2FAReply": {
        "properties": {
          "accessToken": {
            "description": "正式访问令牌",
            "type": "string"
          },
          "expiresAt": {
            "description": "access_token 过期时间",
            "format": "date-time",
            "type": "string"
          },
          "refreshToken": {
            "description": "正式刷新令牌",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Login2FARequest": {
        "properties": {
          "code": {
            "description": "TOTP 6 位码或恢复码（二选一）",
            "type": "string"
          },
          "portal": {
            "description": "Login portal: console=user console, admin=admin console; empty defaults to console.",
            "type": "string"
          },
          "rememberMe": {
            "description": "是否请求长期有效会话；应与登录第一阶段保持一致。",
            "type": "boolean"
          },
          "twoFaToken": {
            "description": "登录第一阶段返回的临时 token（5 分钟有效）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.LoginReply": {
        "properties": {
          "auth": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.AuthTokens"
              }
            ],
            "description": "认证信息"
          },
          "twoFaRequired": {
            "description": "是否需要二步验证（true 时 auth 为空）",
            "type": "boolean"
          },
          "twoFaToken": {
            "description": "临时 token，用于后续 Verify2FA（two_fa_required=true 时有效）",
            "type": "string"
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.UserInfo"
              }
            ],
            "description": "用户信息"
          }
        },
        "type": "object"
      },
      "account.v1.LoginRequest": {
        "properties": {
          "password": {
            "description": "密码",
            "type": "string"
          },
          "portal": {
            "description": "Login portal: console=user console, admin=admin console; empty defaults to console.",
            "type": "string"
          },
          "rememberMe": {
            "description": "是否请求长期有效会话；具体有效期由后台 auth.session.remember_me_ttl_hours 控制。",
            "type": "boolean"
          },
          "username": {
            "description": "登录标识符：支持用户名、邮箱或手机号\n - 用户名：字母、数字、下划线、中划线组合\n - 邮箱：标准邮箱格式（如 user@example.com）\n - 手机号：中国大陆 11 位手机号（如 13800138000）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.LogoutReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "account.v1.LogoutRequest": {
        "properties": {
          "refreshToken": {
            "description": "要吊销的 refresh_token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Preferences": {
        "properties": {
          "daily_report": {
            "description": "是否订阅每日用量报告。",
            "type": "boolean"
          },
          "locale": {
            "description": "界面语言偏好（如 zh-CN）。",
            "type": "string"
          },
          "notification_email": {
            "description": "通知接收邮箱；为空表示使用登录邮箱。",
            "type": "string"
          },
          "notification_enabled": {
            "description": "是否开启通知。",
            "type": "boolean"
          },
          "quota_warning_threshold": {
            "description": "配额（余额）告警阈值，单位 micros；0 表示不告警。",
            "format": "int64",
            "type": "integer"
          },
          "timezone": {
            "description": "时区（IANA 名称，如 Asia/Shanghai）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.ReferralRecord": {
        "properties": {
          "registeredAt": {
            "description": "注册时间",
            "format": "date-time",
            "type": "string"
          },
          "rewardMicros": {
            "description": "奖励金额（单位：micros）",
            "type": "string"
          },
          "status": {
            "description": "状态：pending=待确认 completed=已完成",
            "type": "string"
          },
          "userId": {
            "description": "被邀请用户 ID",
            "type": "string"
          },
          "username": {
            "description": "被邀请用户名",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.RefreshTokenReply": {
        "properties": {
          "auth": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.AuthTokens"
              }
            ],
            "description": "认证令牌信息"
          }
        },
        "type": "object"
      },
      "account.v1.RefreshTokenRequest": {
        "properties": {
          "refreshToken": {
            "description": "有效的 refresh_token",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.RegisterReply": {
        "properties": {
          "auth": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.AuthTokens"
              }
            ],
            "description": "认证信息（注册成功后直接返回 token，无需再次登录）"
          },
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.UserInfo"
              }
            ],
            "description": "用户信息"
          }
        },
        "type": "object"
      },
      "account.v1.RegisterRequest": {
        "properties": {
          "email": {
            "description": "邮箱",
            "type": "string"
          },
          "password": {
            "description": "密码，8-128 个字符",
            "type": "string"
          },
          "referralCode": {
            "description": "来源邀请码（可选）",
            "type": "string"
          },
          "username": {
            "description": "用户名，3-64 个字符",
            "type": "string"
          },
          "verificationCode": {
            "description": "邮箱验证码",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.RevokeSessionReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "account.v1.SSOProviderInfo": {
        "properties": {
          "enabled": {
            "description": "是否启用",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "format": "int32",
            "type": "integer"
          },
          "slug": {
            "type": "string"
          },
          "ssoType": {
            "description": "SSO 类型：oidc / saml",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.SessionInfo": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "isCurrent": {
            "description": "是否为当前会话",
            "type": "boolean"
          },
          "sessionId": {
            "type": "string"
          },
          "userAgent": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.SystemTokenReply": {
        "properties": {
          "createdAt": {
            "description": "创建时间。",
            "format": "date-time",
            "type": "string"
          },
          "lastRegeneratedAt": {
            "description": "最近一次重新生成时间。",
            "format": "date-time",
            "type": "string"
          },
          "token": {
            "description": "系统 API Token 明文，仅用于前端展示和复制。",
            "type": "string"
          },
          "tokenPrefix": {
            "description": "Token 前缀，用于列表展示和识别。",
            "type": "string"
          },
          "updatedAt": {
            "description": "更新时间。",
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.UpdateProfileReply": {
        "properties": {
          "user": {
            "allOf": [
              {
                "$ref": "#/components/schemas/account.v1.UserInfo"
              }
            ],
            "description": "更新后的用户信息"
          }
        },
        "type": "object"
      },
      "account.v1.UpdateProfileRequest": {
        "properties": {
          "avatarUrl": {
            "type": "string"
          },
          "email": {
            "description": "已废弃：修改登录邮箱请用 ChangeEmail（POST /v1/account/email/change，双重验证码），此字段被后端忽略。",
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "nickname": {
            "description": "未传入时保留原值；显式空串表示清空。",
            "type": "string"
          },
          "phone": {
            "description": "未传入时保留原值；显式空串同时清空资料与登录手机号。",
            "type": "string"
          },
          "timezone": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.UserInfo": {
        "description": "UserInfo 用户基本信息",
        "properties": {
          "accountType": {
            "description": "账号类型：1=客户C端 2=员工B端 3=代理商 4=企业管理员 5=企业成员",
            "format": "int32",
            "type": "integer"
          },
          "allowTokenBindSource": {
            "description": "是否允许该用户的令牌绑定渠道资源（默认关闭）",
            "type": "boolean"
          },
          "avatarUrl": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "inviteCode": {
            "description": "用户专属邀请码",
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "nickname": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "phone": {
            "description": "个人资料扩展",
            "type": "string"
          },
          "realnameRequired": {
            "description": "当前登录场景下是否必须完成个人实名认证；企业认证通过不再豁免企业管理员本人，后端按实名状态和场景统一计算。",
            "type": "boolean"
          },
          "realnameStatus": {
            "description": "个人实名认证状态：unverified / processing / verified。",
            "type": "string"
          },
          "registeredAt": {
            "description": "注册时间",
            "format": "date-time",
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "twoFaEnabled": {
            "type": "boolean"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.ValidateReferralCodeReply": {
        "properties": {
          "valid": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "account.v1.ValidateReferralCodeRequest": {
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Verify2FAReply": {
        "properties": {
          "accessToken": {
            "description": "验证成功后签发的 access_token（登录流程）",
            "type": "string"
          },
          "enabled": {
            "description": "是否为开启 2FA 时的确认（true 表示开启成功）",
            "type": "boolean"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "refreshToken": {
            "description": "刷新令牌（登录流程）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "account.v1.Verify2FARequest": {
        "properties": {
          "code": {
            "description": "TOTP 验证码（6 位数字）或备份码",
            "type": "string"
          },
          "portal": {
            "description": "Login portal: console=user console, admin=admin console; empty defaults to console.",
            "type": "string"
          },
          "rememberMe": {
            "description": "登录流程中沿用第一步的长期有效选择；开启 2FA 确认流程忽略该字段。",
            "type": "boolean"
          },
          "twoFaToken": {
            "description": "登录流程中 two_fa_token（若为登录验证则必填）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.AdminListPromotionsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/activity.v1.PromotionInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.CheckinDailyStat": {
        "description": "CheckinDailyStat 每日签到统计",
        "properties": {
          "checkins": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "maxStreak": {
            "format": "int32",
            "type": "integer"
          },
          "rewardMicros": {
            "type": "string"
          },
          "uniqueUsers": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.CheckinReply": {
        "properties": {
          "rewardMicros": {
            "type": "string"
          },
          "streakDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.CheckinRequest": {
        "properties": {},
        "type": "object"
      },
      "activity.v1.CreatePromotionReply": {
        "properties": {
          "promotion": {
            "$ref": "#/components/schemas/activity.v1.PromotionInfo"
          }
        },
        "type": "object"
      },
      "activity.v1.CreatePromotionRequest": {
        "properties": {
          "audience": {
            "type": "string"
          },
          "audienceUserIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "code": {
            "type": "string"
          },
          "config": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntil": {
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.CreateRedeemCodeBatchReply": {
        "properties": {
          "batchId": {
            "type": "string"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.CreateRedeemCodeBatchRequest": {
        "properties": {
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntil": {
            "format": "date-time",
            "type": "string"
          },
          "fiatAmountMicros": {
            "type": "string"
          },
          "fiatCurrency": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxUses": {
            "format": "int32",
            "type": "integer"
          },
          "promotionId": {
            "type": "string"
          },
          "valueSubscriptionDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.DeletePromotionReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "activity.v1.GetCheckinStatsReply": {
        "properties": {
          "daily": {
            "items": {
              "$ref": "#/components/schemas/activity.v1.CheckinDailyStat"
            },
            "type": "array"
          },
          "from": {
            "type": "string"
          },
          "maxStreak": {
            "format": "int32",
            "type": "integer"
          },
          "to": {
            "type": "string"
          },
          "totalCheckins": {
            "type": "string"
          },
          "totalRewardMicros": {
            "type": "string"
          },
          "uniqueUsers": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.GetCheckinStatusReply": {
        "properties": {
          "checkedToday": {
            "type": "boolean"
          },
          "streakDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.ListPromotionsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/activity.v1.PromotionInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.ListRedeemCodesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/activity.v1.RedeemCodeInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.PromotionInfo": {
        "description": "PromotionInfo 促销活动信息",
        "properties": {
          "audience": {
            "type": "string"
          },
          "audienceUserIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "code": {
            "type": "string"
          },
          "config": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntil": {
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.RedeemCodeInfo": {
        "description": "RedeemCodeInfo 兑换码信息",
        "properties": {
          "batchId": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creditsPerUnit": {
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntil": {
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "fiatAmountMicros": {
            "type": "string"
          },
          "fiatCurrency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "maxUses": {
            "format": "int32",
            "type": "integer"
          },
          "payPerCreditMicros": {
            "type": "string"
          },
          "promotionCode": {
            "type": "string"
          },
          "promotionId": {
            "type": "string"
          },
          "usedCount": {
            "format": "int32",
            "type": "integer"
          },
          "valueMicros": {
            "type": "string"
          },
          "valueSubscriptionDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.RedeemPreviewReply": {
        "description": "RedeemPreviewReply 兑换前预览结果。只在「可兑换」时返回，暴露该码可获得的权益（积分/订阅天数），\n 供用户确认后再兑换；不返回法币币种/金额（后台对账口径，不面向终端用户）。\n 不可兑换时不走本消息，而是返回与 Redeem 一致的错误码（success:false + reason），前端复用同一套错误处理。",
        "properties": {
          "kind": {
            "type": "string"
          },
          "valueMicros": {
            "type": "string"
          },
          "valueSubscriptionDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.RedeemPreviewRequest": {
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.RedeemReply": {
        "properties": {
          "kind": {
            "type": "string"
          },
          "valueMicros": {
            "type": "string"
          },
          "valueSubscriptionDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "activity.v1.RedeemRequest": {
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "activity.v1.UpdatePromotionReply": {
        "properties": {
          "promotion": {
            "$ref": "#/components/schemas/activity.v1.PromotionInfo"
          }
        },
        "type": "object"
      },
      "activity.v1.UpdatePromotionRequest": {
        "properties": {
          "audience": {
            "type": "string"
          },
          "audienceUserIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "code": {
            "type": "string"
          },
          "config": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "effectiveFrom": {
            "format": "date-time",
            "type": "string"
          },
          "effectiveUntil": {
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.currency.v1.CreateCurrencyRequest": {
        "properties": {
          "currency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.currency.v1.CurrencyReply": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/admin.currency.v1.SupportedCurrency"
          }
        },
        "type": "object"
      },
      "admin.currency.v1.Empty": {
        "properties": {},
        "type": "object"
      },
      "admin.currency.v1.ListCurrenciesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.currency.v1.SupportedCurrency"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.currency.v1.SupportedCurrency": {
        "description": "SupportedCurrency 支持币种白名单条目。",
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.AdminInvoice": {
        "description": "AdminInvoice 管理员视图发票（含内部审计字段与文件 key）。\n AdminInvoice 管理端发票投影：暴露 fileKey/内部审计字段。\n\n 时间字段口径：本 message 全部时间字段（reviewed_at/issued_at/cancelled_at/\n reversed_at/applied_at/created_at/updated_at/paid_at）均为 RFC3339 字符串、空值为空串，\n 刻意对齐 admin 域既有 sibling（topup_admin/currency_admin）的字符串风格；\n 而 console 侧 invoice.v1.Invoice 用 google.protobuf.Timestamp（对齐 payment）。\n 两端不一致是有意为之，前端 admin 按字符串解析、console 按 Timestamp 解析，勿盲目统一。",
        "properties": {
          "address": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "appliedAt": {
            "type": "string"
          },
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "courierCompany": {
            "type": "string"
          },
          "courierNo": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "fileFormat": {
            "type": "string"
          },
          "fileKey": {
            "type": "string"
          },
          "fileKeyXml": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoiceNo": {
            "description": "----- 开具/文件（admin 可见 key，下载仍走 presign） -----",
            "type": "string"
          },
          "issuedAt": {
            "type": "string"
          },
          "issuedBy": {
            "type": "string"
          },
          "mailingAddress": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "receiverEmail": {
            "description": "----- 交付 -----",
            "type": "string"
          },
          "receiverName": {
            "type": "string"
          },
          "receiverPhone": {
            "type": "string"
          },
          "redConfirmNo": {
            "type": "string"
          },
          "redFileFormat": {
            "type": "string"
          },
          "redFileKey": {
            "type": "string"
          },
          "redInvoiceNo": {
            "type": "string"
          },
          "reissueOf": {
            "type": "string"
          },
          "rejectReason": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "reversalReason": {
            "type": "string"
          },
          "reversedAt": {
            "type": "string"
          },
          "reversedBy": {
            "type": "string"
          },
          "reviewedAt": {
            "type": "string"
          },
          "reviewedBy": {
            "description": "----- 审计 -----",
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "status": {
            "description": "status pending/approved/issuing/issued/rejected/cancelled/reversing/reversed",
            "type": "string"
          },
          "taxNo": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleId": {
            "type": "string"
          },
          "titleType": {
            "description": "----- 抬头快照 -----",
            "type": "string"
          },
          "type": {
            "description": "type electronic_general | electronic_special | paper_special",
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "userEmail": {
            "description": "user_email 申请人邮箱（enrichment，服务层关联填充；biz 模型仅有 user_id）",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.ApproveInvoiceRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.CreateInvoiceFileUploadURLReply": {
        "properties": {
          "expiresAt": {
            "description": "expires_at 上传地址失效时间（RFC3339）",
            "type": "string"
          },
          "fileKey": {
            "description": "file_key 对象 key；approved 状态返回原票 key，issued 状态返回独立红字版式件 key；上传成功后回填对应开具/红冲接口",
            "type": "string"
          },
          "requiredHeaders": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "required_headers 直传时必须原样携带的显式签名请求头；不包含由浏览器/HTTP 客户端根据 upload_url 自动管理的 Host。",
            "type": "object"
          },
          "uploadUrl": {
            "description": "upload_url presigned PUT 地址（前端直传对象存储）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.CreateInvoiceFileUploadURLRequest": {
        "properties": {
          "contentType": {
            "description": "content_type 内容类型：approved 票允许原票版式/XML；issued 票仅允许红字 PDF/OFD。",
            "type": "string"
          },
          "filename": {
            "description": "filename 原始文件名（用于生成 object key，服务端消毒）",
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.ExportInvoicesReply": {
        "properties": {
          "data": {
            "description": "data CSV 文件字节（JSON 网关以 base64 返回）",
            "format": "bytes",
            "type": "string"
          },
          "filename": {
            "description": "filename 建议下载文件名",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.GetInvoiceDownloadURLReply": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "url 15 分钟有效的 presigned 下载地址。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.InvoiceDetailReply": {
        "description": "InvoiceDetailReply 详情：主体 + 订单明细 + 换开链。",
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/admin.invoice.v1.AdminInvoice"
          },
          "orders": {
            "description": "orders 关联的充值订单历史明细（包含红冲/换开后已失效 link）",
            "items": {
              "$ref": "#/components/schemas/admin.invoice.v1.InvoiceOrderLine"
            },
            "type": "array"
          },
          "reissuedTo": {
            "description": "reissued_to 由本票换开出的新票 id（0=无）；配合 reissue_of 构成换开链",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.InvoiceOrderLine": {
        "description": "InvoiceOrderLine 发票关联的充值订单历史明细（包含已失效 link）。",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "orderId": {
            "type": "string"
          },
          "paidAt": {
            "type": "string"
          },
          "tradeNo": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.InvoiceReply": {
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/admin.invoice.v1.AdminInvoice"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.IssueInvoiceRequest": {
        "properties": {
          "courierCompany": {
            "description": "courier_company 纸质快递公司（纸质场景）",
            "type": "string"
          },
          "courierNo": {
            "description": "courier_no 纸质快递单号",
            "type": "string"
          },
          "fileFormat": {
            "description": "file_format 版式格式：pdf | ofd",
            "type": "string"
          },
          "fileKey": {
            "description": "file_key 版式文件 key（电子票必填、纸质可选；前端 presigned PUT 后回填）",
            "type": "string"
          },
          "fileKeyXml": {
            "description": "file_key_xml 数电票 XML 数据文件 key（选填，§十-3）",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invoiceNo": {
            "description": "invoice_no 发票号码（必填）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.ListInvoicesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.invoice.v1.AdminInvoice"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.RejectInvoiceRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "description": "reason 驳回原因（必填，1-4-2）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.ReverseInvoiceRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "description": "reason 红冲原因（建议四种法定情形枚举 + 补充说明）",
            "type": "string"
          },
          "redConfirmNo": {
            "description": "red_confirm_no 红字确认单编号（选填）",
            "type": "string"
          },
          "redFileFormat": {
            "description": "red_file_format 红字版式格式：pdf | ofd",
            "type": "string"
          },
          "redFileKey": {
            "description": "red_file_key 红字发票版式件 key（必填，前端 presigned PUT 后回填）",
            "type": "string"
          },
          "redInvoiceNo": {
            "description": "red_invoice_no 红字发票号码（必填）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.invoice.v1.UpdateCourierRequest": {
        "properties": {
          "courierCompany": {
            "type": "string"
          },
          "courierNo": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.CreateCreditRateRequest": {
        "properties": {
          "creditsPerUnit": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.CreateTopupPackageRequest": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "internalCredits": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payAmountMicros": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.CreateTopupRuleRequest": {
        "properties": {
          "bonusCredits": {
            "type": "string"
          },
          "hasMax": {
            "type": "boolean"
          },
          "maxCredits": {
            "type": "string"
          },
          "minCredits": {
            "type": "string"
          },
          "multiplierBps": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.CreditRate": {
        "description": "---- CreditRate ----",
        "properties": {
          "baseCurrency": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "creditsPerUnit": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "payPerCreditMicros": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.CreditRateReply": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/admin.topup.v1.CreditRate"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.DisableTopupRuleRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.Empty": {
        "properties": {},
        "type": "object"
      },
      "admin.topup.v1.ListCreditRatesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.topup.v1.CreditRate"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.ListPaymentChannelConfigsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.topup.v1.PaymentChannelConfig"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.ListTopupPackagesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.topup.v1.TopupPackage"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.ListTopupRulesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.topup.v1.TopupRule"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.PaymentChannelConfig": {
        "description": "---- PaymentChannelConfig ----\n 支付渠道配置管理。config 中敏感键（private_key/api_v3_key/alipay_public_key）\n 写入时由 data 层自动加密；读取接口对敏感键脱敏返回（仅返回是否已配置的占位符）。",
        "properties": {
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "createdAt": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.PaymentChannelConfigReply": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/admin.topup.v1.PaymentChannelConfig"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.TopupPackage": {
        "description": "---- TopupPackage ----",
        "properties": {
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "internalCredits": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payAmountMicros": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.TopupPackageReply": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/admin.topup.v1.TopupPackage"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.TopupRule": {
        "description": "---- TopupRule ----",
        "properties": {
          "bonusCredits": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "hasMax": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "maxCredits": {
            "type": "string"
          },
          "minCredits": {
            "type": "string"
          },
          "multiplierBps": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.TopupRuleReply": {
        "properties": {
          "item": {
            "$ref": "#/components/schemas/admin.topup.v1.TopupRule"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.UpdateCreditRateRequest": {
        "properties": {
          "creditsPerUnit": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.UpdateTopupPackageRequest": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "internalCredits": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payAmountMicros": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.UpdateTopupRuleRequest": {
        "properties": {
          "bonusCredits": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "hasMax": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "maxCredits": {
            "type": "string"
          },
          "minCredits": {
            "type": "string"
          },
          "multiplierBps": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.topup.v1.UpsertPaymentChannelConfigRequest": {
        "properties": {
          "config": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "config 全量覆盖；敏感键传 \"\u003cconfigured\u003e\" 占位符表示保留库中现值不变。",
            "type": "object"
          },
          "enabled": {
            "type": "boolean"
          },
          "provider": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.uploads.v1.CreateUploadPresignReply": {
        "properties": {
          "expiresAt": {
            "description": "expires_at upload_url 失效时间（RFC3339；不影响 public_url）。",
            "type": "string"
          },
          "key": {
            "description": "key 对象 key（排障 / 日志用，前端正常流程不消费）。",
            "type": "string"
          },
          "publicUrl": {
            "description": "public_url 永久公开访问地址（PUT 成功后即可访问；前端最终提交给业务接口的就是它）。",
            "type": "string"
          },
          "requiredHeaders": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "required_headers PUT 时必须原样携带的签名头（含 If-None-Match: * 防覆盖，\n 以及绑定了对象类型的 Content-Type）；不包含由浏览器 / HTTP 客户端根据\n upload_url 与请求实体自动管理的 Host 和 Content-Length。",
            "type": "object"
          },
          "uploadUrl": {
            "description": "upload_url presigned PUT 地址（前端直传对象存储用），15 分钟有效。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.uploads.v1.CreateUploadPresignRequest": {
        "properties": {
          "contentType": {
            "description": "content_type 图片 MIME（白名单 image/png|jpeg|webp|gif|svg+xml，且须与扩展名配对）。\n 该 MIME 会连同 size 一起进签名：PUT 时必须原样携带（见 required_headers），\n 声明 image/png 就只能传 image/png，不能借此往公共读桶塞 HTML/JS。",
            "type": "string"
          },
          "filename": {
            "description": "filename 原始文件名（服务端只取扩展名，名字本体不进 key；拒绝含 / \\ 或路径穿越）。",
            "type": "string"
          },
          "scene": {
            "description": "scene 上传场景（白名单校验，决定 key 前缀）：banner | entry_slot。\n 每个 RPC 只接受与其权限对应的场景，不能跨场景复用签名能力。",
            "type": "string"
          },
          "size": {
            "description": "size 文件字节数，必须为正且不超过 5 MiB。\n 之所以是必填而非可选提示：aws-sdk-go-v2 仅在 ContentLength 非空时才把 Content-Type\n 纳入 SigV4 SignedHeaders，不给 size 就等于没绑定类型。上传实体大小必须与此完全一致，\n 否则对象存储拒绝该 PUT。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.APISpecTemplate": {
        "description": "APISpecTemplate API 规范模板（字段库 ⊕ field_config 合成后的视图）",
        "properties": {
          "boundModelCount": {
            "format": "int32",
            "type": "integer"
          },
          "code": {
            "type": "string"
          },
          "effectiveFields": {
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "fieldConfig": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "libraryFields": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "requestPath": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdjustUserBalanceReply": {
        "properties": {
          "balanceAfterMicros": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.AdjustUserBalanceRequest": {
        "properties": {
          "amount": {
            "description": "金额（微分字符串，前端 microsString），后端解析为 int64。",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdjustUserQuotaReply": {
        "properties": {
          "balanceAfterMicros": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "quotaAfterMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdjustUserQuotaRequest": {
        "properties": {
          "action": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "quotaMicros": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdminGetTaskReply": {
        "properties": {
          "task": {
            "$ref": "#/components/schemas/admin.v1.AdminTaskDetail"
          }
        },
        "type": "object"
      },
      "admin.v1.AdminListTasksReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.AdminTaskSummary"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdminTaskDetail": {
        "description": "AdminTaskDetail admin 详情：console 安全集 + 运维诊断增补。\n 不含 raw_response / hold_id / billing_op_key / fencing token / poll lease（纯内部机制）。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "billingAttempts": {
            "format": "int32",
            "type": "integer"
          },
          "billingError": {
            "type": "string"
          },
          "billingState": {
            "format": "int32",
            "type": "integer"
          },
          "channelId": {
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（提交请求响应头 X-Request-Id 同值）：从 meta.settle_ctx.request_id\n 抽取，与使用日志 client_request_id 同源同值——前端\"请求 ID\"优先展示本字段并可据此\n 反查调用日志。空串=历史任务缺采集，回退展示 request_id。",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "estMicros": {
            "type": "string"
          },
          "finalizeDeadline": {
            "format": "date-time",
            "type": "string"
          },
          "finalizedAt": {
            "format": "date-time",
            "type": "string"
          },
          "giveUpAt": {
            "description": "运维时间线。",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metaRedacted": {
            "description": "meta（脱敏 request_body/line_items），同样 Redact 后的 JSON 字符串。",
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "nextBillingAttempt": {
            "format": "date-time",
            "type": "string"
          },
          "nextPollAt": {
            "format": "date-time",
            "type": "string"
          },
          "nextReconcileAt": {
            "format": "date-time",
            "type": "string"
          },
          "owedMicros": {
            "type": "string"
          },
          "preview": {
            "allOf": [
              {
                "$ref": "#/components/schemas/admin.v1.TaskPreview"
              }
            ],
            "description": "结果预览（读侧即时组装；从脱敏前 inline 原文抽取，URL 非 data URI 不受 Redact 影响）。"
          },
          "provider": {
            "type": "string"
          },
          "providerTaskId": {
            "type": "string"
          },
          "reconcileDeadline": {
            "format": "date-time",
            "type": "string"
          },
          "requestBodyRedacted": {
            "description": "请求体（脱敏后）：从 meta.settle_ctx.request_body 抽取。meta_redacted 不再裸倒内部 settle_ctx，\n 请求正文改由本字段干净呈现（settle_ctx 其余内部字段不出 API）。",
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "resultInlineRedacted": {
            "description": "上游原样 result_inline，经 logsafe.RedactDataURIs 脱敏后的 JSON 字符串。",
            "type": "string"
          },
          "resultMissing": {
            "type": "boolean"
          },
          "resultRef": {
            "$ref": "#/components/schemas/admin.v1.ResultRefSummary"
          },
          "settledAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "submissionId": {
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "taskType": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "description": "用户展示名（登录名 username）：读侧按 user_id 回填（口径同 console TaskSummary.user_name）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdminTaskSummary": {
        "description": "AdminTaskSummary admin 列表行（比 console 多 channel_id/更全时间线）。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "billingState": {
            "format": "int32",
            "type": "integer"
          },
          "channelId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "preview": {
            "allOf": [
              {
                "$ref": "#/components/schemas/admin.v1.TaskPreview"
              }
            ],
            "description": "结果预览（读侧即时组装，与 console 同结构）。"
          },
          "provider": {
            "type": "string"
          },
          "providerTaskId": {
            "description": "上游 provider 的 task id（列表\"任务ID\"列展示用；未提交上游前为空）。",
            "type": "string"
          },
          "settledAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "taskType": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "description": "用户展示名（登录名 username）：读侧按 user_id 回填（口径同 console TaskSummary.user_name）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AdminUserSubscription": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "planTitle": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalQuotaMicros": {
            "type": "string"
          },
          "usedQuotaMicros": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AnalyticsScriptEntry": {
        "description": "AnalyticsScriptEntry 单条站点统计脚本（结构化，前端用 next/script 渲染，无需解析 HTML）。\n src 与 content 恰好二选一：src 为外部脚本 URL；content 为内联 JS\n （next/script 要求内联脚本必须带 id 用于去重，故 content 非空时 id 必填）。",
        "properties": {
          "attributes": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "attributes 附加 HTML 属性（如 data-website-id）。key 禁止 on* 事件属性及 src/id/strategy 覆盖。",
            "type": "object"
          },
          "content": {
            "description": "content 内联 JS 内容（不含 \u003cscript\u003e 标签）。",
            "type": "string"
          },
          "id": {
            "description": "id 条目稳定标识（React key / next/script 去重）。content 非空时必填；非空 id 需列表内唯一。",
            "type": "string"
          },
          "src": {
            "description": "src 外部脚本 URL（https?:// 或以 / 开头，含协议相对 //）。",
            "type": "string"
          },
          "strategy": {
            "description": "strategy next/script 加载策略：afterInteractive（空串默认）/ lazyOnload / beforeInteractive / worker。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AnalyticsScripts": {
        "description": "AnalyticsScripts 统计脚本条目集合。用包装消息而非在 SiteSettings 里直接 repeated：\n proto3 无法区分「缺省 repeated」与「显式空列表」，包装成 optional 消息后由字段\n presence 表达 patch 语义——absent = 不修改；present 且 entries 为空 = 清空。",
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.AnalyticsScriptEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.AnnouncementInfo": {
        "description": "AnnouncementInfo 公告信息",
        "properties": {
          "content": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdByName": {
            "type": "string"
          },
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "pushSites": {
            "description": "push_sites 推送站点（可多选）：domestic=国内站, overseas=海外站, special=特惠站。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AuditLogEntry": {
        "description": "AuditLogEntry 审计日志条目\n AuditLogEntry field semantics:\n - result: ok=success, fail=failure, partial=partial success, retryable=retryable failure; legacy rows may be empty.\n - actorRole is an operator role snapshot, common values: super_admin/admin/operator/support/system; it is not a live RBAC binding.\n - module/action/targetType are exact, case-sensitive filter values written by business modules.\n - targetId is a string resource ID compatible with int64/UUID.\n - before/after are JSON snapshot strings; writers are responsible for masking sensitive fields.",
        "properties": {
          "action": {
            "type": "string"
          },
          "actorAccountType": {
            "description": "Actor account type snapshot resolved from the users table: 2 = internal staff,\n others = end-user/agent/enterprise. 0 when the actor is unknown or system.",
            "format": "int32",
            "type": "integer"
          },
          "actorEmail": {
            "type": "string"
          },
          "actorId": {
            "type": "string"
          },
          "actorName": {
            "type": "string"
          },
          "actorRole": {
            "type": "string"
          },
          "after": {
            "type": "string"
          },
          "before": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "errMsg": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "page": {
            "description": "Frontend page path where the operation happened (locale prefix stripped); empty for legacy rows.",
            "type": "string"
          },
          "result": {
            "type": "string"
          },
          "source": {
            "description": "Entry source: explicit = business audit write; auto = middleware fallback; legacy rows empty (treat as explicit).",
            "type": "string"
          },
          "targetId": {
            "type": "string"
          },
          "targetName": {
            "description": "Target resource display name resolved at read time from the owning table\n (user→username, role→name, channel→name, model→display_name, vendor→name,\n announcement→title). Empty when unresolved/deleted; UI falls back to target_id.",
            "type": "string"
          },
          "targetType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AuditLogSettings": {
        "description": "AuditLogSettings 审计日志保留策略；retention_days ∈ [0, 3650]，0=不清理，缺省 180。",
        "properties": {
          "retentionDays": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.AuthSessionSettings": {
        "description": "AuthSessionSettings 登录会话 TTL 策略；越界由 service 层 ValidateHours/ValidateInt 拒绝。",
        "properties": {
          "defaultTtlHours": {
            "format": "int32",
            "type": "integer"
          },
          "loginFailureWindowMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "loginLockMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "loginMaxFailures": {
            "format": "int32",
            "type": "integer"
          },
          "maxAbsoluteTtlHours": {
            "format": "int32",
            "type": "integer"
          },
          "rememberMeTtlHours": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.BanUserReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.BanUserRequest": {
        "properties": {
          "duration": {
            "description": "封禁时长（秒）；0 或不传 = 永久封禁。",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.BatchBindModelsReply": {
        "description": "BatchBindModelsReply 批量绑定模型响应",
        "properties": {
          "boundCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.BatchBindModelsRequest": {
        "description": "BatchBindModelsRequest 批量绑定模型请求",
        "properties": {
          "modelIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "templateId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.BindableModel": {
        "description": "BindableModel 可绑定模型（全部启用模型 + 是否已绑定标记）",
        "properties": {
          "bound": {
            "type": "boolean"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CancelTopupReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.CancelTopupRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CancelUserSubscriptionRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "subscriptionId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelAdminInfo": {
        "description": "ChannelAdminInfo 渠道管理信息",
        "properties": {
          "apiKeyMask": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "binding": {
            "allOf": [
              {
                "$ref": "#/components/schemas/admin.v1.ChannelSourceBinding"
              }
            ],
            "description": "当按资源查询时，返回该渠道与查询资源的绑定信息（未绑定时为空）"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "remark": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelSourceBinding": {
        "description": "ChannelSourceBinding 渠道与资源的绑定关系",
        "properties": {
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "sourceCode": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "sourceName": {
            "type": "string"
          },
          "weight": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelSourceInfo": {
        "description": "ChannelSourceInfo 资源目录条目。sale_ratio 为 decimal 字符串（如 \"1.2000\"），避免 float 精度问题。",
        "properties": {
          "code": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "saleRatio": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userRatioCount": {
            "description": "指定用户倍率数量；资源列表批量聚合回填，用于管理端直接进入已配置名单。",
            "type": "string"
          },
          "userSelectable": {
            "description": "用户是否可选：仅控制用户能否新建令牌绑定，不影响存量绑定的路由计费。\n optional（presence 语义）：全局 protojson EmitUnpopulated:false 会省略零值字段，\n false 必须显式 set 才能下发，否则前端拿不到字段误判为默认开。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelSourceReply": {
        "properties": {
          "source": {
            "$ref": "#/components/schemas/admin.v1.ChannelSourceInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelSourceUserRatioInfo": {
        "description": "ChannelSourceUserRatioInfo 指定用户倍率条目。sale_ratio 为 decimal 字符串（如 \"0.8500\"）。",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "origin": {
            "description": "origin 来源：manual=后台手工配置；migration=datamigrate 自源库分组特殊倍率展开。",
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "saleRatio": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "description": "username 用户展示名（服务端按 user_id 反查回填；查不到时为空，前端按 user_id 兜底展示）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ChannelSourceUserRatioReply": {
        "properties": {
          "ratio": {
            "$ref": "#/components/schemas/admin.v1.ChannelSourceUserRatioInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CountUsageLogsReply": {
        "properties": {
          "total": {
            "description": "Exact snapshot total. Proto JSON serializes int64 as a decimal string.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateAPISpecTemplateReply": {
        "description": "CreateAPISpecTemplateReply 创建模板响应",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateAPISpecTemplateRequest": {
        "description": "CreateAPISpecTemplateRequest 创建模板请求",
        "properties": {
          "code": {
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "fieldConfig": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "requestPath": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateAnnouncementReply": {
        "properties": {
          "announcement": {
            "$ref": "#/components/schemas/admin.v1.AnnouncementInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateAnnouncementRequest": {
        "properties": {
          "content": {
            "type": "string"
          },
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "pushSites": {
            "description": "push_sites 推送站点（可多选）：domestic=国内站, overseas=海外站, special=特惠站。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateChannelSourceRequest": {
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "saleRatio": {
            "type": "string"
          },
          "userSelectable": {
            "description": "用户是否可选；不传默认 true。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateModelEndpointReply": {
        "description": "CreateModelEndpointReply 新增端点响应",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateModelEndpointRequest": {
        "description": "CreateModelEndpointRequest 新增端点请求",
        "properties": {
          "docUrl": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateModelReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/admin.v1.ModelInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateModelRequest": {
        "properties": {
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "contextWindow": {
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "descriptionZh": {
            "type": "string"
          },
          "isNew": {
            "type": "boolean"
          },
          "isRecommended": {
            "type": "boolean"
          },
          "maxOutputTokens": {
            "format": "int32",
            "type": "integer"
          },
          "modelName": {
            "type": "string"
          },
          "pricing": {
            "$ref": "#/components/schemas/admin.v1.ModelPricing"
          },
          "ranking": {
            "format": "int32",
            "type": "integer"
          },
          "releasedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateRateLimitConfigRequest": {
        "description": "CreateRateLimitConfigRequest 创建限流配置请求",
        "properties": {
          "description": {
            "type": "string"
          },
          "limitType": {
            "type": "string"
          },
          "limitValue": {
            "format": "int32",
            "type": "integer"
          },
          "scopeId": {
            "type": "string"
          },
          "scopeType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateTierReply": {
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/admin.v1.TierInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateTierRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceMultiplier": {
            "description": "price_multiplier 可选。0 或未传 → 使用 DB 默认 1.0。",
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateUserReply": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/admin.v1.UserAdminInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateUserRequest": {
        "properties": {
          "accountType": {
            "format": "int32",
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "phone": {
            "description": "phone 手机号（分配页创建员工要求）；唯一，重复将返回冲突错误。",
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateUserSubscriptionRequest": {
        "properties": {
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "totalQuotaMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateVendorReply": {
        "properties": {
          "vendor": {
            "$ref": "#/components/schemas/admin.v1.VendorInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.CreateVendorRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteAPISpecTemplateReply": {
        "description": "DeleteAPISpecTemplateReply 删除模板响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteAnnouncementReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteChannelSourceReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteChannelSourceUserRatioReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteModelEndpointReply": {
        "description": "DeleteModelEndpointReply 删除端点响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteModelParamCustomReply": {
        "description": "DeleteModelParamCustomReply 删除参数定制响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteModelReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteRateLimitConfigReply": {
        "description": "DeleteRateLimitConfigReply 删除限流配置响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteTierReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteUserReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteUserSubscriptionReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DeleteVendorReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DisableChannelReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.DisableChannelRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.DisableInviteCodeReply": {
        "properties": {
          "inviteEnabled": {
            "type": "boolean"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.DisableInviteCodeRequest": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.EmailSettings": {
        "description": "EmailSettings 邮件 / SMTP 配置。\n smtp_password: 读取时返回占位符（不下发明文）；写入时为空或等于占位符表示「不修改」。",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "smtpFrom": {
            "type": "string"
          },
          "smtpFromName": {
            "type": "string"
          },
          "smtpHost": {
            "type": "string"
          },
          "smtpPassword": {
            "type": "string"
          },
          "smtpPort": {
            "format": "int32",
            "type": "integer"
          },
          "smtpSsl": {
            "type": "boolean"
          },
          "smtpStartTls": {
            "type": "boolean"
          },
          "smtpTimeoutSeconds": {
            "format": "int32",
            "type": "integer"
          },
          "smtpUser": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.EnableChannelReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.EnableChannelRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.EnableInviteCodeReply": {
        "properties": {
          "inviteEnabled": {
            "type": "boolean"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.EnableInviteCodeRequest": {
        "properties": {
          "reason": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.EstimateModelPricingReply": {
        "description": "EstimateModelPricingReply dry-run 结果。\n\n   - cost_micros: 与生产结算一致的 CRD 基础金额, 单位 micros CRD (int64).\n                  1 CRD = 1_000_000 micros; 与其它金额 API (balance_micros / billed_micros /\n                  amount_micros 等) 单位完全对齐, 前端统一走 microsToCreditsDisplay 展示。\n                  不含渠道销售倍率 (真实计费时才乘, 估算只展示基础价).\n   - matched_tier: tier(...) 命中的档位 name; 表达式未使用 tier() 时为空串\n   - used_vars: 表达式 AST 内省识别到的子类别变量集, 前端用来提示\"你写了 cc1h\n               但没在 UI 里填对应 token 数\"这类边界",
        "properties": {
          "costMicros": {
            "description": "cost_micros 单位 micros CRD (int64). 命名带 _micros 强制提醒对端:\n proto JSON 序列化会成 string (Go int64 保护), 前端要按字符串解析。",
            "type": "string"
          },
          "matchedTier": {
            "type": "string"
          },
          "usedVars": {
            "$ref": "#/components/schemas/admin.v1.EstimateUsedVars"
          }
        },
        "type": "object"
      },
      "admin.v1.EstimateModelPricingRequest": {
        "description": "EstimateModelPricingRequest 计费表达式 dry-run 入参。\n\n tokens 字段命名与后端 billingexpr.TokenParams 对齐 (与结算路径同一源代码),\n 前端 UI 只暴露常用的 p/c/cr/cc/cc1h, 其它可选字段留空。\n\n 语义:\n   - mode 必须是合法 billing_mode; MVP 仅支持 \"tiered_expr\" (其它 mode\n     的估算走前端本地既可, 不需要 API)\n   - expr 必填, 空串或语法错误返回 400\n   - 表达式价格系数单位为积分/百万 token\n   - tokens 全部 optional, 缺省视为 0\n   - **口径契约 (DEF-7)**: 各 token 字段为 canonical disjoint 口径——p/c 为纯\n     文本 token (已剔除缓存与多模态子类别); cr/cc/img/img_o/ai/ao 与 p 互斥,\n     各自独立填真实 token 数, 不与 p 重叠。后端按 disjoint 语义求值 (不再从 p\n     扣减子类别), 与生产结算的 anthropic/disjoint 路径同口径, 使 dry-run 忠实\n     预览真实结算金额。\n     **注意 cc/cc1h 是包含关系, 非互斥**: cc 为 cache-creation token 总量, cc1h\n     是其中 1h TTL 的子集 (cc1h ⊆ cc), 5m 部分 = cc - cc1h。填写时 cc 必须填总量,\n     常见表达式如 (cc - cc1h) * 5 + cc1h * 10 据此区分两档单价; 若把 cc 只填 5m\n     部分会导致 len 漏算 1h 部分并算错金额。\n     len 由后端按 p+cr+cc+img+ai 重算 (完整上下文长度, cc 已含 cc1h 故不再单加),\n     管理员直接填的 len 仅作参考、以重算值为准 (与生产一致: 档位由真实 token 决定,\n     不接受人工强制)。",
        "properties": {
          "ai": {
            "format": "double",
            "type": "number"
          },
          "ao": {
            "format": "double",
            "type": "number"
          },
          "c": {
            "format": "double",
            "type": "number"
          },
          "cc": {
            "format": "double",
            "type": "number"
          },
          "cc1h": {
            "format": "double",
            "type": "number"
          },
          "cr": {
            "format": "double",
            "type": "number"
          },
          "expr": {
            "type": "string"
          },
          "img": {
            "format": "double",
            "type": "number"
          },
          "imgO": {
            "format": "double",
            "type": "number"
          },
          "len": {
            "format": "double",
            "type": "number"
          },
          "mode": {
            "type": "string"
          },
          "p": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.EstimateUsedVars": {
        "description": "EstimateUsedVars 表达式使用的子类别变量集。\n bool 类型: true 表示表达式引用了该变量; p/c/len 是\"兜底变量\"不在此报告。",
        "properties": {
          "ai": {
            "type": "boolean"
          },
          "ao": {
            "type": "boolean"
          },
          "cc": {
            "type": "boolean"
          },
          "cc1h": {
            "type": "boolean"
          },
          "cr": {
            "type": "boolean"
          },
          "img": {
            "type": "boolean"
          },
          "imgO": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.ExportUsageLogsReply": {
        "properties": {
          "data": {
            "description": "XLSX (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) file bytes.\n The current JSON gateway returns base64 for bytes.",
            "format": "bytes",
            "type": "string"
          },
          "filename": {
            "description": "Suggested download filename (含 .xlsx 后缀)。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.GetAPISpecTemplateReply": {
        "description": "GetAPISpecTemplateReply 获取模板响应",
        "properties": {
          "template": {
            "$ref": "#/components/schemas/admin.v1.APISpecTemplate"
          }
        },
        "type": "object"
      },
      "admin.v1.GetAnnouncementReply": {
        "properties": {
          "announcement": {
            "$ref": "#/components/schemas/admin.v1.AnnouncementInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetAuditLogSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.AuditLogSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetAuthSessionSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.AuthSessionSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/admin.v1.ChannelAdminInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetEmailSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.EmailSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetInviterReply": {
        "properties": {
          "inviter": {
            "$ref": "#/components/schemas/admin.v1.ReferralInviterInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetModelParamCustomReply": {
        "description": "GetModelParamCustomReply 获取参数定制响应",
        "properties": {
          "custom": {
            "$ref": "#/components/schemas/admin.v1.ModelParamCustom"
          }
        },
        "type": "object"
      },
      "admin.v1.GetModelReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/admin.v1.ModelInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetModelSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.ModelSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetMonitorSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.MonitorSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetRewardConfigReply": {
        "properties": {
          "inviteeRewardMicros": {
            "type": "string"
          },
          "inviterRewardMicros": {
            "type": "string"
          },
          "signupBonusMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.GetSMSSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.SMSSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetSiteSettingsReply": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.SiteSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.GetTierReply": {
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/admin.v1.TierInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetTopupReply": {
        "properties": {
          "order": {
            "$ref": "#/components/schemas/admin.v1.TopupOrderDetail"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUsageLogDetailReply": {
        "properties": {
          "log": {
            "$ref": "#/components/schemas/admin.v1.UsageLogDetail"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUsageLogsStatReply": {
        "properties": {
          "rpm": {
            "description": "Requests recorded in the trailing 60s window. Declared optional (explicit\n presence) so a zero value is still emitted through the EmitUnpopulated:false\n response envelope instead of disappearing from the JSON body.",
            "type": "string"
          },
          "tpm": {
            "description": "Sum of total_tokens over the same window; explicit presence for the same\n reason as rpm. Proto JSON serializes int64 as a decimal string.",
            "type": "string"
          },
          "windowSeconds": {
            "description": "Trailing window length in seconds (currently always 60).",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUsageSummaryReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UsageSummaryItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUserBalanceTrendReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserBalanceTrendPoint"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUserReply": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/admin.v1.UserAdminInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUserStatsReply": {
        "properties": {
          "activeUsers": {
            "type": "string"
          },
          "bannedUsers": {
            "type": "string"
          },
          "growthTrend": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserGrowthPoint"
            },
            "type": "array"
          },
          "newUsers": {
            "type": "string"
          },
          "roleDistribution": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserRoleDistribution"
            },
            "type": "array"
          },
          "statusDistribution": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserStatusDistribution"
            },
            "type": "array"
          },
          "totalUsers": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.GetUserUsageTrendReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserUsageTrendPoint"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.GetVendorReply": {
        "properties": {
          "vendor": {
            "$ref": "#/components/schemas/admin.v1.VendorInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.ImagePricing": {
        "description": "ImagePricing 图像按分辨率分档计费参数（每张图的 CRD 单价）。",
        "properties": {
          "imagePrice1k": {
            "format": "double",
            "type": "number"
          },
          "imagePrice2k": {
            "format": "double",
            "type": "number"
          },
          "imagePrice4k": {
            "format": "double",
            "type": "number"
          },
          "imagePrice512": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.InviteeDetailRow": {
        "properties": {
          "activatedAt": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "inviteeId": {
            "type": "string"
          },
          "inviteeRewardAmountMicros": {
            "type": "string"
          },
          "inviteeRewardIssuedAt": {
            "type": "string"
          },
          "inviteeRewardStatus": {
            "type": "string"
          },
          "inviterRewardAmountMicros": {
            "type": "string"
          },
          "inviterRewardIssuedAt": {
            "type": "string"
          },
          "inviterRewardStatus": {
            "type": "string"
          },
          "referralStatus": {
            "type": "string"
          },
          "registeredAt": {
            "type": "string"
          },
          "totalConsumedMicros": {
            "type": "string"
          },
          "totalRequests": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.LedgerEntryFE": {
        "description": "LedgerEntryFE 给前端的账本条目，字段名跟 AdminUser → LedgerEntry 接口对齐。\n LedgerEntryFE 是钱包流水的前端视图 DTO。金额字段统一 *_micros 后缀以暴露单位。",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "balanceAfterMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "operatorId": {
            "description": "operator_id / operator_name 仅在管理员调账时有值；普通消费流水为空。",
            "type": "string"
          },
          "operatorName": {
            "type": "string"
          },
          "reason": {
            "description": "reason 复用 wallet_ledger.remark，记录操作原因（管理员调账时由 reason 入参写入）。",
            "type": "string"
          },
          "type": {
            "description": "type 是前端 LedgerType 枚举：topup / deduct / consume / refund / reward。\n 由 biz_type 在 service 层映射得到（admin_topup→topup、admin_deduct→deduct 等）。",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.LedgerEntrySummary": {
        "description": "LedgerEntrySummary 钱包流水摘要",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "balanceAfterMicros": {
            "type": "string"
          },
          "bizType": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "walletId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListAPISpecTemplatesReply": {
        "description": "ListAPISpecTemplatesReply 列出模板响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.APISpecTemplate"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListAnnouncementsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.AnnouncementInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListAuditLogsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.AuditLogEntry"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListBindableModelsReply": {
        "description": "ListBindableModelsReply 列出可绑定模型响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.BindableModel"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListChannelSourceUserRatiosReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ChannelSourceUserRatioInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListChannelSourcesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ChannelSourceInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListChannelsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ChannelAdminInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListInviteesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.InviteeDetailRow"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListInvitersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ReferralInviterInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListLedgerReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.LedgerEntrySummary"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListModelEndpointsReply": {
        "description": "ListModelEndpointsReply 列出端点响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelEndpoint"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListModelParamCustomsReply": {
        "description": "ListModelParamCustomsReply 列出参数定制响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelParamCustom"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListModelsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListParamFieldLibrariesReply": {
        "description": "ListParamFieldLibrariesReply 列出字段库响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ParamFieldLibrary"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListRateLimitConfigsReply": {
        "description": "ListRateLimitConfigsReply 列出限流配置响应",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.RateLimitConfig"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListTiersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.TierInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ListTopupsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.TopupOrderSummary"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListUsageLogsReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UsageLogEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": "string"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "description": "total 为 -1，表示 raw usage 日志列表不执行 COUNT(*)；客户端通过\n has_more/next_cursor 翻页，聚合总量由监控看板 rollup 接口提供。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListUserLedgersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.LedgerEntryFE"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListUserSubscriptionsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.AdminUserSubscription"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListUsersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.UserAdminInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ListVendorsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.VendorInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelEndpoint": {
        "description": "ModelEndpoint 模型端点",
        "properties": {
          "docUrl": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelFaqItem": {
        "description": "ModelFaqItem 模型落地页常见问题条目（answer 纯文本，允许换行）",
        "properties": {
          "answer": {
            "type": "string"
          },
          "question": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelInfo": {
        "description": "ModelInfo 模型信息",
        "properties": {
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "contextWindow": {
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "descriptionZh": {
            "type": "string"
          },
          "faq": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelFaqItem"
            },
            "type": "array"
          },
          "faqZh": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelFaqItem"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "isNew": {
            "type": "boolean"
          },
          "isRecommended": {
            "type": "boolean"
          },
          "maxOutputTokens": {
            "format": "int32",
            "type": "integer"
          },
          "modelName": {
            "type": "string"
          },
          "pricing": {
            "$ref": "#/components/schemas/admin.v1.ModelPricing"
          },
          "ranking": {
            "format": "int32",
            "type": "integer"
          },
          "releasedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelParamCustom": {
        "description": "ModelParamCustom 模型参数定制（冗余模板信息，省列表页 N+1 查询）",
        "properties": {
          "endpointType": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "modelId": {
            "type": "string"
          },
          "overrides": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "templateCode": {
            "type": "string"
          },
          "templateId": {
            "type": "string"
          },
          "templateName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelPricing": {
        "description": "ModelPricing 模型定价：mode 决定计价方式，params 只携带该 mode 所需参数。",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/admin.v1.ImagePricing"
          },
          "mode": {
            "type": "string"
          },
          "perRequest": {
            "$ref": "#/components/schemas/admin.v1.PerRequestPricing"
          },
          "tieredExpr": {
            "$ref": "#/components/schemas/admin.v1.TieredExprPricing"
          },
          "token": {
            "$ref": "#/components/schemas/admin.v1.TokenPricing"
          },
          "video": {
            "$ref": "#/components/schemas/admin.v1.VideoPricing"
          }
        },
        "type": "object"
      },
      "admin.v1.ModelSettings": {
        "description": "ModelSettings 模型相关全局设置。字段分两类：\n\n **JSON blob 字段**（map/slice 类，动态 key/element 数量）：\n   - gemini_version_map_json：`map\u003cstring,string\u003e`，key = model 名或 \"default\"，\n     value ∈ {\"v1\",\"v1beta\",\"v1alpha\"}。缺省 `{\"default\":\"v1beta\",\"gemini-1.0-pro\":\"v1\"}`。\n   - claude_default_max_tokens_json：`map\u003cstring,int\u003e`，key = model 名或 \"default\"，\n     value = 1..1_000_000。缺省 `{\"default\":8192}`；网关保证 \"default\" 键始终存在。\n   - gemini_supported_imagine_models_json：`[]string`，命中即注入 responseModalities。\n\n **强类型标量字段**（Wave 2，bool/double）：\n   - 全部用 `optional`，让\"未设置\"（PATCH 语义）与\"显式 false / 0\"可区分——\n     bool 默认 false 但 thoughtSignature 业务默认 true，没有 optional 就没办法\n     只更新其它字段而不误改 thoughtSignature。\n\n 用 JSON blob 传字符串而非结构化 map，是因为 proto2/3 map 字段类型选择僵硬\n （不能是 map\u003cstring, any\u003e），JSON 更好扩展新 key；\n 服务器侧解析 + 校验，前端只需拼合法 JSON。",
        "properties": {
          "claudeDefaultMaxTokensJson": {
            "description": "Claude 缺省 max_tokens JSON。空串 / \"{}\" / \"null\" → 回退 {\"default\":8192}。",
            "type": "string"
          },
          "claudePreserveThinkingSuffixModelsJson": {
            "description": "保留 -thinking 后缀的模型清单 JSON []string；空 / \"[]\" / \"null\" = 空名单（所有模型都剥后缀）。",
            "type": "string"
          },
          "claudeThinkingAdapterEnabled": {
            "description": "是否识别 Claude `-thinking` 后缀 + opus-4 系 `-\u003ceffort\u003e` 后缀（默认 true）。",
            "type": "boolean"
          },
          "claudeThinkingBudgetTokensPercentage": {
            "description": "`-thinking` 路径 budget = max_tokens × 该百分比。合法区间 (0.1, 1.0)，默认 0.8。",
            "format": "double",
            "type": "number"
          },
          "geminiRemoveFunctionResponseIdEnabled": {
            "description": "是否清空 parts[].functionResponse.id（Vertex AI 兼容）。默认 true。",
            "type": "boolean"
          },
          "geminiSupportedImagineModelsJson": {
            "description": "支持图像生成的 Gemini 模型清单 JSON []string。命中即注入 responseModalities: [\"TEXT\",\"IMAGE\"]。\n 空串 / \"[]\" / \"null\" → 回退 5 个出厂默认模型名。",
            "type": "string"
          },
          "geminiThinkingAdapterEnabled": {
            "description": "是否启用 -thinking / -thinking-N / -nothinking 后缀适配。默认 false（管理员显式打开）。",
            "type": "boolean"
          },
          "geminiThinkingBudgetPercentage": {
            "description": "`-thinking` 无固定预算时 budget = maxOutputTokens × 该百分比。合法区间 (0, 1.0]，默认 0.6。",
            "format": "double",
            "type": "number"
          },
          "geminiThoughtSignatureEnabled": {
            "description": "是否给 assistant/model role 消息注入哨兵字符串（避免 Gemini 2.5+ 多轮 function-call 报 400）。\n optional：未传 = 保持当前值；true/false = 覆盖。默认 true。",
            "type": "boolean"
          },
          "geminiVersionMapJson": {
            "description": "Gemini API 版本映射 JSON。空串 / \"{}\" / \"null\" → 回退出厂默认。",
            "type": "string"
          },
          "grokViolationDeductionAmount": {
            "description": "每次违规的美元金额（默认 0.05）。合法区间 (0, 10]。",
            "format": "double",
            "type": "number"
          },
          "grokViolationDeductionEnabled": {
            "description": "是否对 CSAM 违规响应额外扣违规金（默认 true）。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.MonitorSettings": {
        "description": "MonitorSettings 全局渠道可靠性策略（options KV：monitor.retry.status_codes /\n monitor.auto_disable.status_codes / monitor.auto_disable.keywords）。",
        "properties": {
          "autoDisableKeywords": {
            "description": "自动禁用关键词（每行一个）：上游返回错误中包含这些关键词时（不区分大小写）\n 自动禁用渠道；仅认证/配额类错误参与匹配（防用户可控文本误禁）。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "autoDisableStatusCodes": {
            "description": "自动禁用状态码规则，语法同上；空 = 不按状态码禁用。",
            "type": "string"
          },
          "retryStatusCodes": {
            "description": "自动重试状态码规则：单个状态码或范围（含首尾），逗号分隔，如 \"429,500-503\"；\n 空 = 未配置（回退内置集合）。504/524 恒不重试，不受此处配置影响。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ParamFieldLibrary": {
        "description": "ParamFieldLibrary 单个 endpoint type 的字段库",
        "properties": {
          "defaultRequestPath": {
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "fields": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.PerRequestPricing": {
        "description": "PerRequestPricing 按次计费参数：每次调用预设消耗的 CRD（\"次\"由端点定义）。",
        "properties": {
          "perRequestPrice": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.PreviewItem": {
        "description": "PreviewItem 单个可预览媒体项。",
        "properties": {
          "kind": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.RateLimitConfig": {
        "description": "RateLimitConfig 限流配置",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "limitType": {
            "type": "string"
          },
          "limitValue": {
            "format": "int32",
            "type": "integer"
          },
          "scopeId": {
            "type": "string"
          },
          "scopeType": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.RateLimitConfigReply": {
        "description": "RateLimitConfigReply 限流配置响应",
        "properties": {
          "config": {
            "$ref": "#/components/schemas/admin.v1.RateLimitConfig"
          }
        },
        "type": "object"
      },
      "admin.v1.ReferralInviterInfo": {
        "properties": {
          "activatedTotal": {
            "format": "int32",
            "type": "integer"
          },
          "email": {
            "type": "string"
          },
          "inviteCode": {
            "type": "string"
          },
          "inviteEnabled": {
            "type": "boolean"
          },
          "invitedTotal": {
            "format": "int32",
            "type": "integer"
          },
          "rewardIssuedMicros": {
            "type": "string"
          },
          "rewardPendingMicros": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ResetUserSecurityCredentialReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.ResetUserSecurityCredentialRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.ResultRefSummary": {
        "description": "ResultRefSummary result_ref 摘要（D4）：bucket/key/sha256 永不出 API。",
        "properties": {
          "contentType": {
            "type": "string"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "exists": {
            "type": "boolean"
          },
          "size": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.RevokeUserSessionsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.RevokeUserSessionsRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.Role": {
        "description": "Role 用户的一个生效角色。",
        "properties": {
          "name": {
            "description": "角色显示名",
            "type": "string"
          },
          "roleId": {
            "description": "角色 ID，与 iam GetRole (/v1/iam/roles/{id}) 入参一致",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.SMSSettings": {
        "description": "SMSSettings 短信（阿里云）配置。\n aliyun_access_key_secret: 读取时返回占位符（不下发明文）；写入时为空或等于占位符表示「不修改」。\n endpoint、API 版本、超时不在配置面：按阿里云官方文档硬编码于 biz/account/sms_service.go。",
        "properties": {
          "aliyunAccessKeyId": {
            "type": "string"
          },
          "aliyunAccessKeySecret": {
            "type": "string"
          },
          "aliyunSignName": {
            "type": "string"
          },
          "aliyunTemplateCode": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.SearchVendorsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.VendorInfo"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "page_size": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.SetUserTierReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.SetUserTierRequest": {
        "description": "SetUserTierRequest tier_id \u003c= 0 表示解绑（回落系统默认等级）。",
        "properties": {
          "tierId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.SiteSettings": {
        "description": "SiteSettings 站点公开配置（写入后经由 /v1/public/site-settings 暴露给 web 首屏）。\n 字段口径与 site.v1.GetPublicSiteSettingsReply 一致（admin 写、public 读，闭环）。\n\n 字段全部用 optional：UpdateSiteSettings 是「部分更新」——请求里显式带的字段才写库，\n 缺省字段保留原值。站点字段分散在多个前端 tab（平台 / 充值限额）分别提交，若无 presence\n 语义，缺省字段会被反序列化成零值覆盖，表现为「开放注册被关」「充值限额回退默认」。\n 读路径（GetSiteSettings）始终把全部字段填满（缺失走默认值），故对读端无影响。",
        "properties": {
          "allowRegister": {
            "type": "boolean"
          },
          "analyticsScripts": {
            "allOf": [
              {
                "$ref": "#/components/schemas/admin.v1.AnalyticsScripts"
              }
            ],
            "description": "analytics_scripts 结构化统计脚本列表；写权限即注入任意 JS 的能力，见 admin.settings.site:update。"
          },
          "emailDomainWhitelist": {
            "description": "email_domain_whitelist 邮箱域名白名单，逗号分隔（如 \"qq.com,163.com\"）。\n 空串表示不限制。非空时注册 / 发验证码（未注册邮箱）/ 换绑邮箱仅接受名单内域名。",
            "type": "string"
          },
          "maintenanceMode": {
            "type": "boolean"
          },
          "passwordMinLength": {
            "format": "int32",
            "type": "integer"
          },
          "platformName": {
            "type": "string"
          },
          "platformNameEn": {
            "description": "platform_name_en 平台英文名称；空串表示未配置，用户端非中文语言回退 platform_name。",
            "type": "string"
          },
          "platformUrl": {
            "type": "string"
          },
          "realnameEnforceApikeyCreate": {
            "description": "realname_enforce_apikey_create 控制创建 API Key 时是否强制实名认证。",
            "type": "boolean"
          },
          "realnameEnforceGateway": {
            "description": "realname_enforce_gateway 控制网关/API 调用时是否强制实名认证。",
            "type": "boolean"
          },
          "realnameMethodAlipayCertifyQrEnabled": {
            "description": "各认证方式的独立开关",
            "type": "boolean"
          },
          "realnameMethodAlipayTwoMetaEnabled": {
            "type": "boolean"
          },
          "realnameVerifyEnabled": {
            "description": "realname_verify_enabled 控制用户端个人实名认证入口是否可见。",
            "type": "boolean"
          },
          "rechargeMax": {
            "type": "string"
          },
          "rechargeMin": {
            "description": "recharge 金额字符串，避免浮点误差（与 site.v1.RechargeLimit 一致）。",
            "type": "string"
          },
          "supportEmail": {
            "type": "string"
          },
          "trialDays": {
            "format": "int32",
            "type": "integer"
          },
          "twoFactorRequired": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.TaskPreview": {
        "description": "TaskPreview 结果预览（读侧即时组装，不落库）。上游原样体仍只以 *_redacted 形式出现；\n 大结果以 blob_count 计数，经 GET /v1/admin/tasks/{id}/blob/{seq} 网关代理流式下载。",
        "properties": {
          "blobCount": {
            "format": "int32",
            "type": "integer"
          },
          "expiresHint": {
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.PreviewItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "admin.v1.TestEmailReply": {
        "properties": {
          "message": {
            "description": "message 结果说明（成功提示，或失败时的结构化诊断，不含敏感信息）。",
            "type": "string"
          },
          "ok": {
            "description": "ok 是否发送成功。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.TestEmailRequest": {
        "properties": {
          "recipient": {
            "description": "recipient 收件人邮箱地址。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.TierInfo": {
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "priceMultiplier": {
            "description": "price_multiplier 定价倍率（Wave 3）。当前接入 Grok 违规扣费；未来可扩展至通用消费。\n 合法范围 (0, 10]；默认 1.0。",
            "format": "double",
            "type": "number"
          },
          "updatedAt": {
            "type": "string"
          },
          "userCount": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.TieredExprPricing": {
        "description": "TieredExprPricing 表达式计费参数：一行 DSL 表达式定义完整定价逻辑。\n 语义模型见 internal/pkg/billingexpr, 变量集 p/c/len/cr/cc/cc1h/img/img_o/ai/ao,\n 函数集 tier/max/min/abs/ceil/floor/hour/minute/day/weekday/month。\n 编译期校验 (语法 + tier() 字面量首参 + 节点数 \u003c= 500), 冒烟运行拒绝负数 cost。",
        "properties": {
          "expr": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.TokenPricing": {
        "description": "TokenPricing 按 token 计费参数（每 1M tokens 的 CRD 单价）。",
        "properties": {
          "audioInputPrice": {
            "format": "double",
            "type": "number"
          },
          "audioOutputPrice": {
            "format": "double",
            "type": "number"
          },
          "cacheCreation1hPrice": {
            "description": "迁移 0022 追加：Anthropic ephemeral 1h TTL 缓存创建独立单价（≠ 5m 部分的 cache_creation_price）。\n 缺省/=0 时 pricing 层回退用 cache_creation_price，保持向后兼容。",
            "format": "double",
            "type": "number"
          },
          "cacheCreationPrice": {
            "description": "扩展（可选）：缓存创建 + 图片/音频输入·音频补全 token 单价（每 1M tokens 的 CRD 单价）。",
            "format": "double",
            "type": "number"
          },
          "cachedInputPrice": {
            "format": "double",
            "type": "number"
          },
          "imageInputPrice": {
            "format": "double",
            "type": "number"
          },
          "imageOutputPrice": {
            "description": "迁移 0022 追加：多模态图片输出 token 单价（gpt-image completion_tokens_details.image_tokens 计费）。\n 缺省/=0 时 pricing 层回退用 output_price。",
            "format": "double",
            "type": "number"
          },
          "inputPrice": {
            "format": "double",
            "type": "number"
          },
          "outputPrice": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.TopupOrderDetail": {
        "description": "TopupOrderDetail 充值订单详情",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creditedMicros": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "providerPayload": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tradeNo": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.TopupOrderSummary": {
        "description": "TopupOrderSummary 充值订单摘要",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creditedMicros": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tradeNo": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UnbanUserReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UnbanUserRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAPISpecTemplateReply": {
        "description": "UpdateAPISpecTemplateReply 更新模板响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAPISpecTemplateRequest": {
        "description": "UpdateAPISpecTemplateRequest 更新模板请求（code/endpoint_type 不可改）",
        "properties": {
          "fieldConfig": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "requestPath": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAnnouncementReply": {
        "properties": {
          "announcement": {
            "$ref": "#/components/schemas/admin.v1.AnnouncementInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAnnouncementRequest": {
        "properties": {
          "content": {
            "type": "string"
          },
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "pushSites": {
            "description": "push_sites 推送站点（可多选）：domestic=国内站, overseas=海外站, special=特惠站。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAuditLogSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAuditLogSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.AuditLogSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAuthSessionSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateAuthSessionSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.AuthSessionSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateChannelSourceRequest": {
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "saleRatio": {
            "type": "string"
          },
          "userSelectable": {
            "description": "用户是否可选；不传不修改。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateEmailSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateEmailSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.EmailSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelEndpointReply": {
        "description": "UpdateModelEndpointReply 更新端点响应",
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelEndpointRequest": {
        "description": "UpdateModelEndpointRequest 更新端点请求",
        "properties": {
          "docUrl": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelFaqReply": {
        "description": "UpdateModelFaqReply 更新模型常见问题响应",
        "properties": {
          "model": {
            "$ref": "#/components/schemas/admin.v1.ModelInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelFaqRequest": {
        "description": "UpdateModelFaqRequest 更新模型常见问题请求（全量替换两种语言的列表）",
        "properties": {
          "faq": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelFaqItem"
            },
            "type": "array"
          },
          "faqZh": {
            "items": {
              "$ref": "#/components/schemas/admin.v1.ModelFaqItem"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/admin.v1.ModelInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelRequest": {
        "properties": {
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "contextWindow": {
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "descriptionZh": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isNew": {
            "type": "boolean"
          },
          "isRecommended": {
            "type": "boolean"
          },
          "maxOutputTokens": {
            "format": "int32",
            "type": "integer"
          },
          "modelName": {
            "type": "string"
          },
          "pricing": {
            "$ref": "#/components/schemas/admin.v1.ModelPricing"
          },
          "ranking": {
            "format": "int32",
            "type": "integer"
          },
          "releasedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.ModelSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelStatusReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/admin.v1.ModelInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateModelStatusRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateMonitorSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateMonitorSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.MonitorSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateRateLimitConfigRequest": {
        "description": "UpdateRateLimitConfigRequest 更新限流配置请求",
        "properties": {
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "limitValue": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateRewardConfigReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateRewardConfigRequest": {
        "properties": {
          "inviteeRewardMicros": {
            "type": "string"
          },
          "inviterRewardMicros": {
            "type": "string"
          },
          "signupBonusMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateSMSSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateSMSSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.SMSSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateSiteSettingsReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateSiteSettingsRequest": {
        "properties": {
          "settings": {
            "$ref": "#/components/schemas/admin.v1.SiteSettings"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateTierReply": {
        "properties": {
          "tier": {
            "$ref": "#/components/schemas/admin.v1.TierInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateTierRequest": {
        "description": "UpdateTierRequest PATCH 语义：仅传需要更新的字段。",
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceMultiplier": {
            "description": "price_multiplier PATCH 语义：nil = 不改；显式传即使 0 也覆盖（但 service 会拦截越界）。",
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateTopupReply": {
        "properties": {
          "order": {
            "$ref": "#/components/schemas/admin.v1.TopupOrderDetail"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateTopupRequest": {
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "creditedMicros": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tradeNo": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateUserReply": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/admin.v1.UserAdminInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateUserRequest": {
        "properties": {
          "allowTokenBindSource": {
            "type": "boolean"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateVendorReply": {
        "properties": {
          "vendor": {
            "$ref": "#/components/schemas/admin.v1.VendorInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateVendorRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateVendorStatusReply": {
        "properties": {
          "vendor": {
            "$ref": "#/components/schemas/admin.v1.VendorInfo"
          }
        },
        "type": "object"
      },
      "admin.v1.UpdateVendorStatusRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "admin.v1.UpsertChannelSourceUserRatioRequest": {
        "properties": {
          "remark": {
            "type": "string"
          },
          "saleRatio": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpsertModelParamCustomReply": {
        "description": "UpsertModelParamCustomReply 创建或更新参数定制响应",
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UpsertModelParamCustomRequest": {
        "description": "UpsertModelParamCustomRequest 创建或更新参数定制请求",
        "properties": {
          "id": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "modelId": {
            "type": "string"
          },
          "overrides": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "templateId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UsageLogDetail": {
        "description": "UsageLogDetail 用量日志详情（包含请求/响应内容）\n UsageLogDetail includes bounded, redacted request/response snapshots copied from usage_logs.meta.\n Writers cap snapshots at 256 KiB; readers apply the same defense in depth.",
        "properties": {
          "apiKeyId": {
            "description": "api_key_id 令牌（API Key）ID。",
            "type": "string"
          },
          "basePriceMicros": {
            "description": "base_price_micros 结算时价目表基础金额（CRD micros）；缺失时不可从实扣金额反推。",
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "billingDetail": {
            "description": "billing_detail 后端直出的中文计费过程文本，前端按换行渲染即可。",
            "type": "string"
          },
          "billingMode": {
            "description": "billing_mode 结算时计费方式快照（token/per_request/image/video/tiered_expr）；\n 空串=迁移前历史行或免费未结算行。前端计费类型展示优先用本字段，不再从分项 label 推断。",
            "type": "string"
          },
          "cachedTokens": {
            "description": "cached_tokens 缓存命中 token 数。",
            "type": "string"
          },
          "channelCostMicros": {
            "description": "channel_cost_micros 结算时渠道成本金额（CRD micros）；缺失时不可现算或回退。",
            "type": "string"
          },
          "channelCostRatio": {
            "description": "channel_cost_ratio 渠道成本倍率钉值（decimal 字符串，如 \"0.8500\"）；空串=无快照。",
            "type": "string"
          },
          "channelDiscount": {
            "deprecated": true,
            "description": "Deprecated: use channel_cost_ratio. Historical name retained for old clients.",
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "channelName": {
            "type": "string"
          },
          "channelSaleRatio": {
            "description": "channel_sale_ratio 销售倍率快照（decimal 字符串如 \"1.2000\"）；空串=无快照。PR2 阶段仅观察值，PR3 起为计费实际用值。",
            "type": "string"
          },
          "channelSourceCode": {
            "description": "channel_source_code 命中渠道资源 code 快照；空串=未绑定资源 / 钉值缺失。",
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（响应头 X-Request-Id 同值）；与异步任务详情展示的请求 ID 对齐。\n 空串=历史行或未采集，前端回退展示 request_id。",
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "discountedBilledMicros": {
            "deprecated": true,
            "description": "Deprecated: use channel_cost_micros. When the persisted audit amount is unavailable,\n this compatibility field falls back to billed_micros and must not be used for audit.",
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          },
          "firstTokenMs": {
            "description": "first_token_ms 首字输出耗时（毫秒）；优先 typed 列，迁移前 meta-only 历史记录兼容回退。",
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "internalCostMicros": {
            "description": "internal_cost_micros 内部成本（micros），仅管理端可见。",
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "isStream": {
            "type": "boolean"
          },
          "latencyMs": {
            "type": "string"
          },
          "meta": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "meta 诊断扩展字段（usage_logs.meta 透传的可展示子集，已剔除 request_body/response_body）。\n 典型 key：first_token_ms、usage_source、estimate_micros、actual_micros、image_count、size、quality、video_seconds、resolution、error_summary 等。",
            "type": "object"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "priceSnapshot": {
            "description": "price_snapshot 命中时刻的售卖定价快照原始 JSON 字符串（已剥离内部成本字段）；空串=无快照。仅详情下发。",
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestBody": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "requestType": {
            "description": "request_type 请求类型/协议（如 openai_chat、anthropic_messages）。",
            "type": "string"
          },
          "responseBody": {
            "type": "string"
          },
          "success": {
            "description": "success 行级成败结论，与列表 status 筛选同一谓词（WP7 双列回退口径）在服务端计算。\n 前端徽标请直接用本字段；http_status 在迁移历史行上可能为 0，不可用于本地推断成败。",
            "type": "boolean"
          },
          "tokenName": {
            "description": "token_name 令牌名称，来自 api_keys.name 富化关联。",
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "userTierRatio": {
            "description": "user_tier_ratio 用户等级倍率快照（decimal 字符串如 \"1.5000\"，计费实际用值）；空串=未钉值/历史行。",
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorSlug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UsageLogEntry": {
        "description": "UsageLogEntry 用量日志条目\n UsageLogEntry field semantics:\n - httpStatus is the gateway HTTP status returned to the caller.\n - errorCode being non-empty means a gateway/routing/provider business error occurred.\n - list status filter: 0/empty=all, 1=ok, 2=error. WP7 dual-column semantics: rows with billingStatus set are ok when clientStatus\u003c400 (or unset) AND billingStatus is not 'insufficient' AND errorCode is unset (httpStatus not consulted); rows without billingStatus (legacy/wallet fast-path) are ok when httpStatus\u003c400 AND errorCode is unset. Note an 'insufficient' row with httpStatus 200 counts as error (delivered but unbilled).\n - promptTokens/completionTokens/totalTokens are token counts; cachedTokens is not exposed separately here.\n - billedMicros is the charged amount in micros of currency, with no extra rounding in this API.\n - time filters are RFC3339/ISO8601 strings with offsets allowed; usage log windows are [from, to).",
        "properties": {
          "apiKeyId": {
            "description": "api_key_id 令牌（API Key）ID；用于关联令牌名称。",
            "type": "string"
          },
          "basePriceMicros": {
            "description": "base_price_micros 结算时从原始有理数 gross 单次 ceil 得到的价目表基础金额（CRD micros）。\n 缺失表示历史行或无可靠定价事实；客户端必须展示未知，不能从 billed_micros 反推。",
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "cachedTokens": {
            "description": "cached_tokens 缓存命中 token 数；当前写入链路可能恒为 0，前端按 0 隐藏。",
            "type": "string"
          },
          "channelCostMicros": {
            "description": "channel_cost_micros 结算时从同一原始 gross 乘钉值成本倍率后单次 ceil 的渠道成本（CRD micros）。\n 缺失表示无成本倍率快照；不能从 billed_micros 或 base_price_micros 派生。",
            "type": "string"
          },
          "channelCostRatio": {
            "description": "channel_cost_ratio 渠道成本倍率钉值（decimal 字符串，如 \"0.8500\"）；空串=无快照。",
            "type": "string"
          },
          "channelDiscount": {
            "deprecated": true,
            "description": "Deprecated: use channel_cost_ratio. Historical name retained for old clients.",
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "channelName": {
            "type": "string"
          },
          "channelSaleRatio": {
            "description": "channel_sale_ratio 销售倍率快照（decimal 字符串如 \"1.2000\"）；空串=无快照。PR2 阶段仅观察值，PR3 起为计费实际用值。",
            "type": "string"
          },
          "channelSourceCode": {
            "description": "channel_source_code 命中渠道资源 code 快照；空串=未绑定资源 / 钉值缺失。",
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（响应头 X-Request-Id 同值）；与异步任务详情展示的请求 ID 对齐。\n 空串=历史行或未采集，前端回退展示 request_id。",
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "discountedBilledMicros": {
            "deprecated": true,
            "description": "Deprecated: use channel_cost_micros. When the persisted audit amount is unavailable,\n this compatibility field falls back to billed_micros and must not be used for audit.",
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          },
          "firstTokenMs": {
            "description": "first_token_ms 首字输出耗时（毫秒），来自 usage_logs.first_token_ms；非流式、未采集或历史缺失为 0。",
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "isStream": {
            "type": "boolean"
          },
          "latencyMs": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "requestType": {
            "description": "request_type 请求类型/协议（如 openai_chat、anthropic_messages），用于展示输出协议与流式判定无关的请求形态。",
            "type": "string"
          },
          "success": {
            "description": "success 行级成败结论，与列表 status 筛选同一谓词（WP7 双列回退口径）在服务端计算。\n 前端徽标请直接用本字段；http_status 在迁移历史行上可能为 0，不可用于本地推断成败。",
            "type": "boolean"
          },
          "tokenName": {
            "description": "token_name 令牌名称，来自 api_keys.name 富化关联。",
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "userEmail": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorSlug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UsageSummaryItem": {
        "description": "UsageSummaryItem 用量汇总项\n UsageSummaryItem uses an RFC3339 hour bucket. errorRate is a 0-1 fraction and returns 0 when total is 0.\n avgLatencyMs is weighted by non-NULL latency samples for rollup rows; raw-log fallback uses AVG(latency_ms) in the bucket.\n latencyCount is the corresponding sample weight; consumers must use it when\n combining multiple buckets instead of averaging bucket averages equally.",
        "properties": {
          "avgLatencyMs": {
            "format": "double",
            "type": "number"
          },
          "bucket": {
            "type": "string"
          },
          "errorRate": {
            "format": "double",
            "type": "number"
          },
          "errors": {
            "type": "string"
          },
          "latencyCount": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserAdminInfo": {
        "description": "UserAdminInfo 是管理员视角的用户信息 DTO。\n\n 字段命名约定（与前端 AdminUser 接口约定）:\n   - status: 字符串状态枚举 'active'|'banned'（不是数字码）；删除用户由 deleted_at 软删除表示，默认不出现在列表中\n   - role:   'user'|'agent'|'enterprise'|'admin'\n   - 金额字段统一带 _micros 后缀，避免对端误把 micros 当元处理（金额单位混淆是\n     已经发生过的事故来源；命名上暴露单位是项目硬约束，见 AGENTS.md/skills）\n   - protojson 把 int64 序列化为 JSON string，前端 AdminUser 用 `string` 接收\n\n 字段 ID 9 之前是历史管理后台接口的 int 字段（status=5/account_type=6/is_admin=7），\n 现在统一改用字符串 status 与 role，旧路径调用方必须更新。proto 字段编号没改，\n 仅 wire format 不影响（同 ID 复用兼容老 binary）。",
        "properties": {
          "accountType": {
            "description": "account_type 保留作为内部 / 老路径数字码（1=C端 2=B端员工 3=代理商 4=企业管理员 5=企业成员）。\n 新前端使用 role 字符串；这里保留是为了 wire format 兼容性。",
            "format": "int32",
            "type": "integer"
          },
          "allowTokenBindSource": {
            "description": "allow_token_bind_source 是否允许该用户的 API Key 绑定渠道资源。\n 启用后，该用户创建的 API Key 可设置 channel_source_id 实现令牌级路由；\n 禁用时，后端忽略 API Key 的 channel_source_id 绑定（即使已设置也不生效）。",
            "type": "boolean"
          },
          "apiCallCount": {
            "description": "api_call_count 是从 usage_logs 表聚合的累计调用次数。",
            "type": "string"
          },
          "balanceMicros": {
            "description": "钱包聚合字段（list/get 时由 data 层 EnrichWalletAggregates 填充）。\n 单位 micros 强制写在字段名里，避免对端误用元单位计算。",
            "type": "string"
          },
          "bannedAt": {
            "description": "封禁元数据（仅 status='banned' 时有值）。\n banned_until=nil 表示永久封禁；非空时为预定的自动解封时间。",
            "format": "date-time",
            "type": "string"
          },
          "bannedReason": {
            "type": "string"
          },
          "bannedUntil": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "frozenBalanceMicros": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "inviteCount": {
            "type": "string"
          },
          "inviteRewardMicros": {
            "type": "string"
          },
          "inviterId": {
            "type": "string"
          },
          "inviterName": {
            "type": "string"
          },
          "lastLoginAt": {
            "format": "date-time",
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "realnameStatus": {
            "description": "realname_status 是个人实名认证状态：unverified / processing / verified。",
            "type": "string"
          },
          "realnameVerifiedAt": {
            "description": "realname_verified_at 是个人实名认证通过时间；未认证为空。",
            "format": "date-time",
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "roles": {
            "description": "roles 是用户当前生效的 RBAC 角色（已过滤过期绑定/停用/已删除角色）。\n 前端用 role_id 调 iam GetRole (/v1/iam/roles/{id}) 查权限以驱动菜单/按钮。",
            "items": {
              "$ref": "#/components/schemas/admin.v1.Role"
            },
            "type": "array"
          },
          "status": {
            "description": "status 是字符串状态枚举：'active' / 'banned'。\n 历史接口之前返回 int32 status，本次改为统一字符串；调用方应迁移。",
            "type": "string"
          },
          "tierId": {
            "description": "用户绑定的等级（原始绑定值，非生效等级）。tier_id=0 表示未绑定，\n 运行时回落系统默认等级；企业成员（account_type=5）恒为 0，\n 等级在请求时动态跟随 team owner（见 tier.proto / PR#382 语义）。",
            "type": "string"
          },
          "tierName": {
            "description": "等级名称；未绑定为空串。list/get 由 data 层批量填充，填充失败降级为空（WARN 不阻断）。",
            "type": "string"
          },
          "totalSpentMicros": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserBalanceTrendPoint": {
        "properties": {
          "balanceAfterMicros": {
            "type": "string"
          },
          "creditMicros": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "debitMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserGrowthPoint": {
        "description": "UserGrowthPoint 用户增长趋势点",
        "properties": {
          "count": {
            "type": "string"
          },
          "date": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserRoleDistribution": {
        "description": "UserRoleDistribution 角色分布",
        "properties": {
          "count": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserStatusDistribution": {
        "description": "UserStatusDistribution 状态分布",
        "properties": {
          "count": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.UserSubscriptionReply": {
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/admin.v1.AdminUserSubscription"
          }
        },
        "type": "object"
      },
      "admin.v1.UserUsageTrendPoint": {
        "properties": {
          "billedMicros": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "requestCount": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.VendorInfo": {
        "properties": {
          "created_time": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "model_count": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "updated_time": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "admin.v1.VideoPricing": {
        "description": "VideoPricing 视频按分辨率档每秒计费参数：分辨率档 → 每秒 CRD 单价（如 {\"720p\":0.9,\"1080p\":1.6}）。",
        "properties": {
          "perSecondPrices": {
            "additionalProperties": {
              "format": "double",
              "type": "number"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "agent.v1.ActivateAgentReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "agent.v1.ActivateAgentRequest": {
        "properties": {
          "agentId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.AgentInfo": {
        "properties": {
          "activatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "agentCode": {
            "type": "string"
          },
          "consumeCommissionBps": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "settlementCurrency": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "tier": {
            "format": "int32",
            "type": "integer"
          },
          "topupCommissionBps": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.ApplicationInfo": {
        "properties": {
          "businessScope": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "expectedVolume": {
            "format": "double",
            "type": "number"
          },
          "id": {
            "type": "string"
          },
          "rejectReason": {
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewerId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.ApplyReply": {
        "properties": {
          "application": {
            "$ref": "#/components/schemas/agent.v1.ApplicationInfo"
          }
        },
        "type": "object"
      },
      "agent.v1.ApplyRequest": {
        "properties": {
          "businessScope": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "expectedVolume": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "agent.v1.ApplyWithdrawalReply": {
        "properties": {
          "withdrawal": {
            "$ref": "#/components/schemas/agent.v1.WithdrawalInfo"
          }
        },
        "type": "object"
      },
      "agent.v1.ApplyWithdrawalRequest": {
        "properties": {
          "amountMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.CommissionInfo": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "baseAmountMicros": {
            "type": "string"
          },
          "beneficiaryId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "rateBps": {
            "format": "int32",
            "type": "integer"
          },
          "settledAt": {
            "format": "date-time",
            "type": "string"
          },
          "sourceType": {
            "type": "string"
          },
          "sourceUserId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.GetMyAgentReply": {
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/agent.v1.AgentInfo"
          }
        },
        "type": "object"
      },
      "agent.v1.GetMyStatsReply": {
        "properties": {
          "stats": {
            "$ref": "#/components/schemas/agent.v1.StatsInfo"
          }
        },
        "type": "object"
      },
      "agent.v1.ListAgentsReply": {
        "properties": {
          "agents": {
            "items": {
              "$ref": "#/components/schemas/agent.v1.AgentInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.ListMyCommissionsReply": {
        "properties": {
          "commissions": {
            "items": {
              "$ref": "#/components/schemas/agent.v1.CommissionInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.ListMyWithdrawalsReply": {
        "properties": {
          "total": {
            "type": "string"
          },
          "withdrawals": {
            "items": {
              "$ref": "#/components/schemas/agent.v1.WithdrawalInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "agent.v1.ListPendingApplicationsReply": {
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/agent.v1.ApplicationInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.MarkPaidReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "agent.v1.MarkPaidRequest": {
        "properties": {
          "tradeNo": {
            "type": "string"
          },
          "withdrawalId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.ReviewApplicationReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "agent.v1.ReviewApplicationRequest": {
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "approved": {
            "type": "boolean"
          },
          "consumeRateBps": {
            "format": "int32",
            "type": "integer"
          },
          "rejectReason": {
            "type": "string"
          },
          "topupRateBps": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "agent.v1.ReviewWithdrawalReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "agent.v1.ReviewWithdrawalRequest": {
        "properties": {
          "approved": {
            "type": "boolean"
          },
          "rejectReason": {
            "type": "string"
          },
          "withdrawalId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.StatsInfo": {
        "properties": {
          "activeReferrals": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "pendingCommissionMicros": {
            "type": "string"
          },
          "totalCommissionMicros": {
            "type": "string"
          },
          "totalReferrals": {
            "type": "string"
          },
          "totalWithdrawMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "agent.v1.WithdrawalInfo": {
        "properties": {
          "agentId": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "appliedAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "rejectReason": {
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewerId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tradeNo": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ApplyEnterpriseUpgradeReply": {
        "description": "ApplyEnterpriseUpgradeReply 企业升级申请提交结果。",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ApplyEnterpriseUpgradeRequest": {
        "description": "ApplyEnterpriseUpgradeRequest 企业升级申请提交参数。",
        "properties": {
          "businessLicense": {
            "type": "string"
          },
          "businessScope": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "employeeCount": {
            "format": "int32",
            "type": "integer"
          },
          "legalPersonIdCard": {
            "type": "string"
          },
          "legalPersonName": {
            "type": "string"
          },
          "materialFiles": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.MaterialFile"
            },
            "type": "array"
          },
          "materials": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.AuditRecord": {
        "description": "AuditRecord 审核记录。",
        "properties": {
          "id": {
            "type": "string"
          },
          "reviewComment": {
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewedBy": {
            "type": "string"
          },
          "reviewedByUserId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "submittedBy": {
            "type": "string"
          },
          "submittedByUserId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.EnterpriseAccount": {
        "description": "EnterpriseAccount 已审核通过的企业账号信息。",
        "properties": {
          "approvedAt": {
            "format": "date-time",
            "type": "string"
          },
          "businessLicense": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "employeeCount": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "latestSubmittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "legalPersonIdCard": {
            "type": "string"
          },
          "legalPersonName": {
            "type": "string"
          },
          "registrationEmail": {
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewedBy": {
            "type": "string"
          },
          "reviewedByUserId": {
            "type": "string"
          },
          "riskStatus": {
            "type": "string"
          },
          "skipSubaccountKyc": {
            "type": "boolean"
          },
          "status": {
            "type": "string"
          },
          "subaccountRealnameRequired": {
            "type": "boolean"
          },
          "submittedBy": {
            "type": "string"
          },
          "submittedByUserId": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.EnterpriseApplication": {
        "description": "EnterpriseApplication 企业升级申请详情。",
        "properties": {
          "businessLicense": {
            "type": "string"
          },
          "businessScope": {
            "type": "string"
          },
          "companyName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactPhone": {
            "type": "string"
          },
          "employeeCount": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "legalPersonIdCard": {
            "type": "string"
          },
          "legalPersonName": {
            "type": "string"
          },
          "materialFiles": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.MaterialFile"
            },
            "type": "array"
          },
          "materials": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "rejectReason": {
            "type": "string"
          },
          "reviewComment": {
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewerEmail": {
            "type": "string"
          },
          "reviewerId": {
            "type": "string"
          },
          "reviewerName": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.GetMyApplicationReply": {
        "description": "GetMyApplicationReply 查询我的企业升级申请响应。",
        "properties": {
          "application": {
            "$ref": "#/components/schemas/api.enterprise.v1.EnterpriseApplication"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ListApplicationsReply": {
        "description": "ListApplicationsReply 查询企业升级申请历史响应。",
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.EnterpriseApplication"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ListAuditHistoryReply": {
        "description": "ListAuditHistoryReply 查询企业审核历史响应。",
        "properties": {
          "records": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.AuditRecord"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ListEnterprisesReply": {
        "description": "ListEnterprisesReply 查询企业账号列表响应。",
        "properties": {
          "enterprises": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.EnterpriseAccount"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ListPendingApplicationsReply": {
        "description": "ListPendingApplicationsReply 查询待审核企业升级申请响应。",
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/api.enterprise.v1.EnterpriseApplication"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.MaterialFile": {
        "description": "MaterialFile 企业升级申请附件材料。",
        "properties": {
          "mimeType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "uploadedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ReviewApplicationReply": {
        "description": "ReviewApplicationReply 管理员审核企业升级申请响应。",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.ReviewApplicationRequest": {
        "description": "ReviewApplicationRequest 管理员审核企业升级申请请求。",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "approved": {
            "type": "boolean"
          },
          "rejectReason": {
            "type": "string"
          },
          "reviewComment": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.SetSkipSubaccountKYCReply": {
        "description": "SetSkipSubaccountKYCReply 设置企业子账号免实名认证开关响应。",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.enterprise.v1.SetSkipSubaccountKYCRequest": {
        "description": "SetSkipSubaccountKYCRequest 设置企业子账号免实名认证开关请求。",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "skipKyc": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.AssignQuotaReply": {
        "description": "分配额度响应",
        "properties": {
          "grantId": {
            "type": "string"
          },
          "newBalanceMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.AssignQuotaRequest": {
        "description": "分配额度请求",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "teamMemberId": {
            "type": "string"
          },
          "validFrom": {
            "format": "date-time",
            "type": "string"
          },
          "validUntil": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.CreateSubaccountReply": {
        "description": "创建子账号响应",
        "properties": {
          "teamMemberId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.CreateSubaccountRequest": {
        "description": "创建子账号请求",
        "properties": {
          "department": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "modelIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "monthlyLimitMicros": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "toolCategories": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.DeleteSubaccountReply": {
        "description": "删除子账号响应",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.GetSubaccountQuotaReply": {
        "description": "查询子账号额度响应",
        "properties": {
          "recentGrants": {
            "items": {
              "$ref": "#/components/schemas/api.subaccount.v1.QuotaGrant"
            },
            "type": "array"
          },
          "remainingMicros": {
            "type": "string"
          },
          "totalGrantedMicros": {
            "type": "string"
          },
          "usedMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.GetSubaccountReply": {
        "description": "查询子账号详情响应",
        "properties": {
          "subaccount": {
            "$ref": "#/components/schemas/api.subaccount.v1.Subaccount"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.ListSubaccountsReply": {
        "description": "查询子账号列表响应",
        "properties": {
          "subaccounts": {
            "items": {
              "$ref": "#/components/schemas/api.subaccount.v1.Subaccount"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.ModelPermission": {
        "description": "模型权限",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "dailyQuotaMicros": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "monthlyQuotaMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.QuotaGrant": {
        "description": "额度发放记录",
        "properties": {
          "action": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.RecoverQuotaReply": {
        "description": "回收额度响应",
        "properties": {
          "grantId": {
            "type": "string"
          },
          "newBalanceMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.RecoverQuotaRequest": {
        "description": "回收额度请求",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "teamMemberId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.SetModelPermissionsReply": {
        "description": "设置模型权限响应",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.SetModelPermissionsRequest": {
        "description": "设置模型权限请求",
        "properties": {
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/api.subaccount.v1.ModelPermission"
            },
            "type": "array"
          },
          "teamMemberId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.SetToolPermissionsReply": {
        "description": "设置工具权限响应",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.SetToolPermissionsRequest": {
        "description": "设置工具权限请求",
        "properties": {
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/api.subaccount.v1.ToolPermission"
            },
            "type": "array"
          },
          "teamMemberId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.Subaccount": {
        "description": "子账号",
        "properties": {
          "department": {
            "type": "string"
          },
          "disabledAt": {
            "format": "date-time",
            "type": "string"
          },
          "disabledReason": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "joinedAt": {
            "format": "date-time",
            "type": "string"
          },
          "monthlyLimitMicros": {
            "type": "string"
          },
          "periodResetAt": {
            "format": "date-time",
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "usedThisPeriodMicros": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.ToggleSubaccountReply": {
        "description": "启用/禁用子账号响应",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.ToggleSubaccountRequest": {
        "description": "启用/禁用子账号请求",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "teamMemberId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.ToolPermission": {
        "description": "工具权限",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "rateLimitPerDay": {
            "format": "int32",
            "type": "integer"
          },
          "rateLimitPerMinute": {
            "format": "int32",
            "type": "integer"
          },
          "toolCategory": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.UpdateSubaccountReply": {
        "description": "更新子账号响应",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "api.subaccount.v1.UpdateSubaccountRequest": {
        "description": "更新子账号请求",
        "properties": {
          "department": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "monthlyLimitMicros": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "teamMemberId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.APIKeyInfo": {
        "description": "APIKeyInfo API Key 元数据；plaintext key 仅在 Create/Rotate 时一次性返回。",
        "properties": {
          "billingMode": {
            "type": "string"
          },
          "channelSourceCode": {
            "type": "string"
          },
          "channelSourceId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creatorId": {
            "type": "string"
          },
          "creatorName": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "lastUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastUsedIp": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "subscriptionId": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "teamName": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.BanAPIKeyReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "apikey.v1.BanAPIKeyRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.BindableChannelSource": {
        "description": "BindableChannelSource 可绑定渠道资源的简要信息。",
        "properties": {
          "code": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.BindableSubscription": {
        "description": "BindableSubscription 可绑定订阅的简要信息。",
        "properties": {
          "id": {
            "type": "string"
          },
          "planTitle": {
            "type": "string"
          },
          "remainingMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.CreateAPIKeyReply": {
        "properties": {
          "apikey": {
            "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
          },
          "plaintextKey": {
            "description": "plaintext_key 完整明文 key，仅在创建时返回一次，丢失需 rotate 重建。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.CreateAPIKeyRequest": {
        "properties": {
          "billingMode": {
            "description": "billing_mode: \"\" | \"wallet\" | \"subscription\"。空字符串视为 \"wallet\"。",
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subscriptionId": {
            "description": "subscription_id: billing_mode=\"subscription\" 时必须传，指定绑定的订阅 ID。",
            "type": "string"
          },
          "teamId": {
            "description": "team_id: 在团队令牌页创建时传，将令牌快照归属到该团队（创建人须为该团队 active 成员）。\n 个人令牌不传；订阅令牌不可带 team_id。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.GetAPIKeyReply": {
        "properties": {
          "apikey": {
            "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
          }
        },
        "type": "object"
      },
      "apikey.v1.GetMyAPIKeyReply": {
        "properties": {
          "apikey": {
            "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
          }
        },
        "type": "object"
      },
      "apikey.v1.ListAllAPIKeysReply": {
        "properties": {
          "apikeys": {
            "items": {
              "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.ListBindableChannelSourcesReply": {
        "properties": {
          "channelSources": {
            "items": {
              "$ref": "#/components/schemas/apikey.v1.BindableChannelSource"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "apikey.v1.ListBindableSubscriptionsReply": {
        "properties": {
          "subscriptions": {
            "items": {
              "$ref": "#/components/schemas/apikey.v1.BindableSubscription"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "apikey.v1.ListMyAPIKeysReply": {
        "properties": {
          "apikeys": {
            "items": {
              "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "apikey.v1.RevokeAPIKeyReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "apikey.v1.RevokeAPIKeyRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.RotateAPIKeyReply": {
        "properties": {
          "apikey": {
            "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
          },
          "plaintextKey": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.RotateAPIKeyRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.UnbanAPIKeyReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "apikey.v1.UnbanAPIKeyRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "apikey.v1.UpdateAPIKeyReply": {
        "properties": {
          "apikey": {
            "$ref": "#/components/schemas/apikey.v1.APIKeyInfo"
          }
        },
        "type": "object"
      },
      "apikey.v1.UpdateAPIKeyRequest": {
        "description": "UpdateAPIKeyRequest 聚合更新；nil 字段表示不修改。",
        "properties": {
          "channelSourceId": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "hasChannelSourceId": {
            "description": "channel_source_id: has_channel_source_id=false 不修改；has_channel_source_id=true \u0026\u0026 channel_source_id=0 表示解绑。",
            "type": "boolean"
          },
          "hasExpiresAt": {
            "description": "expires_at: has_expires_at=false 不修改；has_expires_at=true \u0026\u0026 expires_at=nil 表示永久。",
            "type": "boolean"
          },
          "hasScopes": {
            "description": "scopes 为空切片 = 清空；nil 字段（未传）= 不更新。\n 这里用 has_scopes 显式区分。",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "description": "使用 wrapper-style：proto3 默认值无法区分\"未传\"与\"清空\"，因此用\n optional 标记，需要明确传 nil 才不更新。",
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ChannelInfo": {
        "description": "ChannelInfo 渠道展示模型；api_key 永远只回显 mask（\"sk-****abcd\"）。",
        "properties": {
          "apiKeyMask": {
            "type": "string"
          },
          "autoDisableJson": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "boundSources": {
            "description": "bound_sources 该渠道挂载的资源绑定（只读回显，按 source_id asc）。\n 仅 ListChannels 批量回填（列表页\"所属资源\"列，免去逐行反查 by-channel）；\n 其余回包（Create/Get/Update/Enable/Disable）不填，单渠道回显仍走\n GET /v1/admin/source-channels/by-channel/{channel_id}。",
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelBindingInfo"
            },
            "type": "array"
          },
          "costRatio": {
            "description": "渠道成本倍率 decimal 字符串（如 \"0.8500\"）；空串=未配置（快照 NULL）。仅审计不计费。",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "extraConfigJson": {
            "type": "string"
          },
          "headerOverrideJson": {
            "description": "header_override_json 请求头覆盖：{key: string | true} JSON；空/\"{}\" 表示未配置。\n 网关发往上游前 Set 到 HTTP header；支持 {api_key} / {client_header:Name} 模板变量\n 与 \"*\": true / \"re:pat\": true 通配 passthrough；不允许覆盖 stream 键。",
            "type": "string"
          },
          "headerStripJson": {
            "description": "header_strip_json 请求头剔除列表 JSON: '[\"X-Foo\", \"X-Bar\"]'; 空/\"[]\"/\"null\" = 未配置。\n 与 header_override 独立字段, Phase 3 应用 (在 override 之后, 保证剔除优先级最高)。\n 大小写不敏感, 写侧 blocklist 拒绝 Content-Type / Host / Authorization 等协议关键头。",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "modelMappingJson": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "paramOverrideJson": {
            "description": "param_override_json 请求参数覆盖：{key: any} JSON；空/\"{}\" 表示未配置。\n 网关发往上游前用 sjson 覆写请求体 JSON；不允许覆盖 stream 键。",
            "type": "string"
          },
          "passthroughBody": {
            "description": "passthrough_body true 时，网关直接把用户请求体透传给上游，不做任何 reshape。",
            "type": "boolean"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "retryJson": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "timeoutMs": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.ChannelKeyInfo": {
        "properties": {
          "disabledReason": {
            "type": "string"
          },
          "disabledUntil": {
            "format": "date-time",
            "type": "string"
          },
          "errorCount": {
            "type": "string"
          },
          "index": {
            "format": "int32",
            "type": "integer"
          },
          "lastUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "weight": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "channel.v1.CreateChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/channel.v1.ChannelInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.CreateChannelRequest": {
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "autoDisableJson": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "costRatio": {
            "description": "渠道成本倍率 decimal 字符串；空串=不配置（落 NULL）。非法值返回 400，\n reason=CHANNEL_COST_RATIO_INVALID。仅审计不计费。",
            "type": "string"
          },
          "extraConfigJson": {
            "type": "string"
          },
          "headerOverrideJson": {
            "description": "覆盖三件套：与 ChannelInfo 同义；空串 = 未配置。写入前 biz 侧校验，不允许覆盖 stream 键。",
            "type": "string"
          },
          "headerStripJson": {
            "description": "header_strip_json 请求头剔除 JSON (对齐 ChannelInfo.header_strip_json)。",
            "type": "string"
          },
          "modelMappingJson": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "paramOverrideJson": {
            "type": "string"
          },
          "passthroughBody": {
            "type": "boolean"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "retryJson": {
            "type": "string"
          },
          "timeoutMs": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "type": "string"
          },
          "vendorId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.DeleteChannelReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "channel.v1.DisableChannelKeyReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "channel.v1.DisableChannelKeyRequest": {
        "properties": {
          "durationMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "keyIndex": {
            "format": "int32",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.DisableChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/channel.v1.ChannelInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.DisableChannelRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.EnableChannelKeyReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "channel.v1.EnableChannelKeyRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "keyIndex": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "channel.v1.EnableChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/channel.v1.ChannelInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.EnableChannelRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.GetChannelKeysReply": {
        "properties": {
          "channelId": {
            "type": "string"
          },
          "keys": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ChannelKeyInfo"
            },
            "type": "array"
          },
          "mode": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.GetChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/channel.v1.ChannelInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.GetChannelTierWhitelistReply": {
        "properties": {
          "channelId": {
            "type": "string"
          },
          "tierIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.GetModelByNameReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/channel.v1.PublicModel"
          }
        },
        "type": "object"
      },
      "channel.v1.GetModelReply": {
        "properties": {
          "model": {
            "$ref": "#/components/schemas/channel.v1.PublicModel"
          }
        },
        "type": "object"
      },
      "channel.v1.ListCategoriesReply": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicCategory"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListChannelBoundSourcesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListChannelsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ChannelInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.ListModelSourceBindingsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelSourceBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListModelSourcesReply": {
        "properties": {
          "sources": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicModelSource"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListModelsReply": {
        "properties": {
          "filterStats": {
            "$ref": "#/components/schemas/channel.v1.ModelFilterStats"
          },
          "models": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicModel"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.ListSourceChannelBindingsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListSourceModelBindingsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelSourceBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ListVendorsReply": {
        "properties": {
          "vendors": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicVendor"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ModelFilterOption": {
        "description": "ModelFilterOption 是一个可筛选值在当前查询上下文中的命中数量。",
        "properties": {
          "count": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.ModelFilterStats": {
        "description": "ModelFilterStats 按维度返回筛选统计；计算某维度时忽略该维度自身的已选值。",
        "properties": {
          "billingModes": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelFilterOption"
            },
            "type": "array"
          },
          "capabilities": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelFilterOption"
            },
            "type": "array"
          },
          "contextRanges": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelFilterOption"
            },
            "type": "array"
          },
          "tags": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelFilterOption"
            },
            "type": "array"
          },
          "vendors": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelFilterOption"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.ModelSourceBindingInfo": {
        "description": "ModelSourceBindingInfo 模型↔资源绑定行；source_name/source_code/model_name 为只读回显。",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "sourceCode": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "sourceName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.ModelSourceEntry": {
        "description": "ModelSourceEntry SetModelSourceBindings 入参：模型绑定单个资源 + 选举排序。",
        "properties": {
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "sourceId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicCategory": {
        "description": "PublicCategory C 端分类展示信息",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicImagePricing": {
        "description": "PublicImagePricing 图像按分辨率分档计费（每张图的 CRD 单价，十进制字符串）。",
        "properties": {
          "imagePrice1k": {
            "type": "string"
          },
          "imagePrice2k": {
            "type": "string"
          },
          "imagePrice4k": {
            "type": "string"
          },
          "imagePrice512": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicModel": {
        "description": "PublicModel C 端模型展示信息",
        "properties": {
          "callCount": {
            "description": "call_count 模型累计请求数，来源为小时聚合表。",
            "type": "string"
          },
          "capabilities": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "categoryId": {
            "type": "string"
          },
          "categoryName": {
            "type": "string"
          },
          "contextWindow": {
            "format": "int32",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionZh": {
            "type": "string"
          },
          "endpointTypes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "faq": {
            "description": "faq / faq_zh 落地页常见问题（仅详情接口 GetModel/GetModelByName 返回，ListModels 不带，控制列表载荷）。\n 空数组时前端隐藏 FAQ 区域。",
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicModelFaq"
            },
            "type": "array"
          },
          "faqZh": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicModelFaq"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "inputPriceCny": {
            "type": "string"
          },
          "inputPriceOrig": {
            "type": "string"
          },
          "isAvailable": {
            "type": "boolean"
          },
          "isNew": {
            "type": "boolean"
          },
          "isRecommended": {
            "type": "boolean"
          },
          "maxOutputTokens": {
            "format": "int32",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "outputPriceCny": {
            "type": "string"
          },
          "outputPriceOrig": {
            "type": "string"
          },
          "pricing": {
            "allOf": [
              {
                "$ref": "#/components/schemas/channel.v1.PublicModelPricing"
              }
            ],
            "description": "pricing 该模型在默认 plan 上的当前有效定价（CRD 积分口径）；无有效定价时为空。\n 与旧的 input_price_cny 等 CNY 字段并存：CNY 字段保留兼容，前端展示优先用 pricing。"
          },
          "ranking": {
            "format": "int32",
            "type": "integer"
          },
          "releasedAt": {
            "description": "released_at 模型发布时间（可空）；供前端按发布时间过滤/排序。",
            "format": "date-time",
            "type": "string"
          },
          "sources": {
            "description": "sources 卡片价格区展示的前两条资源变体（sale_ratio 升序，服务端排好序截断下发）；\n 完整列表走独立明细接口 GET /v1/models/{id}/sources。",
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicModelSource"
            },
            "type": "array"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorSlug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicModelFaq": {
        "description": "PublicModelFaq 模型落地页常见问题条目（answer 纯文本，允许换行）。",
        "properties": {
          "answer": {
            "type": "string"
          },
          "question": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicModelPricing": {
        "description": "PublicModelPricing C 端模型广场结构化定价（CRD 积分口径，与 admin ModelPricing 对齐）。\n mode 决定计价方式，params 只携带该 mode 所需参数。价格为普通十进制字符串。",
        "properties": {
          "image": {
            "$ref": "#/components/schemas/channel.v1.PublicImagePricing"
          },
          "mode": {
            "type": "string"
          },
          "perRequest": {
            "$ref": "#/components/schemas/channel.v1.PublicPerRequestPricing"
          },
          "tieredExpr": {
            "$ref": "#/components/schemas/channel.v1.PublicTieredExprPricing"
          },
          "token": {
            "$ref": "#/components/schemas/channel.v1.PublicTokenPricing"
          },
          "video": {
            "$ref": "#/components/schemas/channel.v1.PublicVideoPricing"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicModelSource": {
        "description": "PublicModelSource 模型在某渠道资源下的售卖明细行（卡片价格区 + 「查看明细」弹框共用）。\n cost_ratio（内部成本口径）结构性不进本消息——C 端绝不暴露。",
        "properties": {
          "modelName": {
            "type": "string"
          },
          "pricing": {
            "$ref": "#/components/schemas/channel.v1.PublicModelPricing"
          },
          "saleRatio": {
            "type": "string"
          },
          "sourceCode": {
            "type": "string"
          },
          "sourceDescription": {
            "type": "string"
          },
          "sourceDescriptionEn": {
            "type": "string"
          },
          "sourceName": {
            "type": "string"
          },
          "sourceNameEn": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicPerRequestPricing": {
        "description": "PublicPerRequestPricing 按次计费（每次调用消耗的 CRD，十进制字符串）。",
        "properties": {
          "perRequestPrice": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicPricingCondition": {
        "description": "PublicPricingCondition 档位生效的数值阈值条件。",
        "properties": {
          "operator": {
            "type": "string"
          },
          "threshold": {
            "type": "string"
          },
          "variable": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicPricingRate": {
        "description": "PublicPricingRate 表达式变量对应的每百万 token 单价。",
        "properties": {
          "dimension": {
            "type": "string"
          },
          "price": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicPricingTier": {
        "description": "PublicPricingTier 表达式中的一个命名档位。",
        "properties": {
          "conditions": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicPricingCondition"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "rates": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicPricingRate"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicTieredExprPricing": {
        "description": "PublicTieredExprPricing 表达式计费的安全公开投影。\n statically_representable=false 时不下发原始表达式，前端统一提示动态计价。",
        "properties": {
          "staticallyRepresentable": {
            "type": "boolean"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.PublicPricingTier"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicTokenPricing": {
        "description": "PublicTokenPricing 按 token 计费（每 1M tokens 的 CRD 单价，十进制字符串）。",
        "properties": {
          "audioInputPrice": {
            "type": "string"
          },
          "audioOutputPrice": {
            "type": "string"
          },
          "cacheCreation1hPrice": {
            "type": "string"
          },
          "cacheCreationPrice": {
            "type": "string"
          },
          "cachedInputPrice": {
            "type": "string"
          },
          "imageInputPrice": {
            "type": "string"
          },
          "imageOutputPrice": {
            "type": "string"
          },
          "inputPrice": {
            "type": "string"
          },
          "outputPrice": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicVendor": {
        "description": "PublicVendor C 端供应商展示信息",
        "properties": {
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "officialUrl": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.PublicVideoPricing": {
        "description": "PublicVideoPricing 视频按分辨率档每秒计费（分辨率档 → 每秒 CRD 单价，十进制字符串）。",
        "properties": {
          "perSecondPrices": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "type": "object"
      },
      "channel.v1.ResolveRouteEntry": {
        "description": "ResolveRouteEntry 单个资源候选：资源绑定行 + 其下渠道候选（按资源内选举顺序）。",
        "properties": {
          "channels": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelBindingInfo"
            },
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/channel.v1.ModelSourceBindingInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.ResolveRouteReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ResolveRouteEntry"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.SetChannelTierWhitelistReply": {
        "properties": {
          "channelId": {
            "type": "string"
          },
          "tierIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.SetChannelTierWhitelistRequest": {
        "properties": {
          "channelId": {
            "type": "string"
          },
          "tierIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.SetModelSourceBindingsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelSourceBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.SetModelSourceBindingsRequest": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.ModelSourceEntry"
            },
            "type": "array"
          },
          "modelId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.SetSourceChannelBindingsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelBindingInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "channel.v1.SetSourceChannelBindingsRequest": {
        "properties": {
          "entries": {
            "items": {
              "$ref": "#/components/schemas/channel.v1.SourceChannelEntry"
            },
            "type": "array"
          },
          "sourceId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.SourceChannelBindingInfo": {
        "description": "SourceChannelBindingInfo 资源↔渠道绑定行；渠道/资源侧展示字段为只读回显。",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "channelName": {
            "type": "string"
          },
          "channelStatus": {
            "format": "int32",
            "type": "integer"
          },
          "channelType": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "sourceCode": {
            "type": "string"
          },
          "sourceId": {
            "type": "string"
          },
          "sourceName": {
            "type": "string"
          },
          "weight": {
            "description": "weight 同 priority 组内的加权分配比重；0 = 不参与加权、仅兜底排在组末。",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "channel.v1.SourceChannelEntry": {
        "description": "SourceChannelEntry SetSourceChannelBindings 入参：资源挂载单个渠道 + 选举排序。",
        "properties": {
          "channelId": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "weight": {
            "description": "weight 同 priority 组内的加权分配比重；0 = 不参与加权、仅兜底排在组末。\n 建议默认 1；负值返回 400。",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "channel.v1.TestChannelReply": {
        "properties": {
          "latencyMs": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "channel.v1.TestChannelRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "channel.v1.UpdateChannelReply": {
        "properties": {
          "channel": {
            "$ref": "#/components/schemas/channel.v1.ChannelInfo"
          }
        },
        "type": "object"
      },
      "channel.v1.UpdateChannelRequest": {
        "description": "UpdateChannelRequest PATCH 语义：仅传需要更新的字段；未传字段保持不变。",
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "autoDisableJson": {
            "type": "string"
          },
          "baseUrl": {
            "type": "string"
          },
          "costRatio": {
            "description": "成本倍率 PATCH 三态：不传=不变；\"\"=清空为未配置（落 NULL）；非空 decimal=覆盖。\n 非法值返回 400，reason=CHANNEL_COST_RATIO_INVALID。",
            "type": "string"
          },
          "extraConfigJson": {
            "type": "string"
          },
          "hasApiKey": {
            "description": "api_key：has_api_key=true 且 api_key 非空 → 旋转密钥；空字符串视为不变（避免误清空）。",
            "type": "boolean"
          },
          "headerOverrideJson": {
            "description": "覆盖三件套 PATCH 三态：\n   - 不传 = 不改；\n   - \"\" / \"{}\" = 清空该配置；\n   - 非空 JSON = 覆盖。\n param/header 均不允许 stream 键（写入前 biz 侧拒 400）。",
            "type": "string"
          },
          "headerStripJson": {
            "description": "header_strip PATCH 三态 (对齐 header_override_json 的 optional string 语义):\n   - 不传 = 不改\n   - \"\" / \"[]\" = 清空\n   - '[\"X-Foo\", \"X-Bar\"]' JSON 数组 = 覆盖\n 后端解析 JSON 到 []string; biz 校验 blocklist / 数量上限。",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "modelMappingJson": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "paramOverrideJson": {
            "type": "string"
          },
          "passthroughBody": {
            "type": "boolean"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "region": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "retryJson": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "timeoutMs": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "console.topup.v1.CurrencyView": {
        "properties": {
          "creditsPerUnit": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "console.topup.v1.GetTopupOptionsReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/console.topup.v1.TopupOption"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "console.topup.v1.ListCurrenciesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/console.topup.v1.CurrencyView"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "console.topup.v1.ListPackagesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/console.topup.v1.PackageView"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "console.topup.v1.PackageView": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "displayDiscountBps": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "internalCredits": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "payAmountMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "console.topup.v1.TopupOption": {
        "description": "TopupOption 单币种的可充档位组，供充值页一次性渲染。",
        "properties": {
          "currency": {
            "type": "string"
          },
          "tiers": {
            "items": {
              "$ref": "#/components/schemas/console.topup.v1.TopupTier"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "console.topup.v1.TopupTier": {
        "description": "TopupTier 单个充值档位；字段口径与 PackageView/TopupOrderInfo 对齐。",
        "properties": {
          "id": {
            "type": "string"
          },
          "internalCredits": {
            "type": "string"
          },
          "payAmountMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "dashboard.v1.DashboardStats": {
        "description": "DashboardStats 仪表盘聚合统计",
        "properties": {
          "avgLatencyMs": {
            "format": "int32",
            "type": "integer"
          },
          "totalCostMicros": {
            "type": "string"
          },
          "totalRequests": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "dashboard.v1.GetAdminSummaryReply": {
        "description": "GetAdminSummaryReply 获取管理员仪表盘统计摘要响应。",
        "properties": {
          "items": {
            "description": "统计项列表",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.SummaryItem"
            },
            "type": "array"
          },
          "rangeHours": {
            "description": "实际统计的时间范围（小时数）",
            "format": "int32",
            "type": "integer"
          },
          "stats": {
            "allOf": [
              {
                "$ref": "#/components/schemas/dashboard.v1.DashboardStats"
              }
            ],
            "description": "聚合统计数据"
          },
          "timeline": {
            "description": "时间线数据",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.TimelinePoint"
            },
            "type": "array"
          },
          "topModels": {
            "description": "热门模型",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.TopModel"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "dashboard.v1.GetSummaryReply": {
        "description": "GetSummaryReply 获取用户仪表盘统计摘要响应。",
        "properties": {
          "items": {
            "description": "统计项列表",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.SummaryItem"
            },
            "type": "array"
          },
          "rangeHours": {
            "description": "实际统计的时间范围（小时数）",
            "format": "int32",
            "type": "integer"
          },
          "stats": {
            "allOf": [
              {
                "$ref": "#/components/schemas/dashboard.v1.DashboardStats"
              }
            ],
            "description": "聚合统计数据"
          },
          "timeline": {
            "description": "时间线数据",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.TimelinePoint"
            },
            "type": "array"
          },
          "topModels": {
            "description": "热门模型",
            "items": {
              "$ref": "#/components/schemas/dashboard.v1.TopModel"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "dashboard.v1.SummaryItem": {
        "description": "SummaryItem 统计项。",
        "properties": {
          "bucketAt": {
            "description": "时间桶（UTC 时间戳）",
            "format": "date-time",
            "type": "string"
          },
          "channel": {
            "description": "渠道名称",
            "type": "string"
          },
          "errorCount": {
            "description": "错误次数",
            "type": "string"
          },
          "inputTokens": {
            "description": "输入 token 数",
            "type": "string"
          },
          "model": {
            "description": "模型名称",
            "type": "string"
          },
          "outputTokens": {
            "description": "输出 token 数",
            "type": "string"
          },
          "requestCount": {
            "description": "请求次数",
            "type": "string"
          },
          "totalMicros": {
            "description": "总费用（micros CNY）",
            "type": "string"
          },
          "userId": {
            "description": "用户 ID（管理员视图时有值，用户视图时为空）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "dashboard.v1.TimelinePoint": {
        "description": "TimelinePoint 时间线数据点",
        "properties": {
          "costMicros": {
            "type": "string"
          },
          "requests": {
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "type": "string"
          },
          "tokens": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "dashboard.v1.TopModel": {
        "description": "TopModel 热门模型",
        "properties": {
          "model": {
            "type": "string"
          },
          "percentage": {
            "format": "double",
            "type": "number"
          },
          "requests": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.AssignUserRolesReply": {
        "properties": {
          "assigned": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "iam.v1.AssignUserRolesRequest": {
        "properties": {
          "expiresAt": {
            "description": "过期时间，Unix 秒；0 表示永不过期。",
            "type": "string"
          },
          "grantedBy": {
            "description": "授予人 ID；若为 0，service 层会尝试从 ctx 注入。",
            "type": "string"
          },
          "roleIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.CreateMenuReply": {
        "properties": {
          "menu": {
            "$ref": "#/components/schemas/iam.v1.Menu"
          }
        },
        "type": "object"
      },
      "iam.v1.CreateMenuRequest": {
        "properties": {
          "code": {
            "type": "string"
          },
          "component": {
            "type": "string"
          },
          "external": {
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          },
          "keepAlive": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "permCode": {
            "type": "string"
          },
          "redirect": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "菜单类型：0/1=目录，2=菜单，3=按钮。",
            "format": "int32",
            "type": "integer"
          },
          "visible": {
            "description": "不传默认 true；显式传 false 可创建隐藏菜单。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.CreatePermissionReply": {
        "properties": {
          "permission": {
            "$ref": "#/components/schemas/iam.v1.Permission"
          }
        },
        "type": "object"
      },
      "iam.v1.CreatePermissionRequest": {
        "properties": {
          "action": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.CreateRoleReply": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/iam.v1.Role"
          }
        },
        "type": "object"
      },
      "iam.v1.CreateRoleRequest": {
        "properties": {
          "dataScope": {
            "description": "数据范围：0/1=全部数据，2=部门数据，3=仅本人，4=自定义。",
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "menuIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "permissionIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "iam.v1.DeleteMenuReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.DeletePermissionReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.DeleteRoleReply": {
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.GetMenuReply": {
        "properties": {
          "menu": {
            "$ref": "#/components/schemas/iam.v1.Menu"
          }
        },
        "type": "object"
      },
      "iam.v1.GetPermissionReply": {
        "properties": {
          "permission": {
            "$ref": "#/components/schemas/iam.v1.Permission"
          }
        },
        "type": "object"
      },
      "iam.v1.GetRoleReply": {
        "properties": {
          "menuIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.Permission"
            },
            "type": "array"
          },
          "role": {
            "$ref": "#/components/schemas/iam.v1.Role"
          }
        },
        "type": "object"
      },
      "iam.v1.GetUserPermissionsReply": {
        "properties": {
          "permissionCodes": {
            "description": "聚合后的权限码列表，已去重排序。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "roleCodes": {
            "description": "用户有效角色码列表，已去重排序。",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.ListMenusReply": {
        "properties": {
          "menus": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.Menu"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.ListPermissionsReply": {
        "properties": {
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.Permission"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.ListRoleDataScopesReply": {
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.RoleDataScope"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.ListRolesReply": {
        "properties": {
          "roles": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.Role"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.ListUserRolesReply": {
        "properties": {
          "bindings": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.UserRoleBinding"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.Menu": {
        "properties": {
          "children": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.Menu"
            },
            "type": "array"
          },
          "code": {
            "description": "菜单唯一编码。",
            "type": "string"
          },
          "component": {
            "description": "前端组件路径。",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "external": {
            "description": "是否外链。",
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isBuiltin": {
            "description": "内置菜单。内置菜单禁止删除。",
            "type": "boolean"
          },
          "keepAlive": {
            "description": "是否由前端 keep-alive 缓存。",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "description": "父菜单 ID，0 表示根菜单。",
            "type": "string"
          },
          "path": {
            "description": "前端路由路径。",
            "type": "string"
          },
          "permCode": {
            "description": "关联的权限编码，对应 Permission.code；不为空时必须存在。",
            "type": "string"
          },
          "redirect": {
            "description": "前端路由重定向路径。",
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：1=启用，2=禁用。",
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "菜单类型：1=目录，2=菜单，3=按钮。",
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "visible": {
            "description": "是否在菜单树中可见。创建时不传默认为 true。",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.Permission": {
        "properties": {
          "action": {
            "description": "操作标识，可自定义，如 read/create/update/delete。",
            "type": "string"
          },
          "code": {
            "description": "权限唯一编码，创建后不可修改。",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isBuiltin": {
            "description": "内置权限。内置权限禁止更新和删除。",
            "type": "boolean"
          },
          "module": {
            "description": "模块名称，用于前端分组和筛选，可自定义。",
            "type": "string"
          },
          "moduleCode": {
            "description": "模块英文码（如 permission/settings），由后端按内置模块目录派生，\n 供前端多语言展示用的稳定 key；自定义模块无对应码时为空串。",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "description": "父权限 ID，0 表示顶级权限分组。",
            "type": "string"
          },
          "resource": {
            "description": "资源标识，可自定义。",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.RevokeUserRolesReply": {
        "properties": {
          "revoked": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "iam.v1.Role": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "description": "创建人 user_id；为 0 表示系统/迁移创建（历史数据）。",
            "type": "string"
          },
          "createdByName": {
            "description": "创建人展示名（昵称优先，回退用户名）；空表示系统创建或用户已不存在。",
            "type": "string"
          },
          "dataScope": {
            "description": "数据范围：1=全部数据，2=部门数据，3=仅本人，4=自定义。",
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isBuiltin": {
            "description": "内置角色。内置角色禁止删除，且禁止修改 status。",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：1=启用，2=禁用。",
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "description": "最后修改人 user_id；为 0 表示未修改过或系统修改。",
            "type": "string"
          },
          "updatedByName": {
            "description": "最后修改人展示名；空表示未修改过、系统修改或用户已不存在。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.RoleDataScope": {
        "properties": {
          "id": {
            "type": "string"
          },
          "roleId": {
            "type": "string"
          },
          "scopeType": {
            "description": "自定义范围类型：org=组织/部门，team=团队，self=本人。",
            "type": "string"
          },
          "scopeValue": {
            "description": "org/team 时填写对应 ID 字符串；self 必须为空。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.ScanPermissionsReply": {
        "properties": {
          "created": {
            "description": "本次补插的权限 code 列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "deleted": {
            "description": "本次删除的失效内置权限 code 列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "skippedMenuRefs": {
            "description": "因被菜单 perm_code 引用而跳过删除的权限 code 列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updated": {
            "description": "本次更新元数据的权限 code 列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.ScanPermissionsRequest": {
        "properties": {},
        "type": "object"
      },
      "iam.v1.SetRoleDataScopesReply": {
        "properties": {
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.RoleDataScope"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.SetRoleDataScopesRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "$ref": "#/components/schemas/iam.v1.RoleDataScope"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdateMenuReply": {
        "properties": {
          "menu": {
            "$ref": "#/components/schemas/iam.v1.Menu"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdateMenuRequest": {
        "description": "UpdateMenuRequest 使用 PATCH 语义，未传的 optional 字段保持不变。",
        "properties": {
          "component": {
            "type": "string"
          },
          "external": {
            "type": "boolean"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "keepAlive": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "permCode": {
            "type": "string"
          },
          "redirect": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：1=启用，2=禁用。",
            "format": "int32",
            "type": "integer"
          },
          "type": {
            "description": "菜单类型：1=目录，2=菜单，3=按钮。",
            "format": "int32",
            "type": "integer"
          },
          "visible": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdatePermissionReply": {
        "properties": {
          "permission": {
            "$ref": "#/components/schemas/iam.v1.Permission"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdatePermissionRequest": {
        "description": "UpdatePermissionRequest 使用 PATCH 语义；code/isBuiltin 不允许通过接口修改。",
        "properties": {
          "action": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "module": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdateRoleReply": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/iam.v1.Role"
          }
        },
        "type": "object"
      },
      "iam.v1.UpdateRoleRequest": {
        "description": "UpdateRoleRequest 使用 PATCH 语义，未传的 optional 字段保持不变。",
        "properties": {
          "dataScope": {
            "description": "数据范围：1=全部数据，2=部门数据，3=仅本人，4=自定义。",
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "menuIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "permissionIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "setMenus": {
            "description": "为 true 时用 menuIds 整体替换角色菜单；为 false 时忽略 menuIds。",
            "type": "boolean"
          },
          "setPermissions": {
            "description": "为 true 时用 permissionIds 整体替换角色权限；为 false 时忽略 permissionIds。",
            "type": "boolean"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：1=启用，2=禁用。",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "iam.v1.UserRoleBinding": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantedAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantedBy": {
            "type": "string"
          },
          "roleCode": {
            "type": "string"
          },
          "roleId": {
            "type": "string"
          },
          "roleName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminIdentityAttempt": {
        "description": "AdminIdentityAttempt 是单次实名核身尝试。",
        "properties": {
          "certifyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "documentNoMasked": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "failReason": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "idCardMasked": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "providerResultCode": {
            "type": "string"
          },
          "providerResultMessage": {
            "type": "string"
          },
          "realNameMasked": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "verifiedAt": {
            "format": "date-time",
            "type": "string"
          },
          "verifyMethod": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminIdentityMutationReply": {
        "description": "AdminIdentityMutationReply 管理端实名状态变更结果。",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "verification": {
            "$ref": "#/components/schemas/identity.v1.AdminIdentityVerification"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminIdentityVerification": {
        "description": "AdminIdentityVerification 是管理端可见的实名记录摘要/详情。",
        "properties": {
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/identity.v1.AdminIdentityAttempt"
            },
            "type": "array"
          },
          "certifyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "documentNoMasked": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "failReason": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "idCardMasked": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "providerResultCode": {
            "type": "string"
          },
          "providerResultMessage": {
            "type": "string"
          },
          "realNameMasked": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "verifiedAt": {
            "format": "date-time",
            "type": "string"
          },
          "verifyMethod": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminManualVerifyRequest": {
        "description": "AdminManualVerifyRequest 历史人工认证请求；新请求固定返回停用错误。",
        "properties": {
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminRejectVerificationRequest": {
        "description": "AdminRejectVerificationRequest 管理端驳回处理中实名请求。",
        "properties": {
          "reason": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.AdminRevokeVerificationRequest": {
        "description": "AdminRevokeVerificationRequest 管理端撤销实名请求。",
        "properties": {
          "reason": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.GetUserIdentityVerificationReply": {
        "description": "GetUserIdentityVerificationReply 管理端单用户实名详情。",
        "properties": {
          "verification": {
            "$ref": "#/components/schemas/identity.v1.AdminIdentityVerification"
          }
        },
        "type": "object"
      },
      "identity.v1.GetVerificationReply": {
        "description": "GetVerificationReply 当前实名状态。",
        "properties": {
          "verification": {
            "$ref": "#/components/schemas/identity.v1.IdentityVerification"
          }
        },
        "type": "object"
      },
      "identity.v1.IdentityVerification": {
        "description": "IdentityVerification 是用户侧可见的实名状态，敏感字段仅返回脱敏值。",
        "properties": {
          "certifyId": {
            "description": "支付宝核身/核验审计标识；人脸 processing 或二要素 verified 时可能返回。",
            "type": "string"
          },
          "certifyUrl": {
            "description": "支付宝人脸核身 URL；仅异步 processing 时返回，二要素不返回。",
            "type": "string"
          },
          "documentNoMasked": {
            "type": "string"
          },
          "documentType": {
            "type": "string"
          },
          "expiresAt": {
            "description": "当前核身单据过期时间。",
            "format": "date-time",
            "type": "string"
          },
          "failReason": {
            "description": "最近一次失败原因。",
            "type": "string"
          },
          "idCardMasked": {
            "description": "历史身份证脱敏字段；新客户端使用 documentNoMasked。",
            "type": "string"
          },
          "realNameMasked": {
            "description": "脱敏姓名。",
            "type": "string"
          },
          "remainingAttemptsToday": {
            "description": "当前认证方式剩余提交次数；窗口由服务端策略决定。",
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：unverified / processing / verified。",
            "type": "string"
          },
          "verifiedAt": {
            "description": "认证通过时间。",
            "format": "date-time",
            "type": "string"
          },
          "verifyMethod": {
            "description": "本次认证方式。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "identity.v1.ListAdminIdentityVerificationsReply": {
        "description": "ListAdminIdentityVerificationsReply 管理端实名记录列表。",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/identity.v1.AdminIdentityVerification"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "identity.v1.SubmitVerificationReply": {
        "description": "SubmitVerificationReply 实名提交结果。",
        "properties": {
          "verification": {
            "$ref": "#/components/schemas/identity.v1.IdentityVerification"
          }
        },
        "type": "object"
      },
      "identity.v1.SubmitVerificationRequest": {
        "description": "SubmitVerificationRequest 用户自助实名认证提交参数。",
        "properties": {
          "agreementAccepted": {
            "description": "是否已单独同意实名认证服务协议与个人信息处理授权。",
            "type": "boolean"
          },
          "agreementVersion": {
            "description": "协议版本，留空时服务端使用当前默认版本。",
            "type": "string"
          },
          "documentNo": {
            "description": "证件号码；新客户端应使用此字段，idCardNo 仅保留旧客户端兼容。",
            "type": "string"
          },
          "documentType": {
            "description": "证件类型；当前支持 IDENTITY_CARD / RESIDENCE_HK_MC / RESIDENCE_TAIWAN。",
            "type": "string"
          },
          "idCardNo": {
            "description": "旧客户端身份证号字段；仅在 documentType=IDENTITY_CARD 时兼容读取。",
            "type": "string"
          },
          "realName": {
            "description": "与所选证件一致的真实姓名，2-30 个字符。",
            "type": "string"
          },
          "returnUrl": {
            "description": "认证完成后的前端回跳地址；服务端只允许配置基准 URL 的同源地址。",
            "type": "string"
          },
          "verifyMethod": {
            "description": "支付宝核身方式：alipay_certify_qr / alipay_id_two_meta；留空使用默认方式。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.ApplyInvoiceRequest": {
        "description": "ApplyInvoiceRequest 申请开票（1-3-1）。\n title_id\u003e0 时以模板带出并可用下方快照字段临时覆盖；title_id=0 则纯快照。",
        "properties": {
          "address": {
            "type": "string"
          },
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "mailingAddress": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "receiverEmail": {
            "description": "----- 交付：电子填 receiver_email；纸质填 receiver_name/phone/mailing_address -----",
            "type": "string"
          },
          "receiverName": {
            "type": "string"
          },
          "receiverPhone": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "taxNo": {
            "description": "tax_no 个人抬头可选中国大陆居民身份证号；企业抬头必填税号/统一社会信用代码",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleId": {
            "description": "title_id 抬头模板 id（0=不引用模板，用下方快照字段）",
            "type": "string"
          },
          "titleType": {
            "description": "----- 抬头快照（可覆盖模板） -----",
            "type": "string"
          },
          "topupOrderIds": {
            "description": "topup_order_ids 要合并开票的充值订单 id 集合（同币种、均 paid+非兑换码来源+可开票）",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": {
            "description": "type 票种：electronic_general | electronic_special | paper_special",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.CancelInvoiceRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.CreateTitleRequest": {
        "properties": {
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "regAddress": {
            "type": "string"
          },
          "regPhone": {
            "type": "string"
          },
          "setDefault": {
            "description": "set_default 创建即设为默认",
            "type": "boolean"
          },
          "taxNo": {
            "description": "tax_no 个人抬头可选中国大陆居民身份证号；企业抬头必填税号/统一社会信用代码",
            "type": "string"
          },
          "titleType": {
            "description": "title_type personal | company",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.Empty": {
        "properties": {},
        "type": "object"
      },
      "invoice.v1.GetInvoiceDownloadURLReply": {
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "url 15 分钟有效的 presigned 下载地址",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.Invoice": {
        "description": "Invoice 发票申请单（C 端视图，抬头/金额为申请时快照）。",
        "properties": {
          "address": {
            "description": "address 注册地址（快照）",
            "type": "string"
          },
          "amountMicros": {
            "description": "amount_micros 票面金额（micros）",
            "type": "string"
          },
          "appliedAt": {
            "description": "----- 时间 -----",
            "format": "date-time",
            "type": "string"
          },
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "cancelledAt": {
            "format": "date-time",
            "type": "string"
          },
          "courierCompany": {
            "type": "string"
          },
          "courierNo": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "fileFormat": {
            "description": "file_format 版式文件格式：pdf | ofd（下载走 GetInvoiceDownloadURL，不直传 key）",
            "type": "string"
          },
          "hasRedFile": {
            "description": "has_red_file 红冲后是否存在可供用户下载的红字版式件。",
            "type": "boolean"
          },
          "hasXml": {
            "description": "has_xml 是否存在数电票 XML 数据文件（决定详情页是否并列 XML 下载入口，§六）",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "invoiceNo": {
            "description": "----- 开具/文件 -----\n invoice_no 发票号码（issued 后有值）",
            "type": "string"
          },
          "issuedAt": {
            "format": "date-time",
            "type": "string"
          },
          "mailingAddress": {
            "type": "string"
          },
          "phone": {
            "description": "phone 注册电话（快照）",
            "type": "string"
          },
          "receiverEmail": {
            "description": "----- 交付 -----",
            "type": "string"
          },
          "receiverName": {
            "type": "string"
          },
          "receiverPhone": {
            "type": "string"
          },
          "redFileFormat": {
            "description": "red_file_format 红字版式格式：pdf | ofd。",
            "type": "string"
          },
          "redInvoiceNo": {
            "description": "red_invoice_no 红字发票号码（reversed 时有值）",
            "type": "string"
          },
          "reissueOf": {
            "description": "reissue_of 换开来源原票 id（0=非换开票）",
            "type": "string"
          },
          "rejectReason": {
            "description": "----- 审计/换开 -----\n reject_reason 驳回原因（rejected 时有值）",
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "reversalReason": {
            "description": "reversal_reason 红冲原因（reversed 时有值）",
            "type": "string"
          },
          "reversedAt": {
            "format": "date-time",
            "type": "string"
          },
          "reviewedAt": {
            "format": "date-time",
            "type": "string"
          },
          "sourceType": {
            "description": "source_type 来源：topup=充值 period=周期",
            "type": "string"
          },
          "status": {
            "description": "status 状态：pending/approved/issuing/issued/rejected/cancelled/reversing/reversed",
            "type": "string"
          },
          "taxNo": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleType": {
            "description": "----- 抬头快照 -----",
            "type": "string"
          },
          "type": {
            "description": "type 票种：electronic_general | electronic_special | paper_special",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.InvoiceOrderLine": {
        "description": "InvoiceOrderLine 发票关联的充值订单明细（trade_no 供用户核对充值流水）。\n 与 admin.invoice.v1.InvoiceOrderLine 同构，但 paid_at 用 Timestamp 对齐 console 侧时间口径。",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 订单金额（micros）",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "orderId": {
            "description": "order_id 充值订单 id",
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "tradeNo": {
            "description": "trade_no 交易流水号",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.InvoiceReply": {
        "properties": {
          "invoice": {
            "$ref": "#/components/schemas/invoice.v1.Invoice"
          },
          "orders": {
            "description": "orders 本票关联的充值订单明细（供用户核对开的是哪几笔充值）。\n 仅 GetInvoice 详情填充；ApplyInvoice/CancelInvoice/RequestReissue 等写操作回执为空。",
            "items": {
              "$ref": "#/components/schemas/invoice.v1.InvoiceOrderLine"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "invoice.v1.InvoiceTitle": {
        "description": "InvoiceTitle 发票抬头（用户模板）。user_id 不回传（归属由 JWT 保证）。",
        "properties": {
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isDefault": {
            "description": "is_default 是否默认抬头",
            "type": "boolean"
          },
          "name": {
            "description": "name 抬头名称（个人姓名 / 企业名称）",
            "type": "string"
          },
          "regAddress": {
            "description": "reg_address 注册地址（专票必填）",
            "type": "string"
          },
          "regPhone": {
            "description": "reg_phone 注册电话（专票必填）",
            "type": "string"
          },
          "taxNo": {
            "description": "tax_no 个人抬头可选中国大陆居民身份证号；企业抬头必填税号/统一社会信用代码",
            "type": "string"
          },
          "titleType": {
            "description": "title_type 抬头类型：personal=个人 company=企业",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.InvoiceableOrder": {
        "description": "InvoiceableOrder 可开票的充值订单（paid + 非兑换码来源 + 无有效 link + 窗口内）。",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 订单金额（micros，1 元 = 1,000,000 micros）",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "tradeNo": {
            "description": "trade_no 交易流水号",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.InvoiceableOrderGroup": {
        "description": "InvoiceableOrderGroup 按币种分组（同一张票只能同币种订单）。",
        "properties": {
          "currency": {
            "type": "string"
          },
          "orders": {
            "items": {
              "$ref": "#/components/schemas/invoice.v1.InvoiceableOrder"
            },
            "type": "array"
          },
          "totalAmountMicros": {
            "description": "total_amount_micros 组内订单金额合计（micros）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.ListInvoiceableOrdersReply": {
        "properties": {
          "groups": {
            "description": "groups 按币种分组的可开票订单",
            "items": {
              "$ref": "#/components/schemas/invoice.v1.InvoiceableOrderGroup"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "invoice.v1.ListMyInvoicesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/invoice.v1.Invoice"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.ListTitlesReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/invoice.v1.InvoiceTitle"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "invoice.v1.RequestReissueRequest": {
        "description": "RequestReissueRequest 换开（原票订单集合继承，仅传新抬头/票种/交付）。",
        "properties": {
          "address": {
            "type": "string"
          },
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "id": {
            "description": "id 原票 id（issued）",
            "type": "string"
          },
          "mailingAddress": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "reason": {
            "description": "reason 换开原因（必填）；仅用于换开审计，不替代普通申请备注。",
            "type": "string"
          },
          "receiverEmail": {
            "type": "string"
          },
          "receiverName": {
            "type": "string"
          },
          "receiverPhone": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "taxNo": {
            "description": "tax_no 个人抬头可选中国大陆居民身份证号；企业抬头必填税号/统一社会信用代码",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "titleId": {
            "description": "title_id 新抬头模板 id（0=用快照）",
            "type": "string"
          },
          "titleType": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.SetDefaultTitleRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "invoice.v1.TitleReply": {
        "properties": {
          "title": {
            "$ref": "#/components/schemas/invoice.v1.InvoiceTitle"
          }
        },
        "type": "object"
      },
      "invoice.v1.UpdateTitleRequest": {
        "properties": {
          "bankAccount": {
            "type": "string"
          },
          "bankName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "regAddress": {
            "type": "string"
          },
          "regPhone": {
            "type": "string"
          },
          "setDefault": {
            "type": "boolean"
          },
          "taxNo": {
            "description": "tax_no 个人抬头可选中国大陆居民身份证号；企业抬头必填税号/统一社会信用代码",
            "type": "string"
          },
          "titleType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.AddFavoriteReply": {
        "description": "AddFavoriteReply 新增收藏响应。/ AddFavoriteReply is the add-favorite reply.",
        "properties": {
          "favoriteAt": {
            "format": "date-time",
            "type": "string"
          },
          "favoriteCount": {
            "format": "int32",
            "type": "integer"
          },
          "favorited": {
            "type": "boolean"
          },
          "modelId": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.AddFavoriteRequest": {
        "description": "AddFavoriteRequest 新增收藏请求。/ AddFavoriteRequest adds a favorite.",
        "properties": {
          "modelId": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.AddRecentUseReply": {
        "description": "AddRecentUseReply 新增/更新使用记录响应。/ AddRecentUseReply is the upsert reply.",
        "properties": {
          "lastUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "modelId": {
            "format": "int32",
            "type": "integer"
          },
          "recentUsed": {
            "type": "boolean"
          },
          "useCount": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.AddRecentUseRequest": {
        "description": "AddRecentUseRequest 已废弃，仅为旧客户端保留协议兼容。\n AddRecentUseRequest is deprecated and retained only for wire compatibility.",
        "properties": {
          "modelId": {
            "format": "int32",
            "type": "integer"
          },
          "scene": {
            "description": "使用场景（可选），例如 API_CALL_SUCCESS。/ optional usage scene, e.g. API_CALL_SUCCESS.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.Banner": {
        "description": "Banner 推介图配置。/ Banner is a promotion image configuration.",
        "properties": {
          "bannerCode": {
            "type": "string"
          },
          "bannerId": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creator": {
            "type": "string"
          },
          "creatorName": {
            "description": "创建人展示名；无法解析时回退 creator。",
            "type": "string"
          },
          "description": {
            "description": "推送描述，最长 500 个字符。",
            "type": "string"
          },
          "i18nImages": {
            "description": "中英双语图片全量。/ Full set of zh + en images.",
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.I18nImage"
            },
            "type": "array"
          },
          "imageUrl": {
            "type": "string"
          },
          "jumpUrl": {
            "type": "string"
          },
          "langCode": {
            "description": "按请求 lang 解析出的当前语言图片信息（列表接口填充；创建/编辑响应可为空）。\n Resolved current-language image by request lang (filled by list; may be empty on create/update).",
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "推荐状态：PENDING(待发布) / PUBLISHED(已发布) / OFFLINE(已下架)。\n Status: PENDING / PUBLISHED / OFFLINE.",
            "type": "string"
          },
          "thumbnailUrl": {
            "type": "string"
          },
          "title": {
            "description": "推送标题，最长 100 个字符。",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updater": {
            "type": "string"
          },
          "updaterName": {
            "description": "修改人展示名；无法解析时回退 updater。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.BannerSettings": {
        "description": "BannerSettings Banner 全局展示配置。",
        "properties": {
          "carouselIntervalSeconds": {
            "description": "每张 Banner 停留秒数，允许 1-60 秒。",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ConsoleBanner": {
        "description": "ConsoleBanner 前台 Banner（仅展示字段，不含后台编辑字段）。\n ConsoleBanner is the console-side banner (display fields only).",
        "properties": {
          "bannerCode": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "jumpUrl": {
            "type": "string"
          },
          "langCode": {
            "type": "string"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "thumbnailUrl": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ConsoleEntrySlot": {
        "description": "ConsoleEntrySlot 前台固定入口位（仅展示字段）。\n ConsoleEntrySlot is the console-side fixed entry slot (display fields only).",
        "properties": {
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          },
          "jumpUrl": {
            "type": "string"
          },
          "slotName": {
            "type": "string"
          },
          "slotNo": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "titleEn": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ConsoleVisualizationMetricItem": {
        "description": "ConsoleVisualizationMetricItem 前台可视化数据项，metricCode 供前端匹配本地化文案。",
        "properties": {
          "displayValue": {
            "type": "string"
          },
          "metricCode": {
            "type": "string"
          },
          "metricName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.CreateBannerRequest": {
        "description": "CreateBannerRequest 新增 Banner 请求。/ CreateBannerRequest creates a banner.",
        "properties": {
          "description": {
            "description": "推送描述，必填，最长 500 个字符。",
            "type": "string"
          },
          "i18nImages": {
            "description": "中英文图片列表，必须同时包含 zh 和 en 两条。\n zh + en image list; both languages are required.",
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.I18nImage"
            },
            "type": "array"
          },
          "jumpUrl": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "description": "推送标题，必填，最长 100 个字符。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.DeleteBannerReply": {
        "description": "DeleteBannerReply 删除 Banner 响应。/ DeleteBannerReply is the delete reply.",
        "properties": {
          "bannerId": {
            "format": "int32",
            "type": "integer"
          },
          "deleted": {
            "type": "boolean"
          },
          "deletedAt": {
            "format": "date-time",
            "type": "string"
          },
          "deletedBy": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.EntrySlot": {
        "description": "EntrySlot 后台固定入口位配置（完整字段）。\n EntrySlot is the admin-side fixed entry-slot config (full fields).",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creator": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionEn": {
            "type": "string"
          },
          "iconUrl": {
            "type": "string"
          },
          "id": {
            "format": "int32",
            "type": "integer"
          },
          "jumpUrl": {
            "type": "string"
          },
          "slotName": {
            "type": "string"
          },
          "slotNo": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "状态：1 启用，0 禁用。/ Status: 1 enabled, 0 disabled.",
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "titleEn": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updater": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.FavoriteItem": {
        "description": "FavoriteItem 收藏列表项（含 model_id 关联装配的展示信息）。\n FavoriteItem is a favorite list item (with model-joined display info).",
        "properties": {
          "callCountDisplay": {
            "type": "string"
          },
          "contextDisplay": {
            "type": "string"
          },
          "favoriteAt": {
            "format": "date-time",
            "type": "string"
          },
          "favoriteId": {
            "format": "int32",
            "type": "integer"
          },
          "favorited": {
            "type": "boolean"
          },
          "iconUrl": {
            "type": "string"
          },
          "inputPriceDisplay": {
            "type": "string"
          },
          "jumpUrl": {
            "type": "string"
          },
          "logoText": {
            "type": "string"
          },
          "modelId": {
            "format": "int32",
            "type": "integer"
          },
          "modelName": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.GetModelParamSchemaReply": {
        "description": "GetModelParamSchemaReply 模型调用参数 schema 响应；schemas 为空表示该模型未绑定任何模板。\n GetModelParamSchemaReply carries all resolved schemas; empty means the model has no bound template.",
        "properties": {
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "schemas": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.ModelParamSchemaItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.I18nImage": {
        "description": "I18nImage Banner 单语言图片（中/英），既用于返回也用于创建/编辑入参。\n I18nImage is a per-language banner image, used in both responses and requests.",
        "properties": {
          "imageUrl": {
            "description": "当前语言 Banner 大图地址。/ Full-size banner image URL for this language.",
            "type": "string"
          },
          "langCode": {
            "description": "语言编码：仅允许 zh / en。/ Language code: only zh or en.",
            "type": "string"
          },
          "thumbnailUrl": {
            "description": "当前语言 Banner 缩略图地址（可选）。/ Thumbnail URL for this language (optional).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListBannersReply": {
        "description": "ListBannersReply Banner 列表响应。/ ListBannersReply is the banner list reply.",
        "properties": {
          "carouselIntervalSeconds": {
            "description": "每张 Banner 停留秒数。",
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.Banner"
            },
            "type": "array"
          },
          "page": {
            "format": "int32",
            "type": "integer"
          },
          "pageSize": {
            "format": "int32",
            "type": "integer"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListConsoleBannersReply": {
        "description": "ListConsoleBannersReply 前台 Banner 列表响应。\n ListConsoleBannersReply is the console banner list reply.",
        "properties": {
          "carouselIntervalSeconds": {
            "description": "每张 Banner 停留秒数。",
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.ConsoleBanner"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListConsoleEntrySlotsReply": {
        "description": "ListConsoleEntrySlotsReply 前台固定入口位列表响应。/ Console entry-slot list reply.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.ConsoleEntrySlot"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListConsoleVisualizationMetricsReply": {
        "description": "ListConsoleVisualizationMetricsReply 前台可视化数据响应。\n ListConsoleVisualizationMetricsReply is the console visualization metrics reply.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.ConsoleVisualizationMetricItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListEntrySlotsReply": {
        "description": "ListEntrySlotsReply 后台固定入口位列表响应。/ Admin entry-slot list reply.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.EntrySlot"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListFavoritesReply": {
        "description": "ListFavoritesReply 我的收藏列表响应。/ ListFavoritesReply is the favorites list reply.",
        "properties": {
          "favoriteCount": {
            "description": "当前用户全部未取消收藏数量（不受 limit 影响）。/ Total active favorites (not affected by limit).",
            "format": "int32",
            "type": "integer"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.FavoriteItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListRecentUsesReply": {
        "description": "ListRecentUsesReply 最近使用列表响应。/ ListRecentUsesReply is the recent-use list reply.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.RecentUseItem"
            },
            "type": "array"
          },
          "recentUseCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ListVisualizationMetricsReply": {
        "description": "ListVisualizationMetricsReply 可视化配置列表响应（固定 4 条，不分页）。\n ListVisualizationMetricsReply is the metric list reply (fixed 4, no pagination).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.VisualizationMetric"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.ModelParamSchemaItem": {
        "description": "ModelParamSchemaItem 单个模板的已解析参数 schema（catalog ⊕ overlay ⊕ profile 合并结果）。\n ModelParamSchemaItem is one template's resolved param schema.",
        "properties": {
          "endpointType": {
            "type": "string"
          },
          "fields": {
            "description": "fields FieldSpec 数组 JSON；groups GroupSpec 数组 JSON（结构定义见 web/packages/types/src/param-schema.ts）。",
            "type": "string"
          },
          "groups": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "requestPath": {
            "type": "string"
          },
          "templateCode": {
            "type": "string"
          },
          "templateName": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.RecentUseItem": {
        "description": "RecentUseItem 最近使用列表项（含 model_id 关联装配的展示信息）。\n RecentUseItem is a recent-use list item (with model-joined display info).",
        "properties": {
          "callCountDisplay": {
            "type": "string"
          },
          "favorited": {
            "type": "boolean"
          },
          "iconUrl": {
            "type": "string"
          },
          "jumpUrl": {
            "type": "string"
          },
          "lastUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "logoText": {
            "type": "string"
          },
          "modelId": {
            "format": "int32",
            "type": "integer"
          },
          "modelName": {
            "type": "string"
          },
          "providerName": {
            "type": "string"
          },
          "recentUseId": {
            "format": "int32",
            "type": "integer"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "tagsZh": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "useCount": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.RemoveFavoriteReply": {
        "description": "RemoveFavoriteReply 取消收藏响应。/ RemoveFavoriteReply is the remove-favorite reply.",
        "properties": {
          "cancelled": {
            "type": "boolean"
          },
          "cancelledAt": {
            "format": "date-time",
            "type": "string"
          },
          "favoriteCount": {
            "format": "int32",
            "type": "integer"
          },
          "favorited": {
            "type": "boolean"
          },
          "modelId": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.SaveVisualizationMetricItem": {
        "description": "SaveVisualizationMetricItem 保存可视化配置的单条入参。\n SaveVisualizationMetricItem is one metric save input.",
        "properties": {
          "dataSource": {
            "type": "string"
          },
          "metricCode": {
            "type": "string"
          },
          "virtualValue": {
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.SaveVisualizationMetricsRequest": {
        "description": "SaveVisualizationMetricsRequest 保存可视化配置请求。\n SaveVisualizationMetricsRequest saves metric config.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.SaveVisualizationMetricItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateBannerRequest": {
        "description": "UpdateBannerRequest 编辑 Banner 请求。/ UpdateBannerRequest edits a banner.",
        "properties": {
          "bannerId": {
            "format": "int32",
            "type": "integer"
          },
          "description": {
            "description": "推送描述，必填，最长 500 个字符。",
            "type": "string"
          },
          "i18nImages": {
            "description": "中英文图片列表，必须同时包含 zh 和 en 两条。\n zh + en image list; both languages are required.",
            "items": {
              "$ref": "#/components/schemas/modelsquare.v1.I18nImage"
            },
            "type": "array"
          },
          "jumpUrl": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "description": "推送标题，必填，最长 100 个字符。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateBannerSettingsRequest": {
        "description": "UpdateBannerSettingsRequest 保存 Banner 全局展示配置。",
        "properties": {
          "carouselIntervalSeconds": {
            "description": "每张 Banner 停留秒数，允许 1-60 秒。",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateBannerStatusReply": {
        "description": "UpdateBannerStatusReply 上下架响应。/ UpdateBannerStatusReply is the status reply.",
        "properties": {
          "bannerId": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updater": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateBannerStatusRequest": {
        "description": "UpdateBannerStatusRequest 上下架请求。/ UpdateBannerStatusRequest toggles status.",
        "properties": {
          "bannerId": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "目标状态：仅允许 PUBLISHED 或 OFFLINE。/ Target status: only PUBLISHED or OFFLINE.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateEntrySlotReply": {
        "description": "UpdateEntrySlotReply 修改固定入口位配置响应。\n UpdateEntrySlotReply is the response for updating an entry slot.",
        "properties": {
          "entrySlot": {
            "$ref": "#/components/schemas/modelsquare.v1.EntrySlot"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.UpdateEntrySlotRequest": {
        "description": "UpdateEntrySlotRequest 修改固定入口位配置请求。\n UpdateEntrySlotRequest updates a fixed entry-slot config.",
        "properties": {
          "description": {
            "description": "description 辅助说明（中文）。/ description: auxiliary description (Chinese).",
            "type": "string"
          },
          "descriptionEn": {
            "description": "description_en 辅助说明（英文）。/ description_en: auxiliary description (English).",
            "type": "string"
          },
          "iconUrl": {
            "description": "icon_url 图标地址，支持 SVG/PNG。/ icon_url: icon URL, supports SVG/PNG.",
            "type": "string"
          },
          "jumpUrl": {
            "description": "jump_url 跳转 URL。/ jump_url: click-through URL.",
            "type": "string"
          },
          "slotNo": {
            "description": "slot_no 固定入口编号，只允许 1/2/3。/ slot_no: fixed entry number, must be 1/2/3.",
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "description": "status 状态：1 启用，0 禁用。/ status: 1 enabled, 0 disabled.",
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "description": "title 主标题（中文）。/ title: main title (Chinese).",
            "type": "string"
          },
          "titleEn": {
            "description": "title_en 主标题（英文）。/ title_en: main title (English).",
            "type": "string"
          }
        },
        "type": "object"
      },
      "modelsquare.v1.VisualizationMetric": {
        "description": "VisualizationMetric 可视化数据指标（含实时计算的真实值与展示值）。\n VisualizationMetric is a visualization metric (with live-computed real \u0026 display values).",
        "properties": {
          "dataSource": {
            "description": "数据来源：MIXED / REAL_ONLY / VIRTUAL_ONLY。/ data source enum.",
            "type": "string"
          },
          "displayValue": {
            "description": "展示值（不含单位，后端按 dataSource 计算并做 M/K 缩写）。\n Display value (no unit; computed by dataSource with M/K abbreviation).",
            "type": "string"
          },
          "metricCode": {
            "type": "string"
          },
          "metricName": {
            "type": "string"
          },
          "realValue": {
            "description": "后端实时统计的真实值（AVG_RESPONSE_5MIN / CALL_SUCCESS_RATE 恒为 0；optional 保证 0 值也输出）。\n Live real statistic (0 for AVG_RESPONSE_5MIN / CALL_SUCCESS_RATE; optional so 0 is still emitted).",
            "format": "double",
            "type": "number"
          },
          "sort": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "virtualValue": {
            "description": "虚拟数据值（optional 保证 0 值也输出）。/ virtual value (optional so 0 is still emitted).",
            "format": "double",
            "type": "number"
          }
        },
        "type": "object"
      },
      "payment.v1.CreateTopupReply": {
        "properties": {
          "order": {
            "$ref": "#/components/schemas/payment.v1.TopupOrderInfo"
          },
          "payMode": {
            "description": "pay_mode 支付交互方式：redirect=跳转 pay_url（支付宝网页/Stripe Checkout）\n qrcode=pay_url 是二维码内容（微信 Native 的 weixin://wxpay/...），前端渲染二维码扫码支付。",
            "type": "string"
          },
          "payUrl": {
            "description": "pay_url 支付载荷：pay_mode=redirect 时前端跳转；pay_mode=qrcode 时前端渲染二维码。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.CreateTopupRequest": {
        "description": "CreateTopup",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 法币进路径：用户应付法币 micros（\u003e0），按 internal_credit_rates 基础单价换算积分。与 credits/package_id 互斥。",
            "type": "string"
          },
          "credits": {
            "description": "credits 自定义路径：用户想要的积分数（\u003e0）。与 amount_micros/package_id 互斥。",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "packageId": {
            "description": "package_id 套餐路径：选定的充值套餐 id（\u003e0）。与 amount_micros/credits 互斥。",
            "type": "string"
          },
          "provider": {
            "description": "provider 支付渠道：alipay/wechat/stripe",
            "type": "string"
          },
          "returnUrl": {
            "description": "return_url 用户支付完成/取消后浏览器回跳的前端页面地址（绝对 URL）。\n Stripe Checkout 强制要求 success_url：前端应传本字段；为空时后端按 public_base_url 兜底。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.HandleCallbackReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "payment.v1.HandleCallbackRequest": {
        "description": "HandleCallback",
        "properties": {
          "payload": {
            "description": "payload 回调原始数据（JSON 字符串）",
            "type": "string"
          },
          "provider": {
            "description": "provider 支付渠道：alipay/wechat/stripe",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.ListTopupOrdersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/payment.v1.TopupOrderInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.PreviewTopupReply": {
        "description": "PreviewTopupReply 报价结果，供前端展示「应付 / 到账 / 赠送」。",
        "properties": {
          "appliedMultiplierBps": {
            "description": "applied_multiplier_bps 实际应用倍率（10000=1.0x）",
            "format": "int32",
            "type": "integer"
          },
          "baseCreditedMicros": {
            "description": "base_credited_micros 未加成基础入账积分（微单位，倍率/赠送前）；赠送额 = credited_micros - base_credited_micros",
            "type": "string"
          },
          "bonusCreditsApplied": {
            "description": "bonus_credits_applied 命中规则的赠送积分（整数积分 CRD，非 micros），未命中为 0",
            "type": "string"
          },
          "creditedMicros": {
            "description": "credited_micros 实际到账积分（微单位，已含倍率与赠送，前端到账展示的权威值）",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "internalCredits": {
            "description": "internal_credits 实际到账内置积分（floor(credited_micros/1e6)，展示用）",
            "type": "string"
          },
          "matchedRuleId": {
            "description": "matched_rule_id 命中的阶梯规则 id（0=未命中）",
            "type": "string"
          },
          "payAmountMicros": {
            "description": "pay_amount_micros 用户应付法币（微单位，1 元 = 1,000,000 micros）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.PreviewTopupRequest": {
        "description": "PreviewTopup 充值预览：与 CreateTopupRequest 同构但不需要 provider（不实际下单）。",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 法币进路径：用户应付法币 micros（\u003e0）。与 credits/package_id 互斥。",
            "type": "string"
          },
          "credits": {
            "description": "credits 自定义路径：用户想要的积分数（\u003e0）。与 amount_micros/package_id 互斥。",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "packageId": {
            "description": "package_id 套餐路径：选定的充值套餐 id（\u003e0）。与 amount_micros/credits 互斥。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.RequestRefundReply": {
        "properties": {
          "status": {
            "description": "status 退款状态：processing=处理中 success=成功 failed=失败",
            "type": "string"
          },
          "tradeNo": {
            "description": "trade_no 交易流水号",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.RequestRefundRequest": {
        "description": "RequestRefund",
        "properties": {
          "reason": {
            "type": "string"
          },
          "tradeNo": {
            "description": "trade_no 交易流水号",
            "type": "string"
          }
        },
        "type": "object"
      },
      "payment.v1.TopupOrderInfo": {
        "description": "TopupOrderInfo 充值订单信息",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 充值金额（微单位，1 元 = 1,000,000 micros）",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creditedMicros": {
            "description": "credited_micros 实际到账金额（微单位，扣除手续费后）",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "internalCredits": {
            "description": "internal_credits 实际入账的内置积分（floor(credited_micros/1e6)，展示用）",
            "type": "string"
          },
          "invoiceId": {
            "description": "invoice_id 关联发票 id（有效票或最新已红冲票；0=无关联票；是否可申请以 invoice_status 为准）",
            "type": "string"
          },
          "invoiceStatus": {
            "description": "invoice_status 该订单开票状态：none=可开票/未开 not_invoiceable=不可开票\n pending=申请中 approved=已审核 issued=已开具 reversed=已红冲\n （有效/最新红冲发票投影优先；无发票时由订单状态与支付来源决定；1-3-4 购买历史列）。",
            "type": "string"
          },
          "paidAt": {
            "format": "date-time",
            "type": "string"
          },
          "payMode": {
            "description": "pay_mode 支付交互方式：redirect=跳转 pay_url qrcode=将 pay_url 渲染为二维码扫码支付。\n 仅创建订单时有值；历史订单查询为空。",
            "type": "string"
          },
          "payUrl": {
            "description": "pay_url 支付载荷：pay_mode=redirect 时为可跳转 URL；pay_mode=qrcode 时为二维码内容\n （如微信 Native 的 weixin://wxpay/...），前端需渲染成二维码供用户扫码，不能跳转。",
            "type": "string"
          },
          "provider": {
            "description": "provider 订单来源：alipay/wechat/stripe；历史记录还可能为 redeem_code（不可退款、不可开票）",
            "type": "string"
          },
          "status": {
            "description": "status 订单状态：pending=待支付 paid=已支付 failed=失败 closed=已关闭 refunding=退款中 refunded=已退款",
            "type": "string"
          },
          "tradeNo": {
            "description": "trade_no 交易流水号（业务侧生成，唯一）",
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.Category": {
        "description": "Category 分类",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "playground.v1.CreateMediaAssetReply": {
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/playground.v1.MediaAsset"
          }
        },
        "type": "object"
      },
      "playground.v1.CreateMediaAssetRequest": {
        "description": "CreateMediaAsset",
        "properties": {
          "assetType": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "negativePrompt": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.CreateSessionReply": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/playground.v1.Session"
          }
        },
        "type": "object"
      },
      "playground.v1.CreateSessionRequest": {
        "description": "CreateSession",
        "properties": {
          "categoryId": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.DeleteMediaAssetReply": {
        "properties": {},
        "type": "object"
      },
      "playground.v1.DeleteMessageReply": {
        "properties": {},
        "type": "object"
      },
      "playground.v1.DeleteSessionReply": {
        "properties": {},
        "type": "object"
      },
      "playground.v1.GenerateDownloadURLReply": {
        "properties": {
          "downloadUrl": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.GenerateImageReply": {
        "properties": {
          "assetId": {
            "type": "string"
          },
          "created": {
            "type": "string"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/playground.v1.GeneratedImage"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "playground.v1.GenerateImageRequest": {
        "description": "GenerateImage",
        "properties": {
          "apiKeyId": {
            "description": "计费身份：用户自己的 API key（按 id 选、无明文），同 playground chat 先例。\n proto 层 optional 以兼容旧客户端，service 层强制必填（缺失 → 400）。",
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "n": {
            "format": "int32",
            "type": "integer"
          },
          "prompt": {
            "type": "string"
          },
          "quality": {
            "type": "string"
          },
          "responseFormat": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "style": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.GenerateUploadURLReply": {
        "properties": {
          "assetId": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "uploadUrl": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.GenerateUploadURLRequest": {
        "description": "GenerateUploadURL",
        "properties": {
          "assetType": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "fileSize": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.GeneratedImage": {
        "properties": {
          "b64Json": {
            "type": "string"
          },
          "revisedPrompt": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.GetCategoryReply": {
        "properties": {
          "category": {
            "$ref": "#/components/schemas/playground.v1.Category"
          }
        },
        "type": "object"
      },
      "playground.v1.GetMediaAssetReply": {
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/playground.v1.MediaAsset"
          }
        },
        "type": "object"
      },
      "playground.v1.GetMessageReply": {
        "properties": {
          "message": {
            "$ref": "#/components/schemas/playground.v1.Message"
          }
        },
        "type": "object"
      },
      "playground.v1.GetSessionReply": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/playground.v1.Session"
          }
        },
        "type": "object"
      },
      "playground.v1.ListCategoriesReply": {
        "properties": {
          "categories": {
            "items": {
              "$ref": "#/components/schemas/playground.v1.Category"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "playground.v1.ListMediaAssetsReply": {
        "properties": {
          "assets": {
            "items": {
              "$ref": "#/components/schemas/playground.v1.MediaAsset"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.ListMessagesReply": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/playground.v1.Message"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "playground.v1.ListSessionsReply": {
        "properties": {
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/playground.v1.Session"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.MediaAsset": {
        "description": "MediaAsset 媒体资产",
        "properties": {
          "assetType": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "completedAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "durationMs": {
            "format": "int32",
            "type": "integer"
          },
          "failReason": {
            "type": "string"
          },
          "height": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "internalCostMicros": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "negativePrompt": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "resultUrl": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "thumbnailUrl": {
            "type": "string"
          },
          "upstreamTaskId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "width": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "playground.v1.Message": {
        "description": "Message 消息",
        "properties": {
          "attachments": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "contentTokens": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "latencyMs": {
            "format": "int32",
            "type": "integer"
          },
          "modelId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.SendMessageReply": {
        "properties": {
          "message": {
            "$ref": "#/components/schemas/playground.v1.Message"
          }
        },
        "type": "object"
      },
      "playground.v1.SendMessageRequest": {
        "description": "SendMessage",
        "properties": {
          "attachments": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.Session": {
        "description": "Session 会话",
        "properties": {
          "categoryId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "params": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "totalBilledMicros": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.UpdateMediaAssetStatusReply": {
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/playground.v1.MediaAsset"
          }
        },
        "type": "object"
      },
      "playground.v1.UpdateMediaAssetStatusRequest": {
        "description": "UpdateMediaAssetStatus",
        "properties": {
          "assetId": {
            "type": "string"
          },
          "failReason": {
            "type": "string"
          },
          "resultUrl": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "playground.v1.UpdateSessionReply": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/playground.v1.Session"
          }
        },
        "type": "object"
      },
      "playground.v1.UpdateSessionRequest": {
        "description": "UpdateSession",
        "properties": {
          "params": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "systemPrompt": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "pricing.v1.CalculateCostReply": {
        "properties": {
          "costMicros": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "grossMicros": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/pricing.v1.ModelPriceInfo"
          },
          "totalMicros": {
            "type": "string"
          },
          "usedFallback": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "pricing.v1.CalculateCostRequest": {
        "properties": {
          "audioSeconds": {
            "type": "string"
          },
          "cachedTokens": {
            "type": "string"
          },
          "imageCount": {
            "type": "string"
          },
          "inputTokens": {
            "description": "计费维度（未设置的维度为 0，不计费）",
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "outputTokens": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "requestCount": {
            "type": "string"
          },
          "videoSeconds": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "pricing.v1.ConvertCurrencyReply": {
        "properties": {
          "convertedMicros": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "pricing.v1.ConvertCurrencyRequest": {
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "fromCurrency": {
            "type": "string"
          },
          "toCurrency": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "pricing.v1.CurrencyRateInfo": {
        "properties": {
          "baseCurrency": {
            "type": "string"
          },
          "effectiveAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "quoteCurrency": {
            "type": "string"
          },
          "rate": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "pricing.v1.GetExchangeRateReply": {
        "properties": {
          "rate": {
            "$ref": "#/components/schemas/pricing.v1.CurrencyRateInfo"
          }
        },
        "type": "object"
      },
      "pricing.v1.GetModelPriceReply": {
        "properties": {
          "price": {
            "$ref": "#/components/schemas/pricing.v1.ModelPriceInfo"
          },
          "usedFallback": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "pricing.v1.ListModelPricesReply": {
        "properties": {
          "prices": {
            "items": {
              "$ref": "#/components/schemas/pricing.v1.ModelPriceInfo"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "pricing.v1.ModelPriceInfo": {
        "properties": {
          "cachedInputPrice": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "effectiveFrom": {
            "description": "有效期",
            "format": "date-time",
            "type": "string"
          },
          "effectiveTo": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "inputPrice": {
            "description": "价格字段（普通十进制字符串，CRD；token 维度为每 1M tokens）",
            "type": "string"
          },
          "internalCostInput": {
            "description": "内部成本",
            "type": "string"
          },
          "internalCostOutput": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "officialPriceCurrency": {
            "type": "string"
          },
          "officialPriceUsd": {
            "description": "官网原价",
            "type": "string"
          },
          "outputPrice": {
            "type": "string"
          },
          "perAudioSecondPrice": {
            "type": "string"
          },
          "perImagePrice": {
            "type": "string"
          },
          "perRequestPrice": {
            "type": "string"
          },
          "perVideoSecondPrice": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "version": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "providertask.v1.GetTaskReply": {
        "properties": {
          "task": {
            "$ref": "#/components/schemas/providertask.v1.TaskDetail"
          }
        },
        "type": "object"
      },
      "providertask.v1.ListTasksReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/providertask.v1.TaskSummary"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "providertask.v1.PreviewItem": {
        "description": "PreviewItem 单个可预览媒体项。",
        "properties": {
          "kind": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "providertask.v1.ResultRefSummary": {
        "description": "ResultRefSummary result_ref 摘要（D4）。",
        "properties": {
          "contentType": {
            "type": "string"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          },
          "exists": {
            "type": "boolean"
          },
          "size": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "providertask.v1.TaskDetail": {
        "description": "TaskDetail console 详情（安全集）：summary + 上游任务号/请求号/结果摘要/完整时间线。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（提交请求响应头 X-Request-Id 同值）：从 meta.settle_ctx.request_id\n 抽取，与使用日志 client_request_id 同源同值——前端\"请求 ID\"优先展示本字段并可据此\n 反查调用日志。空串=历史任务缺采集，回退展示 request_id。",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "finalizedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "preview": {
            "allOf": [
              {
                "$ref": "#/components/schemas/providertask.v1.TaskPreview"
              }
            ],
            "description": "结果预览（同列表项结构）。"
          },
          "provider": {
            "type": "string"
          },
          "providerTaskId": {
            "type": "string"
          },
          "requestBodyRedacted": {
            "description": "请求体（脱敏后）：从 meta.settle_ctx.request_body 抽取；提交时已抹 data-URI + 256KB 限长。\n 仅本任务的请求正文，不含内部结算上下文（settle_ctx 其余字段不出 API）。",
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "resultMissing": {
            "description": "C2 政策(a)：已扣费但结果缺失（对用户可见，不冤枉用户）。",
            "type": "boolean"
          },
          "resultRef": {
            "allOf": [
              {
                "$ref": "#/components/schemas/providertask.v1.ResultRefSummary"
              }
            ],
            "description": "结果引用摘要：只回存在性 + 计数 + 类型 + 大小；bucket/key/sha256 永不出 API（D4）。"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "taskType": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "description": "用户展示名（登录名 username）：读侧按 user_id 回填（口径同 TaskSummary.user_name）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "providertask.v1.TaskPreview": {
        "description": "TaskPreview 结果预览（读侧即时组装，不落库）。上游原样体仍绝不出本 API：\n items 只含 adapter 解析出的媒体 URL；大结果以 blob_count 计数，经下载端点\n GET /v1/console/tasks/{id}/blob/{seq}（团队侧 /v1/teams/{team_id}/tasks/{id}/blob/{seq}）\n 网关代理流式下载。",
        "properties": {
          "blobCount": {
            "description": "result_ref 条目数（可下载数，seq ∈ [0, blob_count)）。",
            "format": "int32",
            "type": "integer"
          },
          "expiresHint": {
            "description": "有 URL 项时恒为 \"upstream_urls_may_expire\"（上游 URL 过期是其固有属性）。",
            "type": "string"
          },
          "items": {
            "description": "inline 抽取的媒体 URL 项（上游时效性 URL，dashscope 约 24h 过期）。",
            "items": {
              "$ref": "#/components/schemas/providertask.v1.PreviewItem"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "providertask.v1.TaskSummary": {
        "description": "TaskSummary console 列表行（字段暴露矩阵 console list 列）。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endpointType": {
            "type": "string"
          },
          "finalizedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "preview": {
            "allOf": [
              {
                "$ref": "#/components/schemas/providertask.v1.TaskPreview"
              }
            ],
            "description": "结果预览（读侧即时组装）：inline 抽取的媒体 URL 项 + result_ref 可下载条目数。"
          },
          "provider": {
            "type": "string"
          },
          "providerTaskId": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "submittedAt": {
            "format": "date-time",
            "type": "string"
          },
          "taskType": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userName": {
            "description": "用户展示名（登录名 username）：读侧按 user_id 回填，供团队视图直出成员名；\n 单个解析失败非致命（空串）。个人视图行即本人，前端亦可回退会话身份。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "site.v1.AnalyticsScriptEntry": {
        "description": "AnalyticsScriptEntry 单条站点统计脚本；字段口径与 admin.v1.AnalyticsScriptEntry 一致\n （两包不互相 import，与 PaymentMethods 等概念级复制的惯例一致）。\n 前端用 next/script 渲染：src 非空为外部脚本，content 非空为内联脚本（id 必有）。",
        "properties": {
          "attributes": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "content": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "src": {
            "type": "string"
          },
          "strategy": {
            "description": "strategy 为空时前端按 afterInteractive 处理。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "site.v1.GetPublicSiteSettingsReply": {
        "properties": {
          "allowRegister": {
            "type": "boolean"
          },
          "analyticsScripts": {
            "description": "analytics_scripts 结构化统计脚本列表；空列表表示未配置，前端不注入。",
            "items": {
              "$ref": "#/components/schemas/site.v1.AnalyticsScriptEntry"
            },
            "type": "array"
          },
          "defaultPlanId": {
            "type": "string"
          },
          "emailDomainWhitelist": {
            "description": "email_domain_whitelist 邮箱域名白名单（已归一化小写）。空列表表示不限制；\n 非空时注册页可据此提前提示，后端注册/发码/换绑仍做最终强校验。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "emailEnabled": {
            "type": "boolean"
          },
          "maintenanceMode": {
            "type": "boolean"
          },
          "paymentMethods": {
            "$ref": "#/components/schemas/site.v1.PaymentMethods"
          },
          "platformName": {
            "type": "string"
          },
          "platformNameEn": {
            "description": "platform_name_en 平台英文名称；空串表示未配置，前端非中文语言回退 platform_name。",
            "type": "string"
          },
          "platformUrl": {
            "type": "string"
          },
          "realnameDocumentTypes": {
            "description": "当前能力矩阵中 provider 支持且通过 readiness 的证件类型去重列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "realnameEnforceApikeyCreate": {
            "description": "realname_enforce_apikey_create 控制前端创建 API Key 前的主动实名提醒；后端仍做最终强校验。",
            "type": "boolean"
          },
          "realnameEnforceGateway": {
            "description": "realname_enforce_gateway 控制前端使用模型前的主动实名提醒；网关仍做最终强校验。",
            "type": "boolean"
          },
          "realnameVerifyCapabilities": {
            "description": "当前进程实际支持的“认证方式 × 证件类型”组合。",
            "items": {
              "$ref": "#/components/schemas/site.v1.RealnameVerifyCapability"
            },
            "type": "array"
          },
          "realnameVerifyDefaultMethod": {
            "description": "新提交未指定方式时使用的稳定默认认证方式；不是管理员可编辑配置。",
            "type": "string"
          },
          "realnameVerifyEnabled": {
            "description": "realname_verify_enabled 控制用户端个人设置里的实名认证入口是否可见。",
            "type": "boolean"
          },
          "realnameVerifyMethods": {
            "description": "realname_verify_methods 当前进程 readiness 通过且管理员已开启的认证方式列表。",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "rechargeLimit": {
            "$ref": "#/components/schemas/site.v1.RechargeLimit"
          },
          "security": {
            "$ref": "#/components/schemas/site.v1.SecuritySettings"
          },
          "supportEmail": {
            "type": "string"
          },
          "trialDays": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "site.v1.PaymentMethods": {
        "description": "PaymentMethods 支付方式开关（admin 在 options 表手动配置）。",
        "properties": {
          "alipay": {
            "type": "boolean"
          },
          "stripe": {
            "type": "boolean"
          },
          "wechat": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "site.v1.RealnameVerifyCapability": {
        "properties": {
          "documentTypes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "verifyMethod": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "site.v1.RechargeLimit": {
        "description": "RechargeLimit 充值限额；金额用字符串避免浮点误差。",
        "properties": {
          "max": {
            "type": "string"
          },
          "min": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "site.v1.SecuritySettings": {
        "description": "SecuritySettings 前端需要的安全策略子集（不含 maxLoginAttempts 等内部参数）。",
        "properties": {
          "loginLockMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "passwordMinLength": {
            "format": "int32",
            "type": "integer"
          },
          "twoFactorRequired": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "subscription.v1.AdminListPlansReply": {
        "properties": {
          "plans": {
            "items": {
              "$ref": "#/components/schemas/subscription.v1.AdminPlanInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "subscription.v1.AdminPlanInfo": {
        "properties": {
          "durationUnit": {
            "type": "string"
          },
          "durationValue": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "maxPurchasePerUser": {
            "type": "string"
          },
          "priceCredits": {
            "type": "string"
          },
          "quotaResetPeriod": {
            "type": "string"
          },
          "sortOrder": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "totalMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.AdminPlanReply": {
        "properties": {
          "plan": {
            "$ref": "#/components/schemas/subscription.v1.AdminPlanInfo"
          }
        },
        "type": "object"
      },
      "subscription.v1.BucketInfo": {
        "properties": {
          "bucketStart": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "remainingMicros": {
            "type": "string"
          },
          "requestCount": {
            "type": "string"
          },
          "totalMicros": {
            "type": "string"
          },
          "usedMicros": {
            "type": "string"
          },
          "userSubscriptionId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.ConsumeReply": {
        "properties": {
          "remainingMicros": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "subscription.v1.ConsumeRequest": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.CreatePlanRequest": {
        "properties": {
          "creemProductId": {
            "type": "string"
          },
          "customSeconds": {
            "type": "string"
          },
          "durationUnit": {
            "type": "string"
          },
          "durationValue": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "maxPurchasePerUser": {
            "type": "string"
          },
          "priceCredits": {
            "type": "string"
          },
          "quotaResetCustomSeconds": {
            "type": "string"
          },
          "quotaResetPeriod": {
            "type": "string"
          },
          "sortOrder": {
            "type": "string"
          },
          "stripePriceId": {
            "type": "string"
          },
          "subtitle": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "totalMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.DisablePlanRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.EnablePlanRequest": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.GetBucketReply": {
        "properties": {
          "bucket": {
            "$ref": "#/components/schemas/subscription.v1.BucketInfo"
          }
        },
        "type": "object"
      },
      "subscription.v1.GetCurrentSubscriptionReply": {
        "properties": {
          "subscription": {
            "$ref": "#/components/schemas/subscription.v1.SubscriptionInfo"
          }
        },
        "type": "object"
      },
      "subscription.v1.ListPlansReply": {
        "properties": {
          "plans": {
            "items": {
              "$ref": "#/components/schemas/subscription.v1.PlanInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "subscription.v1.PlanInfo": {
        "properties": {
          "currency": {
            "type": "string"
          },
          "durationUnit": {
            "type": "string"
          },
          "durationValue": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "maxPurchasePerUser": {
            "type": "string"
          },
          "priceCredits": {
            "type": "string"
          },
          "priceMicros": {
            "type": "string"
          },
          "quotaResetPeriod": {
            "type": "string"
          },
          "recommended": {
            "type": "boolean"
          },
          "sortOrder": {
            "format": "int32",
            "type": "integer"
          },
          "subtitle": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "totalMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.PreConsumeReply": {
        "properties": {
          "lockedMicros": {
            "type": "string"
          },
          "preConsumeId": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "subscription.v1.PreConsumeRequest": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.PurchaseReply": {
        "properties": {
          "orderId": {
            "type": "string"
          },
          "paymentUrl": {
            "type": "string"
          },
          "subscription": {
            "$ref": "#/components/schemas/subscription.v1.SubscriptionInfo"
          }
        },
        "type": "object"
      },
      "subscription.v1.PurchaseRequest": {
        "properties": {
          "paymentMethod": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.ReleaseReply": {
        "properties": {
          "releasedMicros": {
            "type": "string"
          },
          "remainingMicros": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "subscription.v1.ReleaseRequest": {
        "properties": {
          "preConsumeId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.RenewReply": {
        "properties": {
          "orderId": {
            "type": "string"
          },
          "paymentUrl": {
            "type": "string"
          },
          "subscription": {
            "$ref": "#/components/schemas/subscription.v1.SubscriptionInfo"
          }
        },
        "type": "object"
      },
      "subscription.v1.RenewRequest": {
        "properties": {
          "paymentMethod": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.SettleReply": {
        "properties": {
          "refundedMicros": {
            "type": "string"
          },
          "remainingMicros": {
            "type": "string"
          },
          "settledMicros": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "subscription.v1.SettleRequest": {
        "properties": {
          "actualAmount": {
            "type": "string"
          },
          "preConsumeId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.SubscriptionInfo": {
        "properties": {
          "endTime": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "startTime": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "totalMicros": {
            "type": "string"
          },
          "usedMicros": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "subscription.v1.UpdatePlanRequest": {
        "properties": {
          "id": {
            "type": "string"
          },
          "plan": {
            "$ref": "#/components/schemas/subscription.v1.CreatePlanRequest"
          }
        },
        "type": "object"
      },
      "support.v1.AdminAssignTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminAssignTicketRequest": {
        "properties": {
          "assigneeId": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminCloseTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminCloseTicketRequest": {
        "properties": {
          "ticketId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminCreateReplyReply": {
        "properties": {
          "reply": {
            "$ref": "#/components/schemas/support.v1.TicketReplyInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminCreateReplyRequest": {
        "properties": {
          "attachments": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminGetTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminListTicketsReply": {
        "properties": {
          "tickets": {
            "items": {
              "$ref": "#/components/schemas/support.v1.TicketInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminResolveTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminResolveTicketRequest": {
        "properties": {
          "ticketId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminSendMessageReply": {
        "properties": {
          "message": {
            "$ref": "#/components/schemas/support.v1.MessageInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminSendMessageRequest": {
        "properties": {
          "content": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AdminUpdateTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.AdminUpdateTicketRequest": {
        "properties": {
          "content": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.AnnouncementInfo": {
        "properties": {
          "content": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "endAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "level": {
            "description": "level 公告级别：system=系统公告, maintenance=维护公告。",
            "type": "string"
          },
          "startAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "status 公告状态：1=已发布(published), 2=待发布(draft)。",
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.CreateReplyReply": {
        "properties": {
          "reply": {
            "$ref": "#/components/schemas/support.v1.TicketReplyInfo"
          }
        },
        "type": "object"
      },
      "support.v1.CreateReplyRequest": {
        "properties": {
          "attachments": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.CreateTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.CreateTicketRequest": {
        "properties": {
          "category": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "mediaRefs": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "title": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.DeleteMessageReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "support.v1.GetAnnouncementReply": {
        "properties": {
          "announcement": {
            "$ref": "#/components/schemas/support.v1.AnnouncementInfo"
          }
        },
        "type": "object"
      },
      "support.v1.GetTicketReply": {
        "properties": {
          "ticket": {
            "$ref": "#/components/schemas/support.v1.TicketInfo"
          }
        },
        "type": "object"
      },
      "support.v1.GetUnreadCountReply": {
        "properties": {
          "count": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.ListAnnouncementsReply": {
        "properties": {
          "announcements": {
            "items": {
              "$ref": "#/components/schemas/support.v1.AnnouncementInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.ListMyMessagesReply": {
        "properties": {
          "messages": {
            "items": {
              "$ref": "#/components/schemas/support.v1.MessageInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.ListMyTicketsReply": {
        "properties": {
          "tickets": {
            "items": {
              "$ref": "#/components/schemas/support.v1.TicketInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.ListRepliesReply": {
        "properties": {
          "replies": {
            "items": {
              "$ref": "#/components/schemas/support.v1.TicketReplyInfo"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.MarkAllAnnouncementsAsReadReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "support.v1.MarkAllAnnouncementsAsReadRequest": {
        "properties": {},
        "type": "object"
      },
      "support.v1.MarkAllMessagesAsReadReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "support.v1.MarkAllMessagesAsReadRequest": {
        "properties": {},
        "type": "object"
      },
      "support.v1.MarkAnnouncementAsReadReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "support.v1.MarkAnnouncementAsReadRequest": {
        "properties": {
          "announcementId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.MarkMessageAsReadReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "support.v1.MarkMessageAsReadRequest": {
        "properties": {
          "messageId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.MessageInfo": {
        "properties": {
          "content": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "readAt": {
            "format": "date-time",
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.TicketInfo": {
        "properties": {
          "assigneeId": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "closedAt": {
            "format": "date-time",
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "mediaRefs": {
            "type": "string"
          },
          "priority": {
            "format": "int32",
            "type": "integer"
          },
          "status": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "support.v1.TicketReplyInfo": {
        "properties": {
          "attachments": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "isStaff": {
            "type": "boolean"
          },
          "ticketId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.AddMemberReply": {
        "properties": {
          "teamMemberId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.AddMemberRequest": {
        "description": "AddMemberRequest 添加企业团队成员（managed_subaccount）。复用 subaccount 创建链路；\n 邮箱必填、手机可选，不含月度额度入参。",
        "properties": {
          "department": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.CreateTeamReply": {
        "properties": {
          "team": {
            "$ref": "#/components/schemas/team.v1.TeamInfo"
          }
        },
        "type": "object"
      },
      "team.v1.CreateTeamRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "quotaMicros": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "teamType": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.DisbandTeamReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "team.v1.GetMemberQuotaReply": {
        "properties": {
          "availableMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.GetTeamReply": {
        "properties": {
          "myRole": {
            "type": "string"
          },
          "team": {
            "$ref": "#/components/schemas/team.v1.TeamInfo"
          }
        },
        "type": "object"
      },
      "team.v1.GrantTeamQuotaReply": {
        "description": "GrantTeamQuotaReply 加额度结果。",
        "properties": {
          "grant": {
            "$ref": "#/components/schemas/team.v1.QuotaGrantInfo"
          },
          "totalQuotaMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.GrantTeamQuotaRequest": {
        "description": "GrantTeamQuotaRequest 给团队增量加额度的入参。",
        "properties": {
          "amountMicros": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.LeaveTeamReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "team.v1.LeaveTeamRequest": {
        "properties": {
          "teamId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.ListMembersReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/team.v1.MemberInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "team.v1.ListMyTeamsReply": {
        "properties": {
          "teams": {
            "items": {
              "$ref": "#/components/schemas/team.v1.TeamInfo"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "team.v1.ListQuotaGrantsReply": {
        "properties": {
          "grants": {
            "items": {
              "$ref": "#/components/schemas/team.v1.QuotaGrantInfo"
            },
            "type": "array"
          },
          "total": {
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "team.v1.ListTeamAPIKeysReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/team.v1.TeamAPIKeyInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "team.v1.ListTeamLogsReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/team.v1.TeamUsageLogInfo"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.MemberInfo": {
        "properties": {
          "balanceMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdByName": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "joinedAt": {
            "format": "date-time",
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          },
          "updatedByName": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.MigrateMemberReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "team.v1.MigrateMemberRequest": {
        "properties": {
          "teamId": {
            "type": "string"
          },
          "toTeamId": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.QuotaGrantInfo": {
        "properties": {
          "action": {
            "type": "string"
          },
          "amountMicros": {
            "type": "string"
          },
          "balanceAfterMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "grantId": {
            "type": "string"
          },
          "memberId": {
            "type": "string"
          },
          "operatorId": {
            "type": "string"
          },
          "operatorName": {
            "type": "string"
          },
          "remark": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.RemoveMemberReply": {
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "team.v1.TeamAPIKeyInfo": {
        "description": "TeamAPIKeyInfo 团队 owner 只读视角下的令牌信息（不含明文与可改字段）。",
        "properties": {
          "billingMode": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creatorName": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "keyPrefix": {
            "type": "string"
          },
          "lastUsedAt": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.TeamInfo": {
        "properties": {
          "availableQuotaMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "format": "int32",
            "type": "integer"
          },
          "subaccountRealnameRequired": {
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          },
          "teamType": {
            "type": "string"
          },
          "totalQuotaMicros": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "usedQuotaMicros": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.TeamUsageLogInfo": {
        "description": "TeamUsageLogInfo 团队 owner 只读视角的单条日志（含 creator 展示名；不含请求/响应明文）。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "creatorName": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "isStream": {
            "type": "boolean"
          },
          "latencyMs": {
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestType": {
            "type": "string"
          },
          "success": {
            "description": "success 行级成败结论，与列表 status 筛选同一谓词（WP7 双列回退口径）在服务端计算。\n 前端徽标请直接用本字段；http_status 在迁移历史行上可能为 0，不可用于本地推断成败。",
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.TransferOwnershipReply": {
        "properties": {
          "team": {
            "$ref": "#/components/schemas/team.v1.TeamInfo"
          }
        },
        "type": "object"
      },
      "team.v1.TransferOwnershipRequest": {
        "properties": {
          "teamId": {
            "type": "string"
          },
          "toUserId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.UpdateTeamRealnameRequirementReply": {
        "properties": {
          "team": {
            "$ref": "#/components/schemas/team.v1.TeamInfo"
          }
        },
        "type": "object"
      },
      "team.v1.UpdateTeamRealnameRequirementRequest": {
        "properties": {
          "required": {
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "team.v1.UpdateTeamReply": {
        "properties": {
          "team": {
            "$ref": "#/components/schemas/team.v1.TeamInfo"
          }
        },
        "type": "object"
      },
      "team.v1.UpdateTeamRequest": {
        "properties": {
          "description": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "totalQuotaMicros": {
            "description": "total_quota_micros 可选：传值（\u003e=0）时编辑团队总额度并写团队级额度事件流（member_id=NULL）；\n 不传时仅改 name/description，不触额度。用 wrapper 区分\"未传\"与\"显式传 0\"（清零为合法编辑）。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.APIKeyStatItem": {
        "description": "APIKeyStatItem 单个 API Key 在统计窗口内的用量汇总。",
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "apiKeyName": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "failedCount": {
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestCount": {
            "type": "string"
          },
          "successCount": {
            "type": "string"
          },
          "teamId": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.APIKeyStatPoint": {
        "description": "APIKeyStatPoint 单个时间桶的用量。",
        "properties": {
          "billedMicros": {
            "type": "string"
          },
          "bucketAt": {
            "format": "date-time",
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "failedCount": {
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestCount": {
            "type": "string"
          },
          "successCount": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.CountLogsReply": {
        "properties": {
          "total": {
            "description": "精确快照总数；proto JSON 以十进制字符串序列化 int64。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.ExportLogsReply": {
        "properties": {
          "data": {
            "format": "bytes",
            "type": "string"
          },
          "filename": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.GetAPIKeyStatsSeriesReply": {
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "granularity": {
            "type": "string"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/usage.v1.APIKeyStatPoint"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "usage.v1.GetLogDetailReply": {
        "properties": {
          "log": {
            "$ref": "#/components/schemas/usage.v1.UsageLogDetail"
          }
        },
        "type": "object"
      },
      "usage.v1.ListAPIKeyStatsReply": {
        "properties": {
          "endTime": {
            "format": "date-time",
            "type": "string"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/usage.v1.APIKeyStatItem"
            },
            "type": "array"
          },
          "startTime": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.ListLogsReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/usage.v1.UsageLogEntry"
            },
            "type": "array"
          },
          "limit": {
            "format": "int32",
            "type": "integer"
          },
          "nextCursor": {
            "type": "string"
          },
          "total": {
            "description": "total 为 -1，表示 raw usage 日志列表不执行 COUNT(*)；客户端通过\n has_more/next_cursor 翻页，聚合总量由看板 rollup 接口提供。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.UsageLogDetail": {
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "billingDetail": {
            "description": "billing_detail 后端直出的中文计费过程文本，前端按换行渲染即可。",
            "type": "string"
          },
          "billingMode": {
            "description": "billing_mode 结算时计费方式快照（token/per_request/image/video/tiered_expr）；\n 空串=迁移前历史行或免费未结算行。前端计费类型展示优先用本字段，不再从分项 label 推断。",
            "type": "string"
          },
          "cachedTokens": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "channelName": {
            "type": "string"
          },
          "channelSaleRatio": {
            "description": "渠道资源销售倍率快照（decimal 串如 \"1.2000\"）；空 = 旧记录无快照。",
            "type": "string"
          },
          "channelSourceCode": {
            "description": "渠道资源 code 快照（用户可见「来源」）；空 = 旧记录或未绑定资源。",
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（响应头 X-Request-Id 同值）；与异步任务详情展示的请求 ID 对齐。\n 空串=历史行或未采集，前端回退展示 request_id。",
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          },
          "firstTokenMs": {
            "description": "首 token 延迟（毫秒）；优先 typed 列，迁移前 meta-only 历史记录兼容回退。",
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "type": "string"
          },
          "isStream": {
            "type": "boolean"
          },
          "latencyMs": {
            "type": "string"
          },
          "meta": {
            "description": "Deprecated: 用户端详情不再返回内部 meta。",
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "promptTokens": {
            "type": "string"
          },
          "requestBody": {
            "description": "详情字段\n Deprecated: 用户端详情不再返回请求正文。",
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "requestType": {
            "type": "string"
          },
          "responseBody": {
            "description": "Deprecated: 用户端详情不再返回响应正文。",
            "type": "string"
          },
          "subscriptionPreId": {
            "type": "string"
          },
          "success": {
            "description": "success 行级成败结论，与列表 status 筛选同一谓词（WP7 双列回退口径）在服务端计算。\n 前端徽标请直接用本字段；http_status 在迁移历史行上可能为 0，不可用于本地推断成败。",
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          },
          "tokenName": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "unitsConsumed": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "userTierRatio": {
            "description": "用户等级倍率快照（decimal 串如 \"1.5000\"，计费实际用值）；空 = 旧记录未钉值。",
            "type": "string"
          },
          "walletHoldId": {
            "type": "string"
          },
          "walletLedgerId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "usage.v1.UsageLogEntry": {
        "properties": {
          "apiKeyId": {
            "type": "string"
          },
          "billedMicros": {
            "type": "string"
          },
          "cachedTokens": {
            "type": "string"
          },
          "channelId": {
            "type": "string"
          },
          "clientRequestId": {
            "description": "网关层 request id 原文（响应头 X-Request-Id 同值）；与异步任务详情展示的请求 ID 对齐。\n 空串=历史行或未采集，前端回退展示 request_id。",
            "type": "string"
          },
          "completionTokens": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "errorCode": {
            "type": "string"
          },
          "firstTokenMs": {
            "description": "首 token 延迟（毫秒），来自 usage_logs.first_token_ms；非流式、未采集或历史缺失为 0。",
            "type": "string"
          },
          "httpStatus": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "ip": {
            "description": "请求元信息",
            "type": "string"
          },
          "isStream": {
            "type": "boolean"
          },
          "latencyMs": {
            "description": "性能指标",
            "type": "string"
          },
          "meta": {
            "description": "Deprecated: 用户端列表和详情均不再返回内部 meta 及请求/响应正文。",
            "type": "string"
          },
          "modelId": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "promptTokens": {
            "description": "Token 使用情况",
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "requestType": {
            "type": "string"
          },
          "subscriptionPreId": {
            "type": "string"
          },
          "success": {
            "description": "success 行级成败结论，与列表 status 筛选同一谓词（WP7 双列回退口径）在服务端计算。\n 前端徽标请直接用本字段；http_status 在迁移历史行上可能为 0，不可用于本地推断成败。",
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          },
          "totalTokens": {
            "type": "string"
          },
          "unitsConsumed": {
            "description": "计费信息",
            "type": "string"
          },
          "userId": {
            "type": "string"
          },
          "walletHoldId": {
            "description": "关联记录",
            "type": "string"
          },
          "walletLedgerId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.ConsumptionBucket": {
        "description": "ConsumptionBucket 单个时间桶的消费小计。",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 该桶内 direction='debit' 出账之和（微单位）。",
            "type": "string"
          },
          "bucket": {
            "description": "bucket 桶起始本地日期标签：day 为 YYYY-MM-DD，month 为 YYYY-MM。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.GetBalanceReply": {
        "properties": {
          "wallet": {
            "$ref": "#/components/schemas/wallet.v1.WalletInfo"
          }
        },
        "type": "object"
      },
      "wallet.v1.GetConsumptionSummaryReply": {
        "properties": {
          "buckets": {
            "description": "buckets 按时间升序排列，缺失区间补 0，长度等于请求的桶数。",
            "items": {
              "$ref": "#/components/schemas/wallet.v1.ConsumptionBucket"
            },
            "type": "array"
          },
          "granularity": {
            "description": "granularity 实际生效的粒度（回显，便于前端校验）。",
            "type": "string"
          },
          "totalMicros": {
            "description": "total_micros 返回窗口内所有桶之和（微单位）。注意这是「窗口内」总额，\n 与余额卡 consumed_micros（全期全量）口径相同但时间范围不同。",
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.LedgerEntry": {
        "description": "LedgerEntry 账本流水条目",
        "properties": {
          "amountMicros": {
            "description": "amount_micros 变动金额（微单位，绝对值）",
            "type": "string"
          },
          "balanceAfterMicros": {
            "description": "balance_after_micros 变动后余额（微单位）",
            "type": "string"
          },
          "bizType": {
            "description": "biz_type 业务类型：topup=充值 consume=消费 refund=退款 adjust=调整 reward=奖励\n violation_fee=内容违规扣费（上游对违规请求收费，非正常模型消费）",
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "direction": {
            "description": "direction 流水方向：credit=入账 debit=出账",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "remark": {
            "description": "remark 备注（如违规扣费的关联请求 ID）；无备注时为空串",
            "type": "string"
          },
          "walletId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.ListLedgerExportReply": {
        "properties": {
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "items": {
              "$ref": "#/components/schemas/wallet.v1.LedgerEntry"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.ListLedgerReply": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/wallet.v1.LedgerEntry"
            },
            "type": "array"
          },
          "total": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "wallet.v1.WalletInfo": {
        "description": "WalletInfo 钱包信息",
        "properties": {
          "balanceMicros": {
            "description": "balance_micros 可用余额（微单位，1 元 = 1,000,000 micros）",
            "type": "string"
          },
          "consumedMicros": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "int64 frozen_micros = 4 [json_name = \"frozenMicros\"];",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "webhook.v1.CreateSubscriptionReply": {
        "description": "CreateSubscriptionReply 创建 Webhook 订阅响应。",
        "properties": {
          "secret": {
            "description": "签名密钥明文，仅创建时返回一次；列表、详情和更新接口不会回显",
            "type": "string"
          },
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/webhook.v1.SubscriptionInfo"
              }
            ],
            "description": "创建的订阅信息"
          }
        },
        "type": "object"
      },
      "webhook.v1.CreateSubscriptionRequest": {
        "description": "CreateSubscriptionRequest 创建 Webhook 订阅请求。",
        "properties": {
          "enabled": {
            "description": "是否启用（默认 true）",
            "type": "boolean"
          },
          "eventTypes": {
            "description": "订阅的事件类型列表（如 [\"request.completed\", \"request.failed\"]）",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "secret": {
            "description": "签名密钥（用于验证 Webhook 请求）",
            "type": "string"
          },
          "url": {
            "description": "Webhook 回调 URL",
            "type": "string"
          }
        },
        "type": "object"
      },
      "webhook.v1.DeleteSubscriptionReply": {
        "description": "DeleteSubscriptionReply 删除 Webhook 订阅响应。",
        "properties": {
          "ok": {
            "description": "是否成功",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "webhook.v1.GetSubscriptionReply": {
        "description": "GetSubscriptionReply 获取 Webhook 订阅响应。",
        "properties": {
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/webhook.v1.SubscriptionInfo"
              }
            ],
            "description": "订阅信息"
          }
        },
        "type": "object"
      },
      "webhook.v1.ListSubscriptionsReply": {
        "description": "ListSubscriptionsReply 列出 Webhook 订阅响应。",
        "properties": {
          "items": {
            "description": "订阅列表",
            "items": {
              "$ref": "#/components/schemas/webhook.v1.SubscriptionInfo"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "webhook.v1.SubscriptionInfo": {
        "description": "SubscriptionInfo Webhook 订阅信息。",
        "properties": {
          "createdAt": {
            "description": "创建时间",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "是否启用",
            "type": "boolean"
          },
          "eventTypes": {
            "description": "订阅的事件类型列表",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "订阅 ID",
            "type": "string"
          },
          "updatedAt": {
            "description": "更新时间",
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "Webhook 回调 URL",
            "type": "string"
          },
          "userId": {
            "description": "用户 ID",
            "type": "string"
          }
        },
        "type": "object"
      },
      "webhook.v1.UpdateSubscriptionReply": {
        "description": "UpdateSubscriptionReply 更新 Webhook 订阅响应。",
        "properties": {
          "subscription": {
            "allOf": [
              {
                "$ref": "#/components/schemas/webhook.v1.SubscriptionInfo"
              }
            ],
            "description": "更新后的订阅信息"
          }
        },
        "type": "object"
      },
      "webhook.v1.UpdateSubscriptionRequest": {
        "description": "UpdateSubscriptionRequest 更新 Webhook 订阅请求。",
        "properties": {
          "enabled": {
            "description": "是否启用（可选，不传则不更新）",
            "type": "boolean"
          },
          "eventTypes": {
            "description": "订阅的事件类型列表（可选，不传则不更新）",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "订阅 ID",
            "type": "string"
          },
          "secret": {
            "description": "签名密钥（可选，不传则不更新）",
            "type": "string"
          },
          "url": {
            "description": "Webhook 回调 URL（可选，不传则不更新）",
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "title": "APIQIK API",
    "version": "0.0.1"
  },
  "openapi": "3.0.3",
  "paths": {
    "/openapi.json": {
      "get": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "OpenAPI JSON 文档",
        "tags": [
          "OpenAPI"
        ]
      }
    },
    "/openapi.yaml": {
      "get": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "OpenAPI YAML 文档",
        "tags": [
          "OpenAPI"
        ]
      }
    },
    "/swagger": {
      "get": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Swagger UI",
        "tags": [
          "OpenAPI"
        ]
      }
    },
    "/v1/account": {
      "delete": {
        "description": "DeleteAccount 自助删除当前账户（软删）。前置校验：不能拥有活跃团队；钱包余额必须为 0。\n 请求不接受任何参数，被删除者恒为当前登录用户；成功后当前 access/refresh token 立即失效。",
        "operationId": "AccountService_DeleteAccount",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.DeleteAccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/2fa/activate": {
      "post": {
        "description": "ActivateTOTP 二步验证第二阶段：验证 TOTP code，激活 2FA，返回恢复码（仅展示一次）",
        "operationId": "AccountService_ActivateTOTP",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.ActivateTOTPRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ActivateTOTPReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/2fa/disable": {
      "post": {
        "description": "DisableTOTP 禁用二步验证（需 TOTP code 或恢复码验证）",
        "operationId": "AccountService_DisableTOTP",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.DisableTOTPRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.DisableTOTPReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/2fa/enable": {
      "post": {
        "description": "Enable2FA 开启二步验证，返回 TOTP 二维码 URI 和备份码",
        "operationId": "AccountService_Enable2FA",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.Enable2FARequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.Enable2FAReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/2fa/enroll": {
      "post": {
        "description": "EnrollTOTP 二步验证第一阶段：生成 TOTP secret 并以 pending 状态存库，\n 返回 secret/otpauthUrl/qrCodePngBase64；此时 2FA 尚未启用。",
        "operationId": "AccountService_EnrollTOTP",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.EnrollTOTPRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.EnrollTOTPReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/2fa/verify": {
      "post": {
        "description": "Verify2FA 验证 TOTP 码（登录后或开启时确认）",
        "operationId": "AccountService_Verify2FA",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.Verify2FARequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.Verify2FAReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/avatar/upload": {
      "post": {
        "description": "使用 multipart/form-data 上传头像文件，字段名为 file。支持 jpeg、png、webp、gif，最大 2MB。",
        "operationId": "AccountService_UploadAvatar",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "description": "头像文件",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.UploadAvatarReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "上传当前用户头像",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/email/change": {
      "post": {
        "description": "需同时提供发往旧邮箱与新邮箱的两枚验证码，二者均验证通过后完成换绑。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "newEmail": {
                    "description": "目标新邮箱",
                    "type": "string"
                  },
                  "newEmailCode": {
                    "description": "发往新邮箱的验证码",
                    "type": "string"
                  },
                  "oldEmailCode": {
                    "description": "发往旧邮箱的验证码",
                    "type": "string"
                  }
                },
                "required": [
                  "newEmail",
                  "oldEmailCode",
                  "newEmailCode"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "修改登录邮箱（双重验证码）",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/login": {
      "post": {
        "description": "Login 账号登录，成功返回 access_token + refresh_token；若开启 2FA 返回 two_fa_required=true",
        "operationId": "AccountService_Login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.LoginReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/login/2fa": {
      "post": {
        "description": "Login2FA 登录第二阶段：凭 two_fa_token + TOTP code/恢复码换取正式 access/refresh token",
        "operationId": "AccountService_Login2FA",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.Login2FARequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.Login2FAReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/login/code": {
      "post": {
        "description": "使用手机号或邮箱验证码登录；目标账号不存在时自动注册。\n验证码最多允许 5 次错误尝试，超出后需重新发送。已开启 2FA 的账号返回 twoFaRequired=true 与 twoFaToken。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "code": {
                    "description": "6 位数字验证码",
                    "type": "string"
                  },
                  "target": {
                    "description": "手机号（type=phone）或邮箱地址（type=email）",
                    "type": "string"
                  },
                  "type": {
                    "description": "验证码类型：phone 短信验证码 / email 邮箱验证码",
                    "enum": [
                      "phone",
                      "email"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "target",
                  "code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.LoginReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "验证码登录",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/logout": {
      "post": {
        "description": "Logout 退出当前会话（吊销 refresh_token）",
        "operationId": "AccountService_Logout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.LogoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.LogoutReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/password/change": {
      "post": {
        "description": "ChangePassword 修改密码（需要验证旧密码）",
        "operationId": "AccountService_ChangePassword",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.ChangePasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ChangePasswordReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/password/reset": {
      "post": {
        "description": "新密码需使用 RSA-OAEP 公钥加密后提交",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "newPassword": {
                    "description": "RSA-OAEP 加密后的新密码",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "使用邮箱验证码重置密码",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/preferences": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.Preferences"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询当前用户偏好设置",
        "tags": [
          "AccountService"
        ]
      },
      "put": {
        "description": "notification_enabled / daily_report 为三态字段：省略表示不修改。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "daily_report": {
                    "type": "boolean"
                  },
                  "locale": {
                    "type": "string"
                  },
                  "notification_email": {
                    "type": "string"
                  },
                  "notification_enabled": {
                    "type": "boolean"
                  },
                  "quota_warning_threshold": {
                    "description": "配额告警阈值（micros）",
                    "format": "int64",
                    "type": "integer"
                  },
                  "timezone": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.Preferences"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "更新当前用户偏好设置",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/profile": {
      "get": {
        "description": "GetProfile 获取当前登录用户的个人资料",
        "operationId": "AccountService_GetProfile",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.GetProfileReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      },
      "put": {
        "description": "UpdateProfile 更新个人资料",
        "operationId": "AccountService_UpdateProfile",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.UpdateProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.UpdateProfileReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/referral/records": {
      "get": {
        "description": "ListReferrals 获取推广记录列表",
        "operationId": "AccountService_ListReferrals",
        "parameters": [
          {
            "description": "页码，从 1 开始",
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "每页数量",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ListReferralsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/referral/reward-config": {
      "get": {
        "description": "GetReferralRewardConfig 免登录读取邀请奖励配置，供 C 端邀请页动态渲染奖励金额。",
        "operationId": "AccountService_GetReferralRewardConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.GetReferralRewardConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/referral/stats": {
      "get": {
        "description": "GetReferralStats 获取推广概览统计",
        "operationId": "AccountService_GetReferralStats",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.GetReferralStatsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/referral/validate": {
      "post": {
        "description": "ValidateReferralCode 免登录校验邀请码（注册前 UX 增强）。",
        "operationId": "AccountService_ValidateReferralCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.ValidateReferralCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ValidateReferralCodeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/register": {
      "post": {
        "description": "Register 注册新账号",
        "operationId": "AccountService_Register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.RegisterReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/sessions": {
      "get": {
        "description": "ListSessions 获取当前用户的所有活跃会话",
        "operationId": "AccountService_ListSessions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ListSessionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/sessions/{sessionId}": {
      "delete": {
        "description": "RevokeSession 吊销指定会话（踢下线）",
        "operationId": "AccountService_RevokeSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.RevokeSessionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/sso/callback/{slug}": {
      "get": {
        "description": "HandleSSOCallback 处理 SSO 回调",
        "operationId": "AccountService_HandleSSOCallback",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "OIDC: code / SAML: SAMLResponse",
            "in": "query",
            "name": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "samlResponse",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "OIDC / SAML state 参数",
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "error",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "errorDesc",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.HandleSSOCallbackReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/sso/login/{slug}": {
      "get": {
        "description": "InitiateSSOLogin 发起 SSO 登录（返回重定向 URL）",
        "operationId": "AccountService_InitiateSSOLogin",
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.InitiateSSOLoginReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/sso/providers": {
      "get": {
        "description": "ListSSOProviders 列出指定区域的 SSO 提供商",
        "operationId": "AccountService_ListSSOProviders",
        "parameters": [
          {
            "description": "区域：1=国内 2=海外",
            "in": "query",
            "name": "region",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.ListSSOProvidersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/token": {
      "get": {
        "description": "获取当前登录用户用于自动化调用的系统 API Token。响应包含明文 token，服务端会设置 no-store 缓存控制。",
        "operationId": "AccountService_GetSystemToken",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.SystemTokenReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "获取当前用户系统令牌",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/token/generate": {
      "post": {
        "description": "为当前登录用户生成或重新生成系统 API Token。响应包含明文 token，服务端会设置 no-store 缓存控制。",
        "operationId": "AccountService_GenerateSystemToken",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.SystemTokenReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "生成当前用户系统令牌",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/token/refresh": {
      "post": {
        "description": "RefreshToken 用 refresh_token 换取新的 access_token",
        "operationId": "AccountService_RefreshToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/account.v1.RefreshTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/account.v1.RefreshTokenReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/account/verification/send": {
      "post": {
        "description": "向手机号或邮箱发送 6 位数字验证码（5 分钟有效，同一目标 60 秒内只能发送一次）。\n公开接口，无需登录。type=phone 需管理端已启用短信服务（阿里云）；type=email 需已配置 SMTP。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "locale": {
                    "description": "当前页面语言；zh 及其区域变体使用中文，其他语言使用英文，留空兼容旧客户端使用中文。仅影响邮件。",
                    "type": "string"
                  },
                  "target": {
                    "description": "手机号（type=phone）或邮箱地址（type=email）",
                    "type": "string"
                  },
                  "type": {
                    "description": "验证码类型：phone 短信验证码 / email 邮箱验证码",
                    "enum": [
                      "phone",
                      "email"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "type",
                  "target"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "发送验证码",
        "tags": [
          "AccountService"
        ]
      }
    },
    "/v1/admin/activity/checkin-stats": {
      "get": {
        "description": "GetCheckinStats 获取签到统计",
        "operationId": "AdminActivityService_GetCheckinStats",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.GetCheckinStatsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台签到统计",
        "tags": [
          "ActivityAdminService"
        ]
      }
    },
    "/v1/admin/activity/promotions": {
      "get": {
        "description": "ListPromotions 列出所有促销活动",
        "operationId": "AdminActivityService_ListPromotions",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.AdminListPromotionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台查询活动列表",
        "tags": [
          "ActivityAdminService"
        ]
      },
      "post": {
        "description": "CreatePromotion 创建促销活动",
        "operationId": "AdminActivityService_CreatePromotion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.CreatePromotionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.CreatePromotionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台创建活动",
        "tags": [
          "ActivityAdminService"
        ]
      }
    },
    "/v1/admin/activity/promotions/{id}": {
      "delete": {
        "description": "DeletePromotion 删除促销活动",
        "operationId": "AdminActivityService_DeletePromotion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.DeletePromotionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台删除活动",
        "tags": [
          "ActivityAdminService"
        ]
      },
      "put": {
        "description": "UpdatePromotion 更新促销活动",
        "operationId": "AdminActivityService_UpdatePromotion",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.UpdatePromotionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.UpdatePromotionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台更新活动",
        "tags": [
          "ActivityAdminService"
        ]
      }
    },
    "/v1/admin/activity/redeem-codes": {
      "get": {
        "description": "ListRedeemCodes 列出兑换码",
        "operationId": "AdminActivityService_ListRedeemCodes",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.ListRedeemCodesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台查询兑换码",
        "tags": [
          "ActivityAdminService"
        ]
      }
    },
    "/v1/admin/activity/redeem-codes/batch": {
      "post": {
        "description": "CreateRedeemCodeBatch 批量创建兑换码",
        "operationId": "AdminActivityService_CreateRedeemCodeBatch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.CreateRedeemCodeBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.CreateRedeemCodeBatchReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台批量创建兑换码",
        "tags": [
          "ActivityAdminService"
        ]
      }
    },
    "/v1/admin/agent/agents": {
      "get": {
        "description": "ListAgents 列出代理商",
        "operationId": "AdminAgentService_ListAgents",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ListAgentsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/agent/agents/{agentId}/activate": {
      "post": {
        "description": "ActivateAgent 激活代理商",
        "operationId": "AdminAgentService_ActivateAgent",
        "parameters": [
          {
            "in": "path",
            "name": "agentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.ActivateAgentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ActivateAgentReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/agent/applications/pending": {
      "get": {
        "description": "ListPendingApplications 列出待审核申请",
        "operationId": "AdminAgentService_ListPendingApplications",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ListPendingApplicationsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/agent/applications/{applicationId}/review": {
      "post": {
        "description": "ReviewApplication 审核代理商申请",
        "operationId": "AdminAgentService_ReviewApplication",
        "parameters": [
          {
            "in": "path",
            "name": "applicationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.ReviewApplicationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ReviewApplicationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/agent/withdrawals/{withdrawalId}/mark-paid": {
      "post": {
        "description": "MarkPaid 标记已打款",
        "operationId": "AdminAgentService_MarkPaid",
        "parameters": [
          {
            "in": "path",
            "name": "withdrawalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.MarkPaidRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.MarkPaidReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/agent/withdrawals/{withdrawalId}/review": {
      "post": {
        "description": "ReviewWithdrawal 审核提现申请",
        "operationId": "AdminAgentService_ReviewWithdrawal",
        "parameters": [
          {
            "in": "path",
            "name": "withdrawalId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.ReviewWithdrawalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ReviewWithdrawalReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAgentService"
        ]
      }
    },
    "/v1/admin/announcements": {
      "get": {
        "description": "ListAnnouncements 列出公告",
        "operationId": "AdminAnnouncementService_ListAnnouncements",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "level",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListAnnouncementsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "公告列表",
        "tags": [
          "AdminService"
        ]
      },
      "post": {
        "description": "CreateAnnouncement 创建公告",
        "operationId": "AdminAnnouncementService_CreateAnnouncement",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateAnnouncementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateAnnouncementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "创建公告",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/announcements/{id}": {
      "delete": {
        "description": "DeleteAnnouncement 删除公告",
        "operationId": "AdminAnnouncementService_DeleteAnnouncement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteAnnouncementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "删除公告",
        "tags": [
          "AdminService"
        ]
      },
      "get": {
        "description": "GetAnnouncement 获取公告详情",
        "operationId": "AdminAnnouncementService_GetAnnouncement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetAnnouncementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "公告详情",
        "tags": [
          "AdminService"
        ]
      },
      "put": {
        "description": "UpdateAnnouncement 更新公告",
        "operationId": "AdminAnnouncementService_UpdateAnnouncement",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateAnnouncementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateAnnouncementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "更新公告",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/api-spec-templates": {
      "get": {
        "description": "ListAPISpecTemplates 列出 API 规范模板（字段库 ⊕ field_config 合成结果）",
        "operationId": "AdminAPISpecTemplateService_ListAPISpecTemplates",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListAPISpecTemplatesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      },
      "post": {
        "description": "CreateAPISpecTemplate 创建模板（code/endpoint_type 创建后不可改）",
        "operationId": "AdminAPISpecTemplateService_CreateAPISpecTemplate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateAPISpecTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateAPISpecTemplateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      }
    },
    "/v1/admin/api-spec-templates/{id}": {
      "delete": {
        "description": "DeleteAPISpecTemplate 删除模板（仍被参数定制引用时拒绝并返回绑定数）",
        "operationId": "AdminAPISpecTemplateService_DeleteAPISpecTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteAPISpecTemplateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      },
      "get": {
        "description": "GetAPISpecTemplate 获取单个模板详情",
        "operationId": "AdminAPISpecTemplateService_GetAPISpecTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetAPISpecTemplateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      },
      "put": {
        "description": "UpdateAPISpecTemplate 更新模板（name/request_path/status/field_config）",
        "operationId": "AdminAPISpecTemplateService_UpdateAPISpecTemplate",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateAPISpecTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateAPISpecTemplateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      }
    },
    "/v1/admin/api-spec-templates/{templateId}/batch-bind": {
      "post": {
        "description": "BatchBindModels 模板批量绑定模型",
        "operationId": "AdminModelParamCustomService_BatchBindModels",
        "parameters": [
          {
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.BatchBindModelsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.BatchBindModelsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      }
    },
    "/v1/admin/api-spec-templates/{templateId}/bindable-models": {
      "get": {
        "description": "ListBindableModels 列出全部启用模型并标注是否已绑定该模板（端点行由绑定自动派生，不做资格过滤）",
        "operationId": "AdminModelParamCustomService_ListBindableModels",
        "parameters": [
          {
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListBindableModelsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      }
    },
    "/v1/admin/apikeys": {
      "get": {
        "operationId": "AdminAPIKeyService_ListAllAPIKeys",
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.ListAllAPIKeysReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPIKeyService"
        ]
      }
    },
    "/v1/admin/apikeys/{id}": {
      "get": {
        "operationId": "AdminAPIKeyService_GetAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.GetAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPIKeyService"
        ]
      }
    },
    "/v1/admin/apikeys/{id}/ban": {
      "post": {
        "operationId": "AdminAPIKeyService_BanAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.BanAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.BanAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPIKeyService"
        ]
      }
    },
    "/v1/admin/apikeys/{id}/unban": {
      "post": {
        "operationId": "AdminAPIKeyService_UnbanAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.UnbanAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.UnbanAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPIKeyService"
        ]
      }
    },
    "/v1/admin/channel-sources": {
      "get": {
        "operationId": "AdminChannelSourceService_ListChannelSources",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "keyword 模糊搜索：匹配中英文名称 / 中英文资源说明 / 唯一标识 code / 备注（不区分大小写子串）。",
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListChannelSourcesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      },
      "post": {
        "description": "CreateChannelSource 新建渠道资源。",
        "operationId": "AdminChannelSourceService_CreateChannelSource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateChannelSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ChannelSourceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      }
    },
    "/v1/admin/channel-sources/{id}": {
      "delete": {
        "operationId": "AdminChannelSourceService_DeleteChannelSource",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteChannelSourceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      },
      "get": {
        "operationId": "AdminChannelSourceService_GetChannelSource",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ChannelSourceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      },
      "patch": {
        "description": "UpdateChannelSource 部分更新渠道资源。",
        "operationId": "AdminChannelSourceService_UpdateChannelSource",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateChannelSourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ChannelSourceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      }
    },
    "/v1/admin/channel-sources/{sourceId}/user-ratios": {
      "get": {
        "description": "ListChannelSourceUserRatios 列出资源的指定用户倍率（分页）。",
        "operationId": "AdminChannelSourceService_ListChannelSourceUserRatios",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListChannelSourceUserRatiosReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      }
    },
    "/v1/admin/channel-sources/{sourceId}/user-ratios/{userId}": {
      "delete": {
        "description": "DeleteChannelSourceUserRatio 删除指定用户倍率；该用户回落资源默认销售倍率。",
        "operationId": "AdminChannelSourceService_DeleteChannelSourceUserRatio",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteChannelSourceUserRatioReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      },
      "put": {
        "description": "UpsertChannelSourceUserRatio 配置（新建或覆盖更新）指定用户倍率：\n 该用户使用该资源时以此销售倍率替代资源默认 sale_ratio（替代、不叠乘）。",
        "operationId": "AdminChannelSourceService_UpsertChannelSourceUserRatio",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpsertChannelSourceUserRatioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ChannelSourceUserRatioReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminChannelSourceService"
        ]
      }
    },
    "/v1/admin/channels": {
      "get": {
        "operationId": "ChannelAdminService_ListChannels",
        "parameters": [
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "vendorId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "关键字搜索：名称模糊匹配（不区分大小写）；纯数字输入额外按渠道主键精确匹配（OR 语义）。\n 与用户/模型列表的 keyword 行为一致；空 = 不过滤。",
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListChannelsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台渠道列表",
        "tags": [
          "AdminService"
        ]
      },
      "post": {
        "description": "===== Channel =====",
        "operationId": "ChannelAdminService_CreateChannel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.CreateChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.CreateChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{channelId}/tier-whitelist": {
      "get": {
        "description": "GetChannelTierWhitelist 查询渠道当前的等级白名单。",
        "operationId": "ChannelAdminService_GetChannelTierWhitelist",
        "parameters": [
          {
            "in": "path",
            "name": "channelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.GetChannelTierWhitelistReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      },
      "put": {
        "description": "===== TierWhitelist =====\n SetChannelTierWhitelist 全量替换渠道的用户等级白名单；空列表 = 清空 = 对所有用户开放。",
        "operationId": "ChannelAdminService_SetChannelTierWhitelist",
        "parameters": [
          {
            "in": "path",
            "name": "channelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.SetChannelTierWhitelistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.SetChannelTierWhitelistReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}": {
      "delete": {
        "operationId": "ChannelAdminService_DeleteChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.DeleteChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      },
      "get": {
        "operationId": "ChannelAdminService_GetChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.GetChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台渠道详情",
        "tags": [
          "AdminService"
        ]
      },
      "patch": {
        "operationId": "ChannelAdminService_UpdateChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.UpdateChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.UpdateChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/disable": {
      "post": {
        "operationId": "ChannelAdminService_DisableChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.DisableChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.DisableChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "禁用渠道",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/enable": {
      "post": {
        "operationId": "ChannelAdminService_EnableChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.EnableChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.EnableChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "启用渠道",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/keys": {
      "get": {
        "operationId": "ChannelAdminService_GetChannelKeys",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.GetChannelKeysReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/keys/{keyIndex}/disable": {
      "post": {
        "operationId": "ChannelAdminService_DisableChannelKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "keyIndex",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.DisableChannelKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.DisableChannelKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/keys/{keyIndex}/enable": {
      "post": {
        "operationId": "ChannelAdminService_EnableChannelKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "keyIndex",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.EnableChannelKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.EnableChannelKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/channels/{id}/test": {
      "post": {
        "operationId": "ChannelAdminService_TestChannel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.TestChannelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.TestChannelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/credit-rates": {
      "get": {
        "operationId": "CreditRateService_List",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.ListCreditRatesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CreditRateService"
        ]
      },
      "post": {
        "operationId": "CreditRateService_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.CreateCreditRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.CreditRateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CreditRateService"
        ]
      }
    },
    "/v1/admin/credit-rates/{currency}": {
      "delete": {
        "operationId": "CreditRateService_Delete",
        "parameters": [
          {
            "in": "path",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CreditRateService"
        ]
      },
      "put": {
        "operationId": "CreditRateService_Update",
        "parameters": [
          {
            "in": "path",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.UpdateCreditRateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.CreditRateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "CreditRateService"
        ]
      }
    },
    "/v1/admin/currencies": {
      "get": {
        "operationId": "SupportedCurrencyService_List",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.currency.v1.ListCurrenciesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SupportedCurrencyService"
        ]
      },
      "post": {
        "operationId": "SupportedCurrencyService_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.currency.v1.CreateCurrencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.currency.v1.CurrencyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SupportedCurrencyService"
        ]
      }
    },
    "/v1/admin/currencies/{currency}": {
      "delete": {
        "operationId": "SupportedCurrencyService_Delete",
        "parameters": [
          {
            "in": "path",
            "name": "currency",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.currency.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SupportedCurrencyService"
        ]
      }
    },
    "/v1/admin/dashboard/summary": {
      "get": {
        "description": "GetAdminSummary 获取管理员仪表盘统计摘要。",
        "operationId": "AdminDashboardService_GetAdminSummary",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dashboard.v1.GetAdminSummaryReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台汇总看板",
        "tags": [
          "DashboardService"
        ]
      }
    },
    "/v1/admin/enterprise/applications": {
      "get": {
        "description": "管理员查询企业升级申请历史列表。\n\n status 支持 pending、approved、rejected、all；为空或 all 时返回全部状态。\n 列表按提交时间倒序返回。",
        "operationId": "EnterpriseService_ListApplications",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ListApplicationsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprise/applications/pending": {
      "get": {
        "description": "管理员查询待审核企业升级申请列表。\n\n 兼容旧接口，仅返回 pending 状态申请。新页面建议使用 ListApplications 并传 status=pending。\n\n 已知 codegen 缺陷（有意保留）：本 RPC 与 ReviewApplication 的 additional_bindings\n 双路径会让 protoc-gen-openapi 生成重复的 operationId（openapi 要求全局唯一）。\n 前端 generate-types.mjs 已自动追加数字后缀去重并告警。additional_bindings 是为\n 兼容旧客户端路径而刻意保留，删除会破坏旧接口，故不动 proto。",
        "operationId": "EnterpriseService_ListPendingApplications",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ListPendingApplicationsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprise/applications/{applicationId}/review": {
      "post": {
        "description": "管理员审核企业升级申请。\n\n 通过时会把申请状态改为 approved；如果申请已绑定团队，会在同一事务内升级团队。\n 拒绝时必须填写 reject_reason；review_comment 为内部审核备注，用户不可见。",
        "operationId": "EnterpriseService_ReviewApplication",
        "parameters": [
          {
            "in": "path",
            "name": "applicationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.enterprise.v1.ReviewApplicationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ReviewApplicationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprise/pending": {
      "get": {
        "description": "管理员查询待审核企业升级申请列表。\n\n 兼容旧接口，仅返回 pending 状态申请。新页面建议使用 ListApplications 并传 status=pending。\n\n 已知 codegen 缺陷（有意保留）：本 RPC 与 ReviewApplication 的 additional_bindings\n 双路径会让 protoc-gen-openapi 生成重复的 operationId（openapi 要求全局唯一）。\n 前端 generate-types.mjs 已自动追加数字后缀去重并告警。additional_bindings 是为\n 兼容旧客户端路径而刻意保留，删除会破坏旧接口，故不动 proto。",
        "operationId": "EnterpriseService_ListPendingApplications",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ListPendingApplicationsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprise/review": {
      "post": {
        "description": "管理员审核企业升级申请。\n\n 通过时会把申请状态改为 approved；如果申请已绑定团队，会在同一事务内升级团队。\n 拒绝时必须填写 reject_reason；review_comment 为内部审核备注，用户不可见。",
        "operationId": "EnterpriseService_ReviewApplication",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.enterprise.v1.ReviewApplicationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ReviewApplicationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprises": {
      "get": {
        "description": "管理员查询已通过的企业账号列表。\n\n 返回审核通过后的企业账号资料，按通过时间倒序返回。",
        "operationId": "EnterpriseService_ListEnterprises",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "riskStatus",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ListEnterprisesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprises/{applicationId}/skip-subaccount-kyc": {
      "post": {
        "description": "设置企业子账号免实名认证开关。\n\n 管理员可为某个企业（申请）设置是否允许其子账号免实名认证调用 API。\n 开关记录在企业申请上，与团队解耦：无论企业是否已建团都可设置。",
        "operationId": "EnterpriseService_SetSkipSubaccountKYC",
        "parameters": [
          {
            "in": "path",
            "name": "applicationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.enterprise.v1.SetSkipSubaccountKYCRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.SetSkipSubaccountKYCReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/enterprises/{id}/audit-history": {
      "get": {
        "description": "查询指定企业的审核历史记录。\n\n 根据企业 ID（即申请 ID）定位提交人，返回该提交人的所有审核记录，按提交时间倒序返回。",
        "operationId": "EnterpriseService_ListAuditHistory",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ListAuditHistoryReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/admin/finance/ledger": {
      "get": {
        "description": "ListLedger 列出钱包流水",
        "operationId": "AdminFinanceService_ListLedger",
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bizType",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListLedgerReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台总账流水",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/finance/topups": {
      "get": {
        "description": "ListTopups 列出充值订单",
        "operationId": "AdminFinanceService_ListTopups",
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "tradeNo",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "id 订单 ID 精确查询（充值订单主键）；为空则不按 ID 过滤。",
            "in": "query",
            "name": "id",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListTopupsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台充值订单列表",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/finance/topups/{id}": {
      "get": {
        "description": "GetTopup 获取充值订单详情",
        "operationId": "AdminFinanceService_GetTopup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetTopupReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台充值订单详情",
        "tags": [
          "AdminService"
        ]
      },
      "patch": {
        "description": "UpdateTopup 更新充值订单",
        "operationId": "AdminFinanceService_UpdateTopup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateTopupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateTopupReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminFinanceService"
        ]
      }
    },
    "/v1/admin/finance/topups/{id}/cancel": {
      "post": {
        "description": "CancelTopup 取消/作废充值订单",
        "operationId": "AdminFinanceService_CancelTopup",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CancelTopupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CancelTopupReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminFinanceService"
        ]
      }
    },
    "/v1/admin/identity/verifications": {
      "get": {
        "description": "ListVerifications 分页查询实名认证记录，敏感信息只返回脱敏值。",
        "operationId": "AdminIdentityService_ListVerifications",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.ListAdminIdentityVerificationsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminIdentityService"
        ]
      }
    },
    "/v1/admin/identity/verifications/{userId}": {
      "get": {
        "description": "GetUserVerification 查询指定用户的实名认证详情和尝试历史。",
        "operationId": "AdminIdentityService_GetUserVerification",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.GetUserIdentityVerificationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminIdentityService"
        ]
      }
    },
    "/v1/admin/identity/verifications/{userId}/manual-verify": {
      "post": {
        "description": "ManualVerify 历史人工认证接口；新请求仅返回停用错误，不再写入 manual_admin。",
        "operationId": "AdminIdentityService_ManualVerify",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/identity.v1.AdminManualVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.AdminIdentityMutationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminIdentityService"
        ]
      }
    },
    "/v1/admin/identity/verifications/{userId}/reject": {
      "post": {
        "description": "RejectVerification 驳回当前处理中的实名认证申请。",
        "operationId": "AdminIdentityService_RejectVerification",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/identity.v1.AdminRejectVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.AdminIdentityMutationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminIdentityService"
        ]
      }
    },
    "/v1/admin/identity/verifications/{userId}/revoke": {
      "post": {
        "description": "RevokeVerification 撤销用户个人实名认证状态。",
        "operationId": "AdminIdentityService_RevokeVerification",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/identity.v1.AdminRevokeVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.AdminIdentityMutationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminIdentityService"
        ]
      }
    },
    "/v1/admin/invoices": {
      "get": {
        "description": "ListInvoices 发票列表（多条件筛选 + 分页，1-4-1）",
        "operationId": "AdminInvoiceService_ListInvoices",
        "parameters": [
          {
            "description": "status 状态过滤（空=全部）",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "user_id 按申请人过滤（0=全部）",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "applied_from 申请时间下界（RFC3339，含）",
            "in": "query",
            "name": "appliedFrom",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "applied_to 申请时间上界（RFC3339，不含）",
            "in": "query",
            "name": "appliedTo",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "amount_min 票面金额下界（micros，含；未传=不限，显式 0=按 0 查询）",
            "in": "query",
            "name": "amountMin",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "amount_max 票面金额上界（micros，含；未传=不限，显式 0=按 0 查询）",
            "in": "query",
            "name": "amountMax",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "page 页码（从 1 起）",
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "page_size 每页条数（默认由服务端定）",
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "invoice_no 按发票号码模糊过滤（忽略首尾空白）",
            "in": "query",
            "name": "invoiceNo",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.ListInvoicesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/export": {
      "get": {
        "description": "ExportInvoices 导出 CSV（base64 in JSON envelope，同 List 筛选；照 monitor 先例，1-4-1）\n 静态 /export 路由必须注册在动态 /{id} 之前，避免被详情路由抢先匹配。",
        "operationId": "AdminInvoiceService_ExportInvoices",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "appliedFrom",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "appliedTo",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "amountMin",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "amountMax",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "invoiceNo",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.ExportInvoicesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}": {
      "get": {
        "description": "GetInvoice 发票详情（含订单明细、换开链）",
        "operationId": "AdminInvoiceService_GetInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceDetailReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/approve": {
      "post": {
        "description": "ApproveInvoice 审核通过（pending→approved）",
        "operationId": "AdminInvoiceService_ApproveInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.ApproveInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/courier": {
      "post": {
        "description": "UpdateCourier 纸质快递补录/修改",
        "operationId": "AdminInvoiceService_UpdateCourier",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.UpdateCourierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/download": {
      "get": {
        "description": "GetInvoiceDownloadURL 获取版式/XML 文件的短期下载 URL。",
        "operationId": "AdminInvoiceService_GetInvoiceDownloadURL",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "file_type 空/layout/pdf/ofd 均表示原票版式文件（默认）；xml 表示数电票 XML；red 表示红字版式件。",
            "in": "query",
            "name": "fileType",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.GetInvoiceDownloadURLReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/issue": {
      "post": {
        "description": "IssueInvoice 开具（approved→issued；换开票校验原票已 reversed；触发交付，1-4-3/4）",
        "operationId": "AdminInvoiceService_IssueInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.IssueInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/reject": {
      "post": {
        "description": "RejectInvoice 审核驳回（pending→rejected，reason 必填，1-4-2）",
        "operationId": "AdminInvoiceService_RejectInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.RejectInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/reverse": {
      "post": {
        "description": "ReverseInvoice 红冲（issued→reversed + links 处置，1-6-2/3）",
        "operationId": "AdminInvoiceService_ReverseInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.ReverseInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/invoices/{id}/upload-url": {
      "post": {
        "description": "CreateInvoiceFileUploadURL 生成 presigned PUT 直传地址（绕过 admin 代理 multipart 坑，§六）。\n 前端 PUT 上传后，把返回的 file_key 传给 IssueInvoice。",
        "operationId": "AdminInvoiceService_CreateInvoiceFileUploadURL",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.invoice.v1.CreateInvoiceFileUploadURLRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.invoice.v1.CreateInvoiceFileUploadURLReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminInvoiceService"
        ]
      }
    },
    "/v1/admin/messages": {
      "post": {
        "description": "SendMessage 发送消息",
        "operationId": "AdminSupportService_SendMessage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminSendMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminSendMessageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/model-endpoints/{id}": {
      "delete": {
        "description": "DeleteModelEndpoint 删除端点",
        "operationId": "AdminModelEndpointService_DeleteModelEndpoint",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteModelEndpointReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelEndpointService"
        ]
      },
      "put": {
        "description": "UpdateModelEndpoint 更新端点",
        "operationId": "AdminModelEndpointService_UpdateModelEndpoint",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateModelEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateModelEndpointReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelEndpointService"
        ]
      }
    },
    "/v1/admin/model-sources/by-model/{modelId}": {
      "get": {
        "description": "===== SourceBinding（资源中心化路由：模型↔资源↔渠道 两级绑定）=====\n ListModelSourceBindings 某模型绑定的资源列表（按 priority desc）。",
        "operationId": "ChannelAdminService_ListModelSourceBindings",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListModelSourceBindingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      },
      "put": {
        "description": "SetModelSourceBindings 整批替换某模型绑定的资源集合（含选举排序）。",
        "operationId": "ChannelAdminService_SetModelSourceBindings",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.SetModelSourceBindingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.SetModelSourceBindingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/model-sources/by-source/{sourceId}": {
      "get": {
        "description": "ListSourceModelBindings 反查引用某资源的模型（资源详情只读视图）。",
        "operationId": "ChannelAdminService_ListSourceModelBindings",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListSourceModelBindingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/model-square/banner-settings": {
      "put": {
        "description": "UpdateBannerSettings 保存 Banner 全局展示配置（仅平台管理员）。",
        "operationId": "AdminModelSquareService_UpdateBannerSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.UpdateBannerSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.BannerSettings"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/banners": {
      "get": {
        "description": "ListBanners 查询 Banner 列表（前后台复用：前台首页展示亦调用本接口，登录即可）。\n ListBanners returns the banner list; shared by admin and console (login is enough).",
        "operationId": "AdminModelSquareService_ListBanners",
        "parameters": [
          {
            "description": "推荐状态过滤：ALL / PENDING / PUBLISHED / OFFLINE，默认 ALL。\n Status filter: ALL / PENDING / PUBLISHED / OFFLINE, default ALL.",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "推荐排序：ALL / ASC / DESC（按 sort_no），默认 ALL（按 created_at DESC）。\n Sort order: ALL / ASC / DESC by sort_no, default ALL (created_at DESC).",
            "in": "query",
            "name": "sortOrder",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "前端当前语言编码：zh 返回中文图，其余一律返回英文图，默认 en。\n Current language: zh returns zh image, anything else returns en, default en.",
            "in": "query",
            "name": "lang",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "推送标题模糊搜索，忽略大小写与首尾空格。",
            "in": "query",
            "name": "title",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListBannersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      },
      "post": {
        "description": "CreateBanner 新增 Banner（仅平台管理员）。\n CreateBanner creates a banner (platform admin only).",
        "operationId": "AdminModelSquareService_CreateBanner",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.CreateBannerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.Banner"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/banners/{bannerId}": {
      "delete": {
        "description": "DeleteBanner 删除 Banner（软删，仅平台管理员）。\n DeleteBanner soft-deletes a banner (platform admin only).",
        "operationId": "AdminModelSquareService_DeleteBanner",
        "parameters": [
          {
            "in": "path",
            "name": "bannerId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.DeleteBannerReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      },
      "get": {
        "description": "GetBanner 按主键精确查询单个 Banner（含全部语言图片，仅平台管理员）。\n GetBanner fetches a single banner by ID with all language images (platform admin only).",
        "operationId": "AdminModelSquareService_GetBanner",
        "parameters": [
          {
            "in": "path",
            "name": "bannerId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.Banner"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      },
      "put": {
        "description": "UpdateBanner 编辑 Banner（仅平台管理员）。\n UpdateBanner edits a banner (platform admin only).",
        "operationId": "AdminModelSquareService_UpdateBanner",
        "parameters": [
          {
            "in": "path",
            "name": "bannerId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.UpdateBannerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.Banner"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/banners/{bannerId}/status": {
      "patch": {
        "description": "UpdateBannerStatus 上架 / 下架 Banner（仅平台管理员）。\n UpdateBannerStatus publishes/offlines a banner (platform admin only).",
        "operationId": "AdminModelSquareService_UpdateBannerStatus",
        "parameters": [
          {
            "in": "path",
            "name": "bannerId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.UpdateBannerStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.UpdateBannerStatusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/entry-slots": {
      "get": {
        "description": "ListEntrySlots 后台查询固定入口位配置列表（仅平台管理员）。\n ListEntrySlots lists fixed entry-slot config for the admin config page (platform admin only).",
        "operationId": "AdminModelSquareService_ListEntrySlots",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListEntrySlotsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/entry-slots/{slotNo}": {
      "put": {
        "description": "UpdateEntrySlot 修改固定入口位配置（仅平台管理员，slotNo 只允许 1/2/3）。\n UpdateEntrySlot updates a fixed entry-slot config (platform admin only, slotNo must be 1/2/3).",
        "operationId": "AdminModelSquareService_UpdateEntrySlot",
        "parameters": [
          {
            "description": "slot_no 固定入口编号，只允许 1/2/3。/ slot_no: fixed entry number, must be 1/2/3.",
            "in": "path",
            "name": "slotNo",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.UpdateEntrySlotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.UpdateEntrySlotReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-square/visualization-metrics": {
      "get": {
        "description": "ListVisualizationMetrics 查询可视化数据配置列表（不分页，仅平台管理员）。\n ListVisualizationMetrics lists visualization metric config (no pagination, platform admin only).",
        "operationId": "AdminModelSquareService_ListVisualizationMetrics",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListVisualizationMetricsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      },
      "put": {
        "description": "SaveVisualizationMetrics 保存可视化数据配置（仅平台管理员）。\n SaveVisualizationMetrics saves visualization metric config (platform admin only).",
        "operationId": "AdminModelSquareService_SaveVisualizationMetrics",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.SaveVisualizationMetricsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListVisualizationMetricsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSquareService"
        ]
      }
    },
    "/v1/admin/model-vendors": {
      "get": {
        "description": "ListVendors 列出所有供应商（不分页，带模型计数）",
        "operationId": "AdminVendorService_ListVendors",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListVendorsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      },
      "post": {
        "description": "CreateVendor 创建供应商",
        "operationId": "AdminVendorService_CreateVendor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateVendorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateVendorReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      }
    },
    "/v1/admin/model-vendors/search": {
      "get": {
        "description": "SearchVendors 搜索供应商（分页）",
        "operationId": "AdminVendorService_SearchVendors",
        "parameters": [
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page_size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.SearchVendorsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      }
    },
    "/v1/admin/model-vendors/{id}": {
      "delete": {
        "description": "DeleteVendor 删除供应商",
        "operationId": "AdminVendorService_DeleteVendor",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteVendorReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      },
      "get": {
        "description": "GetVendor 获取供应商详情",
        "operationId": "AdminVendorService_GetVendor",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetVendorReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      },
      "patch": {
        "description": "UpdateVendor 更新供应商",
        "operationId": "AdminVendorService_UpdateVendor",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateVendorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateVendorReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      }
    },
    "/v1/admin/model-vendors/{id}/status": {
      "patch": {
        "description": "UpdateVendorStatus 更新供应商状态",
        "operationId": "AdminVendorService_UpdateVendorStatus",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateVendorStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateVendorStatusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminVendorService"
        ]
      }
    },
    "/v1/admin/models": {
      "get": {
        "description": "ListModels 列出模型",
        "operationId": "AdminModelService_ListModels",
        "parameters": [
          {
            "in": "query",
            "name": "vendorId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "capability",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListModelsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台模型列表",
        "tags": [
          "AdminService"
        ]
      },
      "post": {
        "description": "CreateModel 创建模型",
        "operationId": "AdminModelService_CreateModel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateModelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      }
    },
    "/v1/admin/models/pricing/estimate": {
      "post": {
        "description": "EstimateModelPricing 计费表达式 dry-run: 前端 Token 估算器实时预览。\n\n 语义: 用与生产结算完全一致的 billingexpr 引擎, 按传入 token 参数跑一次\n 表达式, 返回 cost + matched_tier。**不落任何数据**、不触发缓存, 纯计算。\n\n 权限: 与 UpdateModel 同门槛 (models:update), 避免非管理员探测定价规则。\n\n 请求侧不校验表达式一定要属于某个已存在模型——同一表达式可以在多个模型\n 之间复制粘贴调试。表达式不合法/负数返回 400。",
        "operationId": "AdminModelService_EstimateModelPricing",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.EstimateModelPricingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.EstimateModelPricingReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      }
    },
    "/v1/admin/models/{id}": {
      "delete": {
        "description": "DeleteModel 删除模型",
        "operationId": "AdminModelService_DeleteModel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteModelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      },
      "get": {
        "description": "GetModel 获取模型详情",
        "operationId": "AdminModelService_GetModel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetModelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台模型详情",
        "tags": [
          "AdminService"
        ]
      },
      "put": {
        "description": "UpdateModel 更新模型",
        "operationId": "AdminModelService_UpdateModel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateModelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      }
    },
    "/v1/admin/models/{id}/faq": {
      "put": {
        "description": "UpdateModelFaq 更新模型落地页常见问题（全量替换；空数组=清空，C 端隐藏 FAQ 区域）",
        "operationId": "AdminModelService_UpdateModelFaq",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateModelFaqRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateModelFaqReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      }
    },
    "/v1/admin/models/{id}/status": {
      "patch": {
        "description": "UpdateModelStatus 更新模型状态",
        "operationId": "AdminModelService_UpdateModelStatus",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateModelStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateModelStatusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelService"
        ]
      }
    },
    "/v1/admin/models/{modelId}/endpoints": {
      "get": {
        "description": "ListModelEndpoints 列出某个模型的所有端点",
        "operationId": "AdminModelEndpointService_ListModelEndpoints",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListModelEndpointsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelEndpointService"
        ]
      },
      "post": {
        "description": "CreateModelEndpoint 新增端点",
        "operationId": "AdminModelEndpointService_CreateModelEndpoint",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateModelEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateModelEndpointReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelEndpointService"
        ]
      }
    },
    "/v1/admin/models/{modelId}/param-customs": {
      "get": {
        "description": "ListModelParamCustoms 列出某个模型的所有参数定制",
        "operationId": "AdminModelParamCustomService_ListModelParamCustoms",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListModelParamCustomsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      }
    },
    "/v1/admin/monitor/audit-logs": {
      "get": {
        "description": "查询管理后台审计日志。用于“日志管理-审计日志”页面，也可通过 targetType=user\u0026targetId={userId} 查询某个用户作为目标资源的操作记录。",
        "operationId": "AdminMonitorService_ListAuditLogs",
        "parameters": [
          {
            "description": "操作者用户 ID；用于查询某个管理员或用户发起的操作。",
            "in": "query",
            "name": "actorId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "模块名，精确匹配，例如 admin.user。",
            "in": "query",
            "name": "module",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "动作名，精确匹配，例如 ban、unban、delete、balance.topup。",
            "in": "query",
            "name": "action",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "目标资源类型，精确匹配；查询用户相关日志时传 user。",
            "in": "query",
            "name": "targetType",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "目标资源 ID；查询某个用户相关日志时传用户 ID。",
            "in": "query",
            "name": "targetId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "起始时间，RFC3339/ISO8601 格式，审计日志时间窗口为 [from, to]。",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "结束时间，RFC3339/ISO8601 格式，审计日志时间窗口为 [from, to]。",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "页码，默认 1。",
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "每页条数，默认 20。",
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListAuditLogsReply"
                }
              }
            },
            "description": "审计日志列表，包含总数、分页信息和审计条目。"
          }
        },
        "summary": "查询审计日志",
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-logs": {
      "get": {
        "description": "查询模型/API 调用日志。用于“日志管理-调用日志”页面，返回用户、模型、通道、状态、Token、计费和延迟等字段。接口使用游标分页，不返回 total。时间范围默认最近 24 小时，显式范围最多 90 天；requestId 查询也必须受时间范围约束以裁剪月度分区。",
        "operationId": "AdminMonitorService_ListUsageLogs",
        "parameters": [
          {
            "description": "请求 ID（UUID）精确过滤；时间范围仍需受约束，省略时后端默认最近 24 小时。",
            "in": "query",
            "name": "requestId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "用户 ID；不传表示全部用户。",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "模型 ID；不传表示全部模型。",
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "通道 ID；不传表示全部通道。",
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "状态过滤：0 或不传=全部，1=成功，2=失败。",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                0,
                1,
                2
              ],
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "起始时间，RFC3339/ISO8601 格式，用量日志时间窗口为 [from, to)。",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "结束时间，RFC3339/ISO8601 格式，用量日志时间窗口为 [from, to)。",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "游标分页标识，使用上一次响应的 nextCursor 获取下一页。",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "每页条数，默认 20。",
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListUsageLogsReply"
                }
              }
            },
            "description": "模型调用日志列表，包含 items、hasMore 和 nextCursor。"
          }
        },
        "summary": "查询模型调用日志",
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-logs/count": {
      "get": {
        "description": "CountUsageLogs returns the exact total for the same filters as ListUsageLogs.\n It is loaded independently from cursor pages; unavailable rollup proof\n returns USAGE_LOG_COUNT_UNAVAILABLE without affecting the list endpoint.",
        "operationId": "AdminMonitorService_CountUsageLogs",
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "0/empty=all, 1=ok, 2=error; semantics match ListUsageLogsRequest.status.",
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "RFC3339/ISO8601 string; offsets are allowed. Window is [from,to), max 90 days.",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Values later than the database snapshot time are truncated to that snapshot time.",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact request UUID. The normalized time range remains mandatory for partition pruning.",
            "in": "query",
            "name": "requestId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "渠道资源ID过滤",
            "in": "query",
            "name": "sourceId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "渠道资源名称过滤（后端解析为 source_id，查不到返回空）",
            "in": "query",
            "name": "sourceName",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CountUsageLogsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-logs/export": {
      "get": {
        "description": "按查询条件导出模型/API 调用日志 XLSX。过滤条件语义与“查询模型调用日志”一致；在线导出最多 10000 行，避免超大范围扫描。",
        "operationId": "AdminMonitorService_ExportUsageLogs",
        "parameters": [
          {
            "description": "请求 ID（UUID）精确过滤；时间范围仍需受约束，省略时后端默认最近 24 小时。",
            "in": "query",
            "name": "requestId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "用户 ID；不传表示全部用户。",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "模型 ID；不传表示全部模型。",
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "通道 ID；不传表示全部通道。",
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "状态过滤：0 或不传=全部，1=成功，2=失败。",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                0,
                1,
                2
              ],
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "起始时间，RFC3339/ISO8601 格式，用量日志时间窗口为 [from, to)。",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "结束时间，RFC3339/ISO8601 格式，用量日志时间窗口为 [from, to)。",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "API Key ID 精确过滤。",
            "in": "query",
            "name": "tokenId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "模型名称精确过滤，与 modelId 互补。",
            "in": "query",
            "name": "modelName",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "要导出的列 key；可重复传递，省略或空数组表示全部列，未知 key 忽略。",
            "explode": true,
            "in": "query",
            "name": "columns",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ExportUsageLogsReply"
                }
              }
            },
            "description": "XLSX 导出结果。data 为 bytes 字段，JSON 网关下表现为 base64 字符串；filename 为含 .xlsx 后缀的建议文件名。"
          }
        },
        "summary": "导出模型调用日志",
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-logs/stat": {
      "get": {
        "description": "GetUsageLogsStat returns realtime RPM/TPM aggregated over a fixed trailing\n 60s window of usage logs. Filters mirror ListUsageLogsRequest semantics.\n\n Keep this literal route before /v1/admin/monitor/usage-logs/{id}; otherwise\n some HTTP routers may match \"stat\" as a path id.",
        "operationId": "AdminMonitorService_GetUsageLogsStat",
        "parameters": [
          {
            "description": "End-user id. Empty means all users.",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Platform model id. Empty means all models.",
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Upstream channel id. Empty means all channels.",
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "0/empty=all, 1=ok, 2=error; semantics match ListUsageLogsRequest.status.",
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUsageLogsStatReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-logs/{id}": {
      "get": {
        "description": "查询单条模型/API 调用日志详情，包含请求体和响应体快照。返回内容依赖写入 usage_logs.meta 时是否已保存 request_body/response_body，敏感字段应由写入方脱敏。",
        "operationId": "AdminMonitorService_GetUsageLogDetail",
        "parameters": [
          {
            "description": "用量日志 ID。",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "列表项创建时间；提供后可裁剪月度 usage_logs 分区，省略时兼容旧客户端但可能探测多个分区。",
            "in": "query",
            "name": "createdAt",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUsageLogDetailReply"
                }
              }
            },
            "description": "单条模型调用日志详情。"
          }
        },
        "summary": "查询模型调用日志详情",
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/monitor/usage-summary": {
      "get": {
        "description": "查询指定时间范围内按小时聚合的调用量、错误数、错误率和平均延迟。用于“日志管理-用量摘要”页面。",
        "operationId": "AdminMonitorService_GetUsageSummary",
        "parameters": [
          {
            "description": "起始时间，RFC3339/ISO8601 格式，用量摘要时间窗口为 [from, to)。",
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "结束时间，RFC3339/ISO8601 格式，用量摘要时间窗口为 [from, to)。",
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUsageSummaryReply"
                }
              }
            },
            "description": "按时间桶聚合的用量摘要列表。"
          }
        },
        "summary": "查询用量摘要",
        "tags": [
          "AdminMonitorService"
        ]
      }
    },
    "/v1/admin/param-customs": {
      "post": {
        "description": "UpsertModelParamCustom 创建或更新参数定制（自动派生模型端点）",
        "operationId": "AdminModelParamCustomService_UpsertModelParamCustom",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpsertModelParamCustomRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpsertModelParamCustomReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      }
    },
    "/v1/admin/param-customs/{id}": {
      "delete": {
        "description": "DeleteModelParamCustom 删除参数定制（解绑；已派生端点保留）",
        "operationId": "AdminModelParamCustomService_DeleteModelParamCustom",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteModelParamCustomReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      },
      "get": {
        "description": "GetModelParamCustom 获取单个参数定制详情",
        "operationId": "AdminModelParamCustomService_GetModelParamCustom",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetModelParamCustomReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelParamCustomService"
        ]
      }
    },
    "/v1/admin/param-field-libraries": {
      "get": {
        "description": "ListParamFieldLibraries 列出全部字段库（模板编辑器展示可选字段与约束上限）",
        "operationId": "AdminAPISpecTemplateService_ListParamFieldLibraries",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListParamFieldLibrariesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAPISpecTemplateService"
        ]
      }
    },
    "/v1/admin/payment-channels": {
      "get": {
        "operationId": "PaymentChannelConfigService_List",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.ListPaymentChannelConfigsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PaymentChannelConfigService"
        ]
      }
    },
    "/v1/admin/payment-channels/{provider}": {
      "put": {
        "operationId": "PaymentChannelConfigService_Upsert",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.UpsertPaymentChannelConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.PaymentChannelConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PaymentChannelConfigService"
        ]
      }
    },
    "/v1/admin/rate-limits": {
      "get": {
        "description": "ListRateLimitConfigs 列出限流配置",
        "operationId": "AdminRateLimitService_ListRateLimitConfigs",
        "parameters": [
          {
            "in": "query",
            "name": "scopeType",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scopeId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limitType",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "enabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListRateLimitConfigsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminRateLimitService"
        ]
      },
      "post": {
        "description": "CreateRateLimitConfig 创建限流配置",
        "operationId": "AdminRateLimitService_CreateRateLimitConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateRateLimitConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.RateLimitConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminRateLimitService"
        ]
      }
    },
    "/v1/admin/rate-limits/{id}": {
      "delete": {
        "description": "DeleteRateLimitConfig 删除限流配置",
        "operationId": "AdminRateLimitService_DeleteRateLimitConfig",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteRateLimitConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminRateLimitService"
        ]
      },
      "get": {
        "description": "GetRateLimitConfig 获取限流配置详情",
        "operationId": "AdminRateLimitService_GetRateLimitConfig",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.RateLimitConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminRateLimitService"
        ]
      },
      "put": {
        "description": "UpdateRateLimitConfig 更新限流配置",
        "operationId": "AdminRateLimitService_UpdateRateLimitConfig",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateRateLimitConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.RateLimitConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminRateLimitService"
        ]
      }
    },
    "/v1/admin/referrals/inviters": {
      "get": {
        "operationId": "AdminReferralService_ListInviters",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "inviteCode",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "inviteEnabled",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListInvitersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/referrals/inviters/{userId}": {
      "get": {
        "operationId": "AdminReferralService_GetInviter",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetInviterReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/referrals/inviters/{userId}/invite-code/disable": {
      "post": {
        "operationId": "AdminReferralService_DisableInviteCode",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.DisableInviteCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DisableInviteCodeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/referrals/inviters/{userId}/invite-code/enable": {
      "post": {
        "operationId": "AdminReferralService_EnableInviteCode",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.EnableInviteCodeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.EnableInviteCodeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/referrals/inviters/{userId}/invitees": {
      "get": {
        "operationId": "AdminReferralService_ListInvitees",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "referralStatus",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "rewardStatus",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListInviteesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/referrals/reward-config": {
      "get": {
        "operationId": "AdminReferralService_GetRewardConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetRewardConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      },
      "put": {
        "operationId": "AdminReferralService_UpdateRewardConfig",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateRewardConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateRewardConfigReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminReferralService"
        ]
      }
    },
    "/v1/admin/route/resolve": {
      "get": {
        "description": "ResolveRoute 路由解析（诊断）：给定 model_id（可选 source_code）返回完整候选链\n 资源（按选举顺序）→ 渠道（按资源内顺序）。直读 DB 反映当前配置，不代表\n RouteCatalog 快照（≤30s 刷新延迟）。",
        "operationId": "ChannelAdminService_ResolveRoute",
        "parameters": [
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "source_code 非空时只解析该资源（对应 model:code 指定资源路径）。",
            "in": "query",
            "name": "sourceCode",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ResolveRouteReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/settings": {
      "get": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "查询站点配置",
        "tags": [
          "AdminService"
        ]
      },
      "put": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "更新站点配置",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/settings/audit-log": {
      "get": {
        "description": "GetAuditLogSettings 读取审计日志保留策略。",
        "operationId": "AdminAuditLogSettingsService_GetAuditLogSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetAuditLogSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAuditLogSettingsService"
        ]
      },
      "put": {
        "description": "UpdateAuditLogSettings 更新审计日志保留策略；retention_days 越界返回 400。",
        "operationId": "AdminAuditLogSettingsService_UpdateAuditLogSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateAuditLogSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateAuditLogSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAuditLogSettingsService"
        ]
      }
    },
    "/v1/admin/settings/auth-session": {
      "get": {
        "description": "GetAuthSessionSettings 读取会话 TTL 策略。",
        "operationId": "AdminAuthSessionSettingsService_GetAuthSessionSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetAuthSessionSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAuthSessionSettingsService"
        ]
      },
      "put": {
        "description": "UpdateAuthSessionSettings 更新会话 TTL 策略；TTL 数值越界返回 400。",
        "operationId": "AdminAuthSessionSettingsService_UpdateAuthSessionSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateAuthSessionSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateAuthSessionSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminAuthSessionSettingsService"
        ]
      }
    },
    "/v1/admin/settings/email": {
      "get": {
        "description": "GetEmailSettings 读取邮件 / SMTP 配置；密码字段返回占位符避免明文下发。",
        "operationId": "AdminEmailSettingsService_GetEmailSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetEmailSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminEmailSettingsService"
        ]
      },
      "put": {
        "description": "UpdateEmailSettings 更新邮件 / SMTP 配置；密码留空或为占位符表示不修改。",
        "operationId": "AdminEmailSettingsService_UpdateEmailSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateEmailSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateEmailSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminEmailSettingsService"
        ]
      }
    },
    "/v1/admin/settings/email/test": {
      "post": {
        "description": "TestEmail 用已保存的 SMTP 配置向指定收件人发送一封测试邮件（管理端验证邮件配置）。",
        "operationId": "AdminEmailSettingsService_TestEmail",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.TestEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.TestEmailReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminEmailSettingsService"
        ]
      }
    },
    "/v1/admin/settings/model": {
      "get": {
        "description": "GetModelSettings 读取模型全局设置。",
        "operationId": "AdminModelSettingsService_GetModelSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetModelSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSettingsService"
        ]
      },
      "put": {
        "description": "UpdateModelSettings 更新模型全局设置；JSON 结构非法 / 值超范围返回 400。",
        "operationId": "AdminModelSettingsService_UpdateModelSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateModelSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateModelSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminModelSettingsService"
        ]
      }
    },
    "/v1/admin/settings/monitor": {
      "get": {
        "description": "GetMonitorSettings 读取全局监控设置。",
        "operationId": "AdminMonitorSettingsService_GetMonitorSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetMonitorSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminMonitorSettingsService"
        ]
      },
      "put": {
        "description": "UpdateMonitorSettings 更新全局监控设置；状态码规则非法返回 400。",
        "operationId": "AdminMonitorSettingsService_UpdateMonitorSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateMonitorSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateMonitorSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminMonitorSettingsService"
        ]
      }
    },
    "/v1/admin/settings/site": {
      "get": {
        "description": "GetSiteSettings 读取站点公开配置。",
        "operationId": "AdminSiteSettingsService_GetSiteSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetSiteSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSiteSettingsService"
        ]
      },
      "put": {
        "description": "UpdateSiteSettings 批量更新站点公开配置。",
        "operationId": "AdminSiteSettingsService_UpdateSiteSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateSiteSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateSiteSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSiteSettingsService"
        ]
      }
    },
    "/v1/admin/settings/sms": {
      "get": {
        "description": "GetSMSSettings 读取短信配置；AK Secret 字段返回占位符避免明文下发。",
        "operationId": "AdminSMSSettingsService_GetSMSSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetSMSSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSMSSettingsService"
        ]
      },
      "put": {
        "description": "UpdateSMSSettings 更新短信配置；AK Secret 留空或为占位符表示不修改。",
        "operationId": "AdminSMSSettingsService_UpdateSMSSettings",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateSMSSettingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateSMSSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSMSSettingsService"
        ]
      }
    },
    "/v1/admin/source-channels/by-channel/{channelId}": {
      "get": {
        "description": "ListChannelBoundSources 反查某渠道挂在哪些资源下（渠道详情回显）。",
        "operationId": "ChannelAdminService_ListChannelBoundSources",
        "parameters": [
          {
            "in": "path",
            "name": "channelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListChannelBoundSourcesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/source-channels/by-source/{sourceId}": {
      "get": {
        "description": "ListSourceChannelBindings 某资源下绑定的渠道列表（按 priority desc）。",
        "operationId": "ChannelAdminService_ListSourceChannelBindings",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListSourceChannelBindingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      },
      "put": {
        "description": "SetSourceChannelBindings 整批替换某资源下绑定的渠道集合（含选举排序）。\n strict_model_mapping 渠道映射未覆盖资源全部模型时 400（SOURCE_BINDING_MODEL_UNSUPPORTED）。",
        "operationId": "ChannelAdminService_SetSourceChannelBindings",
        "parameters": [
          {
            "in": "path",
            "name": "sourceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/channel.v1.SetSourceChannelBindingsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.SetSourceChannelBindingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ChannelAdminService"
        ]
      }
    },
    "/v1/admin/subscription/plans": {
      "get": {
        "operationId": "AdminSubscriptionService_AdminListPlans",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminListPlansReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      },
      "post": {
        "operationId": "AdminSubscriptionService_CreatePlan",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.CreatePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminPlanReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      }
    },
    "/v1/admin/subscription/plans/{id}": {
      "delete": {
        "operationId": "AdminSubscriptionService_DeletePlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminPlanReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      },
      "put": {
        "operationId": "AdminSubscriptionService_UpdatePlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.UpdatePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminPlanReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      }
    },
    "/v1/admin/subscription/plans/{id}/disable": {
      "put": {
        "operationId": "AdminSubscriptionService_DisablePlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.DisablePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminPlanReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      }
    },
    "/v1/admin/subscription/plans/{id}/enable": {
      "put": {
        "operationId": "AdminSubscriptionService_EnablePlan",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.EnablePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.AdminPlanReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSubscriptionService"
        ]
      }
    },
    "/v1/admin/tasks": {
      "get": {
        "description": "ListTasks 全平台任务列表（无行过滤；游标分页 + 过滤，id 倒序）。",
        "operationId": "AdminProviderTaskService_ListTasks",
        "parameters": [
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "billingStates",
            "schema": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "apiKeyId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.AdminListTasksReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminProviderTaskService"
        ]
      }
    },
    "/v1/admin/tasks/{id}": {
      "get": {
        "description": "GetTask 单任务详情（运维视角增补字段）。",
        "operationId": "AdminProviderTaskService_GetTask",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.AdminGetTaskReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminProviderTaskService"
        ]
      }
    },
    "/v1/admin/tasks/{id}/blob/{seq}": {
      "get": {
        "description": "平台管理员（task:read）下载任意任务的 result_ref blob。",
        "operationId": "AdminProviderTaskService_DownloadTaskBlob",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "seq",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "blob 字节流"
          },
          "404": {
            "description": "任务不存在 / seq 越界 / 对象缺失"
          },
          "502": {
            "description": "存储侧不可用"
          }
        },
        "summary": "管理员下载异步任务结果 blob",
        "tags": [
          "AdminProviderTaskService"
        ]
      }
    },
    "/v1/admin/teams/{teamId}/realname-requirement": {
      "put": {
        "operationId": "TeamService_UpdateTeamRealnameRequirement",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.UpdateTeamRealnameRequirementRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.UpdateTeamRealnameRequirementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/admin/tickets": {
      "get": {
        "description": "ListTickets 列出所有工单",
        "operationId": "AdminSupportService_ListTickets",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "assigneeId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminListTicketsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/tickets/{ticketId}": {
      "get": {
        "description": "GetTicket 获取工单详情",
        "operationId": "AdminSupportService_GetTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminGetTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      },
      "put": {
        "description": "UpdateTicket 更新工单",
        "operationId": "AdminSupportService_UpdateTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminUpdateTicketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminUpdateTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/tickets/{ticketId}/assign": {
      "post": {
        "description": "AssignTicket 分配工单",
        "operationId": "AdminSupportService_AssignTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminAssignTicketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminAssignTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/tickets/{ticketId}/close": {
      "post": {
        "description": "CloseTicket 关闭工单",
        "operationId": "AdminSupportService_CloseTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminCloseTicketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminCloseTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/tickets/{ticketId}/replies": {
      "post": {
        "description": "CreateReply 创建工单回复（客服）",
        "operationId": "AdminSupportService_CreateReply",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminCreateReplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminCreateReplyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/tickets/{ticketId}/resolve": {
      "post": {
        "description": "ResolveTicket 解决工单",
        "operationId": "AdminSupportService_ResolveTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.AdminResolveTicketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.AdminResolveTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminSupportService"
        ]
      }
    },
    "/v1/admin/topup-packages": {
      "get": {
        "operationId": "TopupPackageService_List",
        "parameters": [
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.ListTopupPackagesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupPackageService"
        ]
      },
      "post": {
        "operationId": "TopupPackageService_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.CreateTopupPackageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.TopupPackageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupPackageService"
        ]
      }
    },
    "/v1/admin/topup-packages/{id}": {
      "delete": {
        "operationId": "TopupPackageService_Delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupPackageService"
        ]
      },
      "put": {
        "operationId": "TopupPackageService_Update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.UpdateTopupPackageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.TopupPackageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupPackageService"
        ]
      }
    },
    "/v1/admin/topup-rules": {
      "get": {
        "operationId": "TopupRuleService_List",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.ListTopupRulesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupRuleService"
        ]
      },
      "post": {
        "operationId": "TopupRuleService_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.CreateTopupRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.TopupRuleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupRuleService"
        ]
      }
    },
    "/v1/admin/topup-rules/{id}": {
      "delete": {
        "operationId": "TopupRuleService_Delete",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupRuleService"
        ]
      },
      "put": {
        "operationId": "TopupRuleService_Update",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.UpdateTopupRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.TopupRuleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupRuleService"
        ]
      }
    },
    "/v1/admin/topup-rules/{id}/disable": {
      "put": {
        "operationId": "TopupRuleService_Disable",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.topup.v1.DisableTopupRuleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.topup.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupRuleService"
        ]
      }
    },
    "/v1/admin/uploads/entry-slot/presign": {
      "post": {
        "description": "CreateEntrySlotUploadPresign 生成固定入口图标的 presigned PUT 直传地址与永久公开 URL。",
        "operationId": "AdminUploadService_CreateEntrySlotUploadPresign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.uploads.v1.CreateUploadPresignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.uploads.v1.CreateUploadPresignReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUploadService"
        ]
      }
    },
    "/v1/admin/uploads/presign": {
      "post": {
        "description": "CreateUploadPresign 生成 Banner 图片的 presigned PUT 直传地址与永久公开 URL。",
        "operationId": "AdminUploadService_CreateUploadPresign",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.uploads.v1.CreateUploadPresignRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.uploads.v1.CreateUploadPresignReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUploadService"
        ]
      }
    },
    "/v1/admin/user-tiers": {
      "get": {
        "operationId": "AdminTierService_ListTiers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListTiersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      },
      "post": {
        "operationId": "AdminTierService_CreateTier",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateTierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateTierReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      }
    },
    "/v1/admin/user-tiers/{id}": {
      "delete": {
        "operationId": "AdminTierService_DeleteTier",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteTierReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      },
      "get": {
        "operationId": "AdminTierService_GetTier",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetTierReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      },
      "patch": {
        "operationId": "AdminTierService_UpdateTier",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateTierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateTierReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      }
    },
    "/v1/admin/users": {
      "get": {
        "description": "ListUsers 列出用户",
        "operationId": "AdminUserService_ListUsers",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "status 是字符串状态枚举（active / banned）；空串视作不过滤，deleted 用户由软删除字段表示。\n 历史接口之前是 int32，本次破坏性变更，调用方按字符串发送。",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "accountType",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "email",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "role 字符串筛选（与前端 AdminUser.role 取值对齐）。",
            "in": "query",
            "name": "role",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "keyword 模糊匹配 username / email / phone。",
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "sort_by: 'created_at' (默认) | 'balance' | 'last_login_at'",
            "in": "query",
            "name": "sortBy",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "sort_order: 'asc' | 'desc'（默认 desc）",
            "in": "query",
            "name": "sortOrder",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "limit 是前端 AdminUser API 用的分页大小别名（等同 size）。\n 同时提供 size（老） 和 limit（新前端约定），二者取非零的一个。",
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "account_types 多值筛选（用户管理页一次列 C 端 {1,4,5}）。\n 非空时按 IN 过滤并覆盖单值 account_type；为空时回退到单值 account_type 语义。",
            "in": "query",
            "name": "accountTypes",
            "schema": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListUsersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台用户列表",
        "tags": [
          "AdminService"
        ]
      },
      "post": {
        "description": "CreateUser 创建用户",
        "operationId": "AdminUserService_CreateUser",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.CreateUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台创建用户",
        "tags": [
          "AdminService"
        ]
      }
    },
    "/v1/admin/users/stats": {
      "get": {
        "description": "GetUserStats 用户统计（admin 概览卡片）",
        "operationId": "AdminUserService_GetUserStats",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUserStatsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}": {
      "delete": {
        "description": "DeleteUser 删除/注销用户（软删除）",
        "operationId": "AdminUserService_DeleteUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "软删除审计原因（必填，写入 admin_audit 审计日志）",
            "in": "query",
            "name": "reason",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "删除用户",
        "tags": [
          "AdminService"
        ]
      },
      "get": {
        "description": "GetUser 获取用户详情",
        "operationId": "AdminUserService_GetUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "后台用户详情",
        "tags": [
          "AdminService"
        ]
      },
      "patch": {
        "description": "UpdateUser 更新用户资料",
        "operationId": "AdminUserService_UpdateUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UpdateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UpdateUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/2fa/reset": {
      "post": {
        "operationId": "AdminUserService_ResetUserTwoFA",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.ResetUserSecurityCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ResetUserSecurityCredentialReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/balance-trend": {
      "get": {
        "description": "TopupUserBalance 管理员手动充值",
        "operationId": "AdminUserService_GetUserBalanceTrend",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUserBalanceTrendReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/balance/deduct": {
      "post": {
        "description": "DeductUserBalance 管理员手动扣款",
        "operationId": "AdminUserService_DeductUserBalance",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.AdjustUserBalanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.AdjustUserBalanceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/balance/topup": {
      "post": {
        "operationId": "AdminUserService_TopupUserBalance",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.AdjustUserBalanceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.AdjustUserBalanceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/ban": {
      "post": {
        "operationId": "AdminUserService_BanUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.BanUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.BanUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/ledgers": {
      "get": {
        "description": "ListUserLedgers 单个用户的钱包流水",
        "operationId": "AdminUserService_ListUserLedgers",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListUserLedgersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/passkeys/reset": {
      "post": {
        "operationId": "AdminUserService_ResetUserPasskeys",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.ResetUserSecurityCredentialRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ResetUserSecurityCredentialReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/quota/adjust": {
      "post": {
        "description": "AdjustUserQuota 调整用户当前订阅额度，也可同时调整余额。",
        "operationId": "AdminUserService_AdjustUserQuota",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.AdjustUserQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.AdjustUserQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/sessions/revoke": {
      "post": {
        "description": "BanUser 封禁用户（带 reason / 可选 duration）",
        "operationId": "AdminUserService_RevokeUserSessions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.RevokeUserSessionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.RevokeUserSessionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/subscriptions": {
      "get": {
        "description": "ListUserSubscriptions 单个用户的订阅列表",
        "operationId": "AdminUserService_ListUserSubscriptions",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "size",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.ListUserSubscriptionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      },
      "post": {
        "description": "CreateUserSubscription 为用户创建订阅",
        "operationId": "AdminUserService_CreateUserSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CreateUserSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UserSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/subscriptions/{subscriptionId}": {
      "delete": {
        "description": "DeleteUserSubscription 删除用户订阅",
        "operationId": "AdminUserService_DeleteUserSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.DeleteUserSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/subscriptions/{subscriptionId}/cancel": {
      "post": {
        "description": "CancelUserSubscription 作废用户订阅",
        "operationId": "AdminUserService_CancelUserSubscription",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "subscriptionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.CancelUserSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UserSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/unban": {
      "post": {
        "description": "UnbanUser 解封用户（带 reason）",
        "operationId": "AdminUserService_UnbanUser",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.UnbanUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.UnbanUserReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{id}/usage-trend": {
      "get": {
        "operationId": "AdminUserService_GetUserUsageTrend",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.GetUserUsageTrendReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminUserService"
        ]
      }
    },
    "/v1/admin/users/{userId}/tier": {
      "put": {
        "operationId": "AdminTierService_SetUserTier",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/admin.v1.SetUserTierRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/admin.v1.SetUserTierReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "AdminTierService"
        ]
      }
    },
    "/v1/announcements": {
      "get": {
        "description": "ListAnnouncements 查询公告列表",
        "operationId": "UserSupportService_ListAnnouncements",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.ListAnnouncementsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/announcements/{announcementId}": {
      "get": {
        "description": "GetAnnouncement 获取公告详情",
        "operationId": "UserSupportService_GetAnnouncement",
        "parameters": [
          {
            "in": "path",
            "name": "announcementId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.GetAnnouncementReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/chat/completions": {
      "post": {
        "description": "API Key 鉴权后转发到路由后的上游渠道。",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "OpenAI Chat Completions 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/console/activity/checkin": {
      "post": {
        "description": "Checkin 每日签到",
        "operationId": "ActivityService_Checkin",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.CheckinRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.CheckinReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "每日签到",
        "tags": [
          "ActivityService"
        ]
      }
    },
    "/v1/console/activity/checkin/status": {
      "get": {
        "description": "GetCheckinStatus 查询签到状态",
        "operationId": "ActivityService_GetCheckinStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.GetCheckinStatusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询签到状态",
        "tags": [
          "ActivityService"
        ]
      }
    },
    "/v1/console/activity/promotions": {
      "get": {
        "description": "ListPromotions 列出可用促销活动",
        "operationId": "ActivityService_ListPromotions",
        "parameters": [
          {
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.ListPromotionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询活动列表",
        "tags": [
          "ActivityService"
        ]
      }
    },
    "/v1/console/activity/redeem": {
      "post": {
        "description": "Redeem 兑换码兑换",
        "operationId": "ActivityService_Redeem",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.RedeemRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.RedeemReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "兑换活动码",
        "tags": [
          "ActivityService"
        ]
      }
    },
    "/v1/console/activity/redeem/preview": {
      "post": {
        "description": "PreviewRedeem 兑换前预览：只读返回该码可获得的积分与是否可兑换，不消耗码、不返回法币金额",
        "operationId": "ActivityService_PreviewRedeem",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/activity.v1.RedeemPreviewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activity.v1.RedeemPreviewReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ActivityService"
        ]
      }
    },
    "/v1/console/dashboard/summary": {
      "get": {
        "description": "GetSummary 获取用户仪表盘统计摘要。",
        "operationId": "DashboardService_GetSummary",
        "parameters": [
          {
            "in": "query",
            "name": "range",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/dashboard.v1.GetSummaryReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "当前用户看板汇总",
        "tags": [
          "DashboardService"
        ]
      }
    },
    "/v1/console/invoice/invoiceable-orders": {
      "get": {
        "description": "ListInvoiceableOrders 可开票订单：paid + 非兑换码来源 + 无有效 link + 开票窗口内，按币种分组返回（1-3-1）",
        "operationId": "InvoiceService_ListInvoiceableOrders",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.ListInvoiceableOrdersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoice/titles": {
      "get": {
        "description": "ListTitles 抬头列表（1-2）",
        "operationId": "InvoiceService_ListTitles",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.ListTitlesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      },
      "post": {
        "description": "CreateTitle 新建抬头（1-2）",
        "operationId": "InvoiceService_CreateTitle",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.CreateTitleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.TitleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoice/titles/{id}": {
      "delete": {
        "description": "DeleteTitle 删除抬头（硬删，不影响历史票快照；1-2）",
        "operationId": "InvoiceService_DeleteTitle",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.Empty"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      },
      "put": {
        "description": "UpdateTitle 修改抬头（1-2）",
        "operationId": "InvoiceService_UpdateTitle",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.UpdateTitleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.TitleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoice/titles/{id}/default": {
      "post": {
        "description": "SetDefaultTitle 设为默认抬头（1-2-2）",
        "operationId": "InvoiceService_SetDefaultTitle",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.SetDefaultTitleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.TitleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoices": {
      "get": {
        "description": "ListMyInvoices 我的发票列表（可按状态过滤；1-3-4）",
        "operationId": "InvoiceService_ListMyInvoices",
        "parameters": [
          {
            "description": "status 状态过滤（空=全部）",
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.ListMyInvoicesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      },
      "post": {
        "description": "ApplyInvoice 申请开票（1-3-1）：多充值订单合并开一张票，同币种约束",
        "operationId": "InvoiceService_ApplyInvoice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.ApplyInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoices/{id}": {
      "get": {
        "description": "GetInvoice 发票详情（1-3-4）",
        "operationId": "InvoiceService_GetInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoices/{id}/cancel": {
      "post": {
        "description": "CancelInvoice 撤销申请（仅 pending 可撤；1-3-3）",
        "operationId": "InvoiceService_CancelInvoice",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.CancelInvoiceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoices/{id}/download": {
      "get": {
        "description": "GetInvoiceDownloadURL 获取版式/XML 文件下载 URL（校验本人 → 15min presigned；1-5-2）",
        "operationId": "InvoiceService_GetInvoiceDownloadURL",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "file_type 下载类型：pdf/layout=原票版式文件，xml=数电票数据文件，red=红字版式件。",
            "in": "query",
            "name": "fileType",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.GetInvoiceDownloadURLReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/invoices/{id}/reissue": {
      "post": {
        "description": "RequestReissue 申请换开（仅 issued 可换；订单集合继承原票，1-6-1）",
        "operationId": "InvoiceService_RequestReissue",
        "parameters": [
          {
            "description": "id 原票 id（issued）",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/invoice.v1.RequestReissueRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/invoice.v1.InvoiceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "InvoiceService"
        ]
      }
    },
    "/v1/console/model-square/banners": {
      "get": {
        "description": "ListBanners 前台查询 Banner 图配置（仅已发布，按 sort 排序，公开访问）。\n ListBanners lists published banners for the front page (public access, sorted by sort_no).",
        "operationId": "ConsoleModelSquareService_ListBanners",
        "parameters": [
          {
            "description": "前端当前语言编码：zh 返回中文图片，其他值或未传返回英文图片。\n Current language code: zh returns Chinese images, others/empty returns English.",
            "in": "query",
            "name": "lang",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListConsoleBannersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/entry-slots": {
      "get": {
        "description": "ListEntrySlots 前台查询固定入口位列表（仅返回启用项，登录即可）。\n ListEntrySlots lists enabled fixed entry slots for the front page (login only).",
        "operationId": "ConsoleModelSquareService_ListEntrySlots",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListConsoleEntrySlotsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/favorites": {
      "get": {
        "description": "ListFavorites 查询我的收藏列表（默认 4 个，showAll=true 返回全部）。\n ListFavorites lists the current user's favorites (4 by default; showAll=true returns all).",
        "operationId": "ConsoleModelSquareService_ListFavorites",
        "parameters": [
          {
            "description": "是否查看全部收藏；false 返回默认 limit 个，true 返回全部。\n Whether to return all favorites; false returns limit items, true returns all.",
            "in": "query",
            "name": "showAll",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "返回数量（showAll=true 时忽略），默认 4。/ Result count (ignored when showAll=true), default 4.",
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListFavoritesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      },
      "post": {
        "description": "AddFavorite 新增收藏（若已软删则恢复）。\n AddFavorite adds a favorite (restores if previously soft-deleted).",
        "operationId": "ConsoleModelSquareService_AddFavorite",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.AddFavoriteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.AddFavoriteReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/favorites/{modelId}": {
      "delete": {
        "description": "RemoveFavorite 取消收藏（软删，幂等）。\n RemoveFavorite removes a favorite (soft delete, idempotent).",
        "operationId": "ConsoleModelSquareService_RemoveFavorite",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.RemoveFavoriteReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/models/{modelName}/param-schema": {
      "get": {
        "description": "GetModelParamSchema 按模型名查询调用参数 schema（详情页调试面板动态渲染，公开访问）。\n GetModelParamSchema returns the resolved call-param schemas for a model (public access).",
        "operationId": "ConsoleModelSquareService_GetModelParamSchema",
        "parameters": [
          {
            "in": "path",
            "name": "modelName",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.GetModelParamSchemaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/recent-uses": {
      "get": {
        "description": "ListRecentUses 查询最近使用模型列表（固定最近 4 条）。\n ListRecentUses lists recently used models (fixed latest 4).",
        "operationId": "ConsoleModelSquareService_ListRecentUses",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListRecentUsesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      },
      "post": {
        "description": "AddRecentUse 已废弃；最近使用仅由真实成功 usage 链路写入。\n AddRecentUse is deprecated; recent uses are written only from successful usage facts.",
        "operationId": "ConsoleModelSquareService_AddRecentUse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/modelsquare.v1.AddRecentUseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.AddRecentUseReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/model-square/visualization-metrics": {
      "get": {
        "description": "ListVisualizationMetrics 前台查询可视化数据展示（固定 4 条，仅 displayValue）。\n ListVisualizationMetrics lists visualization metrics for display (fixed 4 items, displayValue only).",
        "operationId": "ConsoleModelSquareService_ListVisualizationMetrics",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/modelsquare.v1.ListConsoleVisualizationMetricsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleModelSquareService"
        ]
      }
    },
    "/v1/console/payment/callback/{provider}": {
      "post": {
        "description": "供支付渠道回调；当前仓库含 mock 回调能力。",
        "operationId": "PaymentCallbackService_HandleCallback",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/payment.v1.HandleCallbackRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/payment.v1.HandleCallbackReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "支付回调",
        "tags": [
          "PaymentService"
        ]
      }
    },
    "/v1/console/payment/refund": {
      "post": {
        "description": "对当前用户自己的充值订单发起退款。",
        "operationId": "PaymentService_RequestRefund",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/payment.v1.RequestRefundRequest",
                "properties": {
                  "reason": {
                    "type": "string"
                  },
                  "trade_no": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/payment.v1.RequestRefundReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "申请退款",
        "tags": [
          "PaymentService"
        ]
      }
    },
    "/v1/console/payment/topup": {
      "post": {
        "description": "创建充值订单并返回支付跳转地址。",
        "operationId": "PaymentService_CreateTopup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/payment.v1.CreateTopupRequest",
                "properties": {
                  "amount_micros": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "provider": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/payment.v1.CreateTopupReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "创建充值订单",
        "tags": [
          "PaymentService"
        ]
      }
    },
    "/v1/console/payment/topup/orders": {
      "get": {
        "description": "分页查询当前用户充值订单。",
        "operationId": "PaymentService_ListTopupOrders",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/payment.v1.ListTopupOrdersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询充值订单列表",
        "tags": [
          "PaymentService"
        ]
      }
    },
    "/v1/console/payment/topup/preview": {
      "post": {
        "description": "PreviewTopup 充值预览：输入金额返回到账积分 + 阶梯赠送报价（不下单、不调支付）。",
        "operationId": "PaymentService_PreviewTopup",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/payment.v1.PreviewTopupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/payment.v1.PreviewTopupReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PaymentService"
        ]
      }
    },
    "/v1/console/subscription/bucket": {
      "get": {
        "description": "GetBucket 获取当前用户的订阅桶信息（额度使用情况）。",
        "operationId": "SubscriptionService_GetBucket",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.GetBucketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "当前额度桶",
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/callback/{provider}": {
      "post": {
        "description": "供支付渠道回调订阅订单；入口公开但必须通过 provider 签名验签、订单支付方式和金额校验后才会激活订阅。",
        "parameters": [
          {
            "in": "path",
            "name": "provider",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "provider 原始回调 JSON；服务端按渠道验签解析。",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "订阅支付回调",
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/consume": {
      "post": {
        "description": "Consume 消费订阅额度（直接扣减）。",
        "operationId": "SubscriptionService_Consume",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.ConsumeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.ConsumeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/current": {
      "get": {
        "description": "GetCurrentSubscription 获取当前用户的订阅信息。",
        "operationId": "SubscriptionService_GetCurrentSubscription",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.GetCurrentSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "当前订阅",
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/plans": {
      "get": {
        "description": "ListPlans 列出所有可用的订阅套餐。",
        "operationId": "SubscriptionService_ListPlans",
        "parameters": [
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.ListPlansReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "套餐列表",
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/pre-consume": {
      "post": {
        "description": "PreConsume 预消费订阅额度（锁定额度，待结算）。",
        "operationId": "SubscriptionService_PreConsume",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.PreConsumeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.PreConsumeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/purchase": {
      "post": {
        "description": "Purchase 购买订阅套餐。",
        "operationId": "SubscriptionService_Purchase",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.PurchaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.PurchaseReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/release": {
      "post": {
        "description": "Release 释放预消费（取消锁定的额度）。",
        "operationId": "SubscriptionService_Release",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.ReleaseRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.ReleaseReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/renew": {
      "post": {
        "description": "Renew 续费订阅。",
        "operationId": "SubscriptionService_Renew",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.RenewRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.RenewReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/subscription/settle": {
      "post": {
        "description": "Settle 结算预消费（确认实际消费金额）。",
        "operationId": "SubscriptionService_Settle",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/subscription.v1.SettleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/subscription.v1.SettleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/console/tasks": {
      "get": {
        "description": "ListMyTasks 当前用户的任务列表（游标分页 + 过滤，id 倒序）。",
        "operationId": "ConsoleProviderTaskService_ListMyTasks",
        "parameters": [
          {
            "description": "状态过滤（provider_task 状态机原码 0..8）；空 = 全部（0 是合法态 submitted）。",
            "in": "query",
            "name": "statuses",
            "schema": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/providertask.v1.ListTasksReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/console/tasks/{id}": {
      "get": {
        "description": "GetMyTask 当前用户的单任务详情（不属于本人 → 404，防枚举）。",
        "operationId": "ConsoleProviderTaskService_GetMyTask",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/providertask.v1.GetTaskReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/console/tasks/{id}/blob/{seq}": {
      "get": {
        "description": "网关代理流式下载 result_ref 第 seq 个 blob（seq ∈ [0, preview.blobCount)）。 仅任务归属人可下载；越权/不存在一律 404（反枚举）。响应为附件流 （Content-Disposition: attachment，文件名 \u003ctask_id\u003e-\u003cseq\u003e.\u003cext\u003e）。",
        "operationId": "ConsoleProviderTaskService_DownloadTaskBlob",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "seq",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "blob 字节流（Content-Type 为对象原始 MIME）"
          },
          "404": {
            "description": "任务不存在 / 不属于当前用户 / seq 越界 / 对象缺失"
          },
          "502": {
            "description": "存储侧不可用"
          }
        },
        "summary": "下载本人异步任务结果 blob",
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/console/topup/currencies": {
      "get": {
        "operationId": "TopupCatalogService_ListCurrencies",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/console.topup.v1.ListCurrenciesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupCatalogService"
        ]
      }
    },
    "/v1/console/topup/options": {
      "get": {
        "description": "GetTopupOptions 一次性返回所有可充币种及各自档位，供用户端充值页消除两次往返。",
        "operationId": "TopupCatalogService_GetTopupOptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/console.topup.v1.GetTopupOptionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupCatalogService"
        ]
      }
    },
    "/v1/console/topup/packages": {
      "get": {
        "operationId": "TopupCatalogService_ListPackages",
        "parameters": [
          {
            "in": "query",
            "name": "currency",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/console.topup.v1.ListPackagesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TopupCatalogService"
        ]
      }
    },
    "/v1/console/uploads/presign": {
      "post": {
        "description": "为图片、音频、视频、PDF 等大资源生成对象存储预签名上传地址。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "content_type": {
                    "type": "string"
                  },
                  "expires_in": {
                    "description": "过期秒数",
                    "format": "int64",
                    "type": "integer"
                  },
                  "file_name": {
                    "type": "string"
                  },
                  "size_bytes": {
                    "format": "int64",
                    "type": "integer"
                  },
                  "team_id": {
                    "format": "int64",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "生成预签名上传地址",
        "tags": [
          "MediaService"
        ]
      }
    },
    "/v1/console/usage/apikeys/stats": {
      "get": {
        "description": "ListAPIKeyStats 按 API Key 维度汇总计费/用量统计。\n\n scope=self（默认）：汇总当前用户名下各 API Key 的用量（按 user_id 归属）。\n scope=team：企业管理员视角，汇总其拥有的团队下各 API Key 的用量（按 team_id 归属，\n            付费方为团队 owner，即当前管理员）。仅企业管理员可用，且只返回本人拥有的团队。",
        "operationId": "UsageService_ListAPIKeyStats",
        "parameters": [
          {
            "description": "统计视角：self（个人，默认）/ team（企业管理员看其拥有团队）。",
            "in": "query",
            "name": "scope",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.ListAPIKeyStatsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/usage/apikeys/{apiKeyId}/stats": {
      "get": {
        "description": "GetAPIKeyStatsSeries 查询单个 API Key 的时间序列用量（用于趋势图）。\n\n 鉴权：该 API Key 必须归属当前用户，或属于当前用户拥有的团队。",
        "operationId": "UsageService_GetAPIKeyStatsSeries",
        "parameters": [
          {
            "in": "path",
            "name": "apiKeyId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.GetAPIKeyStatsSeriesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/usage/logs": {
      "get": {
        "description": "查询当前用户的 API 调用日志。默认最近 24 小时，显式时间范围最多 90 天；使用 createdAt/id 不透明游标分页，raw 日志不执行 COUNT(*)，响应 total 固定为 -1。",
        "operationId": "UsageService_ListLogs",
        "parameters": [
          {
            "description": "每页条数，默认 20，最大 100。",
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "不透明 keyset 游标；使用上一次响应的 nextCursor 获取下一页。",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "请求 ID（UUID）精确过滤；非法 UUID 视为无匹配。时间范围仍受默认 24 小时/最大 90 天约束。",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "状态过滤：all（或不传）/success/error。",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "all",
                "success",
                "error"
              ],
              "type": "string"
            }
          },
          {
            "description": "模型 ID 精确过滤。",
            "in": "query",
            "name": "modelId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "渠道 ID 精确过滤。",
            "in": "query",
            "name": "channelId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "起始时间（含），RFC3339；省略时默认最近 24 小时。",
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "结束时间（不含），RFC3339；时间窗口为 [startTime, endTime)。",
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "API Key ID 精确过滤。",
            "in": "query",
            "name": "apiKeyId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "模型名称精确过滤；名称不存在时直接返回空列表。",
            "in": "query",
            "name": "modelName",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "当前用户 API Key 名称精确过滤；名称不存在时直接返回空列表。",
            "in": "query",
            "name": "apiKeyName",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.ListLogsReply"
                }
              }
            },
            "description": "游标分页结果；通过 hasMore/nextCursor 翻页，total 固定为 -1。"
          }
        },
        "summary": "使用日志",
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/usage/logs/count": {
      "get": {
        "description": "CountLogs 返回与 ListLogs 相同筛选条件的精确总数。\n 该查询独立加载；聚合完整性无法证明时返回 USAGE_LOG_COUNT_UNAVAILABLE，\n 不影响日志列表、详情和游标翻页。",
        "operationId": "UsageService_CountLogs",
        "parameters": [
          {
            "description": "请求 ID 精确匹配；非法 UUID 与列表一致，返回 total=0。",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "晚于数据库快照时间时会截断到该快照时间；窗口最大 90 天。",
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "apiKeyId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "modelName",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "apiKeyName",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.CountLogsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/usage/logs/export": {
      "get": {
        "description": "按与列表相同的过滤条件导出 XLSX。在线导出默认 1000 行、最多 10000 行；data 是 JSON 网关返回的 base64 bytes，filename 含 .xlsx 后缀。",
        "operationId": "UsageService_ExportLogs",
        "parameters": [
          {
            "description": "本次导出数量，默认 1000，最大 10000。",
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "可选不透明 keyset 游标，用于从指定位置继续导出。",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "请求 ID（UUID）精确过滤；非法 UUID 视为无匹配。",
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "状态过滤：all（或不传）/success/error。",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "all",
                "success",
                "error"
              ],
              "type": "string"
            }
          },
          {
            "description": "模型 ID 精确过滤。",
            "in": "query",
            "name": "modelId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "渠道 ID 精确过滤。",
            "in": "query",
            "name": "channelId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          },
          {
            "description": "起始时间（含），RFC3339；省略时默认最近 24 小时。",
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "结束时间（不含），RFC3339；时间窗口为 [startTime, endTime)。",
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "模型名称精确过滤；名称不存在时导出空结果。",
            "in": "query",
            "name": "modelName",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "当前用户 API Key 名称精确过滤；名称不存在时导出空结果。",
            "in": "query",
            "name": "apiKeyName",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "要导出的列 key；可重复传递，省略或空数组表示全部列，未知 key 忽略。",
            "explode": true,
            "in": "query",
            "name": "columns",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "style": "form"
          },
          {
            "description": "API Key ID 精确过滤；与 apiKeyName 同时传入时以 tokenId 为准。",
            "in": "query",
            "name": "tokenId",
            "schema": {
              "format": "int64",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.ExportLogsReply"
                }
              }
            },
            "description": "XLSX 导出结果。data 为 base64 编码的 bytes；filename 为含 .xlsx 后缀的建议文件名。"
          }
        },
        "summary": "导出使用日志",
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/usage/logs/{id}": {
      "get": {
        "description": "GetLogDetail 获取单条用户可见日志摘要（不含 meta 及请求/响应正文）。",
        "operationId": "UsageService_GetLogDetail",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "列表项携带的创建时间；提供后可让 PostgreSQL 在月度分区表上做运行时裁剪。\n 省略时保持兼容，但详情查询可能需要探测所有保留分区。",
            "in": "query",
            "name": "createdAt",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usage.v1.GetLogDetailReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UsageService"
        ]
      }
    },
    "/v1/console/wallet/balance": {
      "get": {
        "description": "查询当前用户钱包余额；钱包不存在时由服务端自动创建。",
        "operationId": "WalletService_GetBalance",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/wallet.v1.GetBalanceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询当前用户钱包余额",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/console/wallet/consumption-summary": {
      "get": {
        "description": "GetConsumptionSummary 按时间分桶汇总当前用户消费（与 consumed_micros 同口径：\n direction='debit' 全量出账）。供前端消费统计图表使用，避免前端用分页流水现算导致与\n 余额卡「累计消费」对不上账。",
        "operationId": "WalletService_GetConsumptionSummary",
        "parameters": [
          {
            "description": "granularity 分桶粒度：day（默认）/ month。",
            "in": "query",
            "name": "granularity",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "buckets 返回的桶数量（含当前桶往前推）。day 默认 15、month 默认 12；\n 非法或为 0 时由后端取默认值，并设上限防止超大窗口扫账本。",
            "in": "query",
            "name": "buckets",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/wallet.v1.GetConsumptionSummaryReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/console/wallet/ledger": {
      "get": {
        "description": "分页查询当前用户钱包流水；direction 可选，按流水方向过滤。",
        "operationId": "WalletService_ListLedger",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "流水方向筛选：空=全部，credit=入账，debit=出账",
            "in": "query",
            "name": "direction",
            "schema": {
              "enum": [
                "",
                "credit",
                "debit"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/wallet.v1.ListLedgerReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "查询钱包流水",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/console/wallet/ledger/export": {
      "get": {
        "description": "使用固定上界的不透明游标分批读取当前用户钱包流水；不执行 COUNT 或 OFFSET。cursor 为空表示首批，后续必须原样传回 nextCursor。",
        "operationId": "WalletService_ListLedgerExport",
        "parameters": [
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "description": "流水方向筛选：空=全部，credit=入账，debit=出账",
            "in": "query",
            "name": "direction",
            "schema": {
              "enum": [
                "",
                "credit",
                "debit"
              ],
              "type": "string"
            }
          },
          {
            "description": "上一批返回的不透明 nextCursor；首批不传。",
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/wallet.v1.ListLedgerExportReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "分批读取待导出的钱包流水",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/enterprise/application": {
      "get": {
        "description": "查询当前登录用户最近一次企业升级申请。",
        "operationId": "EnterpriseService_GetMyApplication",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.GetMyApplicationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/enterprise/apply": {
      "post": {
        "description": "提交企业账号升级申请。\n\n 登录用户可发起企业升级申请；如果上下文带 team_id，则申请绑定该团队，\n 否则按当前用户创建个人申请，审核通过后再完成企业账号绑定流程。",
        "operationId": "EnterpriseService_ApplyEnterpriseUpgrade",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.enterprise.v1.ApplyEnterpriseUpgradeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.enterprise.v1.ApplyEnterpriseUpgradeReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "EnterpriseService"
        ]
      }
    },
    "/v1/iam/menus": {
      "get": {
        "description": "ListMenus 列举菜单。菜单是后台路由树数据，不分页；tree=true 时返回树形结构。\n 传 userId 时返回该用户角色下可见的菜单集合。",
        "operationId": "IAMService_ListMenus",
        "parameters": [
          {
            "description": "提供 userId 时返回该用户角色下可见菜单；0 表示不过滤用户。",
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "true 返回树形结构；false 返回平铺列表。",
            "in": "query",
            "name": "tree",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListMenusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "post": {
        "description": "CreateMenu 创建菜单。code/name 必填，code 唯一；visible 不传时默认为 true。",
        "operationId": "IAMService_CreateMenu",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.CreateMenuRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.CreateMenuReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/menus/{id}": {
      "delete": {
        "description": "DeleteMenu 删除菜单。采用软删除；内置菜单、存在子菜单、已被角色绑定时禁止删除。",
        "operationId": "IAMService_DeleteMenu",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.DeleteMenuReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "get": {
        "description": "GetMenu 获取菜单详情。",
        "operationId": "IAMService_GetMenu",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.GetMenuReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "put": {
        "description": "UpdateMenu 更新菜单，采用 PATCH 语义：仅 optional 字段存在时更新。",
        "operationId": "IAMService_UpdateMenu",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.UpdateMenuRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.UpdateMenuReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/my-menus": {
      "get": {
        "description": "ListMyMenus 返回当前登录用户可见的菜单树（role_menus 绑定驱动）。\n 自助端点：仅需登录态，不需要 IAM 菜单管理权限；侧边栏渲染的数据源。",
        "operationId": "IAMService_ListMyMenus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListMenusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/permissions": {
      "get": {
        "description": "ListPermissions 列举权限。权限是授权字典数据，不分页；可按 module 或 parentId 过滤。",
        "operationId": "IAMService_ListPermissions",
        "parameters": [
          {
            "in": "query",
            "name": "module",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "parentId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListPermissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "post": {
        "description": "CreatePermission 创建权限。code/name/module 必填，code 唯一。",
        "operationId": "IAMService_CreatePermission",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.CreatePermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.CreatePermissionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/permissions/scan": {
      "post": {
        "description": "ScanPermissions 按代码内置权限目录扫描同步权限表：补插缺失的内置权限、\n 更新内置权限元数据、删除代码中已不存在的内置权限（连同角色绑定；被菜单\n 引用的跳过删除）。用户自建（isBuiltin=false）权限不受影响。幂等。",
        "operationId": "IAMService_ScanPermissions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.ScanPermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ScanPermissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/permissions/{id}": {
      "delete": {
        "description": "DeletePermission 删除权限。内置权限禁止删除；已被角色绑定时禁止删除。",
        "operationId": "IAMService_DeletePermission",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.DeletePermissionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "get": {
        "description": "GetPermission 获取权限详情。",
        "operationId": "IAMService_GetPermission",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.GetPermissionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "put": {
        "description": "UpdatePermission 更新权限，采用 PATCH 语义；code/isBuiltin 不允许通过接口修改。\n 内置权限禁止更新。",
        "operationId": "IAMService_UpdatePermission",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.UpdatePermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.UpdatePermissionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/roles": {
      "get": {
        "description": "ListRoles 列举角色。支持分页、关键字和 status 过滤；status=0 表示不过滤。",
        "operationId": "IAMService_ListRoles",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "状态过滤：0=全部，1=启用，2=禁用。",
            "in": "query",
            "name": "status",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListRolesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "post": {
        "description": "CreateRole 创建角色。code/name 必填，code 唯一；dataScope 不传时默认为 1。\n permissionIds/menuIds 为创建时的初始授权集合，按传入数组整体设置。",
        "operationId": "IAMService_CreateRole",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.CreateRoleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/roles/{id}": {
      "delete": {
        "description": "DeleteRole 删除角色。采用软删除；内置角色禁止删除；存在有效用户绑定时禁止删除。",
        "operationId": "IAMService_DeleteRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.DeleteRoleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "get": {
        "description": "GetRole 获取角色详情，返回角色基础信息以及已绑定的权限 ID、菜单 ID。",
        "operationId": "IAMService_GetRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.GetRoleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "put": {
        "description": "UpdateRole 更新角色，采用 PATCH 语义：仅 optional 字段存在时更新。\n 内置角色禁止修改 status；setPermissions/setMenus 为 true 时整体覆盖对应授权集合。",
        "operationId": "IAMService_UpdateRole",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.UpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.UpdateRoleReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/roles/{id}/data-scopes": {
      "get": {
        "description": "ListRoleDataScopes 获取角色自定义数据范围明细，仅 dataScope=4 的角色会实际使用这些明细。",
        "operationId": "IAMService_ListRoleDataScopes",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListRoleDataScopesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "put": {
        "description": "SetRoleDataScopes 覆盖设置角色自定义数据范围明细。仅 dataScope=4 的角色允许设置。",
        "operationId": "IAMService_SetRoleDataScopes",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.SetRoleDataScopesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.SetRoleDataScopesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/users/{userId}/permissions": {
      "get": {
        "description": "GetUserPermissions 获取用户聚合后的权限码和角色码，结果会使用 Redis 缓存。",
        "operationId": "IAMService_GetUserPermissions",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.GetUserPermissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/iam/users/{userId}/roles": {
      "delete": {
        "description": "RevokeUserRoles 回收用户角色；成功后失效该用户权限缓存。",
        "operationId": "IAMService_RevokeUserRoles",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "roleIds",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.RevokeUserRolesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "get": {
        "description": "ListUserRoles 列举用户已绑定角色。",
        "operationId": "IAMService_ListUserRoles",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.ListUserRolesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      },
      "post": {
        "description": "AssignUserRoles 给用户分配角色；重复角色会自动去重；成功后失效该用户权限缓存。",
        "operationId": "IAMService_AssignUserRoles",
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/iam.v1.AssignUserRolesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/iam.v1.AssignUserRolesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IAMService"
        ]
      }
    },
    "/v1/images/edits": {
      "post": {
        "description": "API Key 鉴权后转发到路由后的上游渠道。请求体支持 multipart/form-data 与 application/json（图片以 base64 或 data URL 传入）。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "image": {
                    "description": "原始图片，base64 字符串或 data URL（data:image/png;base64,...），解码后最大 4MB；兼容单元素数组形态，不支持 http(s) URL。可省略：部分渠道（如 Gemini）无图时按纯 prompt 图片生成处理。",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "maxItems": 1,
                        "type": "array"
                      }
                    ]
                  },
                  "mask": {
                    "description": "可选遮罩图片，base64 字符串或 data URL，解码后最大 4MB。",
                    "type": "string"
                  },
                  "model": {
                    "description": "模型名称，默认 dall-e-2。",
                    "type": "string"
                  },
                  "n": {
                    "description": "生成数量。",
                    "type": "integer"
                  },
                  "prompt": {
                    "description": "编辑提示词。",
                    "type": "string"
                  },
                  "quality": {
                    "description": "输出质量。",
                    "type": "string"
                  },
                  "response_format": {
                    "description": "返回格式。",
                    "type": "string"
                  },
                  "size": {
                    "description": "输出图片尺寸。",
                    "type": "string"
                  },
                  "user": {
                    "description": "终端用户标识。",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            },
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "image": {
                    "description": "原始图片文件，最大 4MB。",
                    "format": "binary",
                    "type": "string"
                  },
                  "mask": {
                    "description": "可选遮罩图片文件，最大 4MB。",
                    "format": "binary",
                    "type": "string"
                  },
                  "model": {
                    "description": "模型名称，默认 dall-e-2。",
                    "type": "string"
                  },
                  "n": {
                    "description": "生成数量。",
                    "type": "integer"
                  },
                  "prompt": {
                    "description": "编辑提示词。",
                    "type": "string"
                  },
                  "quality": {
                    "description": "输出质量。",
                    "type": "string"
                  },
                  "response_format": {
                    "description": "返回格式。",
                    "type": "string"
                  },
                  "size": {
                    "description": "输出图片尺寸。",
                    "type": "string"
                  },
                  "user": {
                    "description": "终端用户标识。",
                    "type": "string"
                  }
                },
                "required": [
                  "image",
                  "prompt"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "请求体非法、缺少图片或缺少 prompt。"
          },
          "401": {
            "description": "API Key 无效或缺失。"
          }
        },
        "summary": "OpenAI Images Edit 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/me/agent": {
      "get": {
        "description": "GetMyAgent 查询我的代理商信息",
        "operationId": "UserAgentService_GetMyAgent",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.GetMyAgentReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      }
    },
    "/v1/me/agent/apply": {
      "post": {
        "description": "Apply 申请成为代理商",
        "operationId": "UserAgentService_Apply",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.ApplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ApplyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      }
    },
    "/v1/me/agent/commissions": {
      "get": {
        "description": "ListMyCommissions 查询我的佣金列表",
        "operationId": "UserAgentService_ListMyCommissions",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ListMyCommissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      }
    },
    "/v1/me/agent/stats": {
      "get": {
        "description": "GetMyStats 查询我的统计数据",
        "operationId": "UserAgentService_GetMyStats",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.GetMyStatsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      }
    },
    "/v1/me/agent/withdrawals": {
      "get": {
        "description": "ListMyWithdrawals 查询我的提现记录",
        "operationId": "UserAgentService_ListMyWithdrawals",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ListMyWithdrawalsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      },
      "post": {
        "description": "ApplyWithdrawal 申请提现",
        "operationId": "UserAgentService_ApplyWithdrawal",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/agent.v1.ApplyWithdrawalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/agent.v1.ApplyWithdrawalReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAgentService"
        ]
      }
    },
    "/v1/me/announcements/read-all": {
      "post": {
        "description": "MarkAllAnnouncementsAsRead 标记所有当前可见公告为已读",
        "operationId": "UserSupportService_MarkAllAnnouncementsAsRead",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.MarkAllAnnouncementsAsReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.MarkAllAnnouncementsAsReadReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/announcements/{announcementId}/read": {
      "post": {
        "description": "MarkAnnouncementAsRead 标记公告为已读",
        "operationId": "UserSupportService_MarkAnnouncementAsRead",
        "parameters": [
          {
            "in": "path",
            "name": "announcementId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.MarkAnnouncementAsReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.MarkAnnouncementAsReadReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/apikeys": {
      "get": {
        "operationId": "UserAPIKeyService_ListMyAPIKeys",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.ListMyAPIKeysReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      },
      "post": {
        "operationId": "UserAPIKeyService_CreateAPIKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.CreateAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.CreateAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/bindable-channel-sources": {
      "get": {
        "description": "ListBindableChannelSources 列出当前用户可绑定的渠道资源（供绑定令牌时选择路由来源）。\n 同样必须在 GetMyAPIKey 之前注册。",
        "operationId": "UserAPIKeyService_ListBindableChannelSources",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.ListBindableChannelSourcesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/bindable-subscriptions": {
      "get": {
        "description": "ListBindableSubscriptions 列出当前用户可绑定的订阅（供建 Key 时选择计费来源）。\n 必须在 GetMyAPIKey（/{id} 通配符）之前注册，否则 gorilla/mux 首匹配会将\n \"bindable-subscriptions\" 捕获为 id 参数。",
        "operationId": "UserAPIKeyService_ListBindableSubscriptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.ListBindableSubscriptionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/{id}": {
      "get": {
        "operationId": "UserAPIKeyService_GetMyAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.GetMyAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      },
      "patch": {
        "description": "UpdateAPIKey 单接口聚合更新，仅传需要变更的字段；nil 字段不修改。",
        "operationId": "UserAPIKeyService_UpdateAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.UpdateAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.UpdateAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/{id}/disable": {
      "post": {
        "operationId": "UserAPIKeyService_RevokeAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.RevokeAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.RevokeAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/{id}/plaintext": {
      "get": {
        "description": "仅 owner 可读取已加密保存的 API Key 明文；响应包含敏感凭证，服务端会返回 no-store 缓存控制头。",
        "operationId": "UserAPIKeyService_GetAPIKeyPlaintext",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "plaintextKey": {
                      "description": "完整 API Key 明文，仅在用户显式查看时返回。",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "description": "固定为 no-store，禁止缓存明文 API Key。",
                "schema": {
                  "type": "string"
                }
              },
              "Pragma": {
                "description": "固定为 no-cache，兼容旧代理缓存控制。",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "summary": "获取当前用户 API Key 明文",
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/apikeys/{id}/rotate": {
      "post": {
        "operationId": "UserAPIKeyService_RotateAPIKey",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/apikey.v1.RotateAPIKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apikey.v1.RotateAPIKeyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserAPIKeyService"
        ]
      }
    },
    "/v1/me/identity/verification": {
      "get": {
        "description": "GetVerification 查询当前实名状态；网页方式自动查询，扫码方式仅在显式刷新时查询外部结果。\n 扫码方式在单据过期前查询到未通过时仍保持 processing，并继续返回 certifyUrl 供用户再次扫码。",
        "operationId": "IdentityService_GetVerification",
        "parameters": [
          {
            "description": "是否显式查询支付宝结果；扫码方式应在用户完成刷脸、手动查询或支付宝回跳后设置为 true。\n 支付宝扫码 query 无法可靠区分未扫码和失败，单据有效期内未通过仍允许继续扫码。",
            "in": "query",
            "name": "refreshProvider",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.GetVerificationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IdentityService"
        ]
      },
      "post": {
        "description": "SubmitVerification 校验实名信息与授权，并按选定的支付宝 OpenAPI v3 方式初始化核身单据。",
        "operationId": "IdentityService_SubmitVerification",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/identity.v1.SubmitVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/identity.v1.SubmitVerificationReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "IdentityService"
        ]
      }
    },
    "/v1/me/messages": {
      "get": {
        "description": "ListMyMessages 查询我的消息列表",
        "operationId": "UserSupportService_ListMyMessages",
        "parameters": [
          {
            "in": "query",
            "name": "isRead",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.ListMyMessagesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/messages/read-all": {
      "post": {
        "description": "MarkAllMessagesAsRead 标记所有消息为已读",
        "operationId": "UserSupportService_MarkAllMessagesAsRead",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.MarkAllMessagesAsReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.MarkAllMessagesAsReadReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/messages/unread-count": {
      "get": {
        "description": "GetUnreadCount 获取未读消息数",
        "operationId": "UserSupportService_GetUnreadCount",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.GetUnreadCountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/messages/{messageId}": {
      "delete": {
        "description": "DeleteMessage 删除我的一条站内消息（硬删除，带归属校验）",
        "operationId": "UserSupportService_DeleteMessage",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.DeleteMessageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/messages/{messageId}/read": {
      "post": {
        "description": "MarkMessageAsRead 标记消息为已读",
        "operationId": "UserSupportService_MarkMessageAsRead",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.MarkMessageAsReadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.MarkMessageAsReadReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/tickets": {
      "get": {
        "description": "ListMyTickets 查询我的工单列表",
        "operationId": "UserSupportService_ListMyTickets",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.ListMyTicketsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      },
      "post": {
        "description": "CreateTicket 创建工单",
        "operationId": "UserSupportService_CreateTicket",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.CreateTicketRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.CreateTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/tickets/{ticketId}": {
      "get": {
        "description": "GetTicket 获取工单详情",
        "operationId": "UserSupportService_GetTicket",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.GetTicketReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/tickets/{ticketId}/replies": {
      "get": {
        "description": "ListReplies 查询工单回复列表",
        "operationId": "UserSupportService_ListReplies",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.ListRepliesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      },
      "post": {
        "description": "CreateReply 创建工单回复",
        "operationId": "UserSupportService_CreateReply",
        "parameters": [
          {
            "in": "path",
            "name": "ticketId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/support.v1.CreateReplyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/support.v1.CreateReplyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "UserSupportService"
        ]
      }
    },
    "/v1/me/webhooks": {
      "get": {
        "description": "ListSubscriptions 列出当前用户的所有 Webhook 订阅。",
        "operationId": "WebhookService_ListSubscriptions",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook.v1.ListSubscriptionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookService"
        ]
      },
      "post": {
        "description": "CreateSubscription 创建 Webhook 订阅。",
        "operationId": "WebhookService_CreateSubscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/webhook.v1.CreateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook.v1.CreateSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookService"
        ]
      }
    },
    "/v1/me/webhooks/{id}": {
      "delete": {
        "description": "DeleteSubscription 删除 Webhook 订阅。",
        "operationId": "WebhookService_DeleteSubscription",
        "parameters": [
          {
            "description": "订阅 ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook.v1.DeleteSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookService"
        ]
      },
      "get": {
        "description": "GetSubscription 获取指定 Webhook 订阅详情。",
        "operationId": "WebhookService_GetSubscription",
        "parameters": [
          {
            "description": "订阅 ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook.v1.GetSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookService"
        ]
      },
      "patch": {
        "description": "UpdateSubscription 更新 Webhook 订阅。",
        "operationId": "WebhookService_UpdateSubscription",
        "parameters": [
          {
            "description": "订阅 ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/webhook.v1.UpdateSubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/webhook.v1.UpdateSubscriptionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "WebhookService"
        ]
      }
    },
    "/v1/messages": {
      "post": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Anthropic Messages 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/model-categories": {
      "get": {
        "description": "ListCategories 查询模型分类列表",
        "operationId": "ModelSquareService_ListCategories",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListCategoriesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "模型分类列表",
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/model-vendors": {
      "get": {
        "description": "ListVendors 查询模型供应商列表",
        "operationId": "ModelSquareService_ListVendors",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListVendorsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "模型厂商列表",
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/models": {
      "get": {
        "description": "ListModels 分页查询模型列表",
        "operationId": "ModelSquareService_ListModels",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "categoryId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "vendor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "capability",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "keyword",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "availableOnly",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "isNew",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "isRecommended",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "sort 排序方式：DEFAULT | LATEST | RECOMMENDED | CALL_COUNT；空值按 DEFAULT 处理。",
            "in": "query",
            "name": "sort",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "复数过滤字段与旧单值字段并存；服务端会合并去重，同维度按 OR 处理。",
            "in": "query",
            "name": "vendors",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "capabilities",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "tags",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "billingModes",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "context_ranges 固定取值：SHORT | MEDIUM | LONG | EXTRA_LONG。",
            "in": "query",
            "name": "contextRanges",
            "schema": {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "lang 控制标签筛选统计的语言：zh 返回中文标签，其他值或不传返回英文标签。",
            "in": "query",
            "name": "lang",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListModelsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "模型广场列表",
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/models/name/{name}": {
      "get": {
        "description": "GetModelByName 按 model_name 查询模型详情",
        "operationId": "ModelSquareService_GetModelByName",
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.GetModelByNameReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "通过名称查询模型",
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/models/{id}": {
      "get": {
        "description": "GetModel 按 ID 查询模型详情",
        "operationId": "ModelSquareService_GetModel",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.GetModelReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "模型详情",
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/models/{id}/sources": {
      "get": {
        "description": "ListModelSources 查询模型的渠道资源售卖明细（弹框按需加载）",
        "operationId": "ModelSquareService_ListModelSources",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/channel.v1.ListModelSourcesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ModelSquareService"
        ]
      }
    },
    "/v1/models/{model}:generateContent": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Gemini generateContent 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/models/{model}:streamGenerateContent": {
      "post": {
        "parameters": [
          {
            "in": "path",
            "name": "model",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "Gemini streamGenerateContent 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/playground/categories": {
      "get": {
        "description": "ListCategories 列出所有分类",
        "operationId": "PlaygroundService_ListCategories",
        "parameters": [
          {
            "in": "query",
            "name": "kind",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.ListCategoriesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/categories/{categoryId}": {
      "get": {
        "description": "GetCategory 获取分类详情",
        "operationId": "PlaygroundService_GetCategory",
        "parameters": [
          {
            "in": "path",
            "name": "categoryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GetCategoryReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/chat/completions": {
      "post": {
        "description": "用户登录态 JWT 鉴权，前端只提交 apiKeyId 和 OpenAI Chat Completions 兼容请求体； 后端按 apiKeyId 还原用户 API Key 上下文并调用网关，不向前端暴露 API Key 明文。\n",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "apiKeyId": {
                    "description": "当前登录用户名下已启用 API Key 的 ID。",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "format": "int64",
                        "type": "integer"
                      }
                    ]
                  },
                  "frequency_penalty": {
                    "type": "number"
                  },
                  "max_tokens": {
                    "type": "integer"
                  },
                  "messages": {
                    "description": "OpenAI Chat messages。",
                    "items": {
                      "properties": {
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "items": {
                                "type": "object"
                              },
                              "type": "array"
                            }
                          ]
                        },
                        "role": {
                          "enum": [
                            "system",
                            "user",
                            "assistant",
                            "tool"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "role",
                        "content"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "模型名称。",
                    "type": "string"
                  },
                  "presence_penalty": {
                    "type": "number"
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "temperature": {
                    "type": "number"
                  },
                  "top_p": {
                    "type": "number"
                  }
                },
                "required": [
                  "apiKeyId",
                  "model",
                  "messages"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK，非流式返回 JSON；流式返回 text/event-stream。"
          },
          "400": {
            "description": "请求体非法或缺少 apiKeyId。"
          },
          "401": {
            "description": "未登录或 API Key 无效。"
          },
          "403": {
            "description": "API Key 不属于当前用户或缺少 chat scope。"
          }
        },
        "summary": "模型广场聊天代理",
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/images/generations": {
      "post": {
        "description": "GenerateImage 图像生成（同步下载上游结果转存对象存储，返回 presign-download URL）",
        "operationId": "PlaygroundService_GenerateImage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.GenerateImageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GenerateImageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/media": {
      "get": {
        "description": "ListMediaAssets 列出媒体资产",
        "operationId": "PlaygroundService_ListMediaAssets",
        "parameters": [
          {
            "in": "query",
            "name": "sessionId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "assetType",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.ListMediaAssetsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "post": {
        "description": "CreateMediaAsset 创建媒体资产",
        "operationId": "PlaygroundService_CreateMediaAsset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.CreateMediaAssetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.CreateMediaAssetReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/media/upload-url": {
      "post": {
        "description": "GenerateUploadURL 生成预签名上传 URL",
        "operationId": "PlaygroundService_GenerateUploadURL",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.GenerateUploadURLRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GenerateUploadURLReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/media/{assetId}": {
      "delete": {
        "description": "DeleteMediaAsset 删除媒体资产",
        "operationId": "PlaygroundService_DeleteMediaAsset",
        "parameters": [
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.DeleteMediaAssetReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "get": {
        "description": "GetMediaAsset 获取媒体资产详情",
        "operationId": "PlaygroundService_GetMediaAsset",
        "parameters": [
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GetMediaAssetReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/media/{assetId}/download-url": {
      "get": {
        "description": "GenerateDownloadURL 生成预签名下载 URL",
        "operationId": "PlaygroundService_GenerateDownloadURL",
        "parameters": [
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GenerateDownloadURLReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/media/{assetId}/status": {
      "put": {
        "description": "UpdateMediaAssetStatus 更新媒体资产状态",
        "operationId": "PlaygroundService_UpdateMediaAssetStatus",
        "parameters": [
          {
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.UpdateMediaAssetStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.UpdateMediaAssetStatusReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/messages": {
      "get": {
        "description": "ListMessages 列出消息",
        "operationId": "PlaygroundService_ListMessages",
        "parameters": [
          {
            "in": "query",
            "name": "sessionId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "role",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.ListMessagesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "post": {
        "description": "SendMessage 发送消息",
        "operationId": "PlaygroundService_SendMessage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.SendMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.SendMessageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/messages/{messageId}": {
      "delete": {
        "description": "DeleteMessage 删除消息",
        "operationId": "PlaygroundService_DeleteMessage",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.DeleteMessageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "get": {
        "description": "GetMessage 获取消息详情",
        "operationId": "PlaygroundService_GetMessage",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GetMessageReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/sessions": {
      "get": {
        "description": "ListSessions 列出会话",
        "operationId": "PlaygroundService_ListSessions",
        "parameters": [
          {
            "in": "query",
            "name": "categoryId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.ListSessionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "post": {
        "description": "CreateSession 创建会话",
        "operationId": "PlaygroundService_CreateSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.CreateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.CreateSessionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/playground/sessions/{sessionId}": {
      "delete": {
        "description": "DeleteSession 删除会话",
        "operationId": "PlaygroundService_DeleteSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.DeleteSessionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "get": {
        "description": "GetSession 获取会话详情",
        "operationId": "PlaygroundService_GetSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.GetSessionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      },
      "put": {
        "description": "UpdateSession 更新会话",
        "operationId": "PlaygroundService_UpdateSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playground.v1.UpdateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playground.v1.UpdateSessionReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PlaygroundService"
        ]
      }
    },
    "/v1/pricing/calculate": {
      "post": {
        "description": "CalculateCost 计算费用（根据 tokens / images / audio / video / request 等维度）。",
        "operationId": "PricingService_CalculateCost",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pricing.v1.CalculateCostRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pricing.v1.CalculateCostReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PricingService"
        ]
      }
    },
    "/v1/pricing/convert": {
      "post": {
        "description": "ConvertCurrency 货币换算（金额单位为 micros）。",
        "operationId": "PricingService_ConvertCurrency",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pricing.v1.ConvertCurrencyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pricing.v1.ConvertCurrencyReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PricingService"
        ]
      }
    },
    "/v1/pricing/models": {
      "get": {
        "description": "ListModelPrices 列出模型价格列表（支持按 model_id / plan_id 过滤）。",
        "operationId": "PricingService_ListModelPrices",
        "parameters": [
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "planId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pricing.v1.ListModelPricesReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PricingService"
        ]
      }
    },
    "/v1/pricing/models/{modelId}/plans/{planId}": {
      "get": {
        "description": "GetModelPrice 查询指定模型和套餐的有效价格。",
        "operationId": "PricingService_GetModelPrice",
        "parameters": [
          {
            "in": "path",
            "name": "modelId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "planId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pricing.v1.GetModelPriceReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PricingService"
        ]
      }
    },
    "/v1/pricing/rates/{baseCurrency}/{quoteCurrency}": {
      "get": {
        "description": "GetExchangeRate 查询指定货币对的最新汇率。",
        "operationId": "PricingService_GetExchangeRate",
        "parameters": [
          {
            "in": "path",
            "name": "baseCurrency",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "quoteCurrency",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pricing.v1.GetExchangeRateReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "PricingService"
        ]
      }
    },
    "/v1/public/site-settings": {
      "get": {
        "description": "GetPublicSiteSettings 获取公开站点配置（免认证，供 Web 首屏读取）。",
        "operationId": "SiteService_GetPublicSiteSettings",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/site.v1.GetPublicSiteSettingsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SiteService"
        ]
      }
    },
    "/v1/responses": {
      "post": {
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "summary": "OpenAI Responses 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    },
    "/v1/subaccount/create": {
      "post": {
        "description": "创建子账号",
        "operationId": "SubaccountService_CreateSubaccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.CreateSubaccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.CreateSubaccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/list": {
      "get": {
        "description": "查询子账号列表",
        "operationId": "SubaccountService_ListSubaccounts",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.ListSubaccountsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}": {
      "delete": {
        "description": "删除子账号",
        "operationId": "SubaccountService_DeleteSubaccount",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.DeleteSubaccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      },
      "get": {
        "description": "查询子账号详情",
        "operationId": "SubaccountService_GetSubaccount",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.GetSubaccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      },
      "put": {
        "description": "更新子账号",
        "operationId": "SubaccountService_UpdateSubaccount",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.UpdateSubaccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.UpdateSubaccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/permissions/models": {
      "post": {
        "description": "设置模型权限",
        "operationId": "SubaccountService_SetModelPermissions",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.SetModelPermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.SetModelPermissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/permissions/tools": {
      "post": {
        "description": "设置工具权限",
        "operationId": "SubaccountService_SetToolPermissions",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.SetToolPermissionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.SetToolPermissionsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/quota": {
      "get": {
        "description": "查询子账号额度使用情况",
        "operationId": "SubaccountService_GetSubaccountQuota",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.GetSubaccountQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/quota/assign": {
      "post": {
        "description": "分配额度",
        "operationId": "SubaccountService_AssignQuota",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.AssignQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.AssignQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/quota/recover": {
      "post": {
        "description": "回收额度",
        "operationId": "SubaccountService_RecoverQuota",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.RecoverQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.RecoverQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/subaccount/{teamMemberId}/toggle": {
      "post": {
        "description": "启用/禁用子账号",
        "operationId": "SubaccountService_ToggleSubaccount",
        "parameters": [
          {
            "in": "path",
            "name": "teamMemberId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api.subaccount.v1.ToggleSubaccountRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api.subaccount.v1.ToggleSubaccountReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "SubaccountService"
        ]
      }
    },
    "/v1/teams": {
      "get": {
        "operationId": "TeamService_ListMyTeams",
        "parameters": [
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListMyTeamsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      },
      "post": {
        "description": "── Team CRUD ───────────────────────────────────────────────",
        "operationId": "TeamService_CreateTeam",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.CreateTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.CreateTeamReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}": {
      "delete": {
        "operationId": "TeamService_DisbandTeam",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.DisbandTeamReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      },
      "get": {
        "operationId": "TeamService_GetTeam",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.GetTeamReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      },
      "put": {
        "operationId": "TeamService_UpdateTeam",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.UpdateTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.UpdateTeamReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/apikeys": {
      "get": {
        "description": "ListTeamAPIKeys 团队 owner 只读查看快照归属本团队的全部令牌（含已吊销/已迁走成员）。",
        "operationId": "TeamService_ListTeamAPIKeys",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListTeamAPIKeysReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/leave": {
      "post": {
        "operationId": "TeamService_LeaveTeam",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.LeaveTeamRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.LeaveTeamReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/logs": {
      "get": {
        "description": "ListTeamLogs 团队 owner 只读查看快照归属本团队的使用日志（按 team_id 快照过滤，含已移除成员历史）。",
        "operationId": "TeamService_ListTeamLogs",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "modelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "channelId",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListTeamLogsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/members": {
      "get": {
        "description": "── Members ─────────────────────────────────────────────────",
        "operationId": "TeamService_ListMembers",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListMembersReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      },
      "post": {
        "description": "AddMember 添加企业团队成员（managed_subaccount，无邀请码）。邮箱必填、手机可选，\n 不写月度额度；成员账号落 account_type=5。复用 subaccount 创建链路。",
        "operationId": "TeamService_AddMember",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.AddMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.AddMemberReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/members/{userId}": {
      "delete": {
        "operationId": "TeamService_RemoveMember",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.RemoveMemberReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/members/{userId}/migrate": {
      "post": {
        "description": "MigrateMember 将成员从当前团队迁移到目标团队（actor 须同时是两团队 owner）；\n 迁移后原令牌显式 revoke，原团队管理员不再可见其令牌。",
        "operationId": "TeamService_MigrateMember",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.MigrateMemberRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.MigrateMemberReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/members/{userId}/quota": {
      "get": {
        "operationId": "TeamService_GetMemberQuota",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.GetMemberQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/members/{userId}/quota/grants": {
      "get": {
        "operationId": "TeamService_ListMemberQuotaGrants",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListQuotaGrantsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/quota/grants": {
      "get": {
        "description": "ListTeamQuotaGrants 查询团队级额度编辑日志（member_id IS NULL）：创建/编辑总额度的事件流。",
        "operationId": "TeamService_ListTeamQuotaGrants",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.ListQuotaGrantsReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      },
      "post": {
        "description": "GrantTeamQuota 给团队增量增加可用额度（仅 owner）：total_quota_micros += amount，\n 并写一条 action=\"add\" 的团队级额度发放记录（member_id IS NULL）。",
        "operationId": "TeamService_GrantTeamQuota",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.GrantTeamQuotaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.GrantTeamQuotaReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{teamId}/tasks": {
      "get": {
        "description": "ListTeamTasks 团队任务列表（owner 权限 team.task.list.all）。",
        "operationId": "ConsoleProviderTaskService_ListTeamTasks",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "statuses",
            "schema": {
              "items": {
                "format": "int32",
                "type": "integer"
              },
              "type": "array"
            }
          },
          {
            "in": "query",
            "name": "provider",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "model",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "taskId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/providertask.v1.ListTasksReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/teams/{teamId}/tasks/{id}": {
      "get": {
        "description": "GetTeamTask 团队单任务详情（不属于本团队 → 404）。",
        "operationId": "ConsoleProviderTaskService_GetTeamTask",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/providertask.v1.GetTaskReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/teams/{teamId}/transfer": {
      "post": {
        "description": "TransferOwnership owner 一步将团队所有权转给目标成员，立即生效（无需对方接受）。",
        "operationId": "TeamService_TransferOwnership",
        "parameters": [
          {
            "in": "path",
            "name": "teamId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/team.v1.TransferOwnershipRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/team.v1.TransferOwnershipReply"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "TeamService"
        ]
      }
    },
    "/v1/teams/{team_id}/tasks/{id}/blob/{seq}": {
      "get": {
        "description": "团队 owner（team.task.list.all）下载本团队任务的 result_ref blob； 鉴权与反枚举口径同 console 端点。",
        "operationId": "ConsoleProviderTaskService_DownloadTeamTaskBlob",
        "parameters": [
          {
            "in": "path",
            "name": "team_id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "in": "path",
            "name": "seq",
            "required": true,
            "schema": {
              "format": "int32",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "blob 字节流"
          },
          "404": {
            "description": "任务不存在 / 不属于本团队 / seq 越界 / 对象缺失"
          },
          "502": {
            "description": "存储侧不可用"
          }
        },
        "summary": "下载本团队异步任务结果 blob",
        "tags": [
          "ConsoleProviderTaskService"
        ]
      }
    },
    "/v1/video/generations": {
      "post": {
        "description": "API Key 鉴权后转发到路由后的上游渠道。",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "duration": {
                    "description": "视频时长。",
                    "type": "string"
                  },
                  "media": {
                    "description": "可选参考媒体。",
                    "items": {
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "model": {
                    "description": "模型名称，默认 wan2.7-t2v。",
                    "type": "string"
                  },
                  "prompt": {
                    "description": "视频生成提示词；带 media 时可选。",
                    "type": "string"
                  },
                  "resolution": {
                    "description": "视频分辨率。",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "请求体非法，或同时缺少 prompt 和 media。"
          },
          "401": {
            "description": "API Key 无效或缺失。"
          }
        },
        "summary": "OpenAI Video Generations 兼容入口",
        "tags": [
          "Gateway"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "AccountService 账号管理服务：注册、登录、登出、token 刷新、个人资料、二步验证、会话管理。",
      "name": "AccountService"
    },
    {
      "description": "ActivityService 活动服务（用户端）：签到、促销活动、兑换码",
      "name": "ActivityService"
    },
    {
      "description": "AdminAPIKeyService B 端管理员 API Key 全局视角（查询/封禁/解封）。\n 需要 JWT + IAM 权限 apikey:manage。",
      "name": "AdminAPIKeyService"
    },
    {
      "description": "AdminAPISpecTemplateService API 规范模板管理服务：admin 可增删改模板，\n 字段结构永远来自代码字段库（internal/biz/param_schema/library.go）",
      "name": "AdminAPISpecTemplateService"
    },
    {
      "description": "AdminActivityService 活动管理服务（管理端）",
      "name": "AdminActivityService"
    },
    {
      "description": "AdminAgentService 管理端代理商服务",
      "name": "AdminAgentService"
    },
    {
      "description": "AdminAnnouncementService 公告管理服务（管理端）",
      "name": "AdminAnnouncementService"
    },
    {
      "description": "AdminAuditLogSettingsService 审计日志保留策略（强类型，范围校验在 service 层）。",
      "name": "AdminAuditLogSettingsService"
    },
    {
      "description": "AdminAuthSessionSettingsService 登录会话策略管理（强类型，范围校验在 service 层）。\n 消费方：internal/pkg/authsettings（签发会话时按 TTL 决策）。",
      "name": "AdminAuthSessionSettingsService"
    },
    {
      "description": "AdminChannelService 渠道管理服务（管理端）",
      "name": "AdminChannelService"
    },
    {
      "description": "AdminChannelSourceService 渠道资源目录管理（售卖维度）。\n 资源为独立目录条目，渠道通过 ChannelAdminService 的 source_id 字段主动绑定（至多一个）。",
      "name": "AdminChannelSourceService"
    },
    {
      "description": "AdminDashboardService 管理员仪表盘服务。\n\n 提供全局统计数据查询功能。\n 鉴权：JWT + 管理员权限（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/admin/dashboard",
      "name": "AdminDashboardService"
    },
    {
      "description": "AdminEmailSettingsService 邮件 / SMTP 配置管理（强类型）。\n 消费方：internal/biz/account/notification_service.go（发送验证码等）。",
      "name": "AdminEmailSettingsService"
    },
    {
      "description": "AdminFinanceService 财务管理服务（管理端）",
      "name": "AdminFinanceService"
    },
    {
      "description": "AdminIdentityService 提供管理端实名认证记录查询和受控状态治理能力；人工新增认证已停用。",
      "name": "AdminIdentityService"
    },
    {
      "description": "AdminInvoiceService 管理员发票服务（审核 / 开具 / 红冲 / 快递补录 / 上传 / 导出）。\n route_config.go 全部 RPC 挂 PermInvoiceApprove。金额单位 micros，时间 RFC3339 字符串。",
      "name": "AdminInvoiceService"
    },
    {
      "description": "AdminModelEndpointService 模型端点管理服务（模型暴露哪些接口，供 P2 批量绑定按接口筛选模型）",
      "name": "AdminModelEndpointService"
    },
    {
      "description": "AdminModelParamCustomService 模型参数定制管理服务（模型 × 模板绑定 + 收紧覆盖）",
      "name": "AdminModelParamCustomService"
    },
    {
      "description": "AdminModelService 模型管理服务（管理端）",
      "name": "AdminModelService"
    },
    {
      "description": "AdminModelSettingsService 模型相关全局设置（Gemini API 版本映射、Claude 缺省 max_tokens\n 等；对齐 QuantumNous/new-api 的「系统设置 → 模型相关设置」）。落 options KV：\n   - model.gemini.version_map（JSON blob，map\u003cstring,string\u003e）\n   - model.claude.default_max_tokens（JSON blob，map\u003cstring,int\u003e）\n\n 消费方：gateway 侧 provider 缓存 10s，adapter 层查询版本/默认值；渠道未命中 model\n 时查 \"default\" 键；仍未命中 → 内置常量（v1beta / 8192）兜底。",
      "name": "AdminModelSettingsService"
    },
    {
      "description": "AdminModelSquareService 模型广场后台配置服务（管理端）。\n AdminModelSquareService is the admin-side config service for the model square.\n Phase 1 仅覆盖 Banner 图管理；固定入口位 / 可视化指标 / 收藏 / 最近使用后续分批加入。\n Phase 1 only covers banner management; entry slots / metrics / favorites /\n recent uses are added in later batches.",
      "name": "AdminModelSquareService"
    },
    {
      "description": "AdminMonitorService 监控服务（管理端）",
      "name": "AdminMonitorService"
    },
    {
      "description": "AdminMonitorSettingsService 监控设置（全局渠道可靠性策略，落 options KV）。\n 消费方：relay 引擎（渠道未配置 settings.retry / settings.auto_disable 时的全局回退，\n 优先级：渠道级 \u003e 全局 \u003e 内置硬编码集合；504/524 恒不重试，不受任何配置影响）。",
      "name": "AdminMonitorSettingsService"
    },
    {
      "description": "AdminProviderTaskService 异步 provider 任务查询（平台管理员侧，权限 task:read）。\n\n 脱敏铁律（D3）：result_inline / meta 只以 *_redacted（logsafe.RedactDataURIs 后）\n 字符串形式出现在 detail；raw_response 任何端点都不回（本文件不定义该字段）。",
      "name": "AdminProviderTaskService"
    },
    {
      "description": "AdminRateLimitService 限流配置管理服务（管理端）",
      "name": "AdminRateLimitService"
    },
    {
      "name": "AdminReferralService"
    },
    {
      "description": "AdminSMSSettingsService 短信（阿里云）配置管理（强类型）。\n 消费方：internal/biz/account/sms_service.go（发送手机验证码）。\n 配置面只暴露 AK / AK Secret / 签名 / 模板 4 项；endpoint、API 版本、超时按官方文档硬编码。",
      "name": "AdminSMSSettingsService"
    },
    {
      "description": "AdminSiteSettingsService 站点公开配置管理（强类型，替代通用 /v1/admin/settings）。\n 字段对应 GetPublicSiteSettings 的可写子集；落库到 public.options 表内规范 key。",
      "name": "AdminSiteSettingsService"
    },
    {
      "name": "AdminSubscriptionService"
    },
    {
      "description": "AdminSupportService 管理端支持服务",
      "name": "AdminSupportService"
    },
    {
      "description": "AdminTierService 用户等级管理（等级 CRUD + 用户绑定）。\n 渠道白名单的配置入口在 channel.v1 ChannelAdminService（SetChannelTierWhitelist）。",
      "name": "AdminTierService"
    },
    {
      "description": "AdminUploadService 管理端通用图片上传服务（presign 直传）。\n\n 管理员前端调 presign 拿预签名 PUT 地址 + 永久公开 URL，文件由前端直传对象存储\n （不经后端），传成功后把永久 URL 提交给业务接口。不同场景使用独立 RPC 与权限码，\n 防止持有某一业务上传权限的管理员向其他公共目录签发写入地址。",
      "name": "AdminUploadService"
    },
    {
      "description": "AdminUserService 用户管理服务（管理端）",
      "name": "AdminUserService"
    },
    {
      "description": "AdminVendorService 供应商管理服务（管理端）\n\n 提供模型供应商的完整 CRUD 操作，包括：\n - GET    /v1/admin/model-vendors          - 列出所有供应商（不分页，带模型计数）\n - GET    /v1/admin/model-vendors/search   - 搜索供应商（分页）\n - GET    /v1/admin/model-vendors/{id}     - 获取供应商详情\n - POST   /v1/admin/model-vendors          - 创建供应商\n - PATCH  /v1/admin/model-vendors/{id}     - 更新供应商\n - PATCH  /v1/admin/model-vendors/{id}/status - 更新供应商状态\n - DELETE /v1/admin/model-vendors/{id}     - 删除供应商\n\n 注意：路径使用 /model-vendors 而非 /vendors，以区分模型供应商和其他类型供应商",
      "name": "AdminVendorService"
    },
    {
      "description": "ChannelAdminService B 端管理员渠道管理服务。\n\n 鉴权：JWT + IAM 权限 channel:manage（由上游 middleware + biz 层 PermissionChecker 复合校验）。\n 资源族：\n   - Channel：上游连接配置（base_url / api_key / region / timeout）\n   - SourceBinding：模型↔资源、资源↔渠道 两级路由绑定（资源中心化路由）\n   - ResolveRoute：路由候选链解析（诊断），给后台用\n\n 路由 prefix：\n   /v1/admin/channels\n   /v1/admin/model-sources\n   /v1/admin/source-channels",
      "name": "ChannelAdminService"
    },
    {
      "description": "ConsoleModelSquareService 模型广场用户端服务（前台）。\n ConsoleModelSquareService is the console-side (front-end) service for the model square.",
      "name": "ConsoleModelSquareService"
    },
    {
      "description": "ConsoleProviderTaskService 异步 provider 任务查询（console 用户侧 + 团队侧）。\n\n 三层可见性（D1）：\n   - /v1/console/tasks*       当前登录用户本人任务（ScopeAuthenticated，user_id 取自 ctx）\n   - /v1/teams/{team_id}/tasks* 团队 owner 看本团队任务（ScopeTeam + team.task.list.all）\n\n 脱敏铁律（D3）：本文件的 message 不定义 result_inline / meta / raw_response 字段——\n 上游原样体绝不回给 console 用户；result_ref 只回摘要（存在性/计数/content_type/size）。",
      "name": "ConsoleProviderTaskService"
    },
    {
      "name": "CreditRateService"
    },
    {
      "description": "DashboardService 用户控制台仪表盘服务。\n\n 提供用户维度的统计数据查询功能。\n 鉴权：JWT（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/console/dashboard",
      "name": "DashboardService"
    },
    {
      "description": "EnterpriseService 企业账号升级与后台审核服务。\n\n 用户侧接口用于提交企业升级申请、查看自己的申请；管理侧接口用于审核、\n 查询申请历史以及查看已通过的企业账号列表。",
      "name": "EnterpriseService"
    },
    {
      "description": "IAMService 身份与访问管理服务，包含角色、权限、菜单、用户角色绑定和用户权限查询。",
      "name": "IAMService"
    },
    {
      "description": "IdentityService 提供用户侧个人实名认证能力，支持当前 provider 能力矩阵中的多证件与多方式组合。",
      "name": "IdentityService"
    },
    {
      "description": "InvoiceService C 端用户发票服务（抬头 CRUD / 申请开票 / 我的发票 / 换开 / 下载）。\n 入参 user_id 通过 JWT 中间件注入 ctx，proto 内不暴露（与 PaymentService 一致）。",
      "name": "InvoiceService"
    },
    {
      "description": "ModelSquareService C 端模型广场服务（公开接口，无需鉴权）。\n\n 路由 prefix：\n   /v1/models\n   /v1/model-categories\n   /v1/model-vendors",
      "name": "ModelSquareService"
    },
    {
      "description": "PaymentCallbackService 支付回调服务（由第三方支付平台调用）。\n 无需鉴权，通过签名验证。",
      "name": "PaymentCallbackService"
    },
    {
      "name": "PaymentChannelConfigService"
    },
    {
      "description": "PaymentService C 端用户支付服务（充值/订单查询/退款）。\n 入参 user_id 通过 JWT 中间件注入 ctx，proto 内不暴露。",
      "name": "PaymentService"
    },
    {
      "description": "PlaygroundService Playground 服务：会话、消息、媒体资产、分类管理",
      "name": "PlaygroundService"
    },
    {
      "description": "PricingService 定价服务。\n\n 提供定价规则查询、模型价格查询、费用计算、汇率查询等功能。\n 鉴权：JWT + IAM 权限 pricing:read / pricing:manage（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/pricing",
      "name": "PricingService"
    },
    {
      "description": "SiteService 站点公开配置服务。\n\n 提供 Web 前端首屏所需的公开站点配置（平台信息、注册/维护开关、\n 支付方式、充值限额、安全策略等）。数据为 admin 配置（public.options\n KV 表）的安全子集 + 领域聚合（默认套餐）。\n\n 鉴权：无（route scope=public, portal=any，匿名放行）。\n\n 路由 prefix：/v1/public",
      "name": "SiteService"
    },
    {
      "description": "子账号管理服务",
      "name": "SubaccountService"
    },
    {
      "description": "SubscriptionService 订阅服务。\n\n 提供订阅套餐查询、订阅购买、续费、消费、预消费、结算、释放等功能。\n 鉴权：JWT + IAM 权限 subscription:read / subscription:manage（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/console/subscription",
      "name": "SubscriptionService"
    },
    {
      "description": "SupportedCurrencyService 系统支持币种白名单管理。\n 操作人/时间一律由服务端鉴权上下文与时钟写入，请求体不携带（设计 D8）。",
      "name": "SupportedCurrencyService"
    },
    {
      "description": "TeamService 提供团队 CRUD、成员管理、邀请流程与所有权转让能力。",
      "name": "TeamService"
    },
    {
      "name": "TopupCatalogService"
    },
    {
      "name": "TopupPackageService"
    },
    {
      "name": "TopupRuleService"
    },
    {
      "description": "UsageService 使用记录服务。\n\n 提供使用记录查询功能，记录每次 API 调用的详细信息。\n 鉴权：JWT 登录态（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/console/usage",
      "name": "UsageService"
    },
    {
      "description": "UserAPIKeyService C 端用户在工作台管理自己的 API Key（创建/列表/旋转/启用/禁用/删除/更新）。\n 入参 user_id 通过 JWT 中间件注入 ctx，proto 内不暴露。",
      "name": "UserAPIKeyService"
    },
    {
      "description": "UserAgentService 用户端代理商服务",
      "name": "UserAgentService"
    },
    {
      "description": "UserSupportService 用户端支持服务",
      "name": "UserSupportService"
    },
    {
      "description": "WalletService C 端用户钱包服务（查询余额/账本流水）。\n 入参 user_id 通过 JWT 中间件注入 ctx，proto 内不暴露。",
      "name": "WalletService"
    },
    {
      "description": "WebhookService Webhook 订阅管理服务。\n\n 提供 Webhook 订阅的创建、查询、更新、删除功能。\n 鉴权：JWT（由上游 middleware 校验）。\n\n 路由 prefix：\n   /v1/me/webhooks",
      "name": "WebhookService"
    }
  ]
}
