{
  "consumes": [
    "application/json"
  ],
  "definitions": {
    "WalletServiceWalletCreditBody": {
      "description": "biz_type + biz_id 是幂等键：同一笔充值回调重放多次只入账一次。\n没有它的话，支付渠道的重试会让客户的余额翻倍——而渠道重试是常态不是异常。\n\n[EN] The business type and id form the idempotency key so a replayed top-up callback credits\nonce: without it a channel retry doubles the customer's balance, and channels retry as a\nmatter of course rather than exceptionally.",
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "金额（单笔不超过 100 万 USD）| [EN] Amount, at most one million USD",
          "type": "string"
        },
        "biz_id": {
          "title": "业务ID（幂等键的另一半）| [EN] Business id, the other half",
          "type": "string"
        },
        "biz_type": {
          "$ref": "#/definitions/enumsWalletBizType",
          "title": "业务类型（幂等键的一半）：手工入账只收 MANUAL，系统入账只收 RECHARGE、PAYMENT_LATE、PAYMENT_DUPLICATE、SIGNUP_GIFT，其余 InvalidArgument | [EN] Business type, half of the idempotency key: MANUAL for manual credits; RECHARGE, PAYMENT_LATE, PAYMENT_DUPLICATE or SIGNUP_GIFT for system credits; anything else is InvalidArgument"
        },
        "org_id": {
          "title": "组织ID | [EN] Organization ID",
          "type": "string"
        },
        "pay_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "支付方式（不能是对公转账）| [EN] Payment method, never bank transfer"
        },
        "summary": {
          "title": "摘要 | [EN] Summary",
          "type": "string"
        },
        "txn_type": {
          "$ref": "#/definitions/walletWalletTxnType",
          "title": "流水类型：充值、退款、赠金，其余 InvalidArgument | [EN] Top-up, refund or gift; anything else is InvalidArgument"
        }
      },
      "title": "入账请求（充值、赠金、退款、运营调整）\n[EN] Credit request: top-up, gift, refund or an operator adjustment",
      "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"
    },
    "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"
    },
    "enumsWalletBizType": {
      "default": "WALLET_BIZ_TYPE_UNSPECIFIED",
      "description": "- WALLET_BIZ_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_BIZ_TYPE_ORDER: 订单结算或第三方直接支付记账，biz_id 是计费订单号 | [EN] Order settlement or off-wallet record; biz_id is the billing order number\n - WALLET_BIZ_TYPE_RECHARGE: 充值单到账，biz_id 是计费订单号 | [EN] A settled top-up order; biz_id is the billing order number\n - WALLET_BIZ_TYPE_ORDER_RECONCILE: 锁定已解除时按订单号补扣钱包抵扣，biz_id 是计费订单号 | [EN] Re-debit of an order's wallet share once its hold is gone; biz_id is the order number\n - WALLET_BIZ_TYPE_PAYMENT_LATE: 到账但订单不能开通（迟到、少付、钱包部分没扣到），转入钱包 | [EN] Money for an order that cannot be fulfilled (late, underpaid, wallet share uncollected)\n - WALLET_BIZ_TYPE_PAYMENT_DUPLICATE: 已支付订单又收到一笔（含多付的差额），转入钱包 | [EN] Another payment for a paid order, an overpayment's extra included\n - WALLET_BIZ_TYPE_SIGNUP_GIFT: 开户赠金，biz_id 是工作区 ID | [EN] Signup gift; biz_id is the workspace ID\n - WALLET_BIZ_TYPE_USAGE: 超额用量扣费，biz_id 是用量事实 ID | [EN] Overage charge; biz_id is the usage fact ID\n - WALLET_BIZ_TYPE_BANK_TRANSFER: 对公转账入账，biz_id 是规范化的银行流水号 | [EN] Bank transfer credit; biz_id is the normalized bank trade number\n - WALLET_BIZ_TYPE_MANUAL: 运营手工入账或扣回，biz_id 由调用方生成 | [EN] Operator credit or clawback; biz_id chosen by the caller",
      "enum": [
        "WALLET_BIZ_TYPE_UNSPECIFIED",
        "WALLET_BIZ_TYPE_ORDER",
        "WALLET_BIZ_TYPE_RECHARGE",
        "WALLET_BIZ_TYPE_ORDER_RECONCILE",
        "WALLET_BIZ_TYPE_PAYMENT_LATE",
        "WALLET_BIZ_TYPE_PAYMENT_DUPLICATE",
        "WALLET_BIZ_TYPE_SIGNUP_GIFT",
        "WALLET_BIZ_TYPE_USAGE",
        "WALLET_BIZ_TYPE_BANK_TRANSFER",
        "WALLET_BIZ_TYPE_MANUAL"
      ],
      "title": "钱包流水的业务类型：与 biz_id、流水类型一起是钱包入账与扣款的幂等键；钱包库里存枚举名去前缀的小写（order、recharge…）\n[EN] The wallet entry's business type, which with biz_id and the transaction type is the idempotency key of credits\nand debits; the wallet stores the lower-case name without the prefix (order, recharge…)",
      "type": "string"
    },
    "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"
    },
    "walletOrgWalletAlertSetRequest": {
      "properties": {
        "enabled": {
          "title": "是否开启 | [EN] Whether it is on",
          "type": "boolean"
        },
        "threshold_micro": {
          "format": "int64",
          "maxLength": 10000000000,
          "minLength": 1000000,
          "title": "提醒阈值：整数美元，1 到 10,000 USD（不是整数美元回 error.wallet_alert_threshold_invalid）| [EN] Alert threshold in whole US dollars, 1 to 10,000 (error.wallet_alert_threshold_invalid otherwise)",
          "type": "string"
        }
      },
      "title": "低余额提醒设置请求\n[EN] Low-balance alert request",
      "type": "object"
    },
    "walletOrgWalletAlertSetResponse": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "更新后的钱包 | [EN] Updated wallet"
        }
      },
      "title": "低余额提醒设置响应\n[EN] Low-balance alert response",
      "type": "object"
    },
    "walletOrgWalletGetResponse": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "钱包 | [EN] Wallet"
        }
      },
      "title": "读取钱包响应\n[EN] Get wallet response",
      "type": "object"
    },
    "walletOrgWalletLedgerListResponse": {
      "properties": {
        "next_cursor": {
          "title": "下一页游标（为空即没有下一页） | [EN] Cursor of the next page; empty when there is none",
          "type": "string"
        },
        "totals": {
          "$ref": "#/definitions/walletTxnTotals",
          "title": "合计（只在首页） | [EN] Totals, first page only"
        },
        "txns": {
          "items": {
            "$ref": "#/definitions/walletOrgWalletTxn",
            "type": "object"
          },
          "title": "流水（最近的在前） | [EN] Transactions, most recent first",
          "type": "array"
        }
      },
      "title": "组织账本响应\n[EN] List org ledger response",
      "type": "object"
    },
    "walletOrgWalletTxn": {
      "properties": {
        "txn": {
          "$ref": "#/definitions/walletWalletTxn",
          "title": "流水 | [EN] Transaction"
        },
        "workspace_id": {
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        },
        "workspace_name": {
          "title": "工作区名称（AC 取不到时为空）| [EN] Workspace name, empty when AC cannot tell",
          "type": "string"
        }
      },
      "title": "带工作区的流水\n[EN] A transaction with its workspace",
      "type": "object"
    },
    "walletOrgWalletTxnListResponse": {
      "properties": {
        "next_cursor": {
          "title": "下一页游标（为空即没有下一页） | [EN] Cursor of the next page; empty when there is none",
          "type": "string"
        },
        "totals": {
          "$ref": "#/definitions/walletTxnTotals",
          "title": "合计（只在首页） | [EN] Totals, first page only"
        },
        "txns": {
          "items": {
            "$ref": "#/definitions/walletWalletTxn",
            "type": "object"
          },
          "title": "流水（最近的在前） | [EN] Transactions, most recent first",
          "type": "array"
        }
      },
      "title": "钱包流水响应\n[EN] List wallet transactions response",
      "type": "object"
    },
    "walletTxnTotals": {
      "description": "只在首页返回（cursor 为空），按同一组过滤条件统计全部命中的流水，不只是这一页\n[EN] Returned on the first page only (empty cursor), over every row matching the same filters, not just the page",
      "properties": {
        "count": {
          "format": "int64",
          "title": "条数 | [EN] Number of transactions",
          "type": "string"
        },
        "expense_micro": {
          "format": "int64",
          "title": "支出合计（只含经钱包的部分） | [EN] Money out, wallet portions only",
          "type": "string"
        },
        "income_micro": {
          "format": "int64",
          "title": "收入合计 | [EN] Money in",
          "type": "string"
        }
      },
      "title": "流水合计\n[EN] Transaction totals",
      "type": "object"
    },
    "walletWalletAccount": {
      "description": "可用余额 = balance + gift − locked，三个数都给出来而不是只给可用额：\n界面要分别展示「充值余额」「赠金」「锁定中」，而赠金不可退不可提现，\n合成一个数之后客户会以为那笔赠金能提走。\n\n[EN] All three figures are returned rather than only the available amount, because the page\nshows the top-up balance, the gift and the held amount separately: a gift is neither\nrefundable nor withdrawable, and a single combined number reads as if it could be cashed out.",
      "properties": {
        "available_micro": {
          "format": "int64",
          "title": "可用 = balance + gift − locked | [EN] Available",
          "type": "string"
        },
        "balance_micro": {
          "format": "int64",
          "title": "充值余额 | [EN] Top-up balance",
          "type": "string"
        },
        "currency": {
          "title": "币种 | [EN] Currency",
          "type": "string"
        },
        "gift_balance_micro": {
          "format": "int64",
          "title": "赠金余额（不可退不可提现）| [EN] Gift balance, not refundable or withdrawable",
          "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"
        },
        "org_id": {
          "title": "组织ID | [EN] Organization ID",
          "type": "string"
        },
        "transfer_reference": {
          "title": "对公转账识别码（LM 开头，客户汇款时填在转账备注里，全局唯一）| [EN] Bank transfer reference, LM-prefixed and globally unique, written in the transfer memo",
          "type": "string"
        },
        "version": {
          "format": "int32",
          "title": "行版本 | [EN] Row version",
          "type": "integer"
        },
        "workspace_id": {
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "title": "钱包账户\n[EN] Wallet account",
      "type": "object"
    },
    "walletWalletAccountTotals": {
      "description": "本月是 UTC+8 自然月（与组织控制台、计费消费总览同一个月界）；充值是充值类型，含对公转账，不含赠金与退款\n[EN] This month is the UTC+8 calendar month, as on the org console and billing's overview; top-ups are the recharge\ntype, bank transfers included, gifts and refunds not",
      "properties": {
        "month_from": {
          "format": "date-time",
          "title": "本月起点（UTC+8 月初）| [EN] Start of this month, UTC+8",
          "type": "string"
        },
        "month_recharge_micro": {
          "format": "int64",
          "title": "本月充值 | [EN] Topped up this month",
          "type": "string"
        },
        "month_spend_micro": {
          "format": "int64",
          "title": "本月钱包扣费：订阅费、资源加购、翻译与 AI 超额里经钱包的部分 | [EN] Spent from the wallet this month: the wallet part of subscriptions, addons and translation and AI overage",
          "type": "string"
        },
        "total_recharge_micro": {
          "format": "int64",
          "title": "累计充值 | [EN] Topped up all time",
          "type": "string"
        }
      },
      "title": "工作区钱包合计\n[EN] Workspace wallet totals",
      "type": "object"
    },
    "walletWalletBankTransfer": {
      "properties": {
        "arrival_date": {
          "title": "到账日期 YYYY-MM-DD | [EN] Arrival date, YYYY-MM-DD",
          "type": "string"
        },
        "bank_trade_no": {
          "title": "银行流水号（原样）| [EN] Bank trade number as entered",
          "type": "string"
        },
        "note": {
          "title": "备注 | [EN] Note",
          "type": "string"
        },
        "payer_name": {
          "title": "付款户名 | [EN] Payer name",
          "type": "string"
        }
      },
      "title": "对公转账明细\n[EN] Bank transfer details",
      "type": "object"
    },
    "walletWalletBankTransferCreditRequest": {
      "description": "一笔银行流水只能入账一次：银行流水号全局唯一（不分大小写），重复时拒绝并给出已入账的工作区\n记一笔「充值」流水，支付方式对公转账，摘要是银行流水号，操作人取令牌\n\n[EN] One bank trade credits once: the trade number is globally unique, case-insensitively, and a repeat is refused\nnaming the workspace it went to. Books a top-up paid by bank transfer whose summary is the trade number, with the\noperator taken from the token.",
      "properties": {
        "amount_micro": {
          "format": "int64",
          "maxLength": 1000000000000,
          "minLength": 0,
          "title": "到账金额（USD，\u003e 0，最多两位小数，即 10000 的整数倍，单笔不超过 100 万）| [EN] Amount received in USD, positive, at most two decimals (a multiple of 10000), at most one million",
          "type": "string"
        },
        "arrival_date": {
          "title": "到账日期 YYYY-MM-DD，不晚于今天 | [EN] Arrival date, YYYY-MM-DD, not after today",
          "type": "string"
        },
        "bank_trade_no": {
          "maxLength": 64,
          "title": "银行流水号 | [EN] Bank trade number",
          "type": "string"
        },
        "note": {
          "maxLength": 200,
          "title": "备注 | [EN] Note",
          "type": "string"
        },
        "payer_name": {
          "maxLength": 100,
          "title": "付款户名 | [EN] Payer name",
          "type": "string"
        },
        "workspace_id": {
          "maxLength": 64,
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        }
      },
      "required": [
        "workspace_id",
        "amount_micro",
        "arrival_date",
        "bank_trade_no"
      ],
      "title": "对公转账入账请求\n[EN] Bank transfer credit request",
      "type": "object"
    },
    "walletWalletBankTransferCreditResponse": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "入账后的钱包 | [EN] Wallet after the credit"
        },
        "balance_before_micro": {
          "format": "int64",
          "title": "入账前的充值余额 | [EN] Top-up balance before",
          "type": "string"
        },
        "entry": {
          "$ref": "#/definitions/walletWalletLedgerEntry",
          "title": "这笔流水 | [EN] The entry booked"
        }
      },
      "title": "对公转账入账响应\n[EN] Bank transfer credit response",
      "type": "object"
    },
    "walletWalletCreditResponse": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "入账后的钱包 | [EN] Wallet after the credit"
        },
        "replayed": {
          "title": "是否命中幂等（true 表示本次未再入账）| [EN] Whether this was a replay and nothing was credited",
          "type": "boolean"
        },
        "txn": {
          "$ref": "#/definitions/walletWalletTxn",
          "title": "本次流水（重放时返回首次那条）| [EN] The transaction; a replay returns the original"
        }
      },
      "title": "入账响应\n[EN] Credit response",
      "type": "object"
    },
    "walletWalletDirection": {
      "default": "WALLET_DIRECTION_UNSPECIFIED",
      "description": "- WALLET_DIRECTION_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_DIRECTION_IN: 入账 | [EN] Credit\n - WALLET_DIRECTION_OUT: 出账 | [EN] Debit",
      "enum": [
        "WALLET_DIRECTION_UNSPECIFIED",
        "WALLET_DIRECTION_IN",
        "WALLET_DIRECTION_OUT"
      ],
      "title": "资金方向\n[EN] Direction of funds",
      "type": "string"
    },
    "walletWalletGetResponse": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "钱包账户 | [EN] Wallet account"
        },
        "totals": {
          "$ref": "#/definitions/walletWalletAccountTotals",
          "title": "合计，只在 with_totals 为 true 时有 | [EN] Totals, only with with_totals"
        }
      },
      "title": "读取钱包响应\n[EN] Get wallet response",
      "type": "object"
    },
    "walletWalletLedgerEntry": {
      "description": "金额不带符号，方向看 direction；组合支付的 amount 是订单总额，wallet 是钱包抵扣、external 是第三方部分，余额只减 wallet\n第三方直接支付 wallet 为 0、余额不变，没有事后余额（has_balance_after = false）\n支付方式用 commonapis 的 PaymentMethod：第三方方式与对公转账；那份枚举没有钱包余额，钱包支付（含组合支付的钱包抵扣）看 wallet_paid\n钱包全额支付与超额扣费是 payment_method 未指定、wallet_paid 为 true；赠送与运营扣回两者都没有\n\n[EN] Amounts are unsigned with direction telling which way. For a mixed payment amount is the order total, wallet the\nwallet deduction and external the third-party part, and the balance only drops by the wallet part. A payment made\nentirely off-wallet has a zero wallet part, leaves the balance unchanged and carries no after-balance. The payment\nmethod is commonapis PaymentMethod, the third-party methods and bank transfer; it has no wallet balance, so wallet\npayments, a mixed payment's wallet part included, show in wallet_paid. A wallet-only payment or overage charge has an\nunspecified payment_method and wallet_paid true; gifts and operator deductions have neither.",
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "金额（组合支付为订单总额）| [EN] Amount; the order total for a mixed payment",
          "type": "string"
        },
        "balance_after_micro": {
          "format": "int64",
          "title": "事后充值余额 | [EN] Top-up balance after",
          "type": "string"
        },
        "bank_transfer": {
          "$ref": "#/definitions/walletWalletBankTransfer",
          "title": "对公转账明细（对公转账入账才有）| [EN] Bank transfer details, bank transfer credits only"
        },
        "direction": {
          "$ref": "#/definitions/walletWalletDirection",
          "title": "方向 | [EN] Direction"
        },
        "external_micro": {
          "format": "int64",
          "title": "第三方支付的部分 | [EN] The third-party part",
          "type": "string"
        },
        "gift_after_micro": {
          "format": "int64",
          "title": "事后赠金余额 | [EN] Gift balance after",
          "type": "string"
        },
        "has_balance_after": {
          "title": "事后余额是否有值 | [EN] Whether the after-balances are present",
          "type": "boolean"
        },
        "id": {
          "title": "流水ID | [EN] Transaction ID",
          "type": "string"
        },
        "occurred_at": {
          "format": "date-time",
          "title": "发生时间 | [EN] Occurred at",
          "type": "string"
        },
        "operator_id": {
          "title": "操作人的身份主体ID（服务发起为空）| [EN] Operator principal ID, empty when a service booked it",
          "type": "string"
        },
        "operator_type": {
          "$ref": "#/definitions/walletWalletOperatorType",
          "title": "操作人类型 | [EN] Operator type"
        },
        "order_no": {
          "title": "计费订单号（订单结算与充值才有）| [EN] Billing order number, for order settlements and top-ups only",
          "type": "string"
        },
        "org_id": {
          "title": "组织ID | [EN] Organization ID",
          "type": "string"
        },
        "org_name": {
          "title": "组织名称（AC 取不到时为空）| [EN] Organization name, empty when AC cannot tell",
          "type": "string"
        },
        "payment_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "第三方方式或对公转账（组合支付为第三方那一方）| [EN] Third-party method or bank transfer; the third party's for a mixed payment"
        },
        "summary": {
          "title": "摘要（写入时定：订单标题，对公转账为银行流水号）| [EN] Summary fixed when booked: the order title, or the bank trade number",
          "type": "string"
        },
        "txn_type": {
          "$ref": "#/definitions/walletWalletTxnType",
          "title": "类型 | [EN] Type"
        },
        "wallet_micro": {
          "format": "int64",
          "title": "经钱包余额的部分 | [EN] The part through the wallet balance",
          "type": "string"
        },
        "wallet_paid": {
          "title": "是否用钱包余额支付（钱包支付、超额扣费、组合支付的钱包抵扣）| [EN] Paid from the wallet balance: wallet payments, overage, a mixed payment's wallet part",
          "type": "boolean"
        },
        "workspace_id": {
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        },
        "workspace_name": {
          "title": "工作区名称（AC 取不到时为空）| [EN] Workspace name, empty when AC cannot tell",
          "type": "string"
        }
      },
      "title": "一条全平台流水\n[EN] One ledger entry across the platform",
      "type": "object"
    },
    "walletWalletLedgerFigure": {
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "金额 | [EN] Amount",
          "type": "string"
        },
        "count": {
          "format": "int64",
          "title": "笔数 | [EN] Number of entries",
          "type": "string"
        }
      },
      "title": "一项合计\n[EN] One total",
      "type": "object"
    },
    "walletWalletLedgerListResponse": {
      "properties": {
        "from": {
          "format": "date-time",
          "title": "实际查询的时间起 | [EN] The effective start",
          "type": "string"
        },
        "list": {
          "items": {
            "$ref": "#/definitions/walletWalletLedgerEntry",
            "type": "object"
          },
          "title": "流水 | [EN] Entries",
          "type": "array"
        },
        "page_response": {
          "$ref": "#/definitions/commonPaging",
          "title": "分页；总数只数到 10000，超过时为 10001 | [EN] Paging; the total stops at 10000 and reads 10001 beyond"
        },
        "to": {
          "format": "date-time",
          "title": "实际查询的时间止 | [EN] The effective end",
          "type": "string"
        }
      },
      "title": "全平台流水响应\n[EN] List ledger entries response",
      "type": "object"
    },
    "walletWalletLedgerSummaryResponse": {
      "description": "钱包扣费只算实际从钱包扣掉的部分（组合支付只算钱包抵扣，第三方直接支付不算）；第三方直接支付只算第三方部分，余额不动\n[EN] Wallet spend counts only what left the wallet (the wallet part of a mixed payment, nothing of an off-wallet\none); third-party payments count only the third-party part, which never touches the balance.",
      "properties": {
        "count": {
          "format": "int64",
          "title": "流水笔数 | [EN] Number of entries",
          "type": "string"
        },
        "deduction": {
          "$ref": "#/definitions/walletWalletLedgerFigure",
          "title": "平台扣回 | [EN] Operator deductions"
        },
        "from": {
          "format": "date-time",
          "title": "实际统计的时间起 | [EN] The effective start",
          "type": "string"
        },
        "gift": {
          "$ref": "#/definitions/walletWalletLedgerFigure",
          "title": "赠送 | [EN] Gifts"
        },
        "recharge": {
          "$ref": "#/definitions/walletWalletLedgerFigure",
          "title": "充值（含对公转账）| [EN] Top-ups, bank transfers included"
        },
        "recharge_transfer_micro": {
          "format": "int64",
          "title": "其中对公转账 | [EN] Of which bank transfers",
          "type": "string"
        },
        "third_party": {
          "$ref": "#/definitions/walletWalletLedgerFigure",
          "title": "第三方直接支付 | [EN] Paid off-wallet"
        },
        "to": {
          "format": "date-time",
          "title": "实际统计的时间止 | [EN] The effective end",
          "type": "string"
        },
        "wallet_spend": {
          "$ref": "#/definitions/walletWalletLedgerFigure",
          "title": "钱包扣费 | [EN] Spent from the wallet"
        },
        "wallet_spend_overage_micro": {
          "format": "int64",
          "title": "其中超额扣费（翻译与 AI）| [EN] Of which overage, translation and AI",
          "type": "string"
        },
        "workspaces": {
          "format": "int64",
          "title": "涉及的工作区数 | [EN] Workspaces involved",
          "type": "string"
        }
      },
      "title": "全平台流水汇总响应\n[EN] Ledger summary response",
      "type": "object"
    },
    "walletWalletOperatorType": {
      "default": "WALLET_OPERATOR_TYPE_UNSPECIFIED",
      "description": "- WALLET_OPERATOR_TYPE_UNSPECIFIED: 认不出 | [EN] Unrecognized\n - WALLET_OPERATOR_TYPE_SYSTEM: 系统（开户赠金、超额扣费、自动续费、充值到账）| [EN] The system: signup gifts, overage, auto-renewal, settled top-ups\n - WALLET_OPERATOR_TYPE_MEMBER: 组织成员 | [EN] An org member\n - WALLET_OPERATOR_TYPE_OPS: 运维（手工入账、对公转账入账、扣回）| [EN] An ops user: manual credits, bank transfers, deductions",
      "enum": [
        "WALLET_OPERATOR_TYPE_UNSPECIFIED",
        "WALLET_OPERATOR_TYPE_SYSTEM",
        "WALLET_OPERATOR_TYPE_MEMBER",
        "WALLET_OPERATOR_TYPE_OPS"
      ],
      "title": "流水的操作人类型，按操作人 ID 的前缀判断（AC 的身份主体：运维 op_、组织 as_），服务发起的流水没有操作人\n[EN] Who booked a transaction, told by the operator ID prefix (AC principals: op_ for ops, as_ for org members);\nservice-initiated entries have no operator",
      "type": "string"
    },
    "walletWalletTransferTarget": {
      "properties": {
        "account": {
          "$ref": "#/definitions/walletWalletAccount",
          "title": "当前钱包（含识别码与余额；还没有钱包时全零、识别码为空）| [EN] The wallet now, with reference and balances; all zero with no reference before the first one"
        },
        "org_id": {
          "title": "组织ID | [EN] Organization ID",
          "type": "string"
        },
        "org_name": {
          "title": "组织名称 | [EN] Organization name",
          "type": "string"
        },
        "reference_matched": {
          "title": "是否按转账识别码完全匹配 | [EN] Whether the transfer reference matched exactly",
          "type": "boolean"
        },
        "workspace_id": {
          "title": "工作区ID | [EN] Workspace ID",
          "type": "string"
        },
        "workspace_name": {
          "title": "工作区名称 | [EN] Workspace name",
          "type": "string"
        }
      },
      "title": "对公转账入账的候选工作区\n[EN] A workspace candidate for a bank transfer credit",
      "type": "object"
    },
    "walletWalletTransferTargetListResponse": {
      "properties": {
        "list": {
          "items": {
            "$ref": "#/definitions/walletWalletTransferTarget",
            "type": "object"
          },
          "title": "候选工作区 | [EN] Candidates",
          "type": "array"
        },
        "total": {
          "format": "int64",
          "title": "匹配到的个数（截断前）| [EN] Matches found before truncation",
          "type": "string"
        }
      },
      "title": "找入账工作区响应：识别码完全匹配的排最前，最多 20 个\n[EN] Bank transfer targets, an exact reference match first, at most 20",
      "type": "object"
    },
    "walletWalletTxn": {
      "description": "支付方式与全平台流水条目同一种说法：钱包全额支付与超额扣费是 payment_method 未指定、wallet_paid 为 true；\n组合支付是第三方方式加 wallet_paid 为 true；第三方直接支付是第三方方式加 false；入账是请求里的方式，赠送与运营扣回两者都没有\n8 曾是字符串 pay_method，换成枚举不能沿用同一个编号（线上类型不同），保留不再用\n[EN] Payment is expressed as on the ops ledger entry: a wallet-only payment or overage has an unspecified\npayment_method and wallet_paid true; a mixed payment the third-party method and true; an off-wallet payment the\nmethod and false; a credit the request's method; gifts and deductions neither. Field 8 was the string pay_method; an\nenum cannot reuse that number since the wire type differs, so it stays reserved",
      "properties": {
        "amount_micro": {
          "format": "int64",
          "title": "金额 | [EN] Amount",
          "type": "string"
        },
        "balance_after_micro": {
          "format": "int64",
          "title": "事后充值余额（第三方全额支付时为空）| [EN] Balance after; absent when paid entirely off-wallet",
          "type": "string"
        },
        "biz_id": {
          "title": "业务ID | [EN] Business ID",
          "type": "string"
        },
        "biz_type": {
          "$ref": "#/definitions/enumsWalletBizType",
          "title": "业务类型 | [EN] Business type"
        },
        "direction": {
          "$ref": "#/definitions/walletWalletDirection",
          "title": "方向 | [EN] Direction"
        },
        "external_micro": {
          "format": "int64",
          "title": "其中第三方支付的部分（组合支付与第三方直接支付才有，余额只减 amount − external）| [EN] The third-party part of a mixed or off-wallet payment; the balance only drops by amount − external",
          "type": "string"
        },
        "gift_after_micro": {
          "format": "int64",
          "title": "事后赠金余额 | [EN] Gift balance after",
          "type": "string"
        },
        "has_balance_after": {
          "title": "事后余额是否有值 | [EN] Whether the balance after is present",
          "type": "boolean"
        },
        "id": {
          "title": "流水ID | [EN] Transaction ID",
          "type": "string"
        },
        "occurred_at": {
          "format": "date-time",
          "title": "发生时间 | [EN] Occurred at",
          "type": "string"
        },
        "payment_method": {
          "$ref": "#/definitions/configPaymentMethod",
          "title": "第三方方式或对公转账（组合支付为第三方那一方）| [EN] Third-party method or bank transfer; the third party's for a mixed payment"
        },
        "summary": {
          "title": "摘要 | [EN] Summary",
          "type": "string"
        },
        "txn_type": {
          "$ref": "#/definitions/walletWalletTxnType",
          "title": "类型 | [EN] Type"
        },
        "wallet_paid": {
          "title": "是否用钱包余额支付（钱包支付、超额扣费、组合支付的钱包抵扣）| [EN] Paid from the wallet balance: wallet payments, overage, a mixed payment's wallet part",
          "type": "boolean"
        }
      },
      "title": "钱包流水\n[EN] Wallet transaction",
      "type": "object"
    },
    "walletWalletTxnListResponse": {
      "properties": {
        "next_cursor": {
          "title": "下一页游标，为空表示已经到底 | [EN] Cursor for the next page; empty when there are no more",
          "type": "string"
        },
        "txns": {
          "items": {
            "$ref": "#/definitions/walletWalletTxn",
            "type": "object"
          },
          "title": "流水（最近的在前）| [EN] Transactions, newest first",
          "type": "array"
        }
      },
      "title": "流水查询响应\n[EN] List transactions response",
      "type": "object"
    },
    "walletWalletTxnType": {
      "default": "WALLET_TXN_TYPE_UNSPECIFIED",
      "description": "钱包流水类型\n[EN] Wallet transaction type\n直接用界面的筛选值，不另设内部枚举再映射：多一层映射就多一处会写反的地方，\n而写反的后果是客户在「充值」筛选里看到一笔扣款。\n[EN] The UI's filter values are used directly rather than an internal set plus a mapping,\nwhich would be one more place to get backwards — and backwards here means a charge showing\nup under the customer's \"top-ups\" filter.\n\n - WALLET_TXN_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_TXN_TYPE_RECHARGE: 充值 | [EN] Top-up\n - WALLET_TXN_TYPE_SUBSCRIPTION: 订阅费 | [EN] Subscription\n - WALLET_TXN_TYPE_RESOURCE: 资源加购 | [EN] Resource purchase\n - WALLET_TXN_TYPE_TRANSLATION: 翻译超额扣费 | [EN] Translation overage\n - WALLET_TXN_TYPE_AI: AI 超额扣费 | [EN] AI overage\n - WALLET_TXN_TYPE_REFUND: 退款 | [EN] Refund\n - WALLET_TXN_TYPE_GIFT: 赠金 | [EN] Gift\n - WALLET_TXN_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction",
      "enum": [
        "WALLET_TXN_TYPE_UNSPECIFIED",
        "WALLET_TXN_TYPE_RECHARGE",
        "WALLET_TXN_TYPE_SUBSCRIPTION",
        "WALLET_TXN_TYPE_RESOURCE",
        "WALLET_TXN_TYPE_TRANSLATION",
        "WALLET_TXN_TYPE_AI",
        "WALLET_TXN_TYPE_REFUND",
        "WALLET_TXN_TYPE_GIFT",
        "WALLET_TXN_TYPE_DEDUCTION"
      ],
      "type": "string"
    }
  },
  "info": {
    "description": "钱包：运维后台的工作区钱包与组织控制台的钱包；锁定、结算等资金接口只走 gRPC | Wallet: ops workspace wallets and the org console wallet; funds movements are gRPC only",
    "title": "Linmi Wallet",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/wallet/accounts/{workspace_id}": {
      "get": {
        "operationId": "WalletService_WalletGet",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "description": "带上合计（运维工作区抽屉用，多两条只扫索引的 SUM；计费读余额不传）| [EN] Also return totals, for the ops workspace drawer at two index-only SUMs; billing's balance reads leave it off",
            "in": "query",
            "name": "with_totals",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "读取钱包 | Get wallet",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/accounts/{workspace_id}/credits": {
      "post": {
        "operationId": "WalletService_WalletCredit",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/WalletServiceWalletCreditBody"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletCreditResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "钱包入账 | Credit the wallet",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/accounts/{workspace_id}/txns": {
      "get": {
        "operationId": "WalletService_WalletTxnList",
        "parameters": [
          {
            "description": "工作区ID | [EN] Workspace ID",
            "in": "path",
            "name": "workspace_id",
            "required": true,
            "type": "string"
          },
          {
            "default": "WALLET_TXN_TYPE_UNSPECIFIED",
            "description": "按类型过滤（不传则全部）| [EN] Filter by type; all when unset\n\n - WALLET_TXN_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_TXN_TYPE_RECHARGE: 充值 | [EN] Top-up\n - WALLET_TXN_TYPE_SUBSCRIPTION: 订阅费 | [EN] Subscription\n - WALLET_TXN_TYPE_RESOURCE: 资源加购 | [EN] Resource purchase\n - WALLET_TXN_TYPE_TRANSLATION: 翻译超额扣费 | [EN] Translation overage\n - WALLET_TXN_TYPE_AI: AI 超额扣费 | [EN] AI overage\n - WALLET_TXN_TYPE_REFUND: 退款 | [EN] Refund\n - WALLET_TXN_TYPE_GIFT: 赠金 | [EN] Gift\n - WALLET_TXN_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction",
            "enum": [
              "WALLET_TXN_TYPE_UNSPECIFIED",
              "WALLET_TXN_TYPE_RECHARGE",
              "WALLET_TXN_TYPE_SUBSCRIPTION",
              "WALLET_TXN_TYPE_RESOURCE",
              "WALLET_TXN_TYPE_TRANSLATION",
              "WALLET_TXN_TYPE_AI",
              "WALLET_TXN_TYPE_REFUND",
              "WALLET_TXN_TYPE_GIFT",
              "WALLET_TXN_TYPE_DEDUCTION"
            ],
            "in": "query",
            "name": "txn_type",
            "required": false,
            "type": "string"
          },
          {
            "description": "每页条数（不传取 50）| [EN] Page size, 50 when unset",
            "format": "int32",
            "in": "query",
            "maximum": 200,
            "minimum": 0,
            "name": "limit",
            "required": false,
            "type": "integer"
          },
          {
            "description": "翻页游标：上一页响应的 next_cursor，首页不传 | [EN] Page cursor: the previous response's next_cursor; omit for the first page",
            "in": "query",
            "maxLength": 128,
            "name": "cursor",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletTxnListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "钱包流水 | List transactions",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/ops/bank-transfers": {
      "post": {
        "operationId": "WalletService_WalletBankTransferCredit",
        "parameters": [
          {
            "description": "一笔银行流水只能入账一次：银行流水号全局唯一（不分大小写），重复时拒绝并给出已入账的工作区\n记一笔「充值」流水，支付方式对公转账，摘要是银行流水号，操作人取令牌\n\n[EN] One bank trade credits once: the trade number is globally unique, case-insensitively, and a repeat is refused\nnaming the workspace it went to. Books a top-up paid by bank transfer whose summary is the trade number, with the\noperator taken from the token.",
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/walletWalletBankTransferCreditRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletBankTransferCreditResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "对公转账入账 | Credit a bank transfer",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/ops/bank-transfers/targets": {
      "get": {
        "operationId": "WalletService_WalletTransferTargetList",
        "parameters": [
          {
            "description": "转账识别码（LM 开头），或组织 / 工作区的名称、ID | [EN] Transfer reference (LM…), or an organization or workspace name or ID",
            "in": "query",
            "maxLength": 128,
            "name": "keyword",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletTransferTargetListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "找入账工作区 | Find bank transfer targets",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/ops/ledger": {
      "get": {
        "operationId": "WalletService_WalletLedgerList",
        "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": false,
            "type": "integer"
          },
          {
            "description": "时间起（含）| [EN] From, inclusive",
            "format": "date-time",
            "in": "query",
            "name": "from",
            "required": false,
            "type": "string"
          },
          {
            "description": "时间止（不含）| [EN] To, exclusive",
            "format": "date-time",
            "in": "query",
            "name": "to",
            "required": false,
            "type": "string"
          },
          {
            "description": "关键词 | [EN] Keyword",
            "in": "query",
            "maxLength": 128,
            "name": "keyword",
            "required": false,
            "type": "string"
          },
          {
            "default": "WALLET_TXN_TYPE_UNSPECIFIED",
            "description": "按类型过滤（不传则全部）| [EN] Filter by type; all when unset\n\n - WALLET_TXN_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_TXN_TYPE_RECHARGE: 充值 | [EN] Top-up\n - WALLET_TXN_TYPE_SUBSCRIPTION: 订阅费 | [EN] Subscription\n - WALLET_TXN_TYPE_RESOURCE: 资源加购 | [EN] Resource purchase\n - WALLET_TXN_TYPE_TRANSLATION: 翻译超额扣费 | [EN] Translation overage\n - WALLET_TXN_TYPE_AI: AI 超额扣费 | [EN] AI overage\n - WALLET_TXN_TYPE_REFUND: 退款 | [EN] Refund\n - WALLET_TXN_TYPE_GIFT: 赠金 | [EN] Gift\n - WALLET_TXN_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction",
            "enum": [
              "WALLET_TXN_TYPE_UNSPECIFIED",
              "WALLET_TXN_TYPE_RECHARGE",
              "WALLET_TXN_TYPE_SUBSCRIPTION",
              "WALLET_TXN_TYPE_RESOURCE",
              "WALLET_TXN_TYPE_TRANSLATION",
              "WALLET_TXN_TYPE_AI",
              "WALLET_TXN_TYPE_REFUND",
              "WALLET_TXN_TYPE_GIFT",
              "WALLET_TXN_TYPE_DEDUCTION"
            ],
            "in": "query",
            "name": "txn_type",
            "required": false,
            "type": "string"
          },
          {
            "default": "PAYMENT_METHOD_UNSPECIFIED",
            "description": "按第三方方式或对公转账过滤（不传则全部）| [EN] Filter by third-party method or bank transfer; all when unset\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": "payment_method",
            "required": false,
            "type": "string"
          },
          {
            "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"
          },
          {
            "description": "只看用钱包余额支付的（含组合支付）| [EN] Only entries paid from the wallet balance, mixed payments included",
            "in": "query",
            "name": "wallet_paid",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletLedgerListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "全平台钱包流水 | Wallet ledger",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/ops/ledger/summary": {
      "get": {
        "operationId": "WalletService_WalletLedgerSummary",
        "parameters": [
          {
            "description": "时间起（含）| [EN] From, inclusive",
            "format": "date-time",
            "in": "query",
            "name": "from",
            "required": false,
            "type": "string"
          },
          {
            "description": "时间止（不含）| [EN] To, exclusive",
            "format": "date-time",
            "in": "query",
            "name": "to",
            "required": false,
            "type": "string"
          },
          {
            "description": "关键词 | [EN] Keyword",
            "in": "query",
            "maxLength": 128,
            "name": "keyword",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletWalletLedgerSummaryResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "钱包流水汇总 | Wallet ledger summary",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/org/account": {
      "get": {
        "operationId": "WalletService_OrgWalletGet",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletOrgWalletGetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "读取钱包 | Get wallet",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/org/account/alert": {
      "put": {
        "operationId": "WalletService_OrgWalletAlertSet",
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/walletOrgWalletAlertSetRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletOrgWalletAlertSetResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "低余额提醒 | Low-balance alert",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/org/ledger": {
      "get": {
        "operationId": "WalletService_OrgWalletLedgerList",
        "parameters": [
          {
            "description": "时间起（含）| [EN] From, inclusive",
            "format": "date-time",
            "in": "query",
            "name": "from",
            "required": false,
            "type": "string"
          },
          {
            "description": "时间止（不含）| [EN] To, exclusive",
            "format": "date-time",
            "in": "query",
            "name": "to",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "按工作区过滤（任一，须属于本组织） | [EN] Filter by workspace, any of them; each must belong to this org",
            "in": "query",
            "items": {
              "type": "string"
            },
            "maxItems": 100,
            "name": "workspace_ids",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "按类型过滤（任一） | [EN] Filter by type, any of them\n\n - WALLET_TXN_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_TXN_TYPE_RECHARGE: 充值 | [EN] Top-up\n - WALLET_TXN_TYPE_SUBSCRIPTION: 订阅费 | [EN] Subscription\n - WALLET_TXN_TYPE_RESOURCE: 资源加购 | [EN] Resource purchase\n - WALLET_TXN_TYPE_TRANSLATION: 翻译超额扣费 | [EN] Translation overage\n - WALLET_TXN_TYPE_AI: AI 超额扣费 | [EN] AI overage\n - WALLET_TXN_TYPE_REFUND: 退款 | [EN] Refund\n - WALLET_TXN_TYPE_GIFT: 赠金 | [EN] Gift\n - WALLET_TXN_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction",
            "in": "query",
            "items": {
              "enum": [
                "WALLET_TXN_TYPE_UNSPECIFIED",
                "WALLET_TXN_TYPE_RECHARGE",
                "WALLET_TXN_TYPE_SUBSCRIPTION",
                "WALLET_TXN_TYPE_RESOURCE",
                "WALLET_TXN_TYPE_TRANSLATION",
                "WALLET_TXN_TYPE_AI",
                "WALLET_TXN_TYPE_REFUND",
                "WALLET_TXN_TYPE_GIFT",
                "WALLET_TXN_TYPE_DEDUCTION"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "name": "txn_types",
            "required": false,
            "type": "array"
          },
          {
            "collectionFormat": "multi",
            "description": "按第三方方式或对公转账过滤（任一；与 wallet_paid 命中任一即可）| [EN] Filter by third-party method or bank transfer, any of them; this or wallet_paid matching is enough\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",
            "in": "query",
            "items": {
              "enum": [
                "PAYMENT_METHOD_UNSPECIFIED",
                "PAYMENT_METHOD_CARD",
                "PAYMENT_METHOD_WECHAT",
                "PAYMENT_METHOD_ALIPAY",
                "PAYMENT_METHOD_PAYPAL",
                "PAYMENT_METHOD_CRYPTO",
                "PAYMENT_METHOD_TRANSFER"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "name": "pay_methods",
            "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"
          },
          {
            "description": "全部时间：不限开始，忽略 from | [EN] All time: no start, from ignored",
            "in": "query",
            "name": "all_time",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "用钱包余额支付的（含有钱包抵扣的组合支付）| [EN] Paid from the wallet balance, mixed payments with a wallet part included",
            "in": "query",
            "name": "wallet_paid",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletOrgWalletLedgerListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "组织账本 | Org ledger",
        "tags": [
          "WalletService"
        ]
      }
    },
    "/v1/wallet/org/txns": {
      "get": {
        "operationId": "WalletService_OrgWalletTxnList",
        "parameters": [
          {
            "description": "时间起（含）| [EN] From, inclusive",
            "format": "date-time",
            "in": "query",
            "name": "from",
            "required": false,
            "type": "string"
          },
          {
            "description": "时间止（不含）| [EN] To, exclusive",
            "format": "date-time",
            "in": "query",
            "name": "to",
            "required": false,
            "type": "string"
          },
          {
            "description": "关键字（摘要、业务ID） | [EN] Keyword over summary and business ID",
            "in": "query",
            "maxLength": 64,
            "name": "keyword",
            "required": false,
            "type": "string"
          },
          {
            "collectionFormat": "multi",
            "description": "按类型过滤 | [EN] Filter by type\n\n - WALLET_TXN_TYPE_UNSPECIFIED: 未指定 | [EN] Unspecified\n - WALLET_TXN_TYPE_RECHARGE: 充值 | [EN] Top-up\n - WALLET_TXN_TYPE_SUBSCRIPTION: 订阅费 | [EN] Subscription\n - WALLET_TXN_TYPE_RESOURCE: 资源加购 | [EN] Resource purchase\n - WALLET_TXN_TYPE_TRANSLATION: 翻译超额扣费 | [EN] Translation overage\n - WALLET_TXN_TYPE_AI: AI 超额扣费 | [EN] AI overage\n - WALLET_TXN_TYPE_REFUND: 退款 | [EN] Refund\n - WALLET_TXN_TYPE_GIFT: 赠金 | [EN] Gift\n - WALLET_TXN_TYPE_DEDUCTION: 运营扣回 | [EN] Operator deduction",
            "in": "query",
            "items": {
              "enum": [
                "WALLET_TXN_TYPE_UNSPECIFIED",
                "WALLET_TXN_TYPE_RECHARGE",
                "WALLET_TXN_TYPE_SUBSCRIPTION",
                "WALLET_TXN_TYPE_RESOURCE",
                "WALLET_TXN_TYPE_TRANSLATION",
                "WALLET_TXN_TYPE_AI",
                "WALLET_TXN_TYPE_REFUND",
                "WALLET_TXN_TYPE_GIFT",
                "WALLET_TXN_TYPE_DEDUCTION"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "name": "txn_types",
            "required": false,
            "type": "array"
          },
          {
            "default": "PAYMENT_METHOD_UNSPECIFIED",
            "description": "按第三方方式或对公转账过滤（与 wallet_paid 命中任一即可）| [EN] Filter by third-party method or bank transfer; either this or wallet_paid matching is enough\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": "pay_method",
            "required": false,
            "type": "string"
          },
          {
            "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"
          },
          {
            "description": "全部时间：不限开始，忽略 from | [EN] All time: no start, from ignored",
            "in": "query",
            "name": "all_time",
            "required": false,
            "type": "boolean"
          },
          {
            "description": "用钱包余额支付的（含有钱包抵扣的组合支付）| [EN] Paid from the wallet balance, mixed payments with a wallet part included",
            "in": "query",
            "name": "wallet_paid",
            "required": false,
            "type": "boolean"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/walletOrgWalletTxnListResponse"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/rpcStatus"
            }
          }
        },
        "summary": "钱包流水 | Wallet transactions",
        "tags": [
          "WalletService"
        ]
      }
    }
  },
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "tags": [
    {
      "description": "钱包：组织控制台的钱包与运维后台的工作区钱包；锁定、结算等资金接口只走 gRPC | Wallet",
      "name": "WalletService"
    }
  ]
}