esim-cli 2026.1202.210 → 2026.1202.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esim.js +12 -12
- package/dist/index.js +12 -12
- package/package.json +1 -1
package/dist/esim.js
CHANGED
|
@@ -7891,7 +7891,7 @@ P = 基础 × (1 + B) × G × H × C
|
|
|
7891
7891
|
- \`esim gear merge <a> <b> <c> --dry-run\` 预览三件材料的合成费用与可能部位。\`esim gear split <装备> --dry-run\` 可预览拆分。
|
|
7892
7892
|
`,
|
|
7893
7893
|
"wiki/feedback.md": "# 问题反馈\n\n本页介绍怎样向游戏运营报告程序错误或算错的数值,以及被接受后得到的测试员勋章。\n\n- 怀疑出了 bug 或数值不对时,先查本目录 `/skills/esim/wiki/` 下对应的规则说明。只有确认和说明不一致,才提交反馈。\n- 种类:`bug` 是程序错误(报错、页面坏了、命令失败、显示不对);`numbers` 是数值或规则算错(伤害、价格、税、产出、奖励等和规则说明不一致);`other` 是其他意见。\n- 标题 1–100 个字符,正文 1–4000 个字符的纯文本,相关信息(`--context`)最多 1000 个字符。正文写清三件事:做了什么(命令或页面)、期望的结果、实际的结果。相关的战斗、公司、拍卖等 ID 放进 `--context`。\n- 每个公民每个游戏日最多提交 5 条,超出后要等下一个游戏日。同一标题和正文再次提交时返回原来那条,不会新建。\n- 运营处理后,反馈变为 `accepted`(确认是问题)、`rejected`(不是问题,例如和原版规则一致)或 `duplicate`(与另一条重复,给出那条的反馈号),并附回复;你会收到一条通知。关闭后不再改变。\n- 每条被接受的反馈奖励一枚测试员勋章(Tester Medal)和 5 Gold,按勋章通用规则发放。拥有测试员勋章解锁成就 Tester,收集 7 枚解锁成就 Bug trainer。被驳回或判为重复的不发勋章。\n- 反馈只有你自己能看到,不公开;公民档案照常显示测试员勋章数量。\n\n## CLI\n\n- `esim feedback` 列出你的反馈(新的在前),`--status open|accepted|rejected|duplicate` 按状态筛选。\n- `esim feedback submit --kind bug|numbers|other --title <标题> --body @report.txt [--context <相关 ID>]` 提交;`--body -` 从标准输入读正文。\n- `esim feedback show <反馈号>` 查看全文、状态和运营的回复。\n",
|
|
7894
|
-
"wiki/groups.md": "# 组织与好友\n\n本页介绍军团、政党和好友关系。按步骤走一遍见教程[加入组织](../tutorials/organizations.md)。\n\n- 未入团的公民可申请本国军团,由团长审批。团长可批准或拒绝申请,批准也受军团容量限制。成员可退出军团。团长可向合资格成员移交领导权,并可指定成员管理军团公司。\n-
|
|
7894
|
+
"wiki/groups.md": "# 组织与好友\n\n本页介绍军团、政党和好友关系。按步骤走一遍见教程[加入组织](../tutorials/organizations.md)。\n\n- 未入团的公民可申请本国军团,由团长审批。团长可批准或拒绝申请,批准也受军团容量限制。成员可退出军团。团长可向合资格成员移交领导权,并可指定成员管理军团公司。\n- 军团成员可捐献军团仓库支持的所有原料和产品。团长可组合任意仓库物资设置每日配给及工作条件,也可把团库物资分发给成员。有指定工作条件时,成员须完成当日指定公司的工作才能领取日包。同一公民一个游戏日最多领一次,转团也沿用当天的领取记录。\n- 军团战令指定战役和阵营。团长设置或清除战令,成员可查看。在指定战役为指定阵营造成伤害时,军团级别影响战令的伤害加成。\n- 新加入政党的公民是学徒。党内有学徒、正式成员、委员会成员和主席。主席及委员会成员按各自权限晋升或移除成员。正式成员和委员会成员可在符合等级及党籍条件时参加本党的主席选举。\n- 向其他公民发送好友申请,对方可以接受或拒绝。接受后双方互为好友,任一方都可删除关系。删除或拒绝后可以重新申请。\n\n用 `esim --help` 查找军团、补给、战令、党务和好友命令。\n\n## 军团 CLI\n\n- `esim unit` 查看身份、待审申请、军团资金、日配给和战令。用 `esim unit list --country <国家>` 浏览目录,`esim unit show <军团>` 查看招募信息,`esim unit apply <军团> --message <留言>` 提交申请。同国且无军团的公民可申请。查看名单用 `esim unit members`,退团用 `esim unit leave`,团长须先用 `esim unit leader <公民>` 交接。\n- `esim unit create <名字> --dry-run` 查看建团资格和 50 金的费用。团长用 `esim unit upgrade --dry-run` 查看升一级的费用,用 `esim unit expand --dry-run` 查看加一个成员名额的费用;预览与实际执行给出同样的变化(等级、名额、战令伤害加成、金币之前→之后),钱不够时给出需要、持有和缺口。用 `esim unit profile --body @file` 修改简介,用 `esim unit recruit <招募信息>` 更新招募信息。用 `esim unit applications` 查申请,`esim unit accept <公民>` 或 `esim unit reject <公民>` 审批,结果给出申请人、审批后的成员数与容量和剩余待审数;军团已满时给出成员数、容量和扩容费用。\n- 团长用 `esim unit order <战斗> --side defend` 设置战令,省略阵营默认为防守。结果给出战役、地区、攻守双方、所选阵营、本轮截止时间和成员的战令伤害加成。用 `esim unit order clear` 清除。成员用 `esim unit company add <公司>` 转入自己的公司,团长用 `esim unit company manager <公民> on|off` 任免公司经理。\n- `esim unit funds` 查看资金与捐款。团员用 `esim unit donate <金额> <货币代码>` 捐款,有分发权限时可用 `esim unit pay <公民>[,<公民>…] <金额> <货币代码>` 按每人金额分发。结果给出该币种军团余额和个人余额的之前→之后;余额不足时给出需要、持有和缺口。\n- `esim unit supply` 查看配给和领取状态,`esim unit supply claim` 领取当日配给,`esim unit supply donate <数量> <产品>` 捐赠。团长用 `esim unit supply policy <产品>=<数量>…` 设定配给,例如 `esim unit supply policy rifle=5 ticket_economy=1`。用 `esim unit supply give <公民>[,<公民>…] <数量> <产品>` 指定发放。发放和捐赠给出团库存或个人库存的之前→之后;库存不足时给出需要、持有和缺口。不能领取时给出当日配给和指定工作的公司。同一次资金或定向补给转账可以用原 `--request-id` 重放。\n\n- `esim friend` 查看好友和双向待审申请。用 `friend add` 发送申请,用 `friend accept` 或 `friend decline` 处理收到的申请,用 `friend remove` 删除已接受的好友关系。\n- `esim invite` 给出你的邀请链接、邀请人数、到 10 级的人数、因此获得的金币和护甲奖励,以及受邀者列表(`--sort registered|name|xp|gold|country`)。\n",
|
|
7895
7895
|
"wiki/items.md": `# 药剂、特殊物品与库存
|
|
7896
7896
|
|
|
7897
7897
|
药剂在一段时间内改变出击的命中档位。特殊物品能恢复每日使用次数,或让战斗增益持续一天,再进入减益期。持久穿戴的物品见[装备系统](equipment.md)。
|
|
@@ -14970,10 +14970,10 @@ var catalog = [
|
|
|
14970
14970
|
{ operationId: "DistributeUnitSupplies", name: "distribute-unit-supplies", method: "POST", path: "/api/units/{id}/supply/distributions", spec: "battle.yaml", write: true, retry: "key", description: "Distribute a stock item to current members as the unit leader. The actor’s request key replays the original private receipt.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["requestKey", "item", "quality", "quantity", "recipientIds"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1, description: "Quantity per recipient." }, recipientIds: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, note: { type: "string", maxLength: 100 } } } }, requestKey: "requestKey", requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "request", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, request: { type: "object", additionalProperties: false, required: ["requestKey", "item", "quality", "quantity", "recipientIds"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1, description: "Quantity per recipient." }, recipientIds: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, note: { type: "string", maxLength: 100 } } }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "request", "transferredAt"] },
|
|
14971
14971
|
{ operationId: "GetMyUnitFunds", name: "get-my-unit-funds", method: "GET", path: "/api/units/{id}/funds", spec: "battle.yaml", write: false, retry: "unsafe", description: "Read unit balances and the caller’s donation balances. Only the current leader receives the recipient list.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["balances", "personalBalances", "canDistribute", "members"], properties: { balances: { type: "array", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", pattern: "^[1-9][0-9]{0,18}$", description: "Positive balance in minor units, encoded as decimal." } } } }, personalBalances: { type: "array", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", pattern: "^[1-9][0-9]{0,18}$", description: "Positive balance in minor units, encoded as decimal." } } } }, canDistribute: { type: "boolean" }, members: { type: "array", items: { type: "object", required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, avatarVersion: { type: "string" } } }, description: "Empty for callers other than the current leader." } } } } }, responseFields: ["balances", "personalBalances", "canDistribute", "members"] },
|
|
14972
14972
|
{ operationId: "TransferUnitFunds", name: "transfer-unit-funds", method: "POST", path: "/api/units/{id}/funds", spec: "battle.yaml", write: true, retry: "key", description: "Donate as a member or distribute as the current leader. Request keys replay the original private receipt for the same actor and operation.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["requestKey", "operation", "asset", "amount"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, operation: { type: "string", enum: ["donate", "distribute"] }, asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", description: "Positive minor-unit amount per recipient, encoded as decimal. Leading zeros and surrounding whitespace are accepted." }, note: { type: "string", maxLength: 100 }, recipientIds: { type: "array", uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, description: "Omit for donations. At least one current member for distributions." } } } }, requestKey: "requestKey", requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "request", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, request: { type: "object", additionalProperties: false, required: ["requestKey", "operation", "asset", "amount"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, operation: { type: "string", enum: ["donate", "distribute"] }, asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", description: "Positive minor-unit amount per recipient, encoded as decimal. Leading zeros and surrounding whitespace are accepted." }, note: { type: "string", maxLength: 100 }, recipientIds: { type: "array", uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, description: "Omit for donations. At least one current member for distributions." } } }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "request", "transferredAt"] },
|
|
14973
|
-
{ operationId: "GetMyUnitSupplies", name: "get-my-unit-supplies", method: "GET", path: "/api/units/{id}/supplies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read the current policy and the caller's ability to claim. A unit member may read their own state. Only the founder receives stock quantities.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems:
|
|
14974
|
-
{ operationId: "SetUnitSupplyPolicy", name: "set-unit-supply-policy", method: "PUT", path: "/api/units/{id}/supplies/policy", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Replace the supply policy as unit founder. To disable claims, provide an empty items array. A selected company must belong to the founder.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems:
|
|
14975
|
-
{ operationId: "DonateUnitSupplies", name: "donate-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/deposits", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Transfer whole items from the member's inventory to the unit. The result lists items moved. Conflicts use insufficient_stock or conflict.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 12 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems:
|
|
14976
|
-
{ operationId: "ClaimUnitSupplies", name: "claim-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/claims", spec: "battle.yaml", write: true, retry: "natural", description: "Citizen session required. Claim the whole supply pack once per Shanghai game day. Changing units does not reset the claim. Conflicts use conflict for eligibility or a previous claim, and insufficient_stock when the pack cannot be issued.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems:
|
|
14973
|
+
{ operationId: "GetMyUnitSupplies", name: "get-my-unit-supplies", method: "GET", path: "/api/units/{id}/supplies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read the current policy and the caller's ability to claim. A unit member may read their own state. Only the founder receives stock quantities.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } }, eligible: { type: "boolean" }, claimed: { type: "boolean" }, claimedAt: { type: "string", format: "date-time" }, stock: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21, description: "Only present in the unit founder's response." } } } } }, responseFields: ["unitId", "policy", "eligible", "claimed", "claimedAt", "stock"] },
|
|
14974
|
+
{ operationId: "SetUnitSupplyPolicy", name: "set-unit-supply-policy", method: "PUT", path: "/api/units/{id}/supplies/policy", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Replace the supply policy as unit founder. To disable claims, provide an empty items array. A selected company must belong to the founder.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } }, eligible: { type: "boolean" }, claimed: { type: "boolean" }, claimedAt: { type: "string", format: "date-time" }, stock: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21, description: "Only present in the unit founder's response." } } } } }, responseFields: ["unitId", "policy", "eligible", "claimed", "claimedAt", "stock"] },
|
|
14975
|
+
{ operationId: "DonateUnitSupplies", name: "donate-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/deposits", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Transfer whole items from the member's inventory to the unit. The result lists items moved. Conflicts use insufficient_stock or conflict.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 12 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 21 }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "items", "transferredAt"] },
|
|
14976
|
+
{ operationId: "ClaimUnitSupplies", name: "claim-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/claims", spec: "battle.yaml", write: true, retry: "natural", description: "Citizen session required. Claim the whole supply pack once per Shanghai game day. Changing units does not reset the claim. Conflicts use conflict for eligibility or a previous claim, and insufficient_stock when the pack cannot be issued.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 21 }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "items", "transferredAt"] },
|
|
14977
14977
|
{ operationId: "ListCompanies", name: "list-companies", method: "GET", path: "/api/companies", spec: "business.yaml", write: false, retry: "unsafe", description: "Public. Filter companies by land, owner, unit, and item before pagination. Sort by company ID ascending by default, or by employee count descending and company ID ascending with sort=employees. Use a cursor issued for the selected sort.", parameters: [{ name: "cursor", in: "query", description: "Opaque cursor from the previous page. Reuse the same filters.", schema: { type: "string" } }, { name: "limit", in: "query", description: "Maximum number of results.", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "land", in: "query", description: "Filter by company region ID.", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "owner", in: "query", description: "Filter by public owner ID.", schema: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, { name: "item", in: "query", schema: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } }, { name: "unitId", in: "query", schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "sort", in: "query", schema: { type: "string", enum: ["employees"] } }, { name: "q", in: "query", description: "Case-insensitive substring of the company name, matched like citizen search.", schema: { type: "string", minLength: 1, maxLength: 100 } }, { name: "order", in: "query", description: "Direction of the selected sort (default: ID asc, employees desc). The other direction is the exact reverse of the default order; reuse a cursor only with the same sort and order.", schema: { type: "string", enum: ["asc", "desc"], description: "Direction of a list sort." } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "nextCursor"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["items", "nextCursor"] },
|
|
14978
14978
|
{ operationId: "CreateCompany", name: "create-company", method: "POST", path: "/api/companies", spec: "business.yaml", write: true, retry: "unsafe", description: "Citizen session required. Found a company at the citizen's current region for 20 gold (2000 in minor units).", parameters: [{ name: "Origin", in: "header", required: true, description: "The same origin as the site hosting the API.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["name", "item"], properties: { name: { type: "string", minLength: 3, maxLength: 32 }, item: { description: "Raw factories can only be founded in a high-resource region for their product.", type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["level", "productionBonusPercent", "management", "conversion", "id", "quality", "name", "avatarVersion", "weaponDamageBonusPercent", "stockCompanyId", "unitId", "unitName", "donationTarget", "owner", "ownerSummary", "workers", "land", "item", "workerCount"] },
|
|
14979
14979
|
{ operationId: "GetCompany", name: "get-company", method: "GET", path: "/api/companies/{id}", spec: "business.yaml", write: false, retry: "unsafe", description: "Public. Read a public company profile.", parameters: [{ name: "id", in: "path", required: true, description: "Resource ID.", schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["level", "productionBonusPercent", "management", "conversion", "id", "quality", "name", "avatarVersion", "weaponDamageBonusPercent", "stockCompanyId", "unitId", "unitName", "donationTarget", "owner", "ownerSummary", "workers", "land", "item", "workerCount"] },
|
|
@@ -16882,6 +16882,7 @@ var namedProducts = [
|
|
|
16882
16882
|
"DEFENSE_SYSTEM",
|
|
16883
16883
|
"HOSPITAL"
|
|
16884
16884
|
];
|
|
16885
|
+
var warehouseProductCodes = [...rawGoods, ...namedProducts];
|
|
16885
16886
|
var potionKinds = ["jinxed", "finesse", "bloody_mess", "lucky"];
|
|
16886
16887
|
var enumValues = operations.get("market-orders")?.parameters.find((parameter) => parameter.name === "item")?.schema.enum;
|
|
16887
16888
|
var items = new Set(Array.isArray(enumValues) ? enumValues.filter((item) => typeof item === "string") : []);
|
|
@@ -19237,8 +19238,7 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
|
|
|
19237
19238
|
var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
|
|
19238
19239
|
var quantityArg = positional("quantity", true, numericId);
|
|
19239
19240
|
var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
|
|
19240
|
-
var
|
|
19241
|
-
var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
|
|
19241
|
+
var dailySupplyChoices = warehouseProductCodes.join(", ").toLowerCase();
|
|
19242
19242
|
var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
|
|
19243
19243
|
var rank = (grade) => ranks[grade ?? 1];
|
|
19244
19244
|
async function membership(ctx) {
|
|
@@ -20330,8 +20330,8 @@ var unit = [
|
|
|
20330
20330
|
unitCommand({
|
|
20331
20331
|
path: ["supply", "policy"],
|
|
20332
20332
|
summary: `Set daily supplies as leader. Allowed products: ${dailySupplyChoices}.`,
|
|
20333
|
-
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length:
|
|
20334
|
-
examples: ["esim unit supply policy
|
|
20333
|
+
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: warehouseProductCodes.length - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
|
|
20334
|
+
examples: ["esim unit supply policy rifle=5 ticket_economy=1"],
|
|
20335
20335
|
operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
|
|
20336
20336
|
confirmWith: confirmSupply,
|
|
20337
20337
|
output: { daily: "Daily allocation now in force", stock: "Unit stock", changed: "Daily supply allocation before → after" },
|
|
@@ -20343,9 +20343,9 @@ var unit = [
|
|
|
20343
20343
|
const product = match?.[1];
|
|
20344
20344
|
if (product === undefined || !quantity.success)
|
|
20345
20345
|
return usage2("Use product=quantity, for example snack=2.");
|
|
20346
|
-
const item =
|
|
20346
|
+
const item = warehouseProductCodes.find((code) => code === product.trim().toUpperCase());
|
|
20347
20347
|
if (!item)
|
|
20348
|
-
return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}
|
|
20348
|
+
return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}.`);
|
|
20349
20349
|
return { item, quality: 0, quantity: quantity.data };
|
|
20350
20350
|
});
|
|
20351
20351
|
if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
|
|
@@ -38080,7 +38080,7 @@ function saveCredentials(store, credentials) {
|
|
|
38080
38080
|
}
|
|
38081
38081
|
|
|
38082
38082
|
// version.ts
|
|
38083
|
-
var version2 = "2026.1202.
|
|
38083
|
+
var version2 = "2026.1202.211";
|
|
38084
38084
|
var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
|
|
38085
38085
|
var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
|
|
38086
38086
|
var releaseUrl = (release) => `https://github.com/CorrectRoadH/open-esim/releases/download/cli-v${release}`;
|
package/dist/index.js
CHANGED
|
@@ -7887,7 +7887,7 @@ P = 基础 × (1 + B) × G × H × C
|
|
|
7887
7887
|
- \`esim gear merge <a> <b> <c> --dry-run\` 预览三件材料的合成费用与可能部位。\`esim gear split <装备> --dry-run\` 可预览拆分。
|
|
7888
7888
|
`,
|
|
7889
7889
|
"wiki/feedback.md": "# 问题反馈\n\n本页介绍怎样向游戏运营报告程序错误或算错的数值,以及被接受后得到的测试员勋章。\n\n- 怀疑出了 bug 或数值不对时,先查本目录 `/skills/esim/wiki/` 下对应的规则说明。只有确认和说明不一致,才提交反馈。\n- 种类:`bug` 是程序错误(报错、页面坏了、命令失败、显示不对);`numbers` 是数值或规则算错(伤害、价格、税、产出、奖励等和规则说明不一致);`other` 是其他意见。\n- 标题 1–100 个字符,正文 1–4000 个字符的纯文本,相关信息(`--context`)最多 1000 个字符。正文写清三件事:做了什么(命令或页面)、期望的结果、实际的结果。相关的战斗、公司、拍卖等 ID 放进 `--context`。\n- 每个公民每个游戏日最多提交 5 条,超出后要等下一个游戏日。同一标题和正文再次提交时返回原来那条,不会新建。\n- 运营处理后,反馈变为 `accepted`(确认是问题)、`rejected`(不是问题,例如和原版规则一致)或 `duplicate`(与另一条重复,给出那条的反馈号),并附回复;你会收到一条通知。关闭后不再改变。\n- 每条被接受的反馈奖励一枚测试员勋章(Tester Medal)和 5 Gold,按勋章通用规则发放。拥有测试员勋章解锁成就 Tester,收集 7 枚解锁成就 Bug trainer。被驳回或判为重复的不发勋章。\n- 反馈只有你自己能看到,不公开;公民档案照常显示测试员勋章数量。\n\n## CLI\n\n- `esim feedback` 列出你的反馈(新的在前),`--status open|accepted|rejected|duplicate` 按状态筛选。\n- `esim feedback submit --kind bug|numbers|other --title <标题> --body @report.txt [--context <相关 ID>]` 提交;`--body -` 从标准输入读正文。\n- `esim feedback show <反馈号>` 查看全文、状态和运营的回复。\n",
|
|
7890
|
-
"wiki/groups.md": "# 组织与好友\n\n本页介绍军团、政党和好友关系。按步骤走一遍见教程[加入组织](../tutorials/organizations.md)。\n\n- 未入团的公民可申请本国军团,由团长审批。团长可批准或拒绝申请,批准也受军团容量限制。成员可退出军团。团长可向合资格成员移交领导权,并可指定成员管理军团公司。\n-
|
|
7890
|
+
"wiki/groups.md": "# 组织与好友\n\n本页介绍军团、政党和好友关系。按步骤走一遍见教程[加入组织](../tutorials/organizations.md)。\n\n- 未入团的公民可申请本国军团,由团长审批。团长可批准或拒绝申请,批准也受军团容量限制。成员可退出军团。团长可向合资格成员移交领导权,并可指定成员管理军团公司。\n- 军团成员可捐献军团仓库支持的所有原料和产品。团长可组合任意仓库物资设置每日配给及工作条件,也可把团库物资分发给成员。有指定工作条件时,成员须完成当日指定公司的工作才能领取日包。同一公民一个游戏日最多领一次,转团也沿用当天的领取记录。\n- 军团战令指定战役和阵营。团长设置或清除战令,成员可查看。在指定战役为指定阵营造成伤害时,军团级别影响战令的伤害加成。\n- 新加入政党的公民是学徒。党内有学徒、正式成员、委员会成员和主席。主席及委员会成员按各自权限晋升或移除成员。正式成员和委员会成员可在符合等级及党籍条件时参加本党的主席选举。\n- 向其他公民发送好友申请,对方可以接受或拒绝。接受后双方互为好友,任一方都可删除关系。删除或拒绝后可以重新申请。\n\n用 `esim --help` 查找军团、补给、战令、党务和好友命令。\n\n## 军团 CLI\n\n- `esim unit` 查看身份、待审申请、军团资金、日配给和战令。用 `esim unit list --country <国家>` 浏览目录,`esim unit show <军团>` 查看招募信息,`esim unit apply <军团> --message <留言>` 提交申请。同国且无军团的公民可申请。查看名单用 `esim unit members`,退团用 `esim unit leave`,团长须先用 `esim unit leader <公民>` 交接。\n- `esim unit create <名字> --dry-run` 查看建团资格和 50 金的费用。团长用 `esim unit upgrade --dry-run` 查看升一级的费用,用 `esim unit expand --dry-run` 查看加一个成员名额的费用;预览与实际执行给出同样的变化(等级、名额、战令伤害加成、金币之前→之后),钱不够时给出需要、持有和缺口。用 `esim unit profile --body @file` 修改简介,用 `esim unit recruit <招募信息>` 更新招募信息。用 `esim unit applications` 查申请,`esim unit accept <公民>` 或 `esim unit reject <公民>` 审批,结果给出申请人、审批后的成员数与容量和剩余待审数;军团已满时给出成员数、容量和扩容费用。\n- 团长用 `esim unit order <战斗> --side defend` 设置战令,省略阵营默认为防守。结果给出战役、地区、攻守双方、所选阵营、本轮截止时间和成员的战令伤害加成。用 `esim unit order clear` 清除。成员用 `esim unit company add <公司>` 转入自己的公司,团长用 `esim unit company manager <公民> on|off` 任免公司经理。\n- `esim unit funds` 查看资金与捐款。团员用 `esim unit donate <金额> <货币代码>` 捐款,有分发权限时可用 `esim unit pay <公民>[,<公民>…] <金额> <货币代码>` 按每人金额分发。结果给出该币种军团余额和个人余额的之前→之后;余额不足时给出需要、持有和缺口。\n- `esim unit supply` 查看配给和领取状态,`esim unit supply claim` 领取当日配给,`esim unit supply donate <数量> <产品>` 捐赠。团长用 `esim unit supply policy <产品>=<数量>…` 设定配给,例如 `esim unit supply policy rifle=5 ticket_economy=1`。用 `esim unit supply give <公民>[,<公民>…] <数量> <产品>` 指定发放。发放和捐赠给出团库存或个人库存的之前→之后;库存不足时给出需要、持有和缺口。不能领取时给出当日配给和指定工作的公司。同一次资金或定向补给转账可以用原 `--request-id` 重放。\n\n- `esim friend` 查看好友和双向待审申请。用 `friend add` 发送申请,用 `friend accept` 或 `friend decline` 处理收到的申请,用 `friend remove` 删除已接受的好友关系。\n- `esim invite` 给出你的邀请链接、邀请人数、到 10 级的人数、因此获得的金币和护甲奖励,以及受邀者列表(`--sort registered|name|xp|gold|country`)。\n",
|
|
7891
7891
|
"wiki/items.md": `# 药剂、特殊物品与库存
|
|
7892
7892
|
|
|
7893
7893
|
药剂在一段时间内改变出击的命中档位。特殊物品能恢复每日使用次数,或让战斗增益持续一天,再进入减益期。持久穿戴的物品见[装备系统](equipment.md)。
|
|
@@ -14966,10 +14966,10 @@ var catalog = [
|
|
|
14966
14966
|
{ operationId: "DistributeUnitSupplies", name: "distribute-unit-supplies", method: "POST", path: "/api/units/{id}/supply/distributions", spec: "battle.yaml", write: true, retry: "key", description: "Distribute a stock item to current members as the unit leader. The actor’s request key replays the original private receipt.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["requestKey", "item", "quality", "quantity", "recipientIds"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1, description: "Quantity per recipient." }, recipientIds: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, note: { type: "string", maxLength: 100 } } } }, requestKey: "requestKey", requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "request", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, request: { type: "object", additionalProperties: false, required: ["requestKey", "item", "quality", "quantity", "recipientIds"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1, description: "Quantity per recipient." }, recipientIds: { type: "array", minItems: 1, uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, note: { type: "string", maxLength: 100 } } }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "request", "transferredAt"] },
|
|
14967
14967
|
{ operationId: "GetMyUnitFunds", name: "get-my-unit-funds", method: "GET", path: "/api/units/{id}/funds", spec: "battle.yaml", write: false, retry: "unsafe", description: "Read unit balances and the caller’s donation balances. Only the current leader receives the recipient list.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["balances", "personalBalances", "canDistribute", "members"], properties: { balances: { type: "array", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", pattern: "^[1-9][0-9]{0,18}$", description: "Positive balance in minor units, encoded as decimal." } } } }, personalBalances: { type: "array", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", pattern: "^[1-9][0-9]{0,18}$", description: "Positive balance in minor units, encoded as decimal." } } } }, canDistribute: { type: "boolean" }, members: { type: "array", items: { type: "object", required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, avatarVersion: { type: "string" } } }, description: "Empty for callers other than the current leader." } } } } }, responseFields: ["balances", "personalBalances", "canDistribute", "members"] },
|
|
14968
14968
|
{ operationId: "TransferUnitFunds", name: "transfer-unit-funds", method: "POST", path: "/api/units/{id}/funds", spec: "battle.yaml", write: true, retry: "key", description: "Donate as a member or distribute as the current leader. Request keys replay the original private receipt for the same actor and operation.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["requestKey", "operation", "asset", "amount"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, operation: { type: "string", enum: ["donate", "distribute"] }, asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", description: "Positive minor-unit amount per recipient, encoded as decimal. Leading zeros and surrounding whitespace are accepted." }, note: { type: "string", maxLength: 100 }, recipientIds: { type: "array", uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, description: "Omit for donations. At least one current member for distributions." } } } }, requestKey: "requestKey", requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "request", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, request: { type: "object", additionalProperties: false, required: ["requestKey", "operation", "asset", "amount"], properties: { requestKey: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" }, operation: { type: "string", enum: ["donate", "distribute"] }, asset: { type: "integer", format: "int32", minimum: 0, description: "0 for Gold, otherwise country ID plus one." }, amount: { type: "string", description: "Positive minor-unit amount per recipient, encoded as decimal. Leading zeros and surrounding whitespace are accepted." }, note: { type: "string", maxLength: 100 }, recipientIds: { type: "array", uniqueItems: true, items: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, description: "Omit for donations. At least one current member for distributions." } } }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "request", "transferredAt"] },
|
|
14969
|
-
{ operationId: "GetMyUnitSupplies", name: "get-my-unit-supplies", method: "GET", path: "/api/units/{id}/supplies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read the current policy and the caller's ability to claim. A unit member may read their own state. Only the founder receives stock quantities.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems:
|
|
14970
|
-
{ operationId: "SetUnitSupplyPolicy", name: "set-unit-supply-policy", method: "PUT", path: "/api/units/{id}/supplies/policy", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Replace the supply policy as unit founder. To disable claims, provide an empty items array. A selected company must belong to the founder.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems:
|
|
14971
|
-
{ operationId: "DonateUnitSupplies", name: "donate-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/deposits", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Transfer whole items from the member's inventory to the unit. The result lists items moved. Conflicts use insufficient_stock or conflict.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 12 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems:
|
|
14972
|
-
{ operationId: "ClaimUnitSupplies", name: "claim-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/claims", spec: "battle.yaml", write: true, retry: "natural", description: "Citizen session required. Claim the whole supply pack once per Shanghai game day. Changing units does not reset the claim. Conflicts use conflict for eligibility or a previous claim, and insufficient_stock when the pack cannot be issued.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems:
|
|
14969
|
+
{ operationId: "GetMyUnitSupplies", name: "get-my-unit-supplies", method: "GET", path: "/api/units/{id}/supplies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read the current policy and the caller's ability to claim. A unit member may read their own state. Only the founder receives stock quantities.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } }, eligible: { type: "boolean" }, claimed: { type: "boolean" }, claimedAt: { type: "string", format: "date-time" }, stock: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21, description: "Only present in the unit founder's response." } } } } }, responseFields: ["unitId", "policy", "eligible", "claimed", "claimedAt", "stock"] },
|
|
14970
|
+
{ operationId: "SetUnitSupplyPolicy", name: "set-unit-supply-policy", method: "PUT", path: "/api/units/{id}/supplies/policy", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Replace the supply policy as unit founder. To disable claims, provide an empty items array. A selected company must belong to the founder.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "policy", "eligible", "claimed"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, policy: { type: "object", additionalProperties: false, required: ["items"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21 } } }, eligible: { type: "boolean" }, claimed: { type: "boolean" }, claimedAt: { type: "string", format: "date-time" }, stock: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 0, maxItems: 21, description: "Only present in the unit founder's response." } } } } }, responseFields: ["unitId", "policy", "eligible", "claimed", "claimedAt", "stock"] },
|
|
14971
|
+
{ operationId: "DonateUnitSupplies", name: "donate-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/deposits", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Transfer whole items from the member's inventory to the unit. The result lists items moved. Conflicts use insufficient_stock or conflict.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["items"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 12 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 21 }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "items", "transferredAt"] },
|
|
14972
|
+
{ operationId: "ClaimUnitSupplies", name: "claim-unit-supplies", method: "POST", path: "/api/units/{id}/supplies/claims", spec: "battle.yaml", write: true, retry: "natural", description: "Citizen session required. Claim the whole supply pack once per Shanghai game day. Changing units does not reset the claim. Conflicts use conflict for eligibility or a previous claim, and insufficient_stock when the pack cannot be issued.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "The same origin as the request.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["unitId", "items", "transferredAt"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, items: { type: "array", items: { type: "object", additionalProperties: false, required: ["item", "quality", "quantity"], properties: { item: { type: "string", description: "Current catalogue product names. The food and weapon selectors also accept historical requests.", enum: ["food", "weapon", "GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE", "SMALL_DRINK", "LARGE_DRINK", "SNACK", "MEAL", "PISTOL", "RIFLE", "TICKET_ECONOMY", "TICKET_BUSINESS", "KNIFE", "HOUSE", "MANSION", "BOAT", "YACHT", "DEFENSE_SYSTEM", "HOSPITAL"] }, quality: { type: "integer", format: "int64", minimum: 0, maximum: 5 }, quantity: { type: "integer", format: "int64", minimum: 1 } } }, minItems: 1, maxItems: 21 }, transferredAt: { type: "string", format: "date-time" } } } } }, responseFields: ["unitId", "items", "transferredAt"] },
|
|
14973
14973
|
{ operationId: "ListCompanies", name: "list-companies", method: "GET", path: "/api/companies", spec: "business.yaml", write: false, retry: "unsafe", description: "Public. Filter companies by land, owner, unit, and item before pagination. Sort by company ID ascending by default, or by employee count descending and company ID ascending with sort=employees. Use a cursor issued for the selected sort.", parameters: [{ name: "cursor", in: "query", description: "Opaque cursor from the previous page. Reuse the same filters.", schema: { type: "string" } }, { name: "limit", in: "query", description: "Maximum number of results.", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "land", in: "query", description: "Filter by company region ID.", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "owner", in: "query", description: "Filter by public owner ID.", schema: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } }, { name: "item", in: "query", schema: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } }, { name: "unitId", in: "query", schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "sort", in: "query", schema: { type: "string", enum: ["employees"] } }, { name: "q", in: "query", description: "Case-insensitive substring of the company name, matched like citizen search.", schema: { type: "string", minLength: 1, maxLength: 100 } }, { name: "order", in: "query", description: "Direction of the selected sort (default: ID asc, employees desc). The other direction is the exact reverse of the default order; reuse a cursor only with the same sort and order.", schema: { type: "string", enum: ["asc", "desc"], description: "Direction of a list sort." } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "nextCursor"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["items", "nextCursor"] },
|
|
14974
14974
|
{ operationId: "CreateCompany", name: "create-company", method: "POST", path: "/api/companies", spec: "business.yaml", write: true, retry: "unsafe", description: "Citizen session required. Found a company at the citizen's current region for 20 gold (2000 in minor units).", parameters: [{ name: "Origin", in: "header", required: true, description: "The same origin as the site hosting the API.", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["name", "item"], properties: { name: { type: "string", minLength: 3, maxLength: 32 }, item: { description: "Raw factories can only be founded in a high-resource region for their product.", type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["level", "productionBonusPercent", "management", "conversion", "id", "quality", "name", "avatarVersion", "weaponDamageBonusPercent", "stockCompanyId", "unitId", "unitName", "donationTarget", "owner", "ownerSummary", "workers", "land", "item", "workerCount"] },
|
|
14975
14975
|
{ operationId: "GetCompany", name: "get-company", method: "GET", path: "/api/companies/{id}", spec: "business.yaml", write: false, retry: "unsafe", description: "Public. Read a public company profile.", parameters: [{ name: "id", in: "path", required: true, description: "Resource ID.", schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "name", "owner", "land", "item", "workerCount"], properties: { level: { type: "integer", minimum: 0 }, productionBonusPercent: { type: "integer", minimum: 0 }, management: { type: "object", additionalProperties: false, required: ["relocateFee"], properties: { relocateFee: { type: "integer", format: "int64" }, upgradeFee: { type: "integer", format: "int64" }, downgradeRefund: { type: "integer", format: "int64" } } }, conversion: { type: "object", additionalProperties: false, required: ["currentProduct", "fee", "products"], properties: { currentProduct: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, fee: { type: "integer", format: "int64", minimum: 0, description: "Conversion fee in Gold minor units." }, products: { type: "array", items: { type: "object", additionalProperties: false, required: ["product"], properties: { product: { type: "string", enum: ["small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "iron", "grain", "oil", "stone", "wood", "minerals", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital"] }, rawMaterial: { type: "string", enum: ["GRAIN", "IRON", "OIL", "MINERALS", "WOOD", "STONE"], description: "One known material for the product. Omitted for raw products and unverified recipes." } } } } } }, id: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1, maximum: 5 }, name: { type: "string" }, avatarVersion: { type: "string", description: "Version of the public custom avatar when uploaded." }, weaponDamageBonusPercent: { type: "integer", minimum: 0, maximum: 100, description: "Battle damage bonus relative to the ordinary weapon, present only for usable weapon output." }, stockCompanyId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, unitName: { type: "string", description: "Public name of the military unit that holds the factory." }, donationTarget: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", description: "Citizen ID for personal factories, empty for corporate or military unit ownership." }, ownerSummary: { allOf: [{ type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } }, { description: "Public citizen summary when the factory is personally owned." }] }, workers: { description: "Public summaries of up to eight current employees, ordered by numeric citizen ID. Included in company details and company events.", type: "array", maxItems: 8, items: { type: "object", additionalProperties: false, required: ["id", "name", "nation"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 } } } }, land: { type: "integer", format: "int64", minimum: 0 }, item: { type: "string", enum: ["food", "weapon", "minerals", "small_drink", "large_drink", "snack", "meal", "pistol", "rifle", "ticket_economy", "ticket_business", "knife", "house", "mansion", "boat", "yacht", "defense_system", "hospital", "iron", "grain", "oil", "stone", "wood"] }, workerCount: { type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["level", "productionBonusPercent", "management", "conversion", "id", "quality", "name", "avatarVersion", "weaponDamageBonusPercent", "stockCompanyId", "unitId", "unitName", "donationTarget", "owner", "ownerSummary", "workers", "land", "item", "workerCount"] },
|
|
@@ -16878,6 +16878,7 @@ var namedProducts = [
|
|
|
16878
16878
|
"DEFENSE_SYSTEM",
|
|
16879
16879
|
"HOSPITAL"
|
|
16880
16880
|
];
|
|
16881
|
+
var warehouseProductCodes = [...rawGoods, ...namedProducts];
|
|
16881
16882
|
var potionKinds = ["jinxed", "finesse", "bloody_mess", "lucky"];
|
|
16882
16883
|
var enumValues = operations.get("market-orders")?.parameters.find((parameter) => parameter.name === "item")?.schema.enum;
|
|
16883
16884
|
var items = new Set(Array.isArray(enumValues) ? enumValues.filter((item) => typeof item === "string") : []);
|
|
@@ -19233,8 +19234,7 @@ var requestIdFlag = flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,128}$/)
|
|
|
19233
19234
|
var recipientArg = positional("recipients", true, string2().regex(/^[^,]+(?:,[^,]+)*$/));
|
|
19234
19235
|
var quantityArg = positional("quantity", true, numericId);
|
|
19235
19236
|
var productArg = { ...positional("product"), source: "Product code, any case, such as snack or pistol; potions take a grade, such as lucky:q2" };
|
|
19236
|
-
var
|
|
19237
|
-
var dailySupplyChoices = dailySupplyProducts.join(", ").toLowerCase();
|
|
19237
|
+
var dailySupplyChoices = warehouseProductCodes.join(", ").toLowerCase();
|
|
19238
19238
|
var ranks = ["", "Novice", "Regular", "Veteran", "Elite"];
|
|
19239
19239
|
var rank = (grade) => ranks[grade ?? 1];
|
|
19240
19240
|
async function membership(ctx) {
|
|
@@ -20326,8 +20326,8 @@ var unit = [
|
|
|
20326
20326
|
unitCommand({
|
|
20327
20327
|
path: ["supply", "policy"],
|
|
20328
20328
|
summary: `Set daily supplies as leader. Allowed products: ${dailySupplyChoices}.`,
|
|
20329
|
-
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length:
|
|
20330
|
-
examples: ["esim unit supply policy
|
|
20329
|
+
args: [positional("allocation", true, string2().min(1)), ...Array.from({ length: warehouseProductCodes.length - 1 }, (_, index) => positional(`allocation-${index + 2}`, false))],
|
|
20330
|
+
examples: ["esim unit supply policy rifle=5 ticket_economy=1"],
|
|
20331
20331
|
operations: ["me", "citizen", "get-my-unit-supplies", "set-unit-supply-policy"],
|
|
20332
20332
|
confirmWith: confirmSupply,
|
|
20333
20333
|
output: { daily: "Daily allocation now in force", stock: "Unit stock", changed: "Daily supply allocation before → after" },
|
|
@@ -20339,9 +20339,9 @@ var unit = [
|
|
|
20339
20339
|
const product = match?.[1];
|
|
20340
20340
|
if (product === undefined || !quantity.success)
|
|
20341
20341
|
return usage2("Use product=quantity, for example snack=2.");
|
|
20342
|
-
const item =
|
|
20342
|
+
const item = warehouseProductCodes.find((code) => code === product.trim().toUpperCase());
|
|
20343
20343
|
if (!item)
|
|
20344
|
-
return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}
|
|
20344
|
+
return usage2(`${product} cannot be included in daily supplies. Choose from ${dailySupplyChoices}.`);
|
|
20345
20345
|
return { item, quality: 0, quantity: quantity.data };
|
|
20346
20346
|
});
|
|
20347
20347
|
if (new Set(items.map((item) => `${item.item}:${item.quality}`)).size !== items.length)
|
|
@@ -38086,7 +38086,7 @@ function saveCredentials(store, credentials) {
|
|
|
38086
38086
|
}
|
|
38087
38087
|
|
|
38088
38088
|
// version.ts
|
|
38089
|
-
var version2 = "2026.1202.
|
|
38089
|
+
var version2 = "2026.1202.211";
|
|
38090
38090
|
var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
|
|
38091
38091
|
var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
|
|
38092
38092
|
var releaseVersion = /^\d+\.\d+\.\d+$/;
|