{
  "consumes": [
    "application/json"
  ],
  "definitions": {
    "BillingServiceOrderVoucherReconcileBody": {
      "properties": {
        "note": {
          "title": "补单说明 | [EN] Note",
          "type": "string"
        },
        "vouchers": {
          "items": {
            "$ref": "#/definitions/billingOrderVoucher",
            "type": "object"
          },
          "title": "付款凭证，1 到 3 个，要能看到金额、时间与流水号或交易哈希 | [EN] Payment vouchers, one to three, showing the amount, time and transaction ID or hash",
          "type": "array"
        }
      },
      "title": "补确认付款请求（渠道核对与凭证补单共用）\n[EN] Confirm payment request, shared by the channel-verified and voucher-only routes",
      "type": "object"
    },
    "BillingServiceOrgOrderCancelBody": {
      "title": "取消订单请求\n[EN] Cancel order request",
      "type": "object"
    },
    "BillingServiceSubscriptionChangeApplyBody": {
      "description": "只接受合计为 0 的变更（纯降级、纯减资源位、纯改续费周期）。\n要收费的变更必须走订单与支付，不能从这里绕过去——否则就是不付钱直接升级。\n\n[EN] Accepts only changes that total zero: a downgrade, a reduction or a cycle change. Any\nchargeable change must go through an order and payment rather than bypassing it here, which\nwould amount to upgrading without paying.",
      "properties": {
        "meta": {
          "$ref": "#/definitions/billingAdminSaveMeta",
          "title": "操作元信息 | [EN] Operation metadata"
        },
        "renew_cycle_months": {
          "format": "int32",
          "title": "目标续费周期（0 表示不改）| [EN] Target renewal cycle; zero keeps it",
          "type": "integer"
        },
        "seats": {
          "items": {
            "$ref": "#/definitions/billingSeatTarget",
            "type": "object"
          },
          "title": "各类资源位目标总数 | [EN] Desired totals per resource",
          "type": "array"
        },
        "target_plan_code": {
          "title": "目标套餐编码 | [EN] Target plan code",
          "type": "string"
        },
        "version": {
          "format": "int32",
          "title": "订阅行版本 | [EN] Subscription row version",
          "type": "integer"
        }
      },
      "title": "应用零元变更请求\n[EN] Apply a zero-cost change request",
      "type": "object"
    },
    "BillingServiceSubscriptionChangeQuoteBody": {
      "description": "三个维度都可选，一次提交可以同时动套餐、资源位与周期——界面上就是一个页面三块表单。\n不传的维度表示不变，而不是清零。\n\n[EN] All three dimensions are optional and one submission may change the plan, the resources\nand the cycle together, as the page presents them on one screen. An omitted dimension means\nunchanged rather than cleared.",
      "properties": {
        "cycle_months": {
          "format": "int32",
          "title": "本次购买时长（0 表示不购买时长，只调配置）| [EN] Months to purchase; zero changes configuration only",
          "type": "integer"
        },
        "seats": {
          "items": {
            "$ref": "#/definitions/billingSeatTarget",
            "type": "object"
          },
          "title": "各类资源位目标总数 | [EN] Desired totals per resource",
          "type": "array"
        },
        "target_plan_code": {
          "title": "目标套餐编码（不传表示不换套餐）| [EN] Target plan code; omit to keep the current one",
          "type": "string"
        }
      },
      "title": "变更报价请求\n[EN] Change quote request",
      "type": "object"
    },
    "BillingServiceTrialExtendBody": {
      "properties": {
        "days": {
          "format": "int32",
          "title": "延长天数 | [EN] Days to add",
          "type": "integer"
        },
        "reason": {
          "title": "延长原因，进审计与订阅变更记录 | [EN] Why, recorded in the audit and the change record",
          "type": "string"
        }
      },
      "title": "延长试用请求：只在试用中可用，订阅仍是免费版，试用额度不加\n[EN] Extend trial request: only while on trial; the subscription stays free and the trial quota is not topped up",
      "type": "object"
    },
    "apiBillingOrderReconcile": {
      "properties": {
        "channel_paid_at": {
          "format": "date-time",
          "title": "渠道实际付款时间（经渠道核对时，供对账）| [EN] When the channel was paid, when verified, for reconciliation",
          "type": "string"
        },
        "channel_txn_id": {
          "title": "渠道流水号（经渠道核对时）| [EN] Channel transaction, when verified",
          "type": "string"
        },
        "confirmed_at": {
          "format": "date-time",
          "title": "补确认时间（即订单的支付时间）| [EN] When it was confirmed, which is the order's paid time",
          "type": "string"
        },
        "note": {
          "title": "补单说明 | [EN] Note",
          "type": "string"
        },
        "operator_id": {
          "title": "操作人（AC 运维身份主体 ID）| [EN] Operator, the AC ops principal ID",
          "type": "string"
        },
        "previous_status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "补单前的状态：待支付或已过期 | [EN] Status before: pending or expired"
        },
        "verified": {
          "title": "是否经渠道核对（虚拟币只能凭凭证，为 false）| [EN] Whether the channel confirmed it; false for crypto, confirmed from vouchers",
          "type": "boolean"
        },
        "vouchers": {
          "items": {
            "$ref": "#/definitions/billingOrderVoucher",
            "type": "object"
          },
          "title": "付款凭证 | [EN] Payment vouchers",
          "type": "array"
        }
      },
      "title": "一笔订单的补单记录\n[EN] An order's manual payment confirmation",
      "type": "object"
    },
    "billingAdminSaveMeta": {
      "properties": {
        "changes": {
          "items": {
            "$ref": "#/definitions/billingConfigChange",
            "type": "object"
          },
          "maxItems": 200,
          "title": "修改前后对比明细 | [EN] Before/after detail rows",
          "type": "array"
        },
        "remark": {
          "maxLength": 200,
          "minLength": 2,
          "title": "变更说明（必填）| [EN] Change note, mandatory",
          "type": "string"
        },
        "section_label": {
          "maxLength": 32,
          "title": "分区名（进审计标题）| [EN] Section name, used as the audit title",
          "type": "string"
        }
      },
      "required": [
        "section_label",
        "remark"
      ],
      "title": "保存元信息\n[EN] Save metadata\n每个写接口都要带：section_label 进审计标题，所以审计里看到的是「改了额度包阶梯」\n而不是「改了套餐与定价」；remark 是必填的变更说明，配置写错的代价是真金白银，\n事后要能查到是谁、为什么改的。\n[EN] Carried by every write endpoint. section_label becomes the audit entry's title, so the\nlog reads \"changed the quota package tiers\" rather than \"changed plans and pricing\"; remark\nis the mandatory change note, because a mispriced configuration costs real money and someone\nhas to be able to find out who changed it and why",
      "type": "object"
    },
    "billingBillingCatalog": {
      "properties": {
        "addon_prices": {
          "items": {
            "$ref": "#/definitions/configAddonPrice",
            "type": "object"
          },
          "title": "资源位加购单价 | [EN] Seat addon unit prices",
          "type": "array"
        },
        "cycle_discounts": {
          "items": {
            "$ref": "#/definitions/configCycleDiscount",
            "type": "object"
          },
          "title": "付费周期折扣 | [EN] Billing cycle discounts",
          "type": "array"
        },
        "entitlements": {
          "items": {
            "$ref": "#/definitions/billingCatalogEntitlement",
            "type": "object"
          },
          "title": "权益对比（只含在售套餐与已上线权益） | [EN] Entitlement comparison over plans on sale and released entitlements",
          "type": "array"
        },
        "plans": {
          "items": {
            "$ref": "#/definitions/billingCatalogPlan",
            "type": "object"
          },
          "title": "在售套餐（按 sort_no） | [EN] Plans on sale, by sort_no",
          "type": "array"
        },
        "quota_packages": {
          "items": {
            "$ref": "#/definitions/configQuotaPackageConfig",
            "type": "object"
          },
          "title": "额度包配置 | [EN] Quota package configurations",
          "type": "array"
        },
        "revision": {
          "title": "目录版本（配置中心 BILLING 分区的 revision） | [EN] Revision of the config center BILLING namespace",
          "type": "string"
        },
        "settings": {
          "$ref": "#/definitions/billingPublicBillingSettings",
          "title": "公开的计费设置 | [EN] Public billing settings"
        }
      },
      "title": "计费目录\n[EN] Billing catalog",
      "type": "object"
    },
    "billingBillingServiceOrderReconcileBody": {
      "properties": {
        "note": {
          "title": "补单说明 | [EN] Note",
          "type": "string"
        },
        "vouchers": {
          "items": {
            "$ref": "#/definitions/billingOrderVoucher",
            "type": "object"
          },
          "title": "付款凭证，1 到 3 个，要能看到金额、时间与流水号或交易哈希 | [EN] Payment vouchers, one to three, showing the amount, time and transaction ID or hash",
          "type": "array"
        }
      },
      "title": "补确认付款请求（渠道核对与凭证补单共用）\n[EN] Confirm payment request, shared by the channel-verified and voucher-only routes",
      "type": "object"
    },
    "billingCatalogEntitlement": {
      "properties": {
        "desc": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "说明（按语言） | [EN] Description per language",
          "type": "array"
        },
        "entitlement_key": {
          "title": "权益标识 | [EN] Entitlement key",
          "type": "string"
        },
        "group": {
          "$ref": "#/definitions/configEntitlementGroup",
          "title": "分组 | [EN] Group"
        },
        "name": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "名称（按语言） | [EN] Name per language",
          "type": "array"
        },
        "sort_no": {
          "format": "int32",
          "title": "组内排序 | [EN] Order within the group",
          "type": "integer"
        },
        "unit": {
          "title": "数量单位 | [EN] Unit for numeric values",
          "type": "string"
        },
        "value_type": {
          "$ref": "#/definitions/configEntitlementValueType",
          "title": "取值类型 | [EN] Value type"
        },
        "values": {
          "items": {
            "$ref": "#/definitions/billingCatalogEntitlementValue",
            "type": "object"
          },
          "title": "各在售套餐的取值（每个套餐一条） | [EN] Value per plan on sale, one each",
          "type": "array"
        }
      },
      "title": "权益对比的一行\n[EN] One row of the entitlement comparison",
      "type": "object"
    },
    "billingCatalogEntitlementValue": {
      "properties": {
        "plan_code": {
          "title": "套餐编码 | [EN] Plan code",
          "type": "string"
        },
        "value_bool": {
          "title": "开关取值（BOOLEAN） | [EN] Switch value, for BOOLEAN",
          "type": "boolean"
        },
        "value_num": {
          "format": "int64",
          "title": "数量取值（NUMBER，0 表示不提供） | [EN] Numeric value for NUMBER; 0 means not provided",
          "type": "string"
        }
      },
      "title": "某套餐在某权益上的取值\n[EN] A plan's value for one entitlement",
      "type": "object"
    },
    "billingCatalogPlan": {
      "description": "只带客户需要看的字段：不含审计字段、在用统计与草稿 / 下架套餐\n[EN] Customer-facing fields only: no audit fields, usage statistics, drafts or off-sale plans",
      "properties": {
        "audience": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "适用人群（按语言） | [EN] Target audience per language",
          "type": "array"
        },
        "code": {
          "title": "套餐编码（套餐的唯一标识） | [EN] Plan code, the plan identity",
          "type": "string"
        },
        "color": {
          "$ref": "#/definitions/configPlanColor",
          "title": "标识色 | [EN] Accent color"
        },
        "features": {
          "items": {
            "$ref": "#/definitions/configPlanFeature",
            "type": "object"
          },
          "title": "卖点 | [EN] Selling points",
          "type": "array"
        },
        "is_free": {
          "title": "是否免费版 | [EN] Whether it is the free plan",
          "type": "boolean"
        },
        "is_recommended": {
          "title": "是否推荐 | [EN] Whether it is recommended",
          "type": "boolean"
        },
        "name": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "名称（按语言） | [EN] Name per language",
          "type": "array"
        },
        "price_per_month_micro": {
          "format": "int64",
          "title": "月费 | [EN] Monthly price",
          "type": "string"
        },
        "quotas": {
          "items": {
            "$ref": "#/definitions/configPlanQuota",
            "type": "object"
          },
          "title": "内含资源位与额度 | [EN] Included seats and quotas",
          "type": "array"
        },
        "sort_no": {
          "format": "int32",
          "title": "展示顺序 | [EN] Display order",
          "type": "integer"
        }
      },
      "title": "在售套餐\n[EN] A plan on sale",
      "type": "object"
    },
    "billingChangeOperatorType": {
      "default": "CHANGE_OPERATOR_TYPE_UNSPECIFIED",
      "description": "- CHANGE_OPERATOR_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHANGE_OPERATOR_TYPE_MEMBER: 客户成员（组织控制台或下单）| [EN] A customer member, from the org console or an order\n - CHANGE_OPERATOR_TYPE_OPS: 运维人员 | [EN] An ops operator\n - CHANGE_OPERATOR_TYPE_SYSTEM: 系统任务（到期、续费、试用）| [EN] A system job: expiry, renewal, trial",
      "enum": [
        "CHANGE_OPERATOR_TYPE_UNSPECIFIED",
        "CHANGE_OPERATOR_TYPE_MEMBER",
        "CHANGE_OPERATOR_TYPE_OPS",
        "CHANGE_OPERATOR_TYPE_SYSTEM"
      ],
      "title": "变更由谁发起\n[EN] Who initiated a change",
      "type": "string"
    },
    "billingCheckoutType": {
      "default": "CHECKOUT_TYPE_UNSPECIFIED",
      "description": "- CHECKOUT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHECKOUT_TYPE_NEW: 新购 | [EN] New purchase\n - CHECKOUT_TYPE_UPGRADE: 升级（立即生效，按天补差价）| [EN] Upgrade, immediate and prorated\n - CHECKOUT_TYPE_ADDON: 加购资源位（立即生效，按天补差价）| [EN] Seat addon, immediate and prorated\n - CHECKOUT_TYPE_RENEW: 续费（顺延到期日）| [EN] Renewal, extends the end date\n - CHECKOUT_TYPE_DOWNGRADE: 降级（期末生效，今天不收钱）| [EN] Downgrade at period end, nothing charged today\n - CHECKOUT_TYPE_ADJUST: 调整（减资源位或改周期，期末生效）| [EN] Reduction or cycle change at period end",
      "enum": [
        "CHECKOUT_TYPE_UNSPECIFIED",
        "CHECKOUT_TYPE_NEW",
        "CHECKOUT_TYPE_UPGRADE",
        "CHECKOUT_TYPE_ADDON",
        "CHECKOUT_TYPE_RENEW",
        "CHECKOUT_TYPE_DOWNGRADE",
        "CHECKOUT_TYPE_ADJUST"
      ],
      "title": "订阅变更的类型\n[EN] Kind of subscription change",
      "type": "string"
    },
    "billingChurnReason": {
      "default": "CHURN_REASON_UNSPECIFIED",
      "description": "- CHURN_REASON_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHURN_REASON_NOT_RENEWED: 关闭自动续费且未续费 | [EN] Auto-renewal off and not renewed\n - CHURN_REASON_RENEW_FAILED: 到期续费扣款失败 | [EN] The renewal charge failed at expiry",
      "enum": [
        "CHURN_REASON_UNSPECIFIED",
        "CHURN_REASON_NOT_RENEWED",
        "CHURN_REASON_RENEW_FAILED"
      ],
      "title": "流失原因\n[EN] Why a paid workspace churned",
      "type": "string"
    },
    "billingConfigChange": {
      "properties": {
        "after": {
          "title": "修改后（已格式化为展示值）| [EN] Value after, formatted for display",
          "type": "string"
        },
        "before": {
          "title": "修改前（已格式化为展示值）| [EN] Value before, formatted for display",
          "type": "string"
        },
        "field": {
          "title": "字段路径（如 quotaTiers.translation_chars[2].minAmount）| [EN] Field path",
          "type": "string"
        }
      },
      "title": "单条配置改动\n[EN] A single configuration change\n保存前要在界面上展示修改前后对比，这组字段就是那张对比表，同时原样写进操作审计。\n[EN] The console shows a before/after table before saving; these are its rows, and they go\ninto the operation audit log verbatim",
      "type": "object"
    },
    "billingEventPlan": {
      "properties": {
        "code": {
          "title": "套餐编码 | [EN] Plan code",
          "type": "string"
        },
        "color": {
          "$ref": "#/definitions/configPlanColor",
          "title": "标识色 | [EN] Accent color"
        },
        "is_free": {
          "title": "是否免费版 | [EN] Whether it is the free plan",
          "type": "boolean"
        },
        "name": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "名称（按语言）| [EN] Name per language",
          "type": "array"
        },
        "storage_quota_gb": {
          "format": "int64",
          "title": "存储空间（GB）| [EN] Storage in GB",
          "type": "string"
        },
        "storage_retention_days": {
          "format": "int32",
          "title": "会话附件保存天数 | [EN] Attachment retention in days",
          "type": "integer"
        }
      },
      "title": "变更记录里的套餐：名称与标识色取当前配置，存储空间与附件保存天数是事件时点的快照\n[EN] A plan on a change record: name and color from the current configuration, storage and retention as of the event",
      "type": "object"
    },
    "billingLastDowngrade": {
      "properties": {
        "churn_reason": {
          "$ref": "#/definitions/billingChurnReason",
          "title": "到期降为免费版的原因（未续费、续费失败） | [EN] Why it expired to free: not renewed or the renewal failed"
        },
        "event_type": {
          "$ref": "#/definitions/billingSubscriptionEventType",
          "title": "DOWNGRADE_EFFECTIVE 或 EXPIRED_FREE | [EN] DOWNGRADE_EFFECTIVE or EXPIRED_FREE"
        },
        "from_plan_code": {
          "title": "降级前套餐 | [EN] Plan before",
          "type": "string"
        },
        "occurred_at": {
          "format": "date-time",
          "title": "降级时间 | [EN] When it happened",
          "type": "string"
        },
        "to_plan_code": {
          "title": "降级后套餐 | [EN] Plan after",
          "type": "string"
        }
      },
      "title": "最近一次降级：已排的降级生效，或到期降为免费版\n[EN] The latest downgrade: a scheduled downgrade taking effect, or expiry to the free plan",
      "type": "object"
    },
    "billingMemberUsage": {
      "properties": {
        "member_id": {
          "title": "AC 成员ID（名字由前端用 AC 成员目录映射） | [EN] AC member ID; names come from the AC member directory",
          "type": "string"
        },
        "qty": {
          "format": "int64",
          "title": "用量 | [EN] Usage",
          "type": "string"
        },
        "share_bp": {
          "format": "int32",
          "title": "占比（基点，10000 = 100%） | [EN] Share in basis points, 10000 is 100%",
          "type": "integer"
        }
      },
      "title": "一名成员的用量\n[EN] One member's usage",
      "type": "object"
    },
    "billingNextRenewal": {
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "预计金额（按现价） | [EN] Estimated amount at current prices",
          "type": "string"
        },
        "auto_renew": {
          "title": "是否自动续费 | [EN] Whether it renews automatically",
          "type": "boolean"
        },
        "cycle_months": {
          "format": "int32",
          "title": "续费周期 | [EN] Months it renews for",
          "type": "integer"
        },
        "renew_at": {
          "format": "date-time",
          "title": "续费时间 | [EN] When it renews",
          "type": "string"
        }
      },
      "title": "下次续费\n[EN] Next renewal",
      "type": "object"
    },
    "billingOpsBillingStatsGetRequest": {
      "description": "运维计费统计请求：订单、订阅变更、用量三块各自带筛选，日期口径由调用方对齐\n[EN] Ops billing stats request: orders, subscription changes and usage each carry their own filter; the caller\naligns the date ranges.",
      "properties": {
        "order_compare_from": {
          "format": "date-time",
          "title": "订单对比窗口起（含）| [EN] Order comparison window start, inclusive",
          "type": "string"
        },
        "order_compare_to": {
          "format": "date-time",
          "title": "订单对比窗口止（不含）| [EN] Order comparison window end, exclusive",
          "type": "string"
        },
        "order_filter": {
          "$ref": "#/definitions/billingOrderFilter",
          "title": "订单筛选，日期为下单日期 | [EN] Order filter; dates are creation dates"
        },
        "subscription_filter": {
          "$ref": "#/definitions/billingSubscriptionEventFilter",
          "title": "订阅变更筛选，日期为发生日期 | [EN] Subscription change filter; dates are occurrence dates"
        },
        "usage_filter": {
          "$ref": "#/definitions/billingUsageRecordFilter",
          "title": "用量筛选，日期为统计日 | [EN] Usage filter; dates are statistics days"
        }
      },
      "required": [
        "order_filter",
        "subscription_filter",
        "usage_filter"
      ],
      "type": "object"
    },
    "billingOpsBillingStatsGetResponse": {
      "properties": {
        "anomalies": {
          "items": {
            "$ref": "#/definitions/configPaymentMethod"
          },
          "title": "支付方式异常 | [EN] Anomalous payment methods",
          "type": "array"
        },
        "as_of": {
          "format": "date-time",
          "title": "数据时点 | [EN] Data time",
          "type": "string"
        },
        "orders": {
          "$ref": "#/definitions/billingOrderStats",
          "title": "订单汇总 | [EN] Order summary"
        },
        "orders_compare": {
          "$ref": "#/definitions/billingOrderStats",
          "title": "订单对比窗口汇总，没给窗口时为空 | [EN] Comparison order summary, empty without a window"
        },
        "subscriptions": {
          "$ref": "#/definitions/billingSubscriptionEventSummaryGetResponse",
          "title": "订阅变更汇总 | [EN] Subscription change summary"
        },
        "time_zone": {
          "title": "统计时区 | [EN] Statistics time zone",
          "type": "string"
        },
        "usage": {
          "$ref": "#/definitions/billingUsageRecordSummaryGetResponse",
          "title": "用量汇总 | [EN] Usage summary"
        }
      },
      "title": "运维计费统计响应：三块汇总加统计时区与数据时点\n[EN] Ops billing stats response: the three summaries plus the statistics time zone and data time",
      "type": "object"
    },
    "billingOrderCancelReason": {
      "default": "ORDER_CANCEL_REASON_UNSPECIFIED",
      "description": "- ORDER_CANCEL_REASON_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_CANCEL_REASON_CUSTOMER: 客户取消 | [EN] Cancelled by the customer\n - ORDER_CANCEL_REASON_CHANNEL_UNSUPPORTED: 下单时支付方式不可用 | [EN] The payment method was unavailable at checkout\n - ORDER_CANCEL_REASON_LATE_PAYMENT: 过期后才到账，钱转入钱包 | [EN] Paid after expiry; the money went to the wallet\n - ORDER_CANCEL_REASON_WALLET_SHORT: 钱包锁定已解除且余额不够补扣，第三方实付转入钱包 | [EN] The wallet hold was gone and the balance short; the channel payment went to the wallet\n - ORDER_CANCEL_REASON_RENEWAL_FAILED: 自动续费时钱包余额不足 | [EN] Automatic renewal found the wallet short\n - ORDER_CANCEL_REASON_BELOW_MINIMUM: 第三方支付部分低于渠道最低金额 | [EN] The third-party part was below the channel minimum\n - ORDER_CANCEL_REASON_UNDERPAID: 渠道确认少付，实到金额转入钱包 | [EN] The channel confirmed an underpayment; what arrived went to the wallet",
      "enum": [
        "ORDER_CANCEL_REASON_UNSPECIFIED",
        "ORDER_CANCEL_REASON_CUSTOMER",
        "ORDER_CANCEL_REASON_CHANNEL_UNSUPPORTED",
        "ORDER_CANCEL_REASON_LATE_PAYMENT",
        "ORDER_CANCEL_REASON_WALLET_SHORT",
        "ORDER_CANCEL_REASON_RENEWAL_FAILED",
        "ORDER_CANCEL_REASON_BELOW_MINIMUM",
        "ORDER_CANCEL_REASON_UNDERPAID"
      ],
      "title": "订单取消原因\n[EN] Why an order was cancelled",
      "type": "string"
    },
    "billingOrderCountResponse": {
      "properties": {
        "count": {
          "format": "int32",
          "title": "笔数 | [EN] Count",
          "type": "integer"
        },
        "latest_created_at": {
          "format": "date-time",
          "title": "全平台最新一笔支付订单的下单时间 | [EN] Creation time of the newest payment order platform-wide",
          "type": "string"
        }
      },
      "title": "新订单计数响应\n[EN] New order count response",
      "type": "object"
    },
    "billingOrderFilter": {
      "description": "下单日期含首尾、最多 90 天；结束日期晚于今天时按今天\n[EN] Created dates are inclusive, at most 90 days; an end date after today counts as today",
      "properties": {
        "checkout_type": {
          "$ref": "#/definitions/billingCheckoutType",
          "title": "订阅变更类型（新购、升级、加购、续费）| [EN] Kind of subscription change: new, upgrade, add-on or renewal"
        },
        "end_date": {
          "title": "下单日期止（YYYY-MM-DD，含当天）| [EN] Last created date, inclusive",
          "type": "string"
        },
        "first_purchase_only": {
          "title": "只看首购 | [EN] First purchases only",
          "type": "boolean"
        },
        "keyword": {
          "maxLength": 64,
          "title": "订单号前缀，或完整的组织 ID / 工作区 ID | [EN] An order number prefix, or a full organization or workspace ID",
          "type": "string"
        },
        "org_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
          "type": "array"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "支付方式 | [EN] Payment method"
        },
        "plan_code": {
          "maxLength": 32,
          "title": "套餐编码，只匹配订阅变更订单（含已下架套餐）| [EN] Plan code, matching subscription orders only, off-sale plans included",
          "type": "string"
        },
        "purpose": {
          "$ref": "#/definitions/billingOrderPurpose",
          "title": "用途：钱包充值、订阅变更或额度包 | [EN] Purpose: top-up, subscription change or quota package"
        },
        "start_date": {
          "title": "下单日期起（YYYY-MM-DD）| [EN] First created date, YYYY-MM-DD",
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "订单状态（汇总接口忽略）| [EN] Status; ignored by the summary"
        },
        "workspace_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
          "type": "array"
        }
      },
      "required": [
        "start_date",
        "end_date"
      ],
      "title": "全站订单的筛选条件\n[EN] Filters of the platform-wide order list",
      "type": "object"
    },
    "billingOrderGetResponse": {
      "properties": {
        "detail": {
          "$ref": "#/definitions/billingPlatformOrderDetail",
          "title": "订单详情 | [EN] Order detail"
        }
      },
      "title": "订单详情响应\n[EN] Get order response",
      "type": "object"
    },
    "billingOrderInfo": {
      "properties": {
        "checkout_type": {
          "$ref": "#/definitions/billingCheckoutType",
          "title": "变更类型（订阅变更时有效） | [EN] Kind of change, for subscription changes"
        },
        "created_at": {
          "format": "date-time",
          "title": "下单时间 | [EN] Created at",
          "type": "string"
        },
        "expires_at": {
          "format": "date-time",
          "title": "未支付的失效时间 | [EN] When it expires if unpaid",
          "type": "string"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方支付部分 | [EN] Paid through a third party",
          "type": "string"
        },
        "gift_micro": {
          "format": "int64",
          "title": "赠金抵扣部分 | [EN] Paid from the gift balance",
          "type": "string"
        },
        "lines": {
          "items": {
            "$ref": "#/definitions/billingQuoteLine",
            "type": "object"
          },
          "title": "订单行 | [EN] Order lines",
          "type": "array"
        },
        "order_no": {
          "title": "订单号（对外） | [EN] Order number shown to customers",
          "type": "string"
        },
        "paid_at": {
          "format": "date-time",
          "title": "支付时间 | [EN] Paid at",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "第三方渠道（钱包付清时为 UNSPECIFIED） | [EN] Third-party channel; UNSPECIFIED when paid in full from the wallet"
        },
        "purpose": {
          "$ref": "#/definitions/billingOrderPurpose",
          "title": "用途 | [EN] Purpose"
        },
        "status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "状态 | [EN] Status"
        },
        "title": {
          "title": "标题 | [EN] Title",
          "type": "string"
        },
        "total_micro": {
          "format": "int64",
          "title": "订单总额 | [EN] Order total",
          "type": "string"
        },
        "wallet_micro": {
          "format": "int64",
          "title": "钱包支付部分（不含赠金） | [EN] Paid from the top-up balance",
          "type": "string"
        }
      },
      "title": "订单\n[EN] Order",
      "type": "object"
    },
    "billingOrderListResponse": {
      "properties": {
        "latest_created_at": {
          "format": "date-time",
          "title": "全平台最新一笔支付订单的下单时间（不受筛选影响），「有 N 笔新订单」从它数起 | [EN] Creation time of the newest payment order platform-wide, ignoring filters; the new-order count starts from it",
          "type": "string"
        },
        "list": {
          "items": {
            "$ref": "#/definitions/billingPlatformOrder",
            "type": "object"
          },
          "title": "订单 | [EN] Orders",
          "type": "array"
        },
        "page_response": {
          "$ref": "#/definitions/commonPaging",
          "title": "分页 | [EN] Paging"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        }
      },
      "title": "全站订单列表响应\n[EN] List platform orders response",
      "type": "object"
    },
    "billingOrderLookupResponse": {
      "properties": {
        "detail": {
          "$ref": "#/definitions/billingPlatformOrderDetail",
          "title": "订单详情 | [EN] Order detail"
        }
      },
      "title": "按订单号查订单响应\n[EN] Look up an order response",
      "type": "object"
    },
    "billingOrderMethodStat": {
      "properties": {
        "cancelled_count": {
          "format": "int32",
          "title": "已取消 | [EN] Cancelled",
          "type": "integer"
        },
        "ended_count": {
          "format": "int32",
          "title": "已结束（已支付 + 已过期 + 已取消）| [EN] Ended: paid, expired or cancelled",
          "type": "integer"
        },
        "expired_count": {
          "format": "int32",
          "title": "已过期 | [EN] Expired",
          "type": "integer"
        },
        "order_count": {
          "format": "int32",
          "title": "拉单 | [EN] Orders created",
          "type": "integer"
        },
        "paid_count": {
          "format": "int32",
          "title": "已支付 | [EN] Paid",
          "type": "integer"
        },
        "paid_micro": {
          "format": "int64",
          "title": "第三方实付 | [EN] Third-party paid",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "支付方式 | [EN] Payment method"
        },
        "pending_count": {
          "format": "int32",
          "title": "待支付 | [EN] Pending",
          "type": "integer"
        },
        "success_rate_bp": {
          "format": "int32",
          "title": "付款成功率（基点，已支付 ÷ 已结束）；没有已结束订单时为空 | [EN] Success rate in basis points, paid over ended; empty without ended orders",
          "type": "integer"
        }
      },
      "title": "一种支付方式的笔数与成功率\n[EN] Counts and success rate of one payment method",
      "type": "object"
    },
    "billingOrderPurpose": {
      "default": "ORDER_PURPOSE_UNSPECIFIED",
      "description": "- ORDER_PURPOSE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_PURPOSE_CHECKOUT: 订阅变更（新购、升级、加购、续费、降级、调整）| [EN] Subscription change\n - ORDER_PURPOSE_QUOTA: 额度包 | [EN] Quota package\n - ORDER_PURPOSE_RECHARGE: 钱包充值 | [EN] Wallet top-up",
      "enum": [
        "ORDER_PURPOSE_UNSPECIFIED",
        "ORDER_PURPOSE_CHECKOUT",
        "ORDER_PURPOSE_QUOTA",
        "ORDER_PURPOSE_RECHARGE"
      ],
      "title": "订单用途\n[EN] Order purpose",
      "type": "string"
    },
    "billingOrderReconcileResponse": {
      "properties": {
        "detail": {
          "$ref": "#/definitions/billingPlatformOrderDetail",
          "title": "补单后的订单 | [EN] The order after reconciling"
        }
      },
      "title": "补确认付款响应\n[EN] Confirm payment response",
      "type": "object"
    },
    "billingOrderStats": {
      "properties": {
        "by_method": {
          "items": {
            "$ref": "#/definitions/billingOrderMethodStat",
            "type": "object"
          },
          "title": "按支付方式（不受支付方式筛选影响），只含有订单的方式，按拉单数倒序 | [EN] Per method, ignoring the method filter, methods with orders only, by orders descending",
          "type": "array"
        },
        "by_status": {
          "items": {
            "$ref": "#/definitions/billingOrderStatusStat",
            "type": "object"
          },
          "title": "按状态：待支付、已支付、已过期、已取消各一条，没有订单的也给 0 | [EN] Per status, one each for pending, paid, expired and cancelled, zeros included",
          "type": "array"
        },
        "ended_count": {
          "format": "int32",
          "title": "已结束（已支付 + 已过期 + 已取消）| [EN] Ended: paid, expired or cancelled",
          "type": "integer"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方应付合计 | [EN] Third-party payable",
          "type": "string"
        },
        "order_count": {
          "format": "int32",
          "title": "拉单（全部状态，受支付方式筛选）| [EN] Orders created, every status, honoring the payment method filter",
          "type": "integer"
        },
        "success_rate_bp": {
          "format": "int32",
          "title": "付款成功率（基点，已支付 ÷ 已结束）；没有已结束订单时为空 | [EN] Success rate in basis points, paid over ended; empty without ended orders",
          "type": "integer"
        }
      },
      "title": "一组订单的统计\n[EN] Statistics of a set of orders",
      "type": "object"
    },
    "billingOrderStatus": {
      "default": "ORDER_STATUS_UNSPECIFIED",
      "description": "- ORDER_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_STATUS_PENDING: 待支付 | [EN] Awaiting payment\n - ORDER_STATUS_PAID: 已支付 | [EN] Paid\n - ORDER_STATUS_EXPIRED: 已过期（30 分钟未支付）| [EN] Expired unpaid after 30 minutes\n - ORDER_STATUS_CANCELLED: 已取消 | [EN] Cancelled\n - ORDER_STATUS_REFUNDED: 已退款 | [EN] Refunded",
      "enum": [
        "ORDER_STATUS_UNSPECIFIED",
        "ORDER_STATUS_PENDING",
        "ORDER_STATUS_PAID",
        "ORDER_STATUS_EXPIRED",
        "ORDER_STATUS_CANCELLED",
        "ORDER_STATUS_REFUNDED"
      ],
      "title": "订单状态（对外）\n[EN] Order status as shown to customers",
      "type": "string"
    },
    "billingOrderStatusStat": {
      "properties": {
        "count": {
          "format": "int32",
          "title": "笔数 | [EN] Count",
          "type": "integer"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方应付合计 | [EN] Third-party payable",
          "type": "string"
        },
        "paid_micro": {
          "format": "int64",
          "title": "第三方实付合计 | [EN] Third-party paid",
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "状态 | [EN] Status"
        }
      },
      "title": "一种状态的笔数与金额\n[EN] Count and amounts of one status",
      "type": "object"
    },
    "billingOrderSummaryGetResponse": {
      "properties": {
        "anomalies": {
          "items": {
            "$ref": "#/definitions/configPaymentMethod"
          },
          "title": "异常的支付方式：成功率比对比窗口低 15 个点以上，且本期已结束不少于 3 笔 | [EN] Anomalous methods: a success rate at least 15 points below the comparison window with at least 3 ended orders",
          "type": "array"
        },
        "as_of": {
          "format": "date-time",
          "title": "数据时点 | [EN] Point in time of the data",
          "type": "string"
        },
        "compare": {
          "$ref": "#/definitions/billingOrderStats",
          "title": "对比窗口（没给窗口时为空）| [EN] The comparison window, empty when none was given"
        },
        "current": {
          "$ref": "#/definitions/billingOrderStats",
          "title": "本期 | [EN] This range"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        }
      },
      "title": "全站订单汇总响应\n[EN] Platform order summary response",
      "type": "object"
    },
    "billingOrderTimelineEvent": {
      "properties": {
        "at": {
          "format": "date-time",
          "title": "时间 | [EN] When",
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/billingOrderTimelineStatus",
          "title": "节点 | [EN] Node"
        }
      },
      "title": "订单状态记录的一个节点\n[EN] One node of an order's status record",
      "type": "object"
    },
    "billingOrderTimelineStatus": {
      "default": "ORDER_TIMELINE_STATUS_UNSPECIFIED",
      "description": "- ORDER_TIMELINE_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_TIMELINE_STATUS_CREATED: 下单（有钱包抵扣时同时锁定）| [EN] Created, holding the wallet share if any\n - ORDER_TIMELINE_STATUS_PAYING: 创建渠道收银台（与下单同一请求）| [EN] Channel cashier created, in the same request as the order\n - ORDER_TIMELINE_STATUS_EXPIRED: 超时未支付（钱包抵扣解除）| [EN] Expired unpaid, wallet hold released\n - ORDER_TIMELINE_STATUS_CANCELLED: 已取消（钱包抵扣解除）| [EN] Cancelled, wallet hold released\n - ORDER_TIMELINE_STATUS_CHANNEL_PAID: 渠道实际付款（补单经渠道核对时）| [EN] Paid at the channel, from a verified reconcile\n - ORDER_TIMELINE_STATUS_PAID: 回调确认付款（钱包抵扣扣除）| [EN] Payment confirmed by callback, wallet share settled\n - ORDER_TIMELINE_STATUS_RECONCILED: 人工补确认付款 | [EN] Payment confirmed manually\n - ORDER_TIMELINE_STATUS_FULFILLED: 开通完成（充值到账、额度到账或订阅已更新）| [EN] Fulfilled: top-up credited, quota granted or subscription updated",
      "enum": [
        "ORDER_TIMELINE_STATUS_UNSPECIFIED",
        "ORDER_TIMELINE_STATUS_CREATED",
        "ORDER_TIMELINE_STATUS_PAYING",
        "ORDER_TIMELINE_STATUS_EXPIRED",
        "ORDER_TIMELINE_STATUS_CANCELLED",
        "ORDER_TIMELINE_STATUS_CHANNEL_PAID",
        "ORDER_TIMELINE_STATUS_PAID",
        "ORDER_TIMELINE_STATUS_RECONCILED",
        "ORDER_TIMELINE_STATUS_FULFILLED"
      ],
      "title": "订单状态记录的节点：只说发生了什么、什么时候，说明文案由运维后台按订单字段拼（钱包锁定与解除、渠道流水号、补单记录）\n[EN] A node of an order's status record: what happened and when; the console builds the wording from the order's\nfields (wallet hold and release, channel transaction, reconcile record)",
      "type": "string"
    },
    "billingOrderVoucher": {
      "properties": {
        "mime_type": {
          "maxLength": 128,
          "title": "image/png、image/jpeg 或 application/pdf | [EN] image/png, image/jpeg or application/pdf",
          "type": "string"
        },
        "name": {
          "maxLength": 255,
          "title": "文件名 | [EN] File name",
          "type": "string"
        },
        "object_key": {
          "maxLength": 512,
          "title": "对象 Key | [EN] Object key",
          "type": "string"
        },
        "size": {
          "format": "int64",
          "maxLength": 5242880,
          "minLength": 1,
          "title": "字节数，不超过 5 MB | [EN] Size in bytes, at most 5 MB",
          "type": "string"
        }
      },
      "required": [
        "object_key",
        "name",
        "mime_type",
        "size"
      ],
      "title": "订单的付款凭证：先经 AC 的文件预上传拿到 object_key，再随补单提交；文件本身不经过计费\n[EN] A payment voucher, pre-uploaded through AC's file service for its object_key and submitted with the reconcile;\nthe file never passes through billing",
      "type": "object"
    },
    "billingOrgCatalogGetResponse": {
      "properties": {
        "catalog": {
          "$ref": "#/definitions/billingBillingCatalog",
          "title": "计费目录 | [EN] Billing catalog"
        },
        "not_modified": {
          "title": "目录未变（catalog 为空） | [EN] Unchanged since known_revision, catalog left empty",
          "type": "boolean"
        }
      },
      "title": "读取计费目录响应\n[EN] Get billing catalog response",
      "type": "object"
    },
    "billingOrgConsumptionOverviewGetResponse": {
      "properties": {
        "as_of": {
          "format": "date-time",
          "title": "数据时点 | [EN] Point in time of the data",
          "type": "string"
        },
        "low_balance_count": {
          "format": "int32",
          "title": "低余额工作区数 | [EN] Workspaces below their low-balance threshold",
          "type": "integer"
        },
        "month_recharge_micro": {
          "format": "int64",
          "title": "全组织本月充值 | [EN] Org-wide top-ups this month",
          "type": "string"
        },
        "month_spend_micro": {
          "format": "int64",
          "title": "全组织本月支出 | [EN] Org-wide spend this month",
          "type": "string"
        },
        "time_zone": {
          "title": "「本月」所用时区 | [EN] Time zone of 'this month'",
          "type": "string"
        },
        "workspaces": {
          "items": {
            "$ref": "#/definitions/billingWorkspaceConsumption",
            "type": "object"
          },
          "title": "各工作区 | [EN] One per workspace",
          "type": "array"
        }
      },
      "title": "读取消费总览响应\n[EN] Get consumption overview response",
      "type": "object"
    },
    "billingOrgOrderCancelResponse": {
      "properties": {
        "order": {
          "$ref": "#/definitions/billingOrderInfo",
          "title": "订单 | [EN] Order"
        }
      },
      "title": "取消订单响应\n[EN] Cancel order response",
      "type": "object"
    },
    "billingOrgOrderCreateRequest": {
      "properties": {
        "idempotency_key": {
          "maxLength": 512,
          "title": "幂等键（同一个键重复提交返回同一笔订单） | [EN] Idempotency key; a repeat returns the same order",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "第三方渠道（钱包不够付时用） | [EN] Third-party channel for what the wallet does not cover"
        },
        "quote_token": {
          "title": "报价凭证 | [EN] Quote token from OrgSubscriptionQuote",
          "type": "string"
        },
        "use_wallet": {
          "title": "先用钱包余额 | [EN] Use the wallet balance first",
          "type": "boolean"
        }
      },
      "required": [
        "quote_token",
        "idempotency_key"
      ],
      "title": "下单请求\n[EN] Create order request",
      "type": "object"
    },
    "billingOrgOrderCreateResponse": {
      "properties": {
        "action": {
          "$ref": "#/definitions/billingPaymentAction",
          "title": "收银台动作（钱包付清时为空） | [EN] Cashier action; empty when paid in full from the wallet"
        },
        "order": {
          "$ref": "#/definitions/billingOrderInfo",
          "title": "订单 | [EN] Order"
        }
      },
      "title": "下单响应\n[EN] Create order response",
      "type": "object"
    },
    "billingOrgOrderGetResponse": {
      "properties": {
        "order": {
          "$ref": "#/definitions/billingOrderInfo",
          "title": "订单 | [EN] Order"
        }
      },
      "title": "订单详情响应\n[EN] Get order response",
      "type": "object"
    },
    "billingOrgOrderListResponse": {
      "properties": {
        "orders": {
          "items": {
            "$ref": "#/definitions/billingOrderInfo",
            "type": "object"
          },
          "title": "订单 | [EN] Orders",
          "type": "array"
        },
        "page_response": {
          "$ref": "#/definitions/commonPaging",
          "title": "分页响应 | [EN] Page response"
        }
      },
      "title": "订单列表响应\n[EN] List orders response",
      "type": "object"
    },
    "billingOrgOrderPaymentGetResponse": {
      "properties": {
        "action": {
          "$ref": "#/definitions/billingPaymentAction",
          "title": "收银台动作（待支付时复用未过期的支付会话） | [EN] Cashier action, reusing the live payment session while pending"
        },
        "exchange_rate": {
          "title": "渠道汇率，十进制串 | [EN] Channel exchange rate, decimal string",
          "type": "string"
        },
        "payer_amount_micro": {
          "format": "int64",
          "title": "渠道要求付款人实付的数量（micro）| [EN] Payer amount quoted by the channel, micro-units",
          "type": "string"
        },
        "payer_currency": {
          "title": "付款币种，如 USDT | [EN] Payer currency, e.g. USDT",
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "订单状态 | [EN] Order status"
        }
      },
      "title": "支付状态响应\n[EN] Get payment status response",
      "type": "object"
    },
    "billingOrgPendingChangeCancelResponse": {
      "properties": {
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "更新后的订阅 | [EN] Updated subscription"
        }
      },
      "title": "撤销待生效变更响应\n[EN] Cancel pending change response",
      "type": "object"
    },
    "billingOrgQuotaLedgerListResponse": {
      "properties": {
        "entries": {
          "items": {
            "$ref": "#/definitions/billingQuotaLedgerEntry",
            "type": "object"
          },
          "title": "流水（最近的在前） | [EN] Entries, most recent first",
          "type": "array"
        },
        "next_cursor": {
          "title": "下一页游标（为空即没有下一页） | [EN] Cursor of the next page; empty when there is none",
          "type": "string"
        },
        "total": {
          "format": "int64",
          "title": "符合条件的总条数（只在首页给） | [EN] Matching entries in total, first page only",
          "type": "string"
        }
      },
      "title": "额度流水响应\n[EN] List quota ledger response",
      "type": "object"
    },
    "billingOrgQuotaOverviewGetResponse": {
      "properties": {
        "as_of": {
          "format": "date-time",
          "title": "数据时点 | [EN] Point in time of the data",
          "type": "string"
        },
        "quotas": {
          "items": {
            "$ref": "#/definitions/billingQuotaOverview",
            "type": "object"
          },
          "title": "各额度类资源 | [EN] One per quota resource",
          "type": "array"
        }
      },
      "title": "读取额度概览响应\n[EN] Get quota overview response",
      "type": "object"
    },
    "billingOrgRechargeOrderCreateRequest": {
      "properties": {
        "amount_micro": {
          "format": "int64",
          "minLength": 0,
          "title": "充值金额，上下限取配置中心计费设置 | [EN] Amount to top up, bounded by the billing settings",
          "type": "string"
        },
        "idempotency_key": {
          "maxLength": 512,
          "title": "幂等键 | [EN] Idempotency key",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "支付渠道 | [EN] Payment channel"
        }
      },
      "required": [
        "pay_method",
        "idempotency_key"
      ],
      "title": "充值下单请求\n[EN] Create top-up order request",
      "type": "object"
    },
    "billingOrgRechargeOrderCreateResponse": {
      "properties": {
        "action": {
          "$ref": "#/definitions/billingPaymentAction",
          "title": "收银台动作 | [EN] Cashier action"
        },
        "order": {
          "$ref": "#/definitions/billingOrderInfo",
          "title": "订单 | [EN] Order"
        }
      },
      "title": "充值下单响应\n[EN] Create top-up order response",
      "type": "object"
    },
    "billingOrgRenewalSetRequest": {
      "description": "已排降级时不能关自动续费（降级要靠续费落地），会返回 FailedPrecondition\n[EN] Auto-renewal cannot be turned off while a downgrade is scheduled, since the downgrade lands through\nthe renewal; that returns FailedPrecondition",
      "properties": {
        "auto_renew": {
          "title": "自动续费开关（不传不改） | [EN] Auto-renewal switch, unchanged when absent",
          "type": "boolean"
        },
        "renew_cycle_months": {
          "format": "int32",
          "title": "续费周期（不传不改，下次续费生效） | [EN] Renewal cycle, unchanged when absent, applies at the next renewal",
          "type": "integer"
        },
        "version": {
          "exclusiveMinimum": true,
          "format": "int32",
          "minimum": 0,
          "title": "订阅行版本 | [EN] Subscription row version",
          "type": "integer"
        }
      },
      "required": [
        "version"
      ],
      "title": "续费设置请求\n[EN] Renewal settings request",
      "type": "object"
    },
    "billingOrgRenewalSetResponse": {
      "properties": {
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "更新后的订阅 | [EN] Updated subscription"
        }
      },
      "title": "续费设置响应\n[EN] Renewal settings response",
      "type": "object"
    },
    "billingOrgSubscriptionOverviewGetResponse": {
      "properties": {
        "overview": {
          "$ref": "#/definitions/billingSubscriptionOverview",
          "title": "订阅总览 | [EN] Subscription overview"
        }
      },
      "title": "读取订阅总览响应\n[EN] Get subscription overview response",
      "type": "object"
    },
    "billingOrgSubscriptionQuoteRequest": {
      "properties": {
        "addons": {
          "items": {
            "$ref": "#/definitions/billingResourceTarget",
            "type": "object"
          },
          "maxItems": 10,
          "title": "资源位目标总量（CHECKOUT） | [EN] Seat targets, for CHECKOUT",
          "type": "array"
        },
        "enable_auto_renew": {
          "title": "同时开启自动续费 | [EN] Turn on auto-renewal with this purchase",
          "type": "boolean"
        },
        "months": {
          "format": "int32",
          "maximum": 36,
          "minimum": 0,
          "title": "购买或续费月数（CHECKOUT） | [EN] Months to buy or renew, for CHECKOUT",
          "type": "integer"
        },
        "plan_code": {
          "title": "目标套餐编码（CHECKOUT，留空为当前套餐） | [EN] Target plan code for CHECKOUT, empty keeps the current one",
          "type": "string"
        },
        "purpose": {
          "$ref": "#/definitions/billingOrderPurpose",
          "title": "用途：CHECKOUT 或 QUOTA | [EN] Purpose: CHECKOUT or QUOTA"
        },
        "quota": {
          "$ref": "#/definitions/billingQuotaPurchase",
          "title": "额度包（QUOTA） | [EN] Quota package, for QUOTA"
        }
      },
      "required": [
        "purpose"
      ],
      "title": "报价请求\n[EN] Quote request",
      "type": "object"
    },
    "billingOrgSubscriptionQuoteResponse": {
      "properties": {
        "checkout_type": {
          "$ref": "#/definitions/billingCheckoutType",
          "title": "变更类型 | [EN] Kind of change"
        },
        "conflicts": {
          "items": {
            "$ref": "#/definitions/billingQuoteConflict",
            "type": "object"
          },
          "title": "目标低于当前占用的资源（有则不能下单） | [EN] Resources whose target is below usage; ordering is refused while any remain",
          "type": "array"
        },
        "pricing_revision": {
          "title": "计价所用的目录版本 | [EN] Catalog revision the quote was priced with",
          "type": "string"
        },
        "quote": {
          "$ref": "#/definitions/billingQuoteResult",
          "title": "报价 | [EN] Quote"
        },
        "quote_expires_at": {
          "format": "date-time",
          "title": "报价失效时间 | [EN] When the quote expires",
          "type": "string"
        },
        "quote_token": {
          "title": "报价凭证（下单时原样回传，15 分钟有效） | [EN] Quote token to pass back when ordering, valid 15 minutes",
          "type": "string"
        }
      },
      "title": "报价响应\n[EN] Quote response",
      "type": "object"
    },
    "billingOrgUsageDailyListResponse": {
      "properties": {
        "daily_avg": {
          "format": "int64",
          "title": "日均（合计 ÷ 区间天数） | [EN] Daily average: total divided by days in range",
          "type": "string"
        },
        "data_as_of": {
          "format": "date-time",
          "title": "数据截至 | [EN] Data as of",
          "type": "string"
        },
        "days": {
          "items": {
            "$ref": "#/definitions/billingUsageDay",
            "type": "object"
          },
          "title": "每天一条（无用量的日子为 0） | [EN] One per day, zero for days without usage",
          "type": "array"
        },
        "peak_date": {
          "title": "峰值日（并列取最早） | [EN] Peak day, earliest on ties",
          "type": "string"
        },
        "peak_qty": {
          "format": "int64",
          "title": "峰值用量 | [EN] Usage on the peak day",
          "type": "string"
        },
        "time_zone": {
          "title": "日界所用时区 | [EN] Time zone of the day boundaries",
          "type": "string"
        },
        "total": {
          "format": "int64",
          "title": "区间合计 | [EN] Total over the range",
          "type": "string"
        }
      },
      "title": "每日用量响应\n[EN] List daily usage response",
      "type": "object"
    },
    "billingOrgUsageMemberBreakdownResponse": {
      "properties": {
        "items": {
          "items": {
            "$ref": "#/definitions/billingMemberUsage",
            "type": "object"
          },
          "title": "按用量降序 | [EN] By usage, descending",
          "type": "array"
        },
        "time_zone": {
          "title": "日界所用时区 | [EN] Time zone of the day boundaries",
          "type": "string"
        },
        "total": {
          "format": "int64",
          "title": "合计 | [EN] Total",
          "type": "string"
        }
      },
      "title": "成员用量分布响应\n[EN] Member usage breakdown response",
      "type": "object"
    },
    "billingPaymentAction": {
      "properties": {
        "expires_at": {
          "format": "date-time",
          "title": "本次支付会话失效时间 | [EN] When this payment session expires",
          "type": "string"
        },
        "qrcode_url": {
          "title": "二维码内容（扫码） | [EN] QR code content, for QRCODE",
          "type": "string"
        },
        "redirect_url": {
          "title": "支付页地址（跳转） | [EN] Payment page URL, for REDIRECT",
          "type": "string"
        },
        "type": {
          "$ref": "#/definitions/billingPaymentActionType",
          "title": "动作类型 | [EN] Action type"
        }
      },
      "title": "收银台动作\n[EN] Cashier action",
      "type": "object"
    },
    "billingPaymentActionType": {
      "default": "PAYMENT_ACTION_TYPE_UNSPECIFIED",
      "description": "- PAYMENT_ACTION_TYPE_UNSPECIFIED: 未指定（钱包付清时无需动作）| [EN] None, e.g. paid in full from the wallet\n - PAYMENT_ACTION_TYPE_QRCODE: 扫码支付 | [EN] Scan a QR code\n - PAYMENT_ACTION_TYPE_REDIRECT: 跳转支付页 | [EN] Redirect to a payment page",
      "enum": [
        "PAYMENT_ACTION_TYPE_UNSPECIFIED",
        "PAYMENT_ACTION_TYPE_QRCODE",
        "PAYMENT_ACTION_TYPE_REDIRECT"
      ],
      "title": "收银台要客户做的动作\n[EN] What the cashier asks the customer to do",
      "type": "string"
    },
    "billingPendingChange": {
      "properties": {
        "change_type": {
          "$ref": "#/definitions/billingSubscriptionChangeType",
          "title": "变更类型 | [EN] Change type"
        },
        "created_at": {
          "format": "date-time",
          "title": "创建时间 | [EN] Created at",
          "type": "string"
        },
        "effective_at": {
          "format": "date-time",
          "title": "生效时间（= 本期结束）| [EN] When it applies, the period end",
          "type": "string"
        },
        "id": {
          "title": "变更ID | [EN] Change ID",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码（减资源位时有效）| [EN] Resource, for a seat reduction"
        },
        "status": {
          "$ref": "#/definitions/billingPendingChangeStatus",
          "title": "状态 | [EN] Status"
        },
        "target_cycle_months": {
          "format": "int32",
          "title": "目标周期（改周期时有效）| [EN] Target cycle, for a cycle change",
          "type": "integer"
        },
        "target_plan": {
          "$ref": "#/definitions/billingPlanRef",
          "title": "目标套餐的展示信息（降级时有效，下架的也给）| [EN] Target plan for display on a downgrade, even when off sale"
        },
        "target_plan_code": {
          "title": "目标套餐编码（降级时有效）| [EN] Target plan code, for a downgrade",
          "type": "string"
        },
        "target_total_qty": {
          "format": "int64",
          "title": "目标总量（减资源位时有效）| [EN] Target total, for a seat reduction",
          "type": "string"
        }
      },
      "title": "待生效的变更\n[EN] A change waiting to take effect",
      "type": "object"
    },
    "billingPendingChangeCancelResponse": {
      "properties": {
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "撤销后的订阅 | [EN] Subscription after the cancellation"
        }
      },
      "title": "撤销待生效变更响应\n[EN] Cancel a scheduled change response",
      "type": "object"
    },
    "billingPendingChangeStatus": {
      "default": "PENDING_CHANGE_STATUS_UNSPECIFIED",
      "description": "- PENDING_CHANGE_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PENDING_CHANGE_STATUS_PENDING: 待生效 | [EN] Waiting to take effect\n - PENDING_CHANGE_STATUS_SUPERSEDED: 被后续变更取代 | [EN] Replaced by a later change\n - PENDING_CHANGE_STATUS_APPLIED: 已生效 | [EN] Applied\n - PENDING_CHANGE_STATUS_CANCELLED: 已撤销 | [EN] Cancelled by the customer",
      "enum": [
        "PENDING_CHANGE_STATUS_UNSPECIFIED",
        "PENDING_CHANGE_STATUS_PENDING",
        "PENDING_CHANGE_STATUS_SUPERSEDED",
        "PENDING_CHANGE_STATUS_APPLIED",
        "PENDING_CHANGE_STATUS_CANCELLED"
      ],
      "title": "待生效变更的状态\n[EN] Pending change status",
      "type": "string"
    },
    "billingPlanInfo": {
      "properties": {
        "audience": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "适用人群（按语言）| [EN] Target audience per language",
          "type": "array"
        },
        "code": {
          "title": "套餐编码（全局唯一，创建后不可改）| [EN] Plan code, globally unique and immutable",
          "type": "string"
        },
        "color": {
          "$ref": "#/definitions/configPlanColor",
          "title": "标识色 | [EN] Accent color"
        },
        "created_at": {
          "format": "date-time",
          "title": "创建时间 | [EN] Created at",
          "type": "string"
        },
        "created_by": {
          "title": "创建人 | [EN] Created by",
          "type": "string"
        },
        "features": {
          "items": {
            "$ref": "#/definitions/configPlanFeature",
            "type": "object"
          },
          "title": "卖点（有序，每条自带各语言文本）| [EN] Selling points, ordered, each carrying its own languages",
          "type": "array"
        },
        "id": {
          "title": "套餐ID | [EN] Plan ID",
          "type": "string"
        },
        "is_free": {
          "title": "是否兜底套餐（免费版，唯一且不可下架删除）| [EN] Whether this is the fallback free plan, unique and undeletable",
          "type": "boolean"
        },
        "is_recommended": {
          "title": "是否推荐套餐（全局唯一）| [EN] Whether this is the recommended plan, globally unique",
          "type": "boolean"
        },
        "is_trial": {
          "title": "是否正被用作试用套餐（启用中不可下架删除）| [EN] Whether it is the active trial plan, undeletable while in use",
          "type": "boolean"
        },
        "name": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "名称（按语言）| [EN] Name per language",
          "type": "array"
        },
        "price_per_month_micro": {
          "format": "int64",
          "title": "月费 | [EN] Monthly price",
          "type": "string"
        },
        "quotas": {
          "items": {
            "$ref": "#/definitions/configPlanQuota",
            "type": "object"
          },
          "title": "内含资源位与额度 | [EN] Included seats and quotas",
          "type": "array"
        },
        "sort_no": {
          "format": "int32",
          "title": "展示顺序 | [EN] Display order",
          "type": "integer"
        },
        "status": {
          "$ref": "#/definitions/configPlanStatus",
          "title": "售卖状态 | [EN] Sale status"
        },
        "updated_at": {
          "format": "date-time",
          "title": "更新时间 | [EN] Updated at",
          "type": "string"
        },
        "updated_by": {
          "title": "最后修改人 | [EN] Last operator",
          "type": "string"
        },
        "usage": {
          "$ref": "#/definitions/billingPlanWorkspaceUsage",
          "title": "在用工作区统计 | [EN] In-use workspace statistics"
        },
        "version": {
          "format": "int32",
          "title": "行版本（保存时原样回传，用于乐观锁）| [EN] Row version, echoed back on save for optimistic locking",
          "type": "integer"
        }
      },
      "title": "套餐信息\n[EN] Plan information\n作为详情、列表、创建响应的统一出参，避免三个接口三套字段。\n[EN] One shape for get/list/create responses instead of three divergent ones",
      "type": "object"
    },
    "billingPlanRef": {
      "description": "只带展示需要的字段：待生效降级要显示目标套餐名，而目标可能已经下架、不在控制台目录里\n[EN] Display fields only: a scheduled downgrade must name its target, which may already be off sale and\nmissing from the console catalog",
      "properties": {
        "code": {
          "title": "套餐编码 | [EN] Plan code",
          "type": "string"
        },
        "color": {
          "$ref": "#/definitions/configPlanColor",
          "title": "标识色 | [EN] Accent color"
        },
        "name": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "名称（按语言）| [EN] Name per language",
          "type": "array"
        }
      },
      "title": "套餐的展示引用\n[EN] A plan reference for display",
      "type": "object"
    },
    "billingPlanWorkspaceUsage": {
      "properties": {
        "active_workspaces": {
          "format": "int32",
          "title": "在用工作区数 | [EN] Active workspace count",
          "type": "integer"
        },
        "trial_workspaces": {
          "format": "int32",
          "title": "试用中工作区数（仅免费版有值）| [EN] Trialing workspace count, free plan only",
          "type": "integer"
        }
      },
      "title": "套餐在用工作区统计\n[EN] Plan in-use workspace statistics\n不落配置表，由 billing 按 subscriptions 实时聚合：它是「这个套餐现在有多少人在用」，\n删除或下架前要看的就是它，存一份快照只会越存越旧。\n[EN] Not stored in any config table but aggregated live from subscriptions: it answers how\nmany workspaces are on this plan right now, which is exactly what one checks before taking a\nplan off sale, and a stored snapshot would only ever go stale",
      "type": "object"
    },
    "billingPlatformOrder": {
      "description": "金额都是下单时冻结的值；第三方应付是 external_micro，已支付时第三方实付 paid_micro 与它相等\n[EN] Amounts are frozen at order time; the third-party payable is external_micro and, once paid, paid_micro equals it",
      "properties": {
        "cancelled_at": {
          "format": "date-time",
          "title": "取消时间 | [EN] Cancelled at",
          "type": "string"
        },
        "checkout_type": {
          "$ref": "#/definitions/billingCheckoutType",
          "title": "订阅变更类型 | [EN] Kind of subscription change"
        },
        "created_at": {
          "format": "date-time",
          "title": "下单时间 | [EN] Created at",
          "type": "string"
        },
        "created_by": {
          "title": "下单成员（AC 身份主体 ID）| [EN] The member who ordered, an AC principal ID",
          "type": "string"
        },
        "currency": {
          "title": "币种 | [EN] Currency",
          "type": "string"
        },
        "expired_at": {
          "format": "date-time",
          "title": "过期时间 | [EN] Expired at",
          "type": "string"
        },
        "expires_at": {
          "format": "date-time",
          "title": "支付截止 | [EN] Payment deadline",
          "type": "string"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方应付 | [EN] Third-party payable",
          "type": "string"
        },
        "first_purchase": {
          "title": "首购：本单之前该组织没有付过款 | [EN] First purchase: the organization had paid nothing before this order",
          "type": "boolean"
        },
        "from_plan_code": {
          "title": "下单时的套餐（升级时看从哪升）| [EN] Plan at order time, showing what an upgrade came from",
          "type": "string"
        },
        "gift_micro": {
          "format": "int64",
          "title": "赠金抵扣 | [EN] Gift share",
          "type": "string"
        },
        "months": {
          "format": "int32",
          "title": "购买月数 | [EN] Months purchased",
          "type": "integer"
        },
        "order_no": {
          "title": "订单号 | [EN] Order number",
          "type": "string"
        },
        "org_id": {
          "title": "组织 ID | [EN] Organization ID",
          "type": "string"
        },
        "paid_at": {
          "format": "date-time",
          "title": "确认付款时间（补单为补确认时间）| [EN] When payment was confirmed; the confirmation time for a reconcile",
          "type": "string"
        },
        "paid_micro": {
          "format": "int64",
          "title": "第三方实付（未支付为 0）| [EN] Third-party paid, zero while unpaid",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "支付方式 | [EN] Payment method"
        },
        "plan_code": {
          "title": "目标套餐 | [EN] Target plan",
          "type": "string"
        },
        "purpose": {
          "$ref": "#/definitions/billingOrderPurpose",
          "title": "用途 | [EN] Purpose"
        },
        "quota_amount": {
          "format": "int64",
          "title": "额度包购买量 | [EN] Quota package amount",
          "type": "string"
        },
        "quota_resource": {
          "$ref": "#/definitions/configResourceCode",
          "title": "额度包资源 | [EN] Quota package resource"
        },
        "reconcile": {
          "$ref": "#/definitions/apiBillingOrderReconcile",
          "title": "补单记录（没补过为空）| [EN] Reconcile record, empty when never reconciled"
        },
        "seat_targets": {
          "items": {
            "$ref": "#/definitions/billingSeatTarget",
            "type": "object"
          },
          "title": "资源位目标总数 | [EN] Seat target totals",
          "type": "array"
        },
        "status": {
          "$ref": "#/definitions/billingOrderStatus",
          "title": "状态 | [EN] Status"
        },
        "title": {
          "title": "下单时冻结的标题（兜底文案）| [EN] Title frozen at order time, the fallback text",
          "type": "string"
        },
        "total_micro": {
          "format": "int64",
          "title": "订单总额 | [EN] Order total",
          "type": "string"
        },
        "wallet_micro": {
          "format": "int64",
          "title": "钱包抵扣 | [EN] Wallet share",
          "type": "string"
        },
        "workspace_id": {
          "title": "工作区 ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "title": "一笔支付订单（运维视图）\n[EN] A payment order as the ops console sees it",
      "type": "object"
    },
    "billingPlatformOrderDetail": {
      "properties": {
        "cancel_reason": {
          "$ref": "#/definitions/billingOrderCancelReason",
          "title": "取消原因 | [EN] Why it was cancelled"
        },
        "channel_txn_id": {
          "title": "落账的渠道流水号 | [EN] Channel transaction applied to the order",
          "type": "string"
        },
        "later_paid_order_no": {
          "title": "同工作区此后已支付的同内容订单号（仅待支付或已过期），补单前提示可能重复开通 | [EN] A later paid order of the same workspace with the same content, pending or expired orders only, warning of a duplicate before reconciling",
          "type": "string"
        },
        "lines": {
          "items": {
            "$ref": "#/definitions/billingQuoteLine",
            "type": "object"
          },
          "title": "订单行 | [EN] Order lines",
          "type": "array"
        },
        "order": {
          "$ref": "#/definitions/billingPlatformOrder",
          "title": "订单 | [EN] Order"
        },
        "payment_id": {
          "title": "支付网关单号 | [EN] Gateway payment ID",
          "type": "string"
        },
        "timeline": {
          "items": {
            "$ref": "#/definitions/billingOrderTimelineEvent",
            "type": "object"
          },
          "title": "状态记录（时间倒序）| [EN] Status record, newest first",
          "type": "array"
        }
      },
      "title": "订单详情（运维视图）\n[EN] Order detail as the ops console sees it",
      "type": "object"
    },
    "billingPublicBillingSettings": {
      "description": "计费设置里客户可以看的那一部分：收款银行账户、加密货币地址等不在此列\n[EN] The part of the billing settings customers may see; receiving bank accounts and crypto addresses are not",
      "properties": {
        "default_cycle_months": {
          "format": "int32",
          "title": "默认付费周期 | [EN] Default billing cycle in months",
          "type": "integer"
        },
        "enabled_pay_methods": {
          "items": {
            "$ref": "#/definitions/configPaymentMethod"
          },
          "title": "已开放的支付方式 | [EN] Payment methods currently offered",
          "type": "array"
        },
        "min_payment_micro": {
          "format": "int64",
          "title": "第三方支付最低金额 | [EN] Minimum third-party payment",
          "type": "string"
        },
        "recharge_max_micro": {
          "format": "int64",
          "title": "单次充值上限 | [EN] Maximum single top-up",
          "type": "string"
        },
        "recharge_presets_micro": {
          "items": {
            "format": "int64",
            "type": "string"
          },
          "title": "充值快捷金额 | [EN] Top-up quick-pick amounts",
          "type": "array"
        },
        "signup_gift_micro": {
          "format": "int64",
          "title": "注册赠金 | [EN] Sign-up gift",
          "type": "string"
        },
        "translation_metering": {
          "$ref": "#/definitions/configTranslationMetering",
          "title": "翻译计量规则（语音、图片折算字符） | [EN] Translation metering rules for voice and images"
        },
        "trial": {
          "$ref": "#/definitions/configBillingTrial",
          "title": "试用设置 | [EN] Trial settings"
        }
      },
      "title": "公开的计费设置\n[EN] Public billing settings",
      "type": "object"
    },
    "billingQuotaCap": {
      "properties": {
        "qty": {
          "format": "int64",
          "title": "额度 | [EN] Quota",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        }
      },
      "title": "一种资源的额度 | [EN] One resource's quota",
      "type": "object"
    },
    "billingQuotaEventType": {
      "default": "QUOTA_EVENT_TYPE_UNSPECIFIED",
      "description": "日常消耗**不入**账本：账本只记这七类增减事件，`balance_after` 是事件时刻的快照，\n相邻两条之间不衔接——这是设计意图不是 bug。\n\n为什么消耗不记账本：消耗是 3,000 万行/天的量级（10 万工作区时），\n把它写进账本会让一张「本该行数极少、可以和扣减同库对账」的表变成最大的表。\n消耗的事实源是 usage_events，账本只回答「额度是怎么来的、怎么被调整的」。\n\n[EN] Day-to-day consumption is deliberately absent: the ledger records only these seven\nadjustment events, and balance_after is a snapshot at the event rather than a running total\nthat reconciles between adjacent rows. Consumption runs at tens of millions of rows a day at\n100k workspaces, and writing it here would turn a table meant to stay tiny — small enough to\nreconcile in the same database as the deduction — into the largest one. Consumption's fact\nsource is usage_events; the ledger answers only where quota came from and how it was adjusted.\n\n - QUOTA_EVENT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - QUOTA_EVENT_TYPE_PLAN_GRANT: 套餐发放（开通或月度重置）| [EN] Plan grant, on activation or monthly reset\n - QUOTA_EVENT_TYPE_PLAN_UPGRADE: 升级补发差额 | [EN] Upgrade top-up of the difference\n - QUOTA_EVENT_TYPE_PURCHASE: 额度包加购 | [EN] Quota package purchase\n - QUOTA_EVENT_TYPE_REFUND: 退款冲销 | [EN] Refund reversal\n - QUOTA_EVENT_TYPE_GIFT: 赠送 | [EN] Gift\n - QUOTA_EVENT_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction\n - QUOTA_EVENT_TYPE_PLAN_EXPIRE: 到期清零 | [EN] Expiry zeroing",
      "enum": [
        "QUOTA_EVENT_TYPE_UNSPECIFIED",
        "QUOTA_EVENT_TYPE_PLAN_GRANT",
        "QUOTA_EVENT_TYPE_PLAN_UPGRADE",
        "QUOTA_EVENT_TYPE_PURCHASE",
        "QUOTA_EVENT_TYPE_REFUND",
        "QUOTA_EVENT_TYPE_GIFT",
        "QUOTA_EVENT_TYPE_DEDUCTION",
        "QUOTA_EVENT_TYPE_PLAN_EXPIRE"
      ],
      "title": "额度账本事件类型（七类，方案 00 §4.1）\n[EN] Quota ledger event type; seven kinds",
      "type": "string"
    },
    "billingQuotaLedgerEntry": {
      "properties": {
        "available_after": {
          "format": "int64",
          "title": "变动后可用 | [EN] Available afterwards",
          "type": "string"
        },
        "delta": {
          "format": "int64",
          "title": "变动量（正为增加） | [EN] Change, positive for an increase",
          "type": "string"
        },
        "event_type": {
          "$ref": "#/definitions/billingQuotaEventType",
          "title": "事件类型 | [EN] Event type"
        },
        "id": {
          "title": "流水ID | [EN] Entry ID",
          "type": "string"
        },
        "occurred_at": {
          "format": "date-time",
          "title": "发生时间 | [EN] Occurred at",
          "type": "string"
        },
        "summary": {
          "title": "说明 | [EN] Description",
          "type": "string"
        }
      },
      "title": "一条额度流水\n[EN] One quota ledger entry",
      "type": "object"
    },
    "billingQuotaOverview": {
      "properties": {
        "addon_remaining": {
          "format": "int64",
          "title": "额度包剩余（永久有效） | [EN] Quota package balance, never expires",
          "type": "string"
        },
        "package_remaining": {
          "format": "int64",
          "title": "本期剩余 | [EN] Left this period",
          "type": "string"
        },
        "package_total": {
          "format": "int64",
          "title": "本期额度总量 | [EN] Quota for this period",
          "type": "string"
        },
        "package_used": {
          "format": "int64",
          "title": "本期内含已用 = 总量 − 剩余，不低于 0 | [EN] Included quota used this period, total minus remaining and never below zero",
          "type": "string"
        },
        "paused_at": {
          "format": "date-time",
          "title": "这一轮超额暂停的开始（未暂停为空） | [EN] When the current overage pause began; empty when not paused",
          "type": "string"
        },
        "paused_reason": {
          "$ref": "#/definitions/billingQuotaPausedReason",
          "title": "超额暂停原因（未暂停为 UNSPECIFIED） | [EN] Why overage is paused, UNSPECIFIED when not"
        },
        "reset_at": {
          "format": "date-time",
          "title": "下次重置时间 | [EN] Next reset",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        }
      },
      "title": "一种额度的概览\n[EN] Overview of one quota",
      "type": "object"
    },
    "billingQuotaPausedReason": {
      "default": "QUOTA_PAUSED_REASON_UNSPECIFIED",
      "description": "两种必须在 Consume 的返回里区分开，因为前端文案完全不同：\n\n\tZERO_BALANCE      余额真的没了 → 提示充值\n\tRENEWAL_RESERVED  余额还在，但被留给了 N 天后的续费 → 提示「余额需优先保证 {date} 到期续费」\n\n合成一个「已暂停」的话，第二种会被渲染成「你没钱了」，而客户账上明明有钱——\n这是会直接变成客诉的那种错。\n\n暂停只拦**超额**：内含额度与加购额度还有余量时照常扣减，不受影响。\n\n[EN] The two must be distinguishable in the response because the copy differs entirely: one\nsays the balance is gone and asks for a top-up, the other says the balance is being held for a\nrenewal on a given date. Collapsed into a single \"paused\" state, the second renders as \"you\nare out of money\" while the customer can see funds in the account — the kind of error that\nbecomes a support ticket directly. Pausing blocks overage only; included and add-on quota keep\nbeing spent normally while they last.\n\n - QUOTA_PAUSED_REASON_UNSPECIFIED: 未暂停 | [EN] Not paused\n - QUOTA_PAUSED_REASON_ZERO_BALANCE: 钱包可用余额为 0 | [EN] Wallet available balance is zero\n - QUOTA_PAUSED_REASON_RENEWAL_RESERVED: 余额留给临近的续费 | [EN] Balance reserved for an imminent renewal",
      "enum": [
        "QUOTA_PAUSED_REASON_UNSPECIFIED",
        "QUOTA_PAUSED_REASON_ZERO_BALANCE",
        "QUOTA_PAUSED_REASON_RENEWAL_RESERVED"
      ],
      "title": "超额暂停的原因（方案 11 §2.2）\n[EN] Why overage is paused",
      "type": "string"
    },
    "billingQuotaPurchase": {
      "properties": {
        "amount": {
          "format": "int64",
          "maxLength": 1000000000000,
          "minLength": 0,
          "title": "购买量 | [EN] Amount to buy",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        }
      },
      "required": [
        "resource_code"
      ],
      "title": "额度包购买量\n[EN] Quota package purchase",
      "type": "object"
    },
    "billingQuoteConflict": {
      "properties": {
        "limit": {
          "format": "int64",
          "title": "目标上限 | [EN] Target limit",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "used": {
          "format": "int64",
          "title": "当前占用 | [EN] In use now",
          "type": "string"
        }
      },
      "title": "与当前占用冲突的资源\n[EN] A resource whose target is below current usage",
      "type": "object"
    },
    "billingQuoteLine": {
      "description": "同时带 months 与 days 的行不存在：days\u003e0 归「本期补差价」组，months\u003e0 归「购买 N 个月」组。\namount 是折前、net_amount 是折后，两个都给——界面每行展示\n「单价 × 数量 × 天数 × (1 − 折扣%)」，缺一个就对不上。\n\n[EN] No row carries both months and days: days put it in the proration group and months in\nthe purchase group. Both the pre- and post-discount amounts are returned because the UI\nprints the multiplication and the percentage separately, and one without the other does not\nadd up on screen.",
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "折前金额 | [EN] Amount before discount",
          "type": "string"
        },
        "discount_bp": {
          "format": "int32",
          "title": "折扣基点 | [EN] Discount in basis points",
          "type": "integer"
        },
        "explain": {
          "title": "算式说明（逐行可复算）| [EN] The arithmetic, so each row can be rechecked",
          "type": "string"
        },
        "kind": {
          "$ref": "#/definitions/billingQuoteLineKind",
          "title": "行类型 | [EN] Line kind"
        },
        "label": {
          "title": "展示文案 | [EN] Display label",
          "type": "string"
        },
        "month_days_x1000": {
          "format": "int32",
          "title": "每月天数×1000（补差价行，展示用）| [EN] Month-days times 1000, for display",
          "type": "integer"
        },
        "months": {
          "format": "int32",
          "title": "月数（整月行）| [EN] Months, for whole-month lines",
          "type": "integer"
        },
        "net_amount_micro": {
          "format": "int64",
          "title": "折后金额 | [EN] Amount after discount",
          "type": "string"
        },
        "proration_days": {
          "format": "int32",
          "title": "计费天数（补差价行）| [EN] Days, for prorated lines",
          "type": "integer"
        },
        "qty": {
          "format": "int64",
          "title": "数量 | [EN] Quantity",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码（资源位行有效）| [EN] Resource, for seat lines"
        },
        "unit_price_micro": {
          "format": "int64",
          "title": "单价 | [EN] Unit price",
          "type": "string"
        }
      },
      "title": "报价行\n[EN] One line of a quote",
      "type": "object"
    },
    "billingQuoteLineKind": {
      "default": "QUOTE_LINE_KIND_UNSPECIFIED",
      "description": "与订单行一一对应。days\u003e0 的行归「本期补差价」组，months\u003e0 的行归「购买 N 个月」组，\n前端就是按这个二分法分组展示的，所以同时带 months 与 days 的行不存在。\n\n[EN] Mirrors the order items. A row with days belongs to the proration group and a row with\nmonths to the purchase group, which is how the UI groups them, so no row carries both.\n\n - QUOTE_LINE_KIND_UNSPECIFIED: 未指定 | [EN] Unspecified\n - QUOTE_LINE_KIND_PLAN: 套餐费 | [EN] Plan fee\n - QUOTE_LINE_KIND_ADDON: 资源位加购 | [EN] Seat addon\n - QUOTE_LINE_KIND_ADDON_CREDIT: 抵扣（降级或减资源位）| [EN] Credit from a reduction",
      "enum": [
        "QUOTE_LINE_KIND_UNSPECIFIED",
        "QUOTE_LINE_KIND_PLAN",
        "QUOTE_LINE_KIND_ADDON",
        "QUOTE_LINE_KIND_ADDON_CREDIT"
      ],
      "title": "报价行的类型\n[EN] Quote line kind",
      "type": "string"
    },
    "billingQuoteResult": {
      "properties": {
        "discount_bp": {
          "format": "int32",
          "title": "本次适用折扣 | [EN] Discount applied",
          "type": "integer"
        },
        "effective_immediately": {
          "title": "是否立即生效（false = 期末生效）| [EN] Immediate, or at period end",
          "type": "boolean"
        },
        "lines": {
          "items": {
            "$ref": "#/definitions/billingQuoteLine",
            "type": "object"
          },
          "title": "报价行 | [EN] Lines",
          "type": "array"
        },
        "month_days_x1000": {
          "format": "int32",
          "title": "本期每月天数×1000 | [EN] This period's month-days times 1000",
          "type": "integer"
        },
        "monthly_subtotal_micro": {
          "format": "int64",
          "title": "整月组小计 | [EN] Whole-month subtotal",
          "type": "string"
        },
        "period_end_at": {
          "format": "date-time",
          "title": "变更后本期结束 | [EN] Period end after the change",
          "type": "string"
        },
        "period_start_at": {
          "format": "date-time",
          "title": "变更后本期开始 | [EN] Period start after the change",
          "type": "string"
        },
        "proration_subtotal_micro": {
          "format": "int64",
          "title": "补差价组小计（已钳到 ≥0）| [EN] Proration subtotal, clamped at zero",
          "type": "string"
        },
        "remaining_days": {
          "format": "int32",
          "title": "本期剩余天数 | [EN] Days left in the period",
          "type": "integer"
        },
        "summary": {
          "title": "中文摘要（订单标题与钱包流水用）| [EN] Summary used as the order title",
          "type": "string"
        },
        "total_amount_micro": {
          "format": "int64",
          "title": "合计 | [EN] Total",
          "type": "string"
        }
      },
      "title": "报价结果\n[EN] Quote result",
      "type": "object"
    },
    "billingRenewMode": {
      "default": "RENEW_MODE_UNSPECIFIED",
      "description": "- RENEW_MODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RENEW_MODE_AUTO: 到期自动从钱包续费 | [EN] Automatically from the wallet at expiry\n - RENEW_MODE_MANUAL: 客户手动续费 | [EN] Renewed by the customer",
      "enum": [
        "RENEW_MODE_UNSPECIFIED",
        "RENEW_MODE_AUTO",
        "RENEW_MODE_MANUAL"
      ],
      "title": "续费方式\n[EN] How a renewal happened",
      "type": "string"
    },
    "billingResourceTarget": {
      "properties": {
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "target_qty": {
          "format": "int64",
          "maxLength": 100000,
          "minLength": 0,
          "title": "目标总量（内含 + 加购） | [EN] Target total, included plus addon",
          "type": "string"
        }
      },
      "required": [
        "resource_code"
      ],
      "title": "资源位的目标总量\n[EN] Target total for a seat resource",
      "type": "object"
    },
    "billingResourceUsage": {
      "description": "资源位（坐席、托管、官方账号）用 included / addon / used；额度（翻译字符、AI token）用 quota_* 与 overage_*\n[EN] Seats use included, addon and used; quotas (translation characters, AI tokens) use quota_* and overage_*",
      "properties": {
        "addon": {
          "format": "int64",
          "title": "已加购（资源位） | [EN] Purchased on top, for seats",
          "type": "string"
        },
        "addon_remaining": {
          "format": "int64",
          "title": "额度包剩余（额度类，永久有效） | [EN] Quota package balance, never expires",
          "type": "string"
        },
        "included": {
          "format": "int64",
          "title": "套餐内含（资源位） | [EN] Included by the plan, for seats",
          "type": "string"
        },
        "overage_fee_micro": {
          "format": "int64",
          "title": "本期超额费用 | [EN] Overage fee this period",
          "type": "string"
        },
        "overage_paused": {
          "title": "超额是否已暂停 | [EN] Whether overage is paused",
          "type": "boolean"
        },
        "overage_unit_price_micro": {
          "format": "int64",
          "title": "超额单价（每万单位） | [EN] Overage unit price per 10k units",
          "type": "string"
        },
        "paused_reason": {
          "$ref": "#/definitions/billingQuotaPausedReason",
          "title": "暂停原因 | [EN] Why it is paused"
        },
        "quota_remaining": {
          "format": "int64",
          "title": "本期剩余额度（额度类） | [EN] Quota left this period, for quotas",
          "type": "string"
        },
        "quota_total": {
          "format": "int64",
          "title": "本期额度总量（额度类） | [EN] Quota for this period, for quotas",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "scheduled_addon": {
          "format": "int64",
          "title": "期末生效后的加购量（资源位） | [EN] Addon after scheduled changes apply, for seats",
          "type": "string"
        },
        "scheduled_effective_at": {
          "format": "date-time",
          "title": "待生效变更的生效时间 | [EN] When the scheduled change applies",
          "type": "string"
        },
        "unit_price_micro": {
          "format": "int64",
          "title": "加购单价（资源位） | [EN] Addon unit price, for seats",
          "type": "string"
        },
        "used": {
          "format": "int64",
          "title": "已占用（拿不到时为空，界面显示 --） | [EN] In use; empty when unknown, shown as --",
          "type": "string"
        },
        "used_as_of": {
          "format": "date-time",
          "title": "占用数的时点 | [EN] Point in time of the usage count",
          "type": "string"
        }
      },
      "title": "一种资源的上限、占用与额度\n[EN] Limit, usage and quota of one resource",
      "type": "object"
    },
    "billingSeatTarget": {
      "description": "某类资源位的目标总数\n[EN] Target total for one resource\n填的是「变更后需要的总数」，不是增减量：界面上就是一个数字输入框，\n用增减量的话，同一个请求重试两次会加两次。\n[EN] The desired total rather than a delta, as the form is a single number field; a delta\nwould apply twice if the same request were retried.",
      "properties": {
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "target_total_qty": {
          "format": "int64",
          "maxLength": 100000,
          "minLength": 0,
          "title": "目标总数 | [EN] Desired total",
          "type": "string"
        }
      },
      "required": [
        "resource_code"
      ],
      "type": "object"
    },
    "billingStorageAllowance": {
      "properties": {
        "quota_gb": {
          "format": "int64",
          "title": "存储空间（GB） | [EN] Storage in GB",
          "type": "string"
        },
        "retention_days": {
          "format": "int32",
          "title": "会话附件保存天数 | [EN] Attachment retention in days",
          "type": "integer"
        }
      },
      "title": "存储空间：随套餐，试用期按试用设置（为 0 的项按免费版）\n[EN] Storage with the plan; during a trial the trial settings, a zero item falling back to the free plan",
      "type": "object"
    },
    "billingSubscriptionChangeApplyResponse": {
      "properties": {
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "变更后的订阅 | [EN] Subscription after the change"
        }
      },
      "title": "应用零元变更响应\n[EN] Apply a zero-cost change response",
      "type": "object"
    },
    "billingSubscriptionChangeQuoteResponse": {
      "properties": {
        "quote": {
          "$ref": "#/definitions/billingQuoteResult",
          "title": "报价 | [EN] Quote"
        }
      },
      "title": "变更报价响应\n[EN] Change quote response",
      "type": "object"
    },
    "billingSubscriptionChangeType": {
      "default": "SUBSCRIPTION_CHANGE_TYPE_UNSPECIFIED",
      "description": "只有「对客户不利」的变更才延后到期末生效：降级、减资源位、改周期。\n升级与加资源位立即生效并按天补差价——让客户马上用上他刚付钱买的东西。\n\n[EN] Only changes that reduce what the customer has are deferred to the period end: a\ndowngrade, fewer seats, a different cycle. Upgrades and added seats take effect at once with\na prorated charge, so the customer gets what they just paid for immediately.\n\n - SUBSCRIPTION_CHANGE_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - SUBSCRIPTION_CHANGE_TYPE_PLAN_UPGRADE: 升级套餐（立即）| [EN] Upgrade, immediate\n - SUBSCRIPTION_CHANGE_TYPE_PLAN_DOWNGRADE: 降级套餐（期末）| [EN] Downgrade, at period end\n - SUBSCRIPTION_CHANGE_TYPE_SEAT_INCREASE: 加资源位（立即）| [EN] More seats, immediate\n - SUBSCRIPTION_CHANGE_TYPE_SEAT_REDUCE: 减资源位（期末）| [EN] Fewer seats, at period end\n - SUBSCRIPTION_CHANGE_TYPE_CYCLE_CHANGE: 改付费周期（期末）| [EN] Change cycle, at period end\n - SUBSCRIPTION_CHANGE_TYPE_RENEW: 续费 | [EN] Renewal\n - SUBSCRIPTION_CHANGE_TYPE_NEW: 新购 | [EN] New purchase",
      "enum": [
        "SUBSCRIPTION_CHANGE_TYPE_UNSPECIFIED",
        "SUBSCRIPTION_CHANGE_TYPE_PLAN_UPGRADE",
        "SUBSCRIPTION_CHANGE_TYPE_PLAN_DOWNGRADE",
        "SUBSCRIPTION_CHANGE_TYPE_SEAT_INCREASE",
        "SUBSCRIPTION_CHANGE_TYPE_SEAT_REDUCE",
        "SUBSCRIPTION_CHANGE_TYPE_CYCLE_CHANGE",
        "SUBSCRIPTION_CHANGE_TYPE_RENEW",
        "SUBSCRIPTION_CHANGE_TYPE_NEW"
      ],
      "title": "待生效变更的类型\n[EN] Pending change type",
      "type": "string"
    },
    "billingSubscriptionEvent": {
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "实付合计 | [EN] Paid in total",
          "type": "string"
        },
        "cancelled_plan": {
          "$ref": "#/definitions/billingEventPlan",
          "title": "原本要降到的套餐（撤销降级）| [EN] The target a cancelled downgrade would have reached"
        },
        "capacity_shrinks": {
          "title": "降级或到期降为免费后，附件保存天数或存储空间变小 | [EN] A downgrade or expiry leaves shorter retention or less storage",
          "type": "boolean"
        },
        "churn_reason": {
          "$ref": "#/definitions/billingChurnReason",
          "title": "流失原因（到期降为免费）| [EN] Churn reason, for expiry to free"
        },
        "cycle_months": {
          "format": "int32",
          "title": "周期月数；修改续费周期时为新周期 | [EN] Cycle in months; the new cycle for a cycle change",
          "type": "integer"
        },
        "due_micro": {
          "format": "int64",
          "title": "应扣金额（续费扣款失败）| [EN] Amount due, for a failed renewal",
          "type": "string"
        },
        "during_trial": {
          "title": "试用期内新购（试用随即结束）| [EN] Bought during the trial, which ends at once",
          "type": "boolean"
        },
        "effective_at": {
          "format": "date-time",
          "title": "生效时间（降级、减少资源位、撤销时为原定生效时间、修改续费周期；试用事件为试用结束，延长试用为新的结束）| [EN] When it applies: downgrades, reductions, the original date when cancelled, cycle changes; the trial end for trial events, the new end for an extension",
          "type": "string"
        },
        "event_type": {
          "$ref": "#/definitions/billingSubscriptionEventType",
          "title": "事件 | [EN] Event"
        },
        "expires_at": {
          "format": "date-time",
          "title": "关闭自动续费后到期降为免费的时间 | [EN] When auto-renewal off lets it expire to free",
          "type": "string"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方支付部分 | [EN] Paid through a third party",
          "type": "string"
        },
        "from_cycle_months": {
          "format": "int32",
          "title": "原续费周期（修改续费周期）| [EN] Previous renewal cycle, for a cycle change",
          "type": "integer"
        },
        "from_plan": {
          "$ref": "#/definitions/billingEventPlan",
          "title": "变更前套餐 | [EN] Plan before"
        },
        "had_trial": {
          "title": "新购前有过试用 | [EN] Had a trial before buying",
          "type": "boolean"
        },
        "id": {
          "title": "记录 ID | [EN] Record ID",
          "type": "string"
        },
        "occurred_at": {
          "format": "date-time",
          "title": "发生时间（降级与减少资源位为客户提交时间）| [EN] When it happened; submission time for downgrades and reductions",
          "type": "string"
        },
        "operator_id": {
          "title": "操作人（AC 身份主体 ID，系统任务为空）| [EN] Operator, an AC principal ID, empty for system jobs",
          "type": "string"
        },
        "operator_type": {
          "$ref": "#/definitions/billingChangeOperatorType",
          "title": "操作人类型 | [EN] Operator type"
        },
        "order_no": {
          "title": "支付订单号（含第三方支付才有）| [EN] Payment order number, only with a third-party part",
          "type": "string"
        },
        "org_id": {
          "title": "组织 ID | [EN] Organization ID",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "第三方支付方式 | [EN] Third-party payment method"
        },
        "period_end_after": {
          "format": "date-time",
          "title": "本次之后的到期时间（新购、续费、开始试用）| [EN] Period end after this, for purchases, renewals and trial starts",
          "type": "string"
        },
        "prorate_days": {
          "format": "int32",
          "title": "按剩余几天补差价（升级、加购）| [EN] Days prorated, for upgrades and additions",
          "type": "integer"
        },
        "remark": {
          "title": "变更说明（运维操作，延长试用为延长原因）| [EN] Note, for ops changes; the reason for a trial extension",
          "type": "string"
        },
        "renew_mode": {
          "$ref": "#/definitions/billingRenewMode",
          "title": "续费方式 | [EN] Renewal mode"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源位（加购、减少）| [EN] Seat resource, for additions and reductions"
        },
        "resource_qty": {
          "format": "int64",
          "title": "资源位增减数量 | [EN] Seats added or removed",
          "type": "string"
        },
        "to_plan": {
          "$ref": "#/definitions/billingEventPlan",
          "title": "变更后套餐 | [EN] Plan after"
        },
        "trial_plan": {
          "$ref": "#/definitions/billingEventPlan",
          "title": "试用权益套餐（试用事件）| [EN] Trial entitlement plan, for trial events"
        },
        "wallet_micro": {
          "format": "int64",
          "title": "钱包支付部分 | [EN] Paid from the wallet",
          "type": "string"
        },
        "workspace_id": {
          "title": "工作区 ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "title": "一条订阅变更\n[EN] One subscription change",
      "type": "object"
    },
    "billingSubscriptionEventCount": {
      "properties": {
        "count": {
          "format": "int32",
          "title": "条数 | [EN] Count",
          "type": "integer"
        },
        "event_type": {
          "$ref": "#/definitions/billingSubscriptionEventType",
          "title": "事件 | [EN] Event"
        }
      },
      "title": "一种事件的条数\n[EN] Count of one event type",
      "type": "object"
    },
    "billingSubscriptionEventFilter": {
      "description": "发生日期含首尾、最多 90 天\n[EN] Dates are inclusive, at most 90 days",
      "properties": {
        "end_date": {
          "title": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
          "type": "string"
        },
        "event_type": {
          "$ref": "#/definitions/billingSubscriptionEventType",
          "title": "事件（汇总接口忽略）| [EN] Event; ignored by the summary"
        },
        "keyword": {
          "maxLength": 64,
          "title": "完整的组织 ID、工作区 ID 或订单号 | [EN] A full organization ID, workspace ID or order number",
          "type": "string"
        },
        "org_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
          "type": "array"
        },
        "plan_code": {
          "maxLength": 32,
          "title": "套餐，匹配变更前或变更后 | [EN] Plan, matching before or after",
          "type": "string"
        },
        "start_date": {
          "title": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
          "type": "string"
        },
        "workspace_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
          "type": "array"
        }
      },
      "required": [
        "start_date",
        "end_date"
      ],
      "title": "订阅变更的筛选条件\n[EN] Filters of subscription changes",
      "type": "object"
    },
    "billingSubscriptionEventListResponse": {
      "properties": {
        "list": {
          "items": {
            "$ref": "#/definitions/billingSubscriptionEvent",
            "type": "object"
          },
          "title": "变更 | [EN] Changes",
          "type": "array"
        },
        "page_response": {
          "$ref": "#/definitions/commonPaging",
          "title": "分页 | [EN] Paging"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        }
      },
      "title": "订阅变更列表响应\n[EN] List subscription changes response",
      "type": "object"
    },
    "billingSubscriptionEventSummaryGetResponse": {
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "实付合计 | [EN] Paid in total",
          "type": "string"
        },
        "churn_not_renewed": {
          "format": "int32",
          "title": "流失：未续费 | [EN] Churn, not renewed",
          "type": "integer"
        },
        "churn_renew_failed": {
          "format": "int32",
          "title": "流失：续费扣款失败 | [EN] Churn, renewal charge failed",
          "type": "integer"
        },
        "counts": {
          "items": {
            "$ref": "#/definitions/billingSubscriptionEventCount",
            "type": "object"
          },
          "title": "每种事件的条数（每种都给，没有的为 0）| [EN] Count of every event type, zeros included",
          "type": "array"
        },
        "external_micro": {
          "format": "int64",
          "title": "其中第三方 | [EN] Through third parties",
          "type": "string"
        },
        "new_during_trial": {
          "format": "int32",
          "title": "其中试用期内新购 | [EN] New purchases made during a trial",
          "type": "integer"
        },
        "renew_auto": {
          "format": "int32",
          "title": "其中自动续费 | [EN] Automatic renewals",
          "type": "integer"
        },
        "renew_manual": {
          "format": "int32",
          "title": "其中手动续费 | [EN] Manual renewals",
          "type": "integer"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        },
        "total": {
          "format": "int32",
          "title": "记录数 | [EN] Records",
          "type": "integer"
        },
        "wallet_micro": {
          "format": "int64",
          "title": "其中钱包 | [EN] From the wallet",
          "type": "string"
        },
        "workspaces": {
          "format": "int32",
          "title": "涉及工作区数 | [EN] Workspaces involved",
          "type": "integer"
        }
      },
      "title": "订阅变更汇总响应\n[EN] Subscription change summary response",
      "type": "object"
    },
    "billingSubscriptionEventType": {
      "default": "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
      "description": "计费主体是工作区；降级与减少资源位按客户提交时间记、本期结束时生效；修改续费周期从下次续费起生效；\n流失 = 付费工作区到期降为免费（关闭自动续费未续费，或到期续费扣款失败）\n[EN] The billed entity is the workspace. Downgrades and seat reductions are recorded when submitted and apply at the\nperiod end; a renewal-cycle change applies from the next renewal; churn is a paid workspace dropping to free at\nexpiry, either not renewed or failing the renewal charge.\n\n - SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_START: 开始试用 | [EN] Trial started\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_END: 试用结束未付费 | [EN] Trial ended unpaid\n - SUBSCRIPTION_EVENT_TYPE_NEW: 新购 | [EN] New purchase\n - SUBSCRIPTION_EVENT_TYPE_RENEW: 续费（自动或手动）| [EN] Renewal, automatic or manual\n - SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED: 续费扣款失败 | [EN] Renewal charge failed\n - SUBSCRIPTION_EVENT_TYPE_UPGRADE: 升级 | [EN] Upgrade\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED: 降级（已安排）| [EN] Downgrade scheduled\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE: 降级（已生效）| [EN] Downgrade took effect\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED: 撤销降级 | [EN] Downgrade cancelled\n - SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE: 到期降为免费 | [EN] Expired to the free plan\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON: 开启自动续费 | [EN] Auto-renewal on\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF: 关闭自动续费 | [EN] Auto-renewal off\n - SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED: 修改续费周期 | [EN] Renewal cycle changed\n - SUBSCRIPTION_EVENT_TYPE_ADDON_ADD: 加购资源位 | [EN] Seats added\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE: 减少资源位 | [EN] Seats reduced\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED: 撤销减少资源位 | [EN] Seat reduction cancelled\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND: 运维延长试用 | [EN] Trial extended by an operator",
      "enum": [
        "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
        "SUBSCRIPTION_EVENT_TYPE_TRIAL_START",
        "SUBSCRIPTION_EVENT_TYPE_TRIAL_END",
        "SUBSCRIPTION_EVENT_TYPE_NEW",
        "SUBSCRIPTION_EVENT_TYPE_RENEW",
        "SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED",
        "SUBSCRIPTION_EVENT_TYPE_UPGRADE",
        "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED",
        "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE",
        "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED",
        "SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE",
        "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON",
        "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF",
        "SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED",
        "SUBSCRIPTION_EVENT_TYPE_ADDON_ADD",
        "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE",
        "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED",
        "SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND"
      ],
      "title": "订阅变更事件（对齐控制台订阅页与购买页）\n[EN] Subscription change events, matching the console's subscription and purchase pages",
      "type": "string"
    },
    "billingSubscriptionGetResponse": {
      "properties": {
        "detail": {
          "$ref": "#/definitions/billingSubscriptionOpsDetail",
          "title": "运维工作区抽屉要的计费现状 | [EN] Billing state for the ops workspace drawer"
        },
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "订阅信息 | [EN] Subscription"
        }
      },
      "title": "读取订阅响应\n[EN] Get subscription response",
      "type": "object"
    },
    "billingSubscriptionInfo": {
      "properties": {
        "auto_renew": {
          "title": "是否自动续费 | [EN] Whether it renews automatically",
          "type": "boolean"
        },
        "id": {
          "title": "订阅ID | [EN] Subscription ID",
          "type": "string"
        },
        "org_id": {
          "title": "组织ID | [EN] Organization ID",
          "type": "string"
        },
        "pending_changes": {
          "items": {
            "$ref": "#/definitions/billingPendingChange",
            "type": "object"
          },
          "title": "待生效变更 | [EN] Pending changes",
          "type": "array"
        },
        "period_end_at": {
          "format": "date-time",
          "title": "本期结束 | [EN] Period end",
          "type": "string"
        },
        "period_start_at": {
          "format": "date-time",
          "title": "本期开始 | [EN] Period start",
          "type": "string"
        },
        "plan": {
          "$ref": "#/definitions/billingPlanInfo",
          "title": "套餐详情（读接口填充）| [EN] Plan details, filled by reads"
        },
        "plan_code": {
          "title": "当前套餐编码 | [EN] Current plan code",
          "type": "string"
        },
        "purchase_cycle_months": {
          "format": "int32",
          "title": "本次购买周期 | [EN] Months purchased this time",
          "type": "integer"
        },
        "renew_cycle_months": {
          "format": "int32",
          "title": "续费周期 | [EN] Months to renew with",
          "type": "integer"
        },
        "seats": {
          "items": {
            "$ref": "#/definitions/billingSubscriptionSeat",
            "type": "object"
          },
          "title": "资源位 | [EN] Seats",
          "type": "array"
        },
        "status": {
          "$ref": "#/definitions/billingSubscriptionStatus",
          "title": "状态 | [EN] Status"
        },
        "trial_ends_at": {
          "format": "date-time",
          "title": "试用结束 | [EN] Trial end",
          "type": "string"
        },
        "trial_plan_code": {
          "description": "试用套餐编码（权益按它给）| [EN] Trial plan code providing entitlements",
          "title": "试用：订阅仍是免费版，只挂这三个字段\n[EN] A trial leaves the subscription on the free plan and only sets these",
          "type": "string"
        },
        "trial_started_at": {
          "format": "date-time",
          "title": "试用开始 | [EN] Trial start",
          "type": "string"
        },
        "version": {
          "format": "int32",
          "title": "行版本（变更时回传）| [EN] Row version, echoed on change",
          "type": "integer"
        },
        "workspace_id": {
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "title": "订阅信息\n[EN] Subscription",
      "type": "object"
    },
    "billingSubscriptionOpsDetail": {
      "description": "都是本库现成的数据：续费金额随周期排期算好存着，月订阅收入按配置中心现价折算，用量取额度账户，降级取订阅变更记录；\n存储只给上限，已用量归存储服务\n[EN] All from data this service already keeps: the renewal amount is stored with the cycle schedule, the monthly\nrevenue is derived from current config-center prices, usage comes from the quota accounts and the downgrade from the\nchange records. Storage carries only the allowance; the amount used belongs to the storage service.",
      "properties": {
        "last_downgrade": {
          "$ref": "#/definitions/billingLastDowngrade",
          "title": "最近一次降级，没有为空 | [EN] The latest downgrade; empty when none"
        },
        "mrr_micro": {
          "format": "int64",
          "title": "月订阅收入 =（套餐月费 + 加购月费）×（1 − 本期购买周期的折扣），按现价；没有服务期为 0 | [EN] Monthly revenue, plan plus add-on monthly prices less the current purchase cycle's discount at current prices; zero without a period",
          "type": "string"
        },
        "quotas": {
          "items": {
            "$ref": "#/definitions/billingQuotaOverview",
            "type": "object"
          },
          "title": "额度类资源本期的用量、余量与超额暂停 | [EN] This period's usage, remainders and overage pause per quota resource",
          "type": "array"
        },
        "renewal_amount_micro": {
          "format": "int64",
          "title": "下期续费金额：按续费周期、期末生效后的套餐与资源位，没有可续的为 0 | [EN] Next renewal amount on the renewal cycle with scheduled changes applied; zero when nothing renews",
          "type": "string"
        },
        "storage": {
          "$ref": "#/definitions/billingStorageAllowance",
          "title": "存储空间与会话附件保存天数 | [EN] Storage allowance and attachment retention"
        },
        "trial_quota_caps": {
          "items": {
            "$ref": "#/definitions/billingQuotaCap",
            "type": "object"
          },
          "title": "试用期的额度（整段试用合计），不在试用为空 | [EN] Trial quota for the whole trial; empty when not on trial",
          "type": "array"
        }
      },
      "title": "运维读订阅时附带的计费现状\n[EN] Billing state returned with the ops subscription read",
      "type": "object"
    },
    "billingSubscriptionOverview": {
      "description": "降级返回而不是整体失败：钱包或用量暂时取不到时，其余部分照常给，degraded 标出缺了哪块\n[EN] Degrades instead of failing as a whole: when the wallet or usage is briefly unavailable the rest is still\nreturned and degraded names the missing parts",
      "properties": {
        "as_of": {
          "format": "date-time",
          "title": "数据时点 | [EN] Point in time of the data",
          "type": "string"
        },
        "degraded": {
          "items": {
            "type": "string"
          },
          "title": "本次没取到的部分：wallet / usage / seats | [EN] Parts that could not be loaded this time: wallet, usage or seats",
          "type": "array"
        },
        "next_renewal": {
          "$ref": "#/definitions/billingNextRenewal",
          "title": "下次续费 | [EN] Next renewal"
        },
        "resources": {
          "items": {
            "$ref": "#/definitions/billingResourceUsage",
            "type": "object"
          },
          "title": "各资源的上限、占用与额度 | [EN] Limits, usage and quota per resource",
          "type": "array"
        },
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "当前订阅（含套餐详情与试用） | [EN] Current subscription with plan details and trial"
        },
        "wallet": {
          "$ref": "#/definitions/billingWalletSummary",
          "title": "钱包摘要 | [EN] Wallet summary"
        }
      },
      "title": "订阅总览\n[EN] Subscription overview",
      "type": "object"
    },
    "billingSubscriptionSeat": {
      "description": "total = included + addon，是「上限」而不是「占用数」：占用数（实际建了几个席位）\n归账号域管，本域只管客户买到了多少。两者混用会让「减资源位」把别人正在用的席位减掉。\n\n[EN] The total is a ceiling rather than a count in use: how many seats actually exist belongs\nto the account domain while this one only tracks what was bought. Confusing the two would let\na seat reduction remove seats somebody is working in.",
      "properties": {
        "addon_qty": {
          "format": "int64",
          "title": "加购 | [EN] Purchased on top",
          "type": "string"
        },
        "included_qty": {
          "format": "int64",
          "title": "套餐内含 | [EN] Included by the plan",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "total_qty": {
          "format": "int64",
          "title": "总量（内含 + 加购）| [EN] Total, included plus addon",
          "type": "string"
        }
      },
      "title": "订阅内含/加购的资源位\n[EN] A subscription's seats for one resource",
      "type": "object"
    },
    "billingSubscriptionStatus": {
      "default": "SUBSCRIPTION_STATUS_UNSPECIFIED",
      "description": "free 与 active 的区别不是「有没有付钱」，而是「有没有计费周期」：\n免费版加购了资源位也会有服务期和续费单，那时它仍是 free 但有 period_end_at。\n没有宽限期：到期没续上当场降为免费版，past_due 保留编号不再写入\n\n[EN] The difference between free and active is not whether money was paid but whether a\nbilling period exists: a free plan with purchased seats has a period and a renewal order\nwhile staying free. There is no grace: an unrenewed subscription drops to free at expiry, and\npast_due keeps its number but is never written.\n\n - SUBSCRIPTION_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - SUBSCRIPTION_STATUS_FREE: 免费版（含试用中）| [EN] On the free plan, trials included\n - SUBSCRIPTION_STATUS_ACTIVE: 付费生效中 | [EN] Active paid subscription\n - SUBSCRIPTION_STATUS_PAST_DUE: 不再使用：没有宽限期 | [EN] Unused; there is no grace period",
      "enum": [
        "SUBSCRIPTION_STATUS_UNSPECIFIED",
        "SUBSCRIPTION_STATUS_FREE",
        "SUBSCRIPTION_STATUS_ACTIVE",
        "SUBSCRIPTION_STATUS_PAST_DUE"
      ],
      "title": "订阅状态\n[EN] Subscription status",
      "type": "string"
    },
    "billingTrialExtendResponse": {
      "properties": {
        "ends_at": {
          "format": "date-time",
          "title": "新的试用结束时间 | [EN] The new trial end",
          "type": "string"
        },
        "subscription": {
          "$ref": "#/definitions/billingSubscriptionInfo",
          "title": "延长后的订阅 | [EN] Subscription after the extension"
        }
      },
      "title": "延长试用响应\n[EN] Extend trial response",
      "type": "object"
    },
    "billingUsageDay": {
      "properties": {
        "active_members": {
          "format": "int32",
          "title": "当天有用量的成员数 | [EN] Members with usage that day",
          "type": "integer"
        },
        "date": {
          "title": "日期（YYYY-MM-DD，time_zone 下） | [EN] Date as YYYY-MM-DD in time_zone",
          "type": "string"
        },
        "qty": {
          "format": "int64",
          "title": "用量 | [EN] Usage",
          "type": "string"
        }
      },
      "title": "一天的用量\n[EN] Usage of one day",
      "type": "object"
    },
    "billingUsageRecord": {
      "description": "扣减顺序：套餐额度（按月重置）→ 加购额度（永久有效）→ 超额（从钱包扣费）；超额被暂停拦下的那部分不计入用量\n[EN] Deducted from the plan quota (monthly), then add-on quota (never expires), then overage charged to the wallet;\noverage refused while paused is not counted as usage",
      "properties": {
        "date": {
          "title": "日期（YYYY-MM-DD，time_zone 下）| [EN] Date as YYYY-MM-DD in time_zone",
          "type": "string"
        },
        "from_addon": {
          "format": "int64",
          "title": "加购额度 | [EN] From add-on quota",
          "type": "string"
        },
        "from_package": {
          "format": "int64",
          "title": "套餐额度 | [EN] From the plan quota",
          "type": "string"
        },
        "member_count": {
          "format": "int32",
          "title": "当天有用量的成员数 | [EN] Members with usage that day",
          "type": "integer"
        },
        "on_trial": {
          "title": "工作区当前在试用中 | [EN] Whether the workspace is on a trial now",
          "type": "boolean"
        },
        "org_id": {
          "title": "组织 ID | [EN] Organization ID",
          "type": "string"
        },
        "overage_fee_micro": {
          "format": "int64",
          "title": "超额扣费（钱包实扣）| [EN] Overage charged to the wallet",
          "type": "string"
        },
        "overage_qty": {
          "format": "int64",
          "title": "超额 | [EN] Overage",
          "type": "string"
        },
        "paused_reason": {
          "$ref": "#/definitions/billingQuotaPausedReason",
          "title": "当天有超额被暂停拦下时的原因 | [EN] Why overage was refused that day, when it was"
        },
        "plan_code": {
          "title": "工作区当前套餐 | [EN] The workspace's current plan",
          "type": "string"
        },
        "qty": {
          "format": "int64",
          "title": "用量（套餐 + 加购 + 超额）| [EN] Usage: plan plus add-on plus overage",
          "type": "string"
        },
        "wallet_available_micro": {
          "format": "int64",
          "title": "工作区现在的钱包可用余额（只给暂停的行，钱包取不到时为空）| [EN] The workspace's available wallet balance now, on paused rows only, empty when the wallet is unreachable",
          "type": "string"
        },
        "workspace_id": {
          "title": "工作区 ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "title": "一天一个工作区的用量\n[EN] One workspace's usage on one day",
      "type": "object"
    },
    "billingUsageRecordFilter": {
      "description": "日期含首尾、最多 31 天\n[EN] Dates are inclusive, at most 31 days",
      "properties": {
        "end_date": {
          "title": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
          "type": "string"
        },
        "keyword": {
          "maxLength": 64,
          "title": "完整的组织 ID 或工作区 ID | [EN] A full organization or workspace ID",
          "type": "string"
        },
        "only": {
          "$ref": "#/definitions/billingUsageRecordOnly",
          "title": "只看超额或只看暂停（汇总接口忽略）| [EN] Overage-only or paused-only; ignored by the summary"
        },
        "org_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
          "type": "array"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "用量类型：翻译字符或 AI token | [EN] Usage kind: translation characters or AI tokens"
        },
        "start_date": {
          "title": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
          "type": "string"
        },
        "workspace_ids": {
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxItems": 100,
          "title": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
          "type": "array"
        }
      },
      "required": [
        "resource_code",
        "start_date",
        "end_date"
      ],
      "title": "用量记录的筛选条件\n[EN] Filters of usage records",
      "type": "object"
    },
    "billingUsageRecordListResponse": {
      "properties": {
        "list": {
          "items": {
            "$ref": "#/definitions/billingUsageRecord",
            "type": "object"
          },
          "title": "用量 | [EN] Usage rows",
          "type": "array"
        },
        "overage_unit_price_micro": {
          "format": "int64",
          "title": "当前超额单价（每万单位）| [EN] Current overage unit price per 10k units",
          "type": "string"
        },
        "page_response": {
          "$ref": "#/definitions/commonPaging",
          "title": "分页 | [EN] Paging"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        }
      },
      "title": "用量记录列表响应\n[EN] List usage records response",
      "type": "object"
    },
    "billingUsageRecordOnly": {
      "default": "USAGE_RECORD_ONLY_UNSPECIFIED",
      "description": "- USAGE_RECORD_ONLY_UNSPECIFIED: 全部 | [EN] All rows\n - USAGE_RECORD_ONLY_OVERAGE: 只看有超额的 | [EN] Rows with overage\n - USAGE_RECORD_ONLY_PAUSED: 只看超额被暂停拦下的 | [EN] Rows where overage was refused while paused",
      "enum": [
        "USAGE_RECORD_ONLY_UNSPECIFIED",
        "USAGE_RECORD_ONLY_OVERAGE",
        "USAGE_RECORD_ONLY_PAUSED"
      ],
      "title": "用量记录只看某一类行\n[EN] Restricting usage records to one kind of row",
      "type": "string"
    },
    "billingUsageRecordSummaryGetResponse": {
      "properties": {
        "from_addon": {
          "format": "int64",
          "title": "其中加购额度 | [EN] From add-on quota",
          "type": "string"
        },
        "from_package": {
          "format": "int64",
          "title": "其中套餐额度 | [EN] From plan quota",
          "type": "string"
        },
        "overage_fee_micro": {
          "format": "int64",
          "title": "超额扣费合计 | [EN] Overage charged",
          "type": "string"
        },
        "overage_qty": {
          "format": "int64",
          "title": "其中超额 | [EN] Overage",
          "type": "string"
        },
        "overage_rows": {
          "format": "int32",
          "title": "有超额的行数 | [EN] Rows with overage",
          "type": "integer"
        },
        "paused_rows": {
          "format": "int32",
          "title": "超额被暂停拦下的行数 | [EN] Rows with overage refused while paused",
          "type": "integer"
        },
        "paused_workspaces": {
          "format": "int32",
          "title": "超额被暂停拦下的工作区数 | [EN] Workspaces with overage refused while paused",
          "type": "integer"
        },
        "qty": {
          "format": "int64",
          "title": "用量合计 | [EN] Usage in total",
          "type": "string"
        },
        "time_zone": {
          "title": "日期所用时区 | [EN] Time zone of the dates",
          "type": "string"
        },
        "workspaces": {
          "format": "int32",
          "title": "有用量的工作区数 | [EN] Workspaces with usage",
          "type": "integer"
        }
      },
      "title": "用量记录汇总响应\n[EN] Usage record summary response",
      "type": "object"
    },
    "billingWalletSummary": {
      "properties": {
        "available_micro": {
          "format": "int64",
          "title": "可用 | [EN] Available",
          "type": "string"
        },
        "balance_micro": {
          "format": "int64",
          "title": "充值余额 | [EN] Top-up balance",
          "type": "string"
        },
        "gift_balance_micro": {
          "format": "int64",
          "title": "赠金余额 | [EN] Gift balance",
          "type": "string"
        },
        "locked_micro": {
          "format": "int64",
          "title": "锁定中 | [EN] Held for pending orders",
          "type": "string"
        },
        "low_balance_alert_enabled": {
          "title": "是否开启低余额提醒 | [EN] Whether the low-balance alert is on",
          "type": "boolean"
        },
        "low_balance_threshold_micro": {
          "format": "int64",
          "title": "低余额提醒阈值 | [EN] Low-balance alert threshold",
          "type": "string"
        },
        "month_recharge_micro": {
          "format": "int64",
          "title": "本月充值 | [EN] Topped up this month",
          "type": "string"
        },
        "month_spend_micro": {
          "format": "int64",
          "title": "本月支出（已付订单含第三方部分 + 超额扣费） | [EN] Spent this month: paid orders including third-party parts, plus overage",
          "type": "string"
        }
      },
      "title": "钱包摘要\n[EN] Wallet summary",
      "type": "object"
    },
    "billingWorkspaceConsumption": {
      "properties": {
        "balance_micro": {
          "format": "int64",
          "title": "充值余额 | [EN] Top-up balance",
          "type": "string"
        },
        "gift_balance_micro": {
          "format": "int64",
          "title": "赠金余额 | [EN] Gift balance",
          "type": "string"
        },
        "locked_micro": {
          "format": "int64",
          "title": "锁定中 | [EN] Held for pending orders",
          "type": "string"
        },
        "low_balance": {
          "title": "是否低于提醒阈值（余额 + 赠金 − 锁定 \u003c 阈值） | [EN] Whether balance plus gift minus held is below the threshold",
          "type": "boolean"
        },
        "month_spend_micro": {
          "format": "int64",
          "title": "本月支出 | [EN] Spent this month",
          "type": "string"
        },
        "period_end_at": {
          "format": "date-time",
          "title": "本期结束 | [EN] Period end",
          "type": "string"
        },
        "plan": {
          "$ref": "#/definitions/billingPlanRef",
          "title": "当前套餐 | [EN] Current plan"
        },
        "status": {
          "$ref": "#/definitions/billingSubscriptionStatus",
          "title": "订阅状态 | [EN] Subscription status"
        },
        "workspace_id": {
          "title": "工作区ID（名字由前端用 AC 工作区列表映射） | [EN] Workspace ID; names come from the AC workspace list",
          "type": "string"
        }
      },
      "title": "一个工作区的消费\n[EN] One workspace's consumption",
      "type": "object"
    },
    "commonLocalizedText": {
      "description": "用于「同一个字段要按语言给出不同取值」的场景，比如商品名、租户显示名\n存库侧把 repeated LocalizedText 整体序列化成一列（见 kronos「多语言文本字段」能力生成的\ninternal/server/model/localized_text.go 里的 LocalizedTextList，它实现了 GORM 的 Valuer/Scanner），\n而不是为每种语言各开一列——语言是会增加的，列不该跟着加\n\n[EN] For fields whose value differs per language, such as a product or tenant display\nname. The storage side serializes the whole repeated field into a single column (see\nLocalizedTextList in internal/server/model/localized_text.go, generated by kronos'\nlocalized-text capability, which implements GORM's Valuer/Scanner) rather than adding one\ncolumn per language: languages get added over time and the schema should not follow.\n\nkey 用 BCP 47 语言标签（zh / en / zh-TW），与 Accept-Language 对齐，\n这样网关拿到的请求语言可以直接用来挑选条目\n[EN] key is a BCP 47 language tag (zh / en / zh-TW), matching Accept-Language, so the\nrequest language the gateway resolves can select an entry directly.",
      "properties": {
        "key": {
          "title": "语言标签 | [EN] Language tag",
          "type": "string"
        },
        "value": {
          "title": "该语言下的文本 | [EN] Text in that language",
          "type": "string"
        }
      },
      "title": "多语言文本条目\n[EN] One localized text entry",
      "type": "object"
    },
    "commonPaging": {
      "properties": {
        "page": {
          "format": "int32",
          "title": "当前页码 | [EN] Current page number",
          "type": "integer"
        },
        "size": {
          "format": "int32",
          "title": "每页条数（上限保护，防止一次拉全表） | [EN] Page size, capped to protect the backend",
          "type": "integer"
        },
        "total": {
          "format": "int32",
          "title": "总条数（响应字段，请求 query 不继承必填） | [EN] Total count",
          "type": "integer"
        }
      },
      "title": "分页信息\n[EN] Paging information\n请求与响应共用一个消息：请求里填 page/size，响应里回填 total\n[EN] Shared by request and response: requests fill page/size, responses fill total",
      "type": "object"
    },
    "commonSorting": {
      "properties": {
        "ascending": {
          "title": "是否升序 | [EN] Whether ascending",
          "type": "boolean"
        },
        "field": {
          "title": "排序字段 | [EN] Sort field",
          "type": "string"
        }
      },
      "title": "排序信息\n[EN] Sorting information",
      "type": "object"
    },
    "configAddonPrice": {
      "properties": {
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "unit_price_micro": {
          "format": "int64",
          "title": "单价（每个 / 月）| [EN] Unit price per unit per month",
          "type": "string"
        }
      },
      "title": "资源位加购单价\n[EN] Addon unit price of a seat resource\n固定单价、不分阶梯：长期优惠只通过付费周期折扣体现，两处都打折会让\n「年付 + 大量加购」的实付价算出两个口径。\n[EN] A flat unit price with no tiers: long-term discounting happens only through the billing\ncycle, because discounting in both places gives \"annual plus many seats\" two different totals",
      "type": "object"
    },
    "configBillingTrial": {
      "properties": {
        "agent_seat_limit": {
          "format": "int64",
          "title": "试用期内含成员席位 | [EN] Agent seats during the trial",
          "type": "string"
        },
        "ai_token_cap": {
          "format": "int64",
          "title": "试用期 AI token 上限（合计）| [EN] Total AI tokens for the trial",
          "type": "string"
        },
        "days": {
          "format": "int32",
          "title": "试用天数 | [EN] Trial length in days",
          "type": "integer"
        },
        "enabled": {
          "title": "是否启用 | [EN] Whether offered",
          "type": "boolean"
        },
        "hosted_account_limit": {
          "format": "int64",
          "title": "试用期内含云托管账号 | [EN] Hosted accounts during the trial",
          "type": "string"
        },
        "official_account_limit": {
          "format": "int64",
          "title": "试用期内含官方渠道账号 | [EN] Official accounts during the trial",
          "type": "string"
        },
        "plan_code": {
          "title": "试用套餐（只提供功能权益）| [EN] Trial plan, providing entitlements only",
          "type": "string"
        },
        "storage_quota_gb": {
          "format": "int64",
          "title": "试用期存储空间（GB），0 表示沿用免费版 | [EN] Trial storage in GB, 0 falls back to the free plan",
          "type": "string"
        },
        "storage_retention_days": {
          "format": "int32",
          "title": "试用期存储周期（天），0 表示沿用免费版 | [EN] Trial retention in days, 0 falls back to the free plan",
          "type": "integer"
        },
        "translation_char_cap": {
          "format": "int64",
          "title": "试用期翻译字符上限（合计）| [EN] Total translation characters for the trial",
          "type": "string"
        }
      },
      "title": "免费试用；启用时试用套餐必须在售、是付费套餐，内含资源位不少于免费版\n[EN] The free trial; when enabled its plan must be on sale and paid, with no fewer seats than the free plan",
      "type": "object"
    },
    "configCycleDiscount": {
      "properties": {
        "cycle_months": {
          "format": "int32",
          "title": "周期月数 | [EN] Cycle length in months",
          "type": "integer"
        },
        "discount_bp": {
          "format": "int32",
          "title": "折扣（基点，2000 = 省 20%）| [EN] Discount in basis points, 2000 means 20% off",
          "type": "integer"
        },
        "enabled": {
          "title": "是否开放（月付恒开放）| [EN] Whether offered; monthly is always on",
          "type": "boolean"
        }
      },
      "title": "付费周期折扣\n[EN] Billing cycle discount\n折扣作用于套餐费与资源位加购，不作用于额度包：额度包是一次性买断、永久有效，\n它没有「付得久」这件事，再打折等于白送。\n[EN] The discount applies to the plan fee and seat addons but never to quota packages: a\npackage is a one-off purchase that never expires, so there is no \"paying for longer\" to\nreward and a discount there is simply a giveaway",
      "type": "object"
    },
    "configEntitlementGroup": {
      "default": "ENTITLEMENT_GROUP_UNSPECIFIED",
      "description": "- ENTITLEMENT_GROUP_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ENTITLEMENT_GROUP_TRANSLATION: 翻译 | [EN] Translation\n - ENTITLEMENT_GROUP_EFFICIENCY: 效率 | [EN] Efficiency\n - ENTITLEMENT_GROUP_DATA: 数据 | [EN] Data\n - ENTITLEMENT_GROUP_GOVERNANCE: 管控 | [EN] Governance\n - ENTITLEMENT_GROUP_OPEN: 开放 | [EN] Open platform\n - ENTITLEMENT_GROUP_SERVICE: 服务 | [EN] Service",
      "enum": [
        "ENTITLEMENT_GROUP_UNSPECIFIED",
        "ENTITLEMENT_GROUP_TRANSLATION",
        "ENTITLEMENT_GROUP_EFFICIENCY",
        "ENTITLEMENT_GROUP_DATA",
        "ENTITLEMENT_GROUP_GOVERNANCE",
        "ENTITLEMENT_GROUP_OPEN",
        "ENTITLEMENT_GROUP_SERVICE"
      ],
      "title": "功能权益分组\n[EN] Entitlement group\n展示顺序 = 本枚举的固定顺序 + 组内 sort_no 升序，超管只能改组内排序，不能改组的先后。\n[EN] Display order is this enum's fixed order plus sort_no within the group; the console can\nreorder inside a group but not the groups themselves",
      "type": "string"
    },
    "configEntitlementValueType": {
      "default": "ENTITLEMENT_VALUE_TYPE_UNSPECIFIED",
      "description": "- ENTITLEMENT_VALUE_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ENTITLEMENT_VALUE_TYPE_BOOLEAN: 开关 | [EN] Boolean switch\n - ENTITLEMENT_VALUE_TYPE_NUMBER: 数量 | [EN] Numeric amount",
      "enum": [
        "ENTITLEMENT_VALUE_TYPE_UNSPECIFIED",
        "ENTITLEMENT_VALUE_TYPE_BOOLEAN",
        "ENTITLEMENT_VALUE_TYPE_NUMBER"
      ],
      "title": "功能权益取值类型\n[EN] Entitlement value type\n决定矩阵里这一行渲染成开关还是数字输入框，也决定 plan_entitlements 用哪一列存值。\n[EN] Decides whether the matrix row renders as a switch or a number input, and which column\nof plan_entitlements holds the value",
      "type": "string"
    },
    "configPaymentMethod": {
      "default": "PAYMENT_METHOD_UNSPECIFIED",
      "description": "支付方式\n[EN] Payment method\n对公转账是线下到账，只能用于充值，不能用于下单支付——\n订单要即时确认才能开通服务，而转账到账要人工核对。\n[EN] A bank transfer settles offline and is for top-ups only, never order payment: an order\nmust confirm immediately to provision the service, while a transfer needs manual checking.\n\n - PAYMENT_METHOD_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PAYMENT_METHOD_CARD: 银行卡 | [EN] Card\n - PAYMENT_METHOD_WECHAT: 微信支付 | [EN] WeChat Pay\n - PAYMENT_METHOD_ALIPAY: 支付宝 | [EN] Alipay\n - PAYMENT_METHOD_PAYPAL: PayPal | [EN] PayPal\n - PAYMENT_METHOD_CRYPTO: 虚拟币 | [EN] Crypto\n - PAYMENT_METHOD_TRANSFER: 对公转账（仅充值）| [EN] Bank transfer, top-up only",
      "enum": [
        "PAYMENT_METHOD_UNSPECIFIED",
        "PAYMENT_METHOD_CARD",
        "PAYMENT_METHOD_WECHAT",
        "PAYMENT_METHOD_ALIPAY",
        "PAYMENT_METHOD_PAYPAL",
        "PAYMENT_METHOD_CRYPTO",
        "PAYMENT_METHOD_TRANSFER"
      ],
      "type": "string"
    },
    "configPlanColor": {
      "default": "PLAN_COLOR_UNSPECIFIED",
      "description": "- PLAN_COLOR_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PLAN_COLOR_GRAY: 灰 | [EN] Gray\n - PLAN_COLOR_BLUE: 蓝 | [EN] Blue\n - PLAN_COLOR_GREEN: 绿 | [EN] Green\n - PLAN_COLOR_PURPLE: 紫 | [EN] Purple\n - PLAN_COLOR_ORANGE: 橙 | [EN] Orange",
      "enum": [
        "PLAN_COLOR_UNSPECIFIED",
        "PLAN_COLOR_GRAY",
        "PLAN_COLOR_BLUE",
        "PLAN_COLOR_GREEN",
        "PLAN_COLOR_PURPLE",
        "PLAN_COLOR_ORANGE"
      ],
      "title": "套餐标识色\n[EN] Plan accent color\n五选一的枚举而不是自由色值：客户端按它渲染套餐卡顶部与套餐胶囊，\n颜色类名在前端，后端只存 key存自由色值的话，前端要么做映射要么内联样式，\n换主题时后端数据就成了硬编码的一部分。\n[EN] A five-way enum rather than a free-form color: the client renders the plan card header\nand the plan pill from it, the class names live in the frontend and the backend stores only\nthe key. A free-form value would force the frontend into either a mapping or inline styles,\nand a theme change would then have to reach into backend data",
      "type": "string"
    },
    "configPlanFeature": {
      "description": "按「条」分组而不是按语言分组：编辑抽屉里一次编辑的单元是「第 N 条卖点」，\n中英文在同一行填写。若改成 features_zh / features_en 两个平行数组，\n两边长度与顺序就得靠调用方自己对齐——少一条、错一位都不会报错，\n只会让某个语言的第 3 条卖点变成另一句话。\n\n[EN] Grouped per point rather than per language, because the unit edited in the drawer is\n\"selling point N\", with every language filled on one row. Two parallel arrays would leave\ntheir length and order for the caller to keep in sync, and a missing or shifted entry would\nnot raise anything — it would just make the third point read differently in one language.",
      "properties": {
        "text": {
          "items": {
            "$ref": "#/definitions/commonLocalizedText",
            "type": "object"
          },
          "title": "该条卖点的各语言文本 | [EN] This point's text per language",
          "type": "array"
        }
      },
      "title": "一条卖点的多语言文本\n[EN] One selling point across languages",
      "type": "object"
    },
    "configPlanQuota": {
      "properties": {
        "included_qty": {
          "format": "int64",
          "title": "内含数量 | [EN] Included quantity",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        }
      },
      "title": "套餐内含资源位或额度\n[EN] Plan included seat or quota\n资源位与额度同表存储，靠 resource_code 区分：前者按「个」，后者按单位量。\n[EN] Seats and quotas share one table and are told apart by resource_code: the former counts\nunits, the latter counts amounts",
      "type": "object"
    },
    "configPlanStatus": {
      "default": "PLAN_STATUS_UNSPECIFIED",
      "description": "- PLAN_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PLAN_STATUS_ON_SALE: 在售 | [EN] On sale\n - PLAN_STATUS_OFF_SALE: 已下架 | [EN] Off sale",
      "enum": [
        "PLAN_STATUS_UNSPECIFIED",
        "PLAN_STATUS_ON_SALE",
        "PLAN_STATUS_OFF_SALE"
      ],
      "title": "套餐售卖状态\n[EN] Plan sale status\n新建套餐一律落 OFF_SALE，不接受「创建即上架」：套餐一旦上架客户就能下单，\n而价格、内含额度、权益三块要分几次才填得完，中间任何一刻被下单都是真金白银的错价。\n[EN] A new plan is always created OFF_SALE; \"create and list in one go\" is not accepted.\nOnce on sale a customer can order, yet price, included quota and entitlements take several\npasses to fill in, and an order landing mid-way is a real mispricing",
      "type": "string"
    },
    "configQuotaPackageConfig": {
      "properties": {
        "min_amount": {
          "format": "int64",
          "title": "起购量 | [EN] Minimum purchase amount",
          "type": "string"
        },
        "overage_unit_price_micro": {
          "format": "int64",
          "title": "超额单价（每万单位）| [EN] Overage unit price per 10k units",
          "type": "string"
        },
        "preset_amounts": {
          "items": {
            "format": "int64",
            "type": "string"
          },
          "title": "快捷购买量（客户加购页的快捷选项）| [EN] Quick-pick amounts shown on the purchase page",
          "type": "array"
        },
        "price_unit": {
          "format": "int64",
          "title": "计价单位（如每 100 万字符）| [EN] Pricing unit, e.g. per 1,000,000 characters",
          "type": "string"
        },
        "resource_code": {
          "$ref": "#/definitions/configResourceCode",
          "title": "资源编码 | [EN] Resource code"
        },
        "step_amount": {
          "format": "int64",
          "title": "购买步长 | [EN] Purchase step",
          "type": "string"
        },
        "tiers": {
          "items": {
            "$ref": "#/definitions/configQuotaPackageTier",
            "type": "object"
          },
          "title": "阶梯价（按起始量升序）| [EN] Pricing tiers, ascending by floor",
          "type": "array"
        }
      },
      "title": "额度包配置\n[EN] Quota package configuration",
      "type": "object"
    },
    "configQuotaPackageTier": {
      "properties": {
        "min_amount": {
          "format": "int64",
          "title": "起始购买量 | [EN] Minimum purchase amount of this tier",
          "type": "string"
        },
        "unit_price_micro": {
          "format": "int64",
          "title": "单价（每计价单位）| [EN] Unit price per pricing unit",
          "type": "string"
        }
      },
      "title": "额度包阶梯档位\n[EN] Quota package pricing tier\nmin_amount 是绝对起始量，不是区间：整单按「起始量不超过购买量」的最高档计价，\n不是分段累加。档数不固定，超管可增删，所以不要把档数写进代码常量。\n[EN] min_amount is an absolute floor, not a bracket: the whole order is priced at the highest\ntier whose floor does not exceed the purchased amount, rather than summing per bracket. The\nnumber of tiers is not fixed and the console may add or remove them, so never hard-code it",
      "type": "object"
    },
    "configResourceCode": {
      "default": "RESOURCE_CODE_UNSPECIFIED",
      "description": "- RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
      "enum": [
        "RESOURCE_CODE_UNSPECIFIED",
        "RESOURCE_CODE_AGENT_SEAT",
        "RESOURCE_CODE_HOSTED_ACCOUNT",
        "RESOURCE_CODE_OFFICIAL_ACCOUNT",
        "RESOURCE_CODE_TRANSLATION_CHARS",
        "RESOURCE_CODE_AI_TOKENS"
      ],
      "title": "计费资源编码\n[EN] Billable resource code\n前三项按「个」计的资源位（可加购、按月续费），后两项按量计的额度（可买额度包、可超额）。\n两类放在一个枚举里是因为它们在 plan_quotas 同表存储，靠本字段区分。\n[EN] The first three are per-seat resources billed monthly and the last two are metered\nquotas sold in packages with overage. Both live in one enum because plan_quotas stores them\nin a single table keyed by this field",
      "type": "string"
    },
    "configTranslationMetering": {
      "description": "语音与图片没有「字符数」这个天然单位，但扣费要和文本统一口径，\n所以折算成字符：语音按秒、图片按张。折算比例由平台定，客户侧只看到最终字符数。\n改这两个值只对之后产生的用量生效，已计量的历史用量不重算——\n重算会让客户已经看到的账单数字变化。\n\n[EN] Voice and images have no natural character count, yet billing must share one unit with\ntext, so they are converted: voice per second and images per image. A change applies only to\nusage recorded afterwards, since recomputing would alter bill figures customers have seen.",
      "properties": {
        "image_chars_per_image": {
          "format": "int32",
          "title": "图片每张折算字符数 | [EN] Characters per image",
          "type": "integer"
        },
        "voice_chars_per_second": {
          "format": "int32",
          "title": "语音每秒折算字符数 | [EN] Characters per second of voice",
          "type": "integer"
        }
      },
      "title": "翻译计量规则\n[EN] Translation metering rules",
      "type": "object"
    },
    "protobufAny": {
      "additionalProperties": {},
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "rpcStatus": {
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "details": {
          "items": {
            "$ref": "#/definitions/protobufAny",
            "type": "object"
          },
          "type": "array"
        },
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "info": {
    "description": "计费：运维后台的订阅管理、全站订单与补单、订阅变更与用量记录，组织控制台的计费目录、订阅、订单、用量与消费总览；计量只走 gRPC | Billing: ops subscriptions, platform orders and reconciling, subscription changes and usage records; org console catalog, subscriptions, orders, usage and consumption; metering is gRPC only",
    "title": "Linmi Billing",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/billing/ops/stats": {
      "post": {
        "description": "只做已有汇总的组合，不跨域取组织、账号或留存数据；那些由 AC / 报表服务提供\n\n[EN] Billing stats: order, subscription change and usage summaries in one response. It only composes the\nexisting summaries and never reaches across domains for organizations, accounts or retention; AC and the\nreport service own those.",
        "operationId": "BillingService_OpsBillingStatsGet",
        "parameters": [
          {
            "description": "运维计费统计请求：订单、订阅变更、用量三块各自带筛选，日期口径由调用方对齐\n[EN] Ops billing stats request: orders, subscription changes and usage each carry their own filter; the caller\naligns the date ranges.",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingOpsBillingStatsGetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOpsBillingStatsGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "计费统计 | Billing stats",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/ops/workspaces/{workspace_id}/trial/extend": {
      "post": {
        "operationId": "BillingService_TrialExtend",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "maxLength": 64,
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingServiceTrialExtendBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingTrialExtendResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "延长试用 | Extend a trial",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/order-count": {
      "get": {
        "operationId": "BillingService_OrderCount",
        "parameters": [
          {
            "description": "下单日期起（YYYY-MM-DD）| [EN] First created date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "下单日期止（YYYY-MM-DD，含当天）| [EN] Last created date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "default": "ORDER_STATUS_UNSPECIFIED",
            "description": "订单状态（汇总接口忽略）| [EN] Status; ignored by the summary\n\n - ORDER_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_STATUS_PENDING: 待支付 | [EN] Awaiting payment\n - ORDER_STATUS_PAID: 已支付 | [EN] Paid\n - ORDER_STATUS_EXPIRED: 已过期（30 分钟未支付）| [EN] Expired unpaid after 30 minutes\n - ORDER_STATUS_CANCELLED: 已取消 | [EN] Cancelled\n - ORDER_STATUS_REFUNDED: 已退款 | [EN] Refunded",
            "enum": [
              "ORDER_STATUS_UNSPECIFIED",
              "ORDER_STATUS_PENDING",
              "ORDER_STATUS_PAID",
              "ORDER_STATUS_EXPIRED",
              "ORDER_STATUS_CANCELLED",
              "ORDER_STATUS_REFUNDED"
            ],
            "in": "query",
            "name": "filter.status",
            "required": false,
            "type": "string"
          },
          {
            "default": "PAYMENT_METHOD_UNSPECIFIED",
            "description": "支付方式 | [EN] Payment method\n\n - PAYMENT_METHOD_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PAYMENT_METHOD_CARD: 银行卡 | [EN] Card\n - PAYMENT_METHOD_WECHAT: 微信支付 | [EN] WeChat Pay\n - PAYMENT_METHOD_ALIPAY: 支付宝 | [EN] Alipay\n - PAYMENT_METHOD_PAYPAL: PayPal | [EN] PayPal\n - PAYMENT_METHOD_CRYPTO: 虚拟币 | [EN] Crypto\n - PAYMENT_METHOD_TRANSFER: 对公转账（仅充值）| [EN] Bank transfer, top-up only",
            "enum": [
              "PAYMENT_METHOD_UNSPECIFIED",
              "PAYMENT_METHOD_CARD",
              "PAYMENT_METHOD_WECHAT",
              "PAYMENT_METHOD_ALIPAY",
              "PAYMENT_METHOD_PAYPAL",
              "PAYMENT_METHOD_CRYPTO",
              "PAYMENT_METHOD_TRANSFER"
            ],
            "in": "query",
            "name": "filter.pay_method",
            "required": false,
            "type": "string"
          },
          {
            "default": "ORDER_PURPOSE_UNSPECIFIED",
            "description": "用途：钱包充值、订阅变更或额度包 | [EN] Purpose: top-up, subscription change or quota package\n\n - ORDER_PURPOSE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_PURPOSE_CHECKOUT: 订阅变更（新购、升级、加购、续费、降级、调整）| [EN] Subscription change\n - ORDER_PURPOSE_QUOTA: 额度包 | [EN] Quota package\n - ORDER_PURPOSE_RECHARGE: 钱包充值 | [EN] Wallet top-up",
            "enum": [
              "ORDER_PURPOSE_UNSPECIFIED",
              "ORDER_PURPOSE_CHECKOUT",
              "ORDER_PURPOSE_QUOTA",
              "ORDER_PURPOSE_RECHARGE"
            ],
            "in": "query",
            "name": "filter.purpose",
            "required": false,
            "type": "string"
          },
          {
            "default": "CHECKOUT_TYPE_UNSPECIFIED",
            "description": "订阅变更类型（新购、升级、加购、续费）| [EN] Kind of subscription change: new, upgrade, add-on or renewal\n\n - CHECKOUT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHECKOUT_TYPE_NEW: 新购 | [EN] New purchase\n - CHECKOUT_TYPE_UPGRADE: 升级（立即生效，按天补差价）| [EN] Upgrade, immediate and prorated\n - CHECKOUT_TYPE_ADDON: 加购资源位（立即生效，按天补差价）| [EN] Seat addon, immediate and prorated\n - CHECKOUT_TYPE_RENEW: 续费（顺延到期日）| [EN] Renewal, extends the end date\n - CHECKOUT_TYPE_DOWNGRADE: 降级（期末生效，今天不收钱）| [EN] Downgrade at period end, nothing charged today\n - CHECKOUT_TYPE_ADJUST: 调整（减资源位或改周期，期末生效）| [EN] Reduction or cycle change at period end",
            "enum": [
              "CHECKOUT_TYPE_UNSPECIFIED",
              "CHECKOUT_TYPE_NEW",
              "CHECKOUT_TYPE_UPGRADE",
              "CHECKOUT_TYPE_ADDON",
              "CHECKOUT_TYPE_RENEW",
              "CHECKOUT_TYPE_DOWNGRADE",
              "CHECKOUT_TYPE_ADJUST"
            ],
            "in": "query",
            "name": "filter.checkout_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "套餐编码，只匹配订阅变更订单（含已下架套餐）| [EN] Plan code, matching subscription orders only, off-sale plans included",
            "in": "query",
            "maxLength": 32,
            "name": "filter.plan_code",
            "required": false,
            "type": "string"
          },
          {
            "description": "只看首购 | [EN] First purchases only",
            "in": "query",
            "name": "filter.first_purchase_only",
            "required": true,
            "type": "boolean"
          },
          {
            "description": "订单号前缀，或完整的组织 ID / 工作区 ID | [EN] An order number prefix, or a full organization or workspace ID",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "description": "下单时间晚于（不含）| [EN] Created strictly after",
            "format": "date-time",
            "in": "query",
            "name": "created_after",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderCountResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "新订单计数 | Count new orders",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/order-lookup/{order_no}": {
      "get": {
        "operationId": "BillingService_OrderLookup",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "maxLength": 32,
            "name": "order_no",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderLookupResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "按订单号查订单 | Look up order by number",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/order-summary": {
      "get": {
        "operationId": "BillingService_OrderSummaryGet",
        "parameters": [
          {
            "description": "下单日期起（YYYY-MM-DD）| [EN] First created date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "下单日期止（YYYY-MM-DD，含当天）| [EN] Last created date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "default": "ORDER_STATUS_UNSPECIFIED",
            "description": "订单状态（汇总接口忽略）| [EN] Status; ignored by the summary\n\n - ORDER_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_STATUS_PENDING: 待支付 | [EN] Awaiting payment\n - ORDER_STATUS_PAID: 已支付 | [EN] Paid\n - ORDER_STATUS_EXPIRED: 已过期（30 分钟未支付）| [EN] Expired unpaid after 30 minutes\n - ORDER_STATUS_CANCELLED: 已取消 | [EN] Cancelled\n - ORDER_STATUS_REFUNDED: 已退款 | [EN] Refunded",
            "enum": [
              "ORDER_STATUS_UNSPECIFIED",
              "ORDER_STATUS_PENDING",
              "ORDER_STATUS_PAID",
              "ORDER_STATUS_EXPIRED",
              "ORDER_STATUS_CANCELLED",
              "ORDER_STATUS_REFUNDED"
            ],
            "in": "query",
            "name": "filter.status",
            "required": false,
            "type": "string"
          },
          {
            "default": "PAYMENT_METHOD_UNSPECIFIED",
            "description": "支付方式 | [EN] Payment method\n\n - PAYMENT_METHOD_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PAYMENT_METHOD_CARD: 银行卡 | [EN] Card\n - PAYMENT_METHOD_WECHAT: 微信支付 | [EN] WeChat Pay\n - PAYMENT_METHOD_ALIPAY: 支付宝 | [EN] Alipay\n - PAYMENT_METHOD_PAYPAL: PayPal | [EN] PayPal\n - PAYMENT_METHOD_CRYPTO: 虚拟币 | [EN] Crypto\n - PAYMENT_METHOD_TRANSFER: 对公转账（仅充值）| [EN] Bank transfer, top-up only",
            "enum": [
              "PAYMENT_METHOD_UNSPECIFIED",
              "PAYMENT_METHOD_CARD",
              "PAYMENT_METHOD_WECHAT",
              "PAYMENT_METHOD_ALIPAY",
              "PAYMENT_METHOD_PAYPAL",
              "PAYMENT_METHOD_CRYPTO",
              "PAYMENT_METHOD_TRANSFER"
            ],
            "in": "query",
            "name": "filter.pay_method",
            "required": false,
            "type": "string"
          },
          {
            "default": "ORDER_PURPOSE_UNSPECIFIED",
            "description": "用途：钱包充值、订阅变更或额度包 | [EN] Purpose: top-up, subscription change or quota package\n\n - ORDER_PURPOSE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_PURPOSE_CHECKOUT: 订阅变更（新购、升级、加购、续费、降级、调整）| [EN] Subscription change\n - ORDER_PURPOSE_QUOTA: 额度包 | [EN] Quota package\n - ORDER_PURPOSE_RECHARGE: 钱包充值 | [EN] Wallet top-up",
            "enum": [
              "ORDER_PURPOSE_UNSPECIFIED",
              "ORDER_PURPOSE_CHECKOUT",
              "ORDER_PURPOSE_QUOTA",
              "ORDER_PURPOSE_RECHARGE"
            ],
            "in": "query",
            "name": "filter.purpose",
            "required": false,
            "type": "string"
          },
          {
            "default": "CHECKOUT_TYPE_UNSPECIFIED",
            "description": "订阅变更类型（新购、升级、加购、续费）| [EN] Kind of subscription change: new, upgrade, add-on or renewal\n\n - CHECKOUT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHECKOUT_TYPE_NEW: 新购 | [EN] New purchase\n - CHECKOUT_TYPE_UPGRADE: 升级（立即生效，按天补差价）| [EN] Upgrade, immediate and prorated\n - CHECKOUT_TYPE_ADDON: 加购资源位（立即生效，按天补差价）| [EN] Seat addon, immediate and prorated\n - CHECKOUT_TYPE_RENEW: 续费（顺延到期日）| [EN] Renewal, extends the end date\n - CHECKOUT_TYPE_DOWNGRADE: 降级（期末生效，今天不收钱）| [EN] Downgrade at period end, nothing charged today\n - CHECKOUT_TYPE_ADJUST: 调整（减资源位或改周期，期末生效）| [EN] Reduction or cycle change at period end",
            "enum": [
              "CHECKOUT_TYPE_UNSPECIFIED",
              "CHECKOUT_TYPE_NEW",
              "CHECKOUT_TYPE_UPGRADE",
              "CHECKOUT_TYPE_ADDON",
              "CHECKOUT_TYPE_RENEW",
              "CHECKOUT_TYPE_DOWNGRADE",
              "CHECKOUT_TYPE_ADJUST"
            ],
            "in": "query",
            "name": "filter.checkout_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "套餐编码，只匹配订阅变更订单（含已下架套餐）| [EN] Plan code, matching subscription orders only, off-sale plans included",
            "in": "query",
            "maxLength": 32,
            "name": "filter.plan_code",
            "required": false,
            "type": "string"
          },
          {
            "description": "只看首购 | [EN] First purchases only",
            "in": "query",
            "name": "filter.first_purchase_only",
            "required": true,
            "type": "boolean"
          },
          {
            "description": "订单号前缀，或完整的组织 ID / 工作区 ID | [EN] An order number prefix, or a full organization or workspace ID",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "description": "对比窗口起（含）| [EN] Comparison window start, inclusive",
            "format": "date-time",
            "in": "query",
            "name": "compare_from",
            "required": false,
            "type": "string"
          },
          {
            "description": "对比窗口止（不含），与 compare_from 一起给 | [EN] Comparison window end, exclusive, given with compare_from",
            "format": "date-time",
            "in": "query",
            "name": "compare_to",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderSummaryGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "全站订单汇总 | Platform order summary",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/orders": {
      "get": {
        "operationId": "BillingService_OrderList",
        "parameters": [
          {
            "description": "下单日期起（YYYY-MM-DD）| [EN] First created date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "下单日期止（YYYY-MM-DD，含当天）| [EN] Last created date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "default": "ORDER_STATUS_UNSPECIFIED",
            "description": "订单状态（汇总接口忽略）| [EN] Status; ignored by the summary\n\n - ORDER_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_STATUS_PENDING: 待支付 | [EN] Awaiting payment\n - ORDER_STATUS_PAID: 已支付 | [EN] Paid\n - ORDER_STATUS_EXPIRED: 已过期（30 分钟未支付）| [EN] Expired unpaid after 30 minutes\n - ORDER_STATUS_CANCELLED: 已取消 | [EN] Cancelled\n - ORDER_STATUS_REFUNDED: 已退款 | [EN] Refunded",
            "enum": [
              "ORDER_STATUS_UNSPECIFIED",
              "ORDER_STATUS_PENDING",
              "ORDER_STATUS_PAID",
              "ORDER_STATUS_EXPIRED",
              "ORDER_STATUS_CANCELLED",
              "ORDER_STATUS_REFUNDED"
            ],
            "in": "query",
            "name": "filter.status",
            "required": false,
            "type": "string"
          },
          {
            "default": "PAYMENT_METHOD_UNSPECIFIED",
            "description": "支付方式 | [EN] Payment method\n\n - PAYMENT_METHOD_UNSPECIFIED: 未指定 | [EN] Unspecified\n - PAYMENT_METHOD_CARD: 银行卡 | [EN] Card\n - PAYMENT_METHOD_WECHAT: 微信支付 | [EN] WeChat Pay\n - PAYMENT_METHOD_ALIPAY: 支付宝 | [EN] Alipay\n - PAYMENT_METHOD_PAYPAL: PayPal | [EN] PayPal\n - PAYMENT_METHOD_CRYPTO: 虚拟币 | [EN] Crypto\n - PAYMENT_METHOD_TRANSFER: 对公转账（仅充值）| [EN] Bank transfer, top-up only",
            "enum": [
              "PAYMENT_METHOD_UNSPECIFIED",
              "PAYMENT_METHOD_CARD",
              "PAYMENT_METHOD_WECHAT",
              "PAYMENT_METHOD_ALIPAY",
              "PAYMENT_METHOD_PAYPAL",
              "PAYMENT_METHOD_CRYPTO",
              "PAYMENT_METHOD_TRANSFER"
            ],
            "in": "query",
            "name": "filter.pay_method",
            "required": false,
            "type": "string"
          },
          {
            "default": "ORDER_PURPOSE_UNSPECIFIED",
            "description": "用途：钱包充值、订阅变更或额度包 | [EN] Purpose: top-up, subscription change or quota package\n\n - ORDER_PURPOSE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_PURPOSE_CHECKOUT: 订阅变更（新购、升级、加购、续费、降级、调整）| [EN] Subscription change\n - ORDER_PURPOSE_QUOTA: 额度包 | [EN] Quota package\n - ORDER_PURPOSE_RECHARGE: 钱包充值 | [EN] Wallet top-up",
            "enum": [
              "ORDER_PURPOSE_UNSPECIFIED",
              "ORDER_PURPOSE_CHECKOUT",
              "ORDER_PURPOSE_QUOTA",
              "ORDER_PURPOSE_RECHARGE"
            ],
            "in": "query",
            "name": "filter.purpose",
            "required": false,
            "type": "string"
          },
          {
            "default": "CHECKOUT_TYPE_UNSPECIFIED",
            "description": "订阅变更类型（新购、升级、加购、续费）| [EN] Kind of subscription change: new, upgrade, add-on or renewal\n\n - CHECKOUT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - CHECKOUT_TYPE_NEW: 新购 | [EN] New purchase\n - CHECKOUT_TYPE_UPGRADE: 升级（立即生效，按天补差价）| [EN] Upgrade, immediate and prorated\n - CHECKOUT_TYPE_ADDON: 加购资源位（立即生效，按天补差价）| [EN] Seat addon, immediate and prorated\n - CHECKOUT_TYPE_RENEW: 续费（顺延到期日）| [EN] Renewal, extends the end date\n - CHECKOUT_TYPE_DOWNGRADE: 降级（期末生效，今天不收钱）| [EN] Downgrade at period end, nothing charged today\n - CHECKOUT_TYPE_ADJUST: 调整（减资源位或改周期，期末生效）| [EN] Reduction or cycle change at period end",
            "enum": [
              "CHECKOUT_TYPE_UNSPECIFIED",
              "CHECKOUT_TYPE_NEW",
              "CHECKOUT_TYPE_UPGRADE",
              "CHECKOUT_TYPE_ADDON",
              "CHECKOUT_TYPE_RENEW",
              "CHECKOUT_TYPE_DOWNGRADE",
              "CHECKOUT_TYPE_ADJUST"
            ],
            "in": "query",
            "name": "filter.checkout_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "套餐编码，只匹配订阅变更订单（含已下架套餐）| [EN] Plan code, matching subscription orders only, off-sale plans included",
            "in": "query",
            "maxLength": 32,
            "name": "filter.plan_code",
            "required": false,
            "type": "string"
          },
          {
            "description": "只看首购 | [EN] First purchases only",
            "in": "query",
            "name": "filter.first_purchase_only",
            "required": true,
            "type": "boolean"
          },
          {
            "description": "订单号前缀，或完整的组织 ID / 工作区 ID | [EN] An order number prefix, or a full organization or workspace ID",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "description": "当前页码 | [EN] Current page number",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "page_request.page",
            "required": false,
            "type": "integer"
          },
          {
            "description": "每页条数（上限保护，防止一次拉全表） | [EN] Page size, capped to protect the backend",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 1,
            "name": "page_request.size",
            "required": false,
            "type": "integer"
          },
          {
            "description": "总条数（响应字段，请求 query 不继承必填） | [EN] Total count",
            "format": "int32",
            "in": "query",
            "name": "page_request.total",
            "required": true,
            "type": "integer"
          },
          {
            "description": "排序字段 | [EN] Sort field",
            "in": "query",
            "name": "sorting.field",
            "required": false,
            "type": "string"
          },
          {
            "description": "是否升序 | [EN] Whether ascending",
            "in": "query",
            "name": "sorting.ascending",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "全站订单 | List platform orders",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/orders/{order_no}": {
      "get": {
        "operationId": "BillingService_OrderGet",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "maxLength": 32,
            "name": "order_no",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订单详情 | Get platform order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/orders/{order_no}/reconcile": {
      "post": {
        "operationId": "BillingService_OrderReconcile",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "maxLength": 32,
            "name": "order_no",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingBillingServiceOrderReconcileBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderReconcileResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "补确认付款 | Reconcile order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/orders/{order_no}/voucher-reconcile": {
      "post": {
        "operationId": "BillingService_OrderVoucherReconcile",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "maxLength": 32,
            "name": "order_no",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingServiceOrderVoucherReconcileBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrderReconcileResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "凭证补单 | Reconcile order from vouchers",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/catalog": {
      "get": {
        "operationId": "BillingService_OrgCatalogGet",
        "parameters": [
          {
            "description": "已持有的目录版本，与当前相同时只回 not_modified | [EN] Revision already held; when current only not_modified is returned",
            "in": "query",
            "maxLength": 64,
            "name": "known_revision",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgCatalogGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "读取计费目录 | Get billing catalog",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/consumption": {
      "get": {
        "operationId": "BillingService_OrgConsumptionOverviewGet",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgConsumptionOverviewGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "消费总览 | Consumption overview",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/orders": {
      "get": {
        "operationId": "BillingService_OrgOrderList",
        "parameters": [
          {
            "description": "当前页码 | [EN] Current page number",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "page_request.page",
            "required": false,
            "type": "integer"
          },
          {
            "description": "每页条数（上限保护，防止一次拉全表） | [EN] Page size, capped to protect the backend",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 1,
            "name": "page_request.size",
            "required": false,
            "type": "integer"
          },
          {
            "description": "总条数（响应字段，请求 query 不继承必填） | [EN] Total count",
            "format": "int32",
            "in": "query",
            "name": "page_request.total",
            "required": true,
            "type": "integer"
          },
          {
            "default": "ORDER_PURPOSE_UNSPECIFIED",
            "description": "按用途过滤 | [EN] Filter by purpose\n\n - ORDER_PURPOSE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_PURPOSE_CHECKOUT: 订阅变更（新购、升级、加购、续费、降级、调整）| [EN] Subscription change\n - ORDER_PURPOSE_QUOTA: 额度包 | [EN] Quota package\n - ORDER_PURPOSE_RECHARGE: 钱包充值 | [EN] Wallet top-up",
            "enum": [
              "ORDER_PURPOSE_UNSPECIFIED",
              "ORDER_PURPOSE_CHECKOUT",
              "ORDER_PURPOSE_QUOTA",
              "ORDER_PURPOSE_RECHARGE"
            ],
            "in": "query",
            "name": "purpose",
            "required": false,
            "type": "string"
          },
          {
            "default": "ORDER_STATUS_UNSPECIFIED",
            "description": "按状态过滤 | [EN] Filter by status\n\n - ORDER_STATUS_UNSPECIFIED: 未指定 | [EN] Unspecified\n - ORDER_STATUS_PENDING: 待支付 | [EN] Awaiting payment\n - ORDER_STATUS_PAID: 已支付 | [EN] Paid\n - ORDER_STATUS_EXPIRED: 已过期（30 分钟未支付）| [EN] Expired unpaid after 30 minutes\n - ORDER_STATUS_CANCELLED: 已取消 | [EN] Cancelled\n - ORDER_STATUS_REFUNDED: 已退款 | [EN] Refunded",
            "enum": [
              "ORDER_STATUS_UNSPECIFIED",
              "ORDER_STATUS_PENDING",
              "ORDER_STATUS_PAID",
              "ORDER_STATUS_EXPIRED",
              "ORDER_STATUS_CANCELLED",
              "ORDER_STATUS_REFUNDED"
            ],
            "in": "query",
            "name": "status",
            "required": false,
            "type": "string"
          },
          {
            "description": "下单时间起 | [EN] Created from",
            "format": "date-time",
            "in": "query",
            "name": "created_from",
            "required": false,
            "type": "string"
          },
          {
            "description": "下单时间止 | [EN] Created to",
            "format": "date-time",
            "in": "query",
            "name": "created_to",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgOrderListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订单记录 | List orders",
        "tags": [
          "BillingService"
        ]
      },
      "post": {
        "operationId": "BillingService_OrgOrderCreate",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingOrgOrderCreateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgOrderCreateResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "下单 | Create order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/orders/{order_no}": {
      "get": {
        "operationId": "BillingService_OrgOrderGet",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "name": "order_no",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgOrderGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订单详情 | Get order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/orders/{order_no}/cancel": {
      "post": {
        "operationId": "BillingService_OrgOrderCancel",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "name": "order_no",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingServiceOrgOrderCancelBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgOrderCancelResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "取消订单 | Cancel order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/orders/{order_no}/payment": {
      "get": {
        "operationId": "BillingService_OrgOrderPaymentGet",
        "parameters": [
          {
            "description": "订单号 | [EN] Order number",
            "in": "path",
            "name": "order_no",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgOrderPaymentGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "支付状态 | Payment status",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/recharge-orders": {
      "post": {
        "operationId": "BillingService_OrgRechargeOrderCreate",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingOrgRechargeOrderCreateRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgRechargeOrderCreateResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "充值下单 | Create top-up order",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/subscription": {
      "get": {
        "operationId": "BillingService_OrgSubscriptionOverviewGet",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgSubscriptionOverviewGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订阅总览 | Subscription overview",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/subscription/pending-changes/{change_id}": {
      "delete": {
        "operationId": "BillingService_OrgPendingChangeCancel",
        "parameters": [
          {
            "description": "变更ID | [EN] Change ID",
            "in": "path",
            "name": "change_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgPendingChangeCancelResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "撤销待生效变更 | Cancel pending change",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/subscription/quote": {
      "post": {
        "operationId": "BillingService_OrgSubscriptionQuote",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingOrgSubscriptionQuoteRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgSubscriptionQuoteResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "报价 | Quote",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/subscription/renewal": {
      "put": {
        "operationId": "BillingService_OrgRenewalSet",
        "parameters": [
          {
            "description": "已排降级时不能关自动续费（降级要靠续费落地），会返回 FailedPrecondition\n[EN] Auto-renewal cannot be turned off while a downgrade is scheduled, since the downgrade lands through\nthe renewal; that returns FailedPrecondition",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/billingOrgRenewalSetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgRenewalSetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "续费设置 | Renewal settings",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/usage/daily": {
      "get": {
        "operationId": "BillingService_OrgUsageDailyList",
        "parameters": [
          {
            "default": "RESOURCE_CODE_UNSPECIFIED",
            "description": "资源编码 | [EN] Resource code\n\n - RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
            "enum": [
              "RESOURCE_CODE_UNSPECIFIED",
              "RESOURCE_CODE_AGENT_SEAT",
              "RESOURCE_CODE_HOSTED_ACCOUNT",
              "RESOURCE_CODE_OFFICIAL_ACCOUNT",
              "RESOURCE_CODE_TRANSLATION_CHARS",
              "RESOURCE_CODE_AI_TOKENS"
            ],
            "in": "query",
            "name": "resource_code",
            "required": true,
            "type": "string"
          },
          {
            "description": "最近天数：7 / 30 / 90 | [EN] Most recent days: 7, 30 or 90",
            "format": "int32",
            "in": "query",
            "maximum": 90,
            "minimum": 1,
            "name": "range_days",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgUsageDailyListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "每日用量 | Daily usage",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/usage/members": {
      "get": {
        "operationId": "BillingService_OrgUsageMemberBreakdown",
        "parameters": [
          {
            "default": "RESOURCE_CODE_UNSPECIFIED",
            "description": "资源编码 | [EN] Resource code\n\n - RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
            "enum": [
              "RESOURCE_CODE_UNSPECIFIED",
              "RESOURCE_CODE_AGENT_SEAT",
              "RESOURCE_CODE_HOSTED_ACCOUNT",
              "RESOURCE_CODE_OFFICIAL_ACCOUNT",
              "RESOURCE_CODE_TRANSLATION_CHARS",
              "RESOURCE_CODE_AI_TOKENS"
            ],
            "in": "query",
            "name": "resource_code",
            "required": true,
            "type": "string"
          },
          {
            "description": "某一天（YYYY-MM-DD；与 range_days 二选一） | [EN] One day as YYYY-MM-DD, or use range_days",
            "in": "query",
            "name": "date",
            "required": false,
            "type": "string"
          },
          {
            "description": "最近天数（date 为空时用） | [EN] Most recent days, when date is empty",
            "format": "int32",
            "in": "query",
            "maximum": 90,
            "minimum": 0,
            "name": "range_days",
            "required": false,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgUsageMemberBreakdownResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "成员用量分布 | Usage by member",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/usage/quota-ledger": {
      "get": {
        "operationId": "BillingService_OrgQuotaLedgerList",
        "parameters": [
          {
            "default": "RESOURCE_CODE_UNSPECIFIED",
            "description": "资源编码 | [EN] Resource code\n\n - RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
            "enum": [
              "RESOURCE_CODE_UNSPECIFIED",
              "RESOURCE_CODE_AGENT_SEAT",
              "RESOURCE_CODE_HOSTED_ACCOUNT",
              "RESOURCE_CODE_OFFICIAL_ACCOUNT",
              "RESOURCE_CODE_TRANSLATION_CHARS",
              "RESOURCE_CODE_AI_TOKENS"
            ],
            "in": "query",
            "name": "resource_code",
            "required": true,
            "type": "string"
          },
          {
            "description": "时间起 | [EN] From",
            "format": "date-time",
            "in": "query",
            "name": "from",
            "required": false,
            "type": "string"
          },
          {
            "description": "时间止 | [EN] To",
            "format": "date-time",
            "in": "query",
            "name": "to",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "按事件类型过滤 | [EN] Filter by event type\n\n - QUOTA_EVENT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - QUOTA_EVENT_TYPE_PLAN_GRANT: 套餐发放（开通或月度重置）| [EN] Plan grant, on activation or monthly reset\n - QUOTA_EVENT_TYPE_PLAN_UPGRADE: 升级补发差额 | [EN] Upgrade top-up of the difference\n - QUOTA_EVENT_TYPE_PURCHASE: 额度包加购 | [EN] Quota package purchase\n - QUOTA_EVENT_TYPE_REFUND: 退款冲销 | [EN] Refund reversal\n - QUOTA_EVENT_TYPE_GIFT: 赠送 | [EN] Gift\n - QUOTA_EVENT_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction\n - QUOTA_EVENT_TYPE_PLAN_EXPIRE: 到期清零 | [EN] Expiry zeroing",
            "in": "query",
            "items": {
              "enum": [
                "QUOTA_EVENT_TYPE_UNSPECIFIED",
                "QUOTA_EVENT_TYPE_PLAN_GRANT",
                "QUOTA_EVENT_TYPE_PLAN_UPGRADE",
                "QUOTA_EVENT_TYPE_PURCHASE",
                "QUOTA_EVENT_TYPE_REFUND",
                "QUOTA_EVENT_TYPE_GIFT",
                "QUOTA_EVENT_TYPE_DEDUCTION",
                "QUOTA_EVENT_TYPE_PLAN_EXPIRE"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "name": "event_types",
            "required": false,
            "type": "array"
          },
          {
            "description": "翻页游标（首页留空） | [EN] Paging cursor, empty for the first page",
            "in": "query",
            "maxLength": 256,
            "name": "cursor",
            "required": false,
            "type": "string"
          },
          {
            "description": "每页条数（默认 50，最多 200） | [EN] Page size, 50 by default, at most 200",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 0,
            "name": "limit",
            "required": false,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgQuotaLedgerListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "额度流水 | Quota ledger",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/org/usage/quotas": {
      "get": {
        "operationId": "BillingService_OrgQuotaOverviewGet",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingOrgQuotaOverviewGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "额度概览 | Quota overview",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscription-event-summary": {
      "get": {
        "operationId": "BillingService_SubscriptionEventSummaryGet",
        "parameters": [
          {
            "description": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "default": "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
            "description": "事件（汇总接口忽略）| [EN] Event; ignored by the summary\n\n - SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_START: 开始试用 | [EN] Trial started\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_END: 试用结束未付费 | [EN] Trial ended unpaid\n - SUBSCRIPTION_EVENT_TYPE_NEW: 新购 | [EN] New purchase\n - SUBSCRIPTION_EVENT_TYPE_RENEW: 续费（自动或手动）| [EN] Renewal, automatic or manual\n - SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED: 续费扣款失败 | [EN] Renewal charge failed\n - SUBSCRIPTION_EVENT_TYPE_UPGRADE: 升级 | [EN] Upgrade\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED: 降级（已安排）| [EN] Downgrade scheduled\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE: 降级（已生效）| [EN] Downgrade took effect\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED: 撤销降级 | [EN] Downgrade cancelled\n - SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE: 到期降为免费 | [EN] Expired to the free plan\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON: 开启自动续费 | [EN] Auto-renewal on\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF: 关闭自动续费 | [EN] Auto-renewal off\n - SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED: 修改续费周期 | [EN] Renewal cycle changed\n - SUBSCRIPTION_EVENT_TYPE_ADDON_ADD: 加购资源位 | [EN] Seats added\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE: 减少资源位 | [EN] Seats reduced\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED: 撤销减少资源位 | [EN] Seat reduction cancelled\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND: 运维延长试用 | [EN] Trial extended by an operator",
            "enum": [
              "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_START",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_END",
              "SUBSCRIPTION_EVENT_TYPE_NEW",
              "SUBSCRIPTION_EVENT_TYPE_RENEW",
              "SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED",
              "SUBSCRIPTION_EVENT_TYPE_UPGRADE",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED",
              "SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE",
              "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON",
              "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF",
              "SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_ADD",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND"
            ],
            "in": "query",
            "name": "filter.event_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "套餐，匹配变更前或变更后 | [EN] Plan, matching before or after",
            "in": "query",
            "maxLength": 32,
            "name": "filter.plan_code",
            "required": false,
            "type": "string"
          },
          {
            "description": "完整的组织 ID、工作区 ID 或订单号 | [EN] A full organization ID, workspace ID or order number",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingSubscriptionEventSummaryGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订阅变更汇总 | Subscription change summary",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscription-events": {
      "get": {
        "operationId": "BillingService_SubscriptionEventList",
        "parameters": [
          {
            "description": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "default": "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
            "description": "事件（汇总接口忽略）| [EN] Event; ignored by the summary\n\n - SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_START: 开始试用 | [EN] Trial started\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_END: 试用结束未付费 | [EN] Trial ended unpaid\n - SUBSCRIPTION_EVENT_TYPE_NEW: 新购 | [EN] New purchase\n - SUBSCRIPTION_EVENT_TYPE_RENEW: 续费（自动或手动）| [EN] Renewal, automatic or manual\n - SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED: 续费扣款失败 | [EN] Renewal charge failed\n - SUBSCRIPTION_EVENT_TYPE_UPGRADE: 升级 | [EN] Upgrade\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED: 降级（已安排）| [EN] Downgrade scheduled\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE: 降级（已生效）| [EN] Downgrade took effect\n - SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED: 撤销降级 | [EN] Downgrade cancelled\n - SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE: 到期降为免费 | [EN] Expired to the free plan\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON: 开启自动续费 | [EN] Auto-renewal on\n - SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF: 关闭自动续费 | [EN] Auto-renewal off\n - SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED: 修改续费周期 | [EN] Renewal cycle changed\n - SUBSCRIPTION_EVENT_TYPE_ADDON_ADD: 加购资源位 | [EN] Seats added\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE: 减少资源位 | [EN] Seats reduced\n - SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED: 撤销减少资源位 | [EN] Seat reduction cancelled\n - SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND: 运维延长试用 | [EN] Trial extended by an operator",
            "enum": [
              "SUBSCRIPTION_EVENT_TYPE_UNSPECIFIED",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_START",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_END",
              "SUBSCRIPTION_EVENT_TYPE_NEW",
              "SUBSCRIPTION_EVENT_TYPE_RENEW",
              "SUBSCRIPTION_EVENT_TYPE_RENEW_FAILED",
              "SUBSCRIPTION_EVENT_TYPE_UPGRADE",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_SCHEDULED",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_EFFECTIVE",
              "SUBSCRIPTION_EVENT_TYPE_DOWNGRADE_CANCELLED",
              "SUBSCRIPTION_EVENT_TYPE_EXPIRED_FREE",
              "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_ON",
              "SUBSCRIPTION_EVENT_TYPE_AUTO_RENEW_OFF",
              "SUBSCRIPTION_EVENT_TYPE_RENEW_CYCLE_CHANGED",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_ADD",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE",
              "SUBSCRIPTION_EVENT_TYPE_ADDON_REDUCE_CANCELLED",
              "SUBSCRIPTION_EVENT_TYPE_TRIAL_EXTEND"
            ],
            "in": "query",
            "name": "filter.event_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "套餐，匹配变更前或变更后 | [EN] Plan, matching before or after",
            "in": "query",
            "maxLength": 32,
            "name": "filter.plan_code",
            "required": false,
            "type": "string"
          },
          {
            "description": "完整的组织 ID、工作区 ID 或订单号 | [EN] A full organization ID, workspace ID or order number",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "description": "当前页码 | [EN] Current page number",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "page_request.page",
            "required": false,
            "type": "integer"
          },
          {
            "description": "每页条数（上限保护，防止一次拉全表） | [EN] Page size, capped to protect the backend",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 1,
            "name": "page_request.size",
            "required": false,
            "type": "integer"
          },
          {
            "description": "总条数（响应字段，请求 query 不继承必填） | [EN] Total count",
            "format": "int32",
            "in": "query",
            "name": "page_request.total",
            "required": true,
            "type": "integer"
          },
          {
            "description": "排序字段 | [EN] Sort field",
            "in": "query",
            "name": "sorting.field",
            "required": false,
            "type": "string"
          },
          {
            "description": "是否升序 | [EN] Whether ascending",
            "in": "query",
            "name": "sorting.ascending",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingSubscriptionEventListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "订阅变更 | List subscription changes",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscriptions/{workspace_id}": {
      "get": {
        "operationId": "BillingService_SubscriptionGet",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingSubscriptionGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "读取订阅 | Get subscription",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscriptions/{workspace_id}/changes": {
      "post": {
        "operationId": "BillingService_SubscriptionChangeApply",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingServiceSubscriptionChangeApplyBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingSubscriptionChangeApplyResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "应用零元变更 | Apply a zero-cost change",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscriptions/{workspace_id}/pending-changes/{change_id}": {
      "delete": {
        "operationId": "BillingService_PendingChangeCancel",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "description": "单据ID | [EN] Record ID",
            "in": "path",
            "name": "change_id",
            "required": true,
            "type": "string"
          },
          {
            "description": "分区名（进审计标题）| [EN] Section name, used as the audit title",
            "in": "query",
            "maxLength": 32,
            "name": "meta.section_label",
            "required": true,
            "type": "string"
          },
          {
            "description": "变更说明（必填）| [EN] Change note, mandatory",
            "in": "query",
            "maxLength": 200,
            "minLength": 2,
            "name": "meta.remark",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingPendingChangeCancelResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "撤销待生效变更 | Cancel a scheduled change",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/subscriptions/{workspace_id}/quote": {
      "post": {
        "operationId": "BillingService_SubscriptionChangeQuote",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/BillingServiceSubscriptionChangeQuoteBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingSubscriptionChangeQuoteResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "变更报价 | Quote a change",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/usage-record-summary": {
      "get": {
        "operationId": "BillingService_UsageRecordSummaryGet",
        "parameters": [
          {
            "default": "RESOURCE_CODE_UNSPECIFIED",
            "description": "用量类型：翻译字符或 AI token | [EN] Usage kind: translation characters or AI tokens\n\n - RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
            "enum": [
              "RESOURCE_CODE_UNSPECIFIED",
              "RESOURCE_CODE_AGENT_SEAT",
              "RESOURCE_CODE_HOSTED_ACCOUNT",
              "RESOURCE_CODE_OFFICIAL_ACCOUNT",
              "RESOURCE_CODE_TRANSLATION_CHARS",
              "RESOURCE_CODE_AI_TOKENS"
            ],
            "in": "query",
            "name": "filter.resource_code",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "完整的组织 ID 或工作区 ID | [EN] A full organization or workspace ID",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "default": "USAGE_RECORD_ONLY_UNSPECIFIED",
            "description": "只看超额或只看暂停（汇总接口忽略）| [EN] Overage-only or paused-only; ignored by the summary\n\n - USAGE_RECORD_ONLY_UNSPECIFIED: 全部 | [EN] All rows\n - USAGE_RECORD_ONLY_OVERAGE: 只看有超额的 | [EN] Rows with overage\n - USAGE_RECORD_ONLY_PAUSED: 只看超额被暂停拦下的 | [EN] Rows where overage was refused while paused",
            "enum": [
              "USAGE_RECORD_ONLY_UNSPECIFIED",
              "USAGE_RECORD_ONLY_OVERAGE",
              "USAGE_RECORD_ONLY_PAUSED"
            ],
            "in": "query",
            "name": "filter.only",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingUsageRecordSummaryGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "用量记录汇总 | Usage record summary",
        "tags": [
          "BillingService"
        ]
      }
    },
    "/v1/billing/usage-records": {
      "get": {
        "operationId": "BillingService_UsageRecordList",
        "parameters": [
          {
            "default": "RESOURCE_CODE_UNSPECIFIED",
            "description": "用量类型：翻译字符或 AI token | [EN] Usage kind: translation characters or AI tokens\n\n - RESOURCE_CODE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - RESOURCE_CODE_AGENT_SEAT: 成员席位 | [EN] Agent seat\n - RESOURCE_CODE_HOSTED_ACCOUNT: 云托管账号 | [EN] Hosted account\n - RESOURCE_CODE_OFFICIAL_ACCOUNT: 官方渠道账号 | [EN] Official channel account\n - RESOURCE_CODE_TRANSLATION_CHARS: 翻译字符 | [EN] Translation characters\n - RESOURCE_CODE_AI_TOKENS: AI token | [EN] AI tokens",
            "enum": [
              "RESOURCE_CODE_UNSPECIFIED",
              "RESOURCE_CODE_AGENT_SEAT",
              "RESOURCE_CODE_HOSTED_ACCOUNT",
              "RESOURCE_CODE_OFFICIAL_ACCOUNT",
              "RESOURCE_CODE_TRANSLATION_CHARS",
              "RESOURCE_CODE_AI_TOKENS"
            ],
            "in": "query",
            "name": "filter.resource_code",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期起（YYYY-MM-DD）| [EN] First date, YYYY-MM-DD",
            "in": "query",
            "name": "filter.start_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "日期止（YYYY-MM-DD，含当天）| [EN] Last date, inclusive",
            "in": "query",
            "name": "filter.end_date",
            "required": true,
            "type": "string"
          },
          {
            "description": "完整的组织 ID 或工作区 ID | [EN] A full organization or workspace ID",
            "in": "query",
            "maxLength": 64,
            "name": "filter.keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "组织（按名称在 AC 搜到的 ID）| [EN] Organizations, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.org_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "工作区（按名称在 AC 搜到的 ID）| [EN] Workspaces, IDs found by name in AC",
            "in": "query",
            "items": {
              "maxLength": 64,
              "type": "string"
            },
            "maxItems": 100,
            "name": "filter.workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "default": "USAGE_RECORD_ONLY_UNSPECIFIED",
            "description": "只看超额或只看暂停（汇总接口忽略）| [EN] Overage-only or paused-only; ignored by the summary\n\n - USAGE_RECORD_ONLY_UNSPECIFIED: 全部 | [EN] All rows\n - USAGE_RECORD_ONLY_OVERAGE: 只看有超额的 | [EN] Rows with overage\n - USAGE_RECORD_ONLY_PAUSED: 只看超额被暂停拦下的 | [EN] Rows where overage was refused while paused",
            "enum": [
              "USAGE_RECORD_ONLY_UNSPECIFIED",
              "USAGE_RECORD_ONLY_OVERAGE",
              "USAGE_RECORD_ONLY_PAUSED"
            ],
            "in": "query",
            "name": "filter.only",
            "required": false,
            "type": "string"
          },
          {
            "description": "当前页码 | [EN] Current page number",
            "format": "int32",
            "in": "query",
            "minimum": 1,
            "name": "page_request.page",
            "required": false,
            "type": "integer"
          },
          {
            "description": "每页条数（上限保护，防止一次拉全表） | [EN] Page size, capped to protect the backend",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 1,
            "name": "page_request.size",
            "required": false,
            "type": "integer"
          },
          {
            "description": "总条数（响应字段，请求 query 不继承必填） | [EN] Total count",
            "format": "int32",
            "in": "query",
            "name": "page_request.total",
            "required": true,
            "type": "integer"
          },
          {
            "description": "排序字段 | [EN] Sort field",
            "in": "query",
            "name": "sorting.field",
            "required": false,
            "type": "string"
          },
          {
            "description": "是否升序 | [EN] Whether ascending",
            "in": "query",
            "name": "sorting.ascending",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/billingUsageRecordListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "用量记录 | List usage records",
        "tags": [
          "BillingService"
        ]
      }
    }
  },
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "tags": [
    {
      "description": "计费：组织控制台的计费目录、订阅、订单、用量与消费，运维后台的订阅管理；计量只走 gRPC | Billing",
      "name": "BillingService"
    }
  ]
}