esim-cli 2026.1130.1 → 2026.1201.179

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.
Files changed (3) hide show
  1. package/dist/esim.js +103 -96
  2. package/dist/index.js +103 -96
  3. package/package.json +1 -1
package/dist/esim.js CHANGED
@@ -14229,11 +14229,11 @@ var catalog = [
14229
14229
  { operationId: "ListBattles", name: "list-battles", method: "GET", path: "/api/battles", spec: "battle.yaml", write: false, retry: "unsafe", description: "Public. Sort keys: start (battle start, by ID; default descending), subsidy (maximum current subsidy rate; default descending), damage (projected damage across all rounds; default descending) and ends (current round deadline; default ascending, finished battles last in either direction). order reverses the key's direction. Ties order by ID descending. Open scores may lag committed hits by one to two seconds. total counts all battles matching the filters, independently of the cursor.", parameters: [{ name: "cursor", in: "query", description: "Opaque cursor returned by the preceding page for the same filters.", schema: { type: "string", minLength: 1, maxLength: 512 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "kind", in: "query", schema: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] } }, { name: "status", in: "query", schema: { type: "string", enum: ["open", "finished"] } }, { name: "land", in: "query", schema: { type: "integer", format: "int64", minimum: 0 } }, { name: "country", in: "query", description: "Country ID on either the attacking or defending side.", schema: { type: "integer", minimum: 0 } }, { name: "filter", in: "query", description: "Include only open battles with a positive subsidy rate.", schema: { type: "string", enum: ["subsidized"] } }, { name: "sort", in: "query", description: "Sort key. Defaults to start.", schema: { type: "string", enum: ["start", "subsidy", "ends", "damage"] } }, { name: "order", in: "query", description: "Sort direction. Defaults to desc for start, subsidy and damage, asc for ends.", schema: { type: "string", enum: ["asc", "desc"] } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "nextCursor", "total"], properties: { total: { type: "integer", format: "int64", minimum: 0 }, items: { type: "array", items: { type: "object", description: "War and resistance include attack, defend, and land. Tournament battles include tournamentId and both entry IDs. Finished battles include endedAt.", additionalProperties: false, required: ["id", "kind", "round", "wins", "score", "completedDamage", "nextRoundAt", "done"], properties: { warId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "National war containing this regional battle." }] }, id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, attack: { type: "integer", minimum: 0 }, defend: { type: "integer", minimum: 0 }, land: { type: "integer", format: "int64", minimum: 0 }, tournamentId: { type: "integer", format: "int64", minimum: 1 }, attackEntryId: { type: "integer", format: "int64", minimum: 0 }, defendEntryId: { type: "integer", format: "int64", minimum: 0 }, round: { type: "integer", format: "int64", minimum: 1 }, wins: { type: "array", items: { type: "integer", format: "int64", minimum: 0, maximum: 8 }, minItems: 2, maxItems: 2, description: "Attack then defend." }, score: { type: "array", items: { type: "integer", format: "int64", minimum: 0 }, minItems: 2, maxItems: 2, description: "Current round attack then defend. Both are zero after settlement." }, completedDamage: { type: "integer", format: "int64", minimum: 0, description: "Sum of previous rounds while open. Whole-battle archived total after settlement." }, maxSubsidyRate: { type: "integer", format: "int32", minimum: 0, description: "Included on list entries. Maximum current rate in minor Gold units per 100,000 damage, or zero when no rate is active." }, nextRoundAt: { type: ["string", "null"], format: "date-time", description: "UTC RFC 3339. Null when the battle has finished." }, endedAt: { type: "string", format: "date-time" }, done: { type: "boolean" } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["total", "items", "nextCursor"] },
14230
14230
  { operationId: "StartBattle", name: "start-battle", method: "POST", path: "/api/battles", spec: "battle.yaml", write: true, retry: "unsafe", description: "Citizen session required. Attack a region in an active national war as president, or start a resistance from an occupied region. A national attack debits 1000 plus 10 minor units per active citizen from the treasury. Resistance debits 4000 minor units from the citizen wallet.", parameters: [{ 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: ["kind", "land"], properties: { kind: { type: "string", enum: ["war", "resistance"] }, land: { type: "integer", format: "int64", minimum: 0 } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", description: "War and resistance include attack, defend, and land. Tournament battles include tournamentId and both entry IDs. Finished battles include endedAt.", additionalProperties: false, required: ["id", "kind", "round", "wins", "score", "completedDamage", "nextRoundAt", "done"], properties: { warId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "National war containing this regional battle." }] }, id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, attack: { type: "integer", minimum: 0 }, defend: { type: "integer", minimum: 0 }, land: { type: "integer", format: "int64", minimum: 0 }, tournamentId: { type: "integer", format: "int64", minimum: 1 }, attackEntryId: { type: "integer", format: "int64", minimum: 0 }, defendEntryId: { type: "integer", format: "int64", minimum: 0 }, round: { type: "integer", format: "int64", minimum: 1 }, wins: { type: "array", items: { type: "integer", format: "int64", minimum: 0, maximum: 8 }, minItems: 2, maxItems: 2, description: "Attack then defend." }, score: { type: "array", items: { type: "integer", format: "int64", minimum: 0 }, minItems: 2, maxItems: 2, description: "Current round attack then defend. Both are zero after settlement." }, completedDamage: { type: "integer", format: "int64", minimum: 0, description: "Sum of previous rounds while open. Whole-battle archived total after settlement." }, maxSubsidyRate: { type: "integer", format: "int32", minimum: 0, description: "Included on list entries. Maximum current rate in minor Gold units per 100,000 damage, or zero when no rate is active." }, nextRoundAt: { type: ["string", "null"], format: "date-time", description: "UTC RFC 3339. Null when the battle has finished." }, endedAt: { type: "string", format: "date-time" }, done: { type: "boolean" } } } } }, responseFields: ["warId", "id", "kind", "attack", "defend", "land", "tournamentId", "attackEntryId", "defendEntryId", "round", "wins", "score", "completedDamage", "maxSubsidyRate", "nextRoundAt", "endedAt", "done"] },
14231
14231
  { operationId: "GetBattle", name: "get-battle", method: "GET", path: "/api/battles/{id}", spec: "battle.yaml", write: false, retry: "unsafe", description: "Public. Read the current state and absolute scores for one battle.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", description: "War and resistance include attack, defend, and land. Tournament battles include tournamentId and both entry IDs. Finished battles include endedAt.", additionalProperties: false, required: ["id", "kind", "round", "wins", "score", "completedDamage", "nextRoundAt", "done"], properties: { warId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "National war containing this regional battle." }] }, id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["war", "resistance", "civil", "tournament", "practice"] }, attack: { type: "integer", minimum: 0 }, defend: { type: "integer", minimum: 0 }, land: { type: "integer", format: "int64", minimum: 0 }, tournamentId: { type: "integer", format: "int64", minimum: 1 }, attackEntryId: { type: "integer", format: "int64", minimum: 0 }, defendEntryId: { type: "integer", format: "int64", minimum: 0 }, round: { type: "integer", format: "int64", minimum: 1 }, wins: { type: "array", items: { type: "integer", format: "int64", minimum: 0, maximum: 8 }, minItems: 2, maxItems: 2, description: "Attack then defend." }, score: { type: "array", items: { type: "integer", format: "int64", minimum: 0 }, minItems: 2, maxItems: 2, description: "Current round attack then defend. Both are zero after settlement." }, completedDamage: { type: "integer", format: "int64", minimum: 0, description: "Sum of previous rounds while open. Whole-battle archived total after settlement." }, maxSubsidyRate: { type: "integer", format: "int32", minimum: 0, description: "Included on list entries. Maximum current rate in minor Gold units per 100,000 damage, or zero when no rate is active." }, nextRoundAt: { type: ["string", "null"], format: "date-time", description: "UTC RFC 3339. Null when the battle has finished." }, endedAt: { type: "string", format: "date-time" }, done: { type: "boolean" } } } } }, responseFields: ["warId", "id", "kind", "attack", "defend", "land", "tournamentId", "attackEntryId", "defendEntryId", "round", "wins", "score", "completedDamage", "maxSubsidyRate", "nextRoundAt", "endedAt", "done"] },
14232
- { operationId: "GetBattleParticipation", name: "get-battle-participation", method: "GET", path: "/api/battles/{id}/participation", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read side eligibility, territorial position and current round buildings, and any remaining round quota.", 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: ["sides"], properties: { contextRound: { description: "Round used to calculate side context and building effects.", type: "integer", minimum: 1 }, territory: { type: "object", additionalProperties: false, required: ["region", "adjacent"], properties: { region: { type: "object", additionalProperties: false, required: ["land", "owner"], properties: { land: { type: "integer", minimum: 0 }, homeNation: { type: "integer", minimum: 0 }, owner: { type: "integer", minimum: 0 } } }, adjacent: { type: "array", items: { type: "object", additionalProperties: false, required: ["land", "owner"], properties: { land: { type: "integer", minimum: 0 }, homeNation: { type: "integer", minimum: 0 }, owner: { type: "integer", minimum: 0 } } } } } }, sideContext: { type: "array", items: { type: "object", additionalProperties: false, required: ["side", "eligible", "positionMultiplier", "buildings"], properties: { side: { type: "string", enum: ["attack", "defend"] }, eligible: { type: "boolean" }, reason: { type: "string" }, positionMultiplier: { type: "number", format: "double" }, positionLand: { description: "Citizen's current region, when the battle is territorial.", type: "integer", minimum: 0 }, positionOptions: { type: "object", additionalProperties: false, description: "Territorial battles only. Where standing changes this side's position multiplier, computed by the strike rule for the battle region and each adjacent region. Everywhere else gives elsewhereMultiplier.", required: ["elsewhereMultiplier", "regions"], properties: { elsewhereMultiplier: { type: "number", format: "double" }, elsewhereReason: { description: "Present when elsewhereMultiplier is below 1, for example when the attacker controls no adjacent region.", type: "string" }, regions: { type: "array", items: { type: "object", additionalProperties: false, required: ["land", "owner", "multiplier", "current"], properties: { land: { type: "integer", minimum: 0 }, owner: { type: "integer", minimum: 0 }, multiplier: { type: "number", format: "double" }, current: { description: "Whether the citizen stands in this region now.", type: "boolean" } } } } } }, buildings: { type: "array", items: { type: "object", additionalProperties: false, required: ["kind", "quality", "effect"], properties: { kind: { type: "string", enum: ["hospital", "defense_system"] }, quality: { type: "integer", minimum: 1 }, effect: { type: "string" } } } } } } }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, roundEnergy: { description: "Current citizen energy available to fight in the practice battle.", type: "integer", format: "int64", minimum: 0 }, sides: { type: "array", uniqueItems: true, items: { type: "string", enum: ["attack", "defend"] } }, weapons: { description: "Open battles. Unarmed and each weapon a strike can use, with the strike's damage multiplier, whether each hit uses one, and the citizen's Q0 stock. Unarmed has no stock.", type: "array", items: { type: "object", additionalProperties: false, required: ["weapon", "damageMultiplier", "consumedPerHit"], properties: { weapon: { type: ["string", "null"], enum: ["PISTOL", "RIFLE", "KNIFE", null] }, damageMultiplier: { type: "number", format: "double" }, consumedPerHit: { type: "boolean" }, stock: { type: "integer", format: "int64", minimum: 0 } } } }, weaponsDisabledReason: { description: "Present when armed strikes are settled as unarmed, for example while a contract debt is overdue.", type: "string" } } } } }, responseFields: ["contextRound", "territory", "sideContext", "encounter", "roundEnergy", "sides", "weapons", "weaponsDisabledReason"] },
14232
+ { operationId: "GetBattleParticipation", name: "get-battle-participation", method: "GET", path: "/api/battles/{id}/participation", spec: "battle.yaml", write: false, retry: "unsafe", description: "Citizen session required. Read side eligibility, presence in the battle region, locked side, current round buildings, and any remaining round quota.", 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: ["sides"], properties: { contextRound: { description: "Round used to calculate side context and building effects.", type: "integer", minimum: 1 }, territory: { type: "object", additionalProperties: false, required: ["region", "adjacent"], properties: { region: { type: "object", additionalProperties: false, required: ["land", "owner"], properties: { land: { type: "integer", minimum: 0 }, homeNation: { type: "integer", minimum: 0 }, owner: { type: "integer", minimum: 0 } } }, adjacent: { type: "array", items: { type: "object", additionalProperties: false, required: ["land", "owner"], properties: { land: { type: "integer", minimum: 0 }, homeNation: { type: "integer", minimum: 0 }, owner: { type: "integer", minimum: 0 } } } } } }, presence: { type: "object", additionalProperties: false, description: "National and resistance wars only. Strikes are accepted only from the battle region; travel there through the territory region and its owner.", required: ["currentLand", "inBattleRegion"], properties: { currentLand: { description: "Citizen's current region.", type: "integer", minimum: 0 }, inBattleRegion: { type: "boolean" }, lockedSide: { description: "Present when the citizen's country is the attacker or defender. Such citizens fight only for this side; everyone else chooses a side on each strike and may switch at any time.", type: "string", enum: ["attack", "defend"] } } }, sideContext: { type: "array", items: { type: "object", additionalProperties: false, required: ["side", "eligible", "buildings"], properties: { side: { type: "string", enum: ["attack", "defend"] }, eligible: { type: "boolean" }, reason: { type: "string" }, buildings: { type: "array", items: { type: "object", additionalProperties: false, required: ["kind", "quality", "effect"], properties: { kind: { type: "string", enum: ["hospital", "defense_system"] }, quality: { type: "integer", minimum: 1 }, effect: { type: "string" } } } } } } }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, roundEnergy: { description: "Current citizen energy available to fight in the practice battle.", type: "integer", format: "int64", minimum: 0 }, sides: { type: "array", uniqueItems: true, items: { type: "string", enum: ["attack", "defend"] } }, weapons: { description: "Open battles. Unarmed and each weapon a strike can use, with the strike's damage multiplier, whether each hit uses one, and the citizen's Q0 stock. Unarmed has no stock.", type: "array", items: { type: "object", additionalProperties: false, required: ["weapon", "damageMultiplier", "consumedPerHit"], properties: { weapon: { type: ["string", "null"], enum: ["PISTOL", "RIFLE", "KNIFE", null] }, damageMultiplier: { type: "number", format: "double" }, consumedPerHit: { type: "boolean" }, stock: { type: "integer", format: "int64", minimum: 0 } } } }, weaponsDisabledReason: { description: "Present when armed strikes are settled as unarmed, for example while a contract debt is overdue.", type: "string" } } } } }, responseFields: ["contextRound", "territory", "presence", "sideContext", "encounter", "roundEnergy", "sides", "weapons", "weaponsDisabledReason"] },
14233
14233
  { operationId: "ListMyBattleSubsidies", name: "list-my-battle-subsidies", method: "GET", path: "/api/me/battle-subsidies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Read the signed-in citizen's actual battle subsidy payments for a Shanghai game day, grouped by paying country and battle.", parameters: [{ name: "day", in: "query", required: true, schema: { type: "integer", format: "int32", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "total"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "battleId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, battleId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1, description: "Amount paid in Gold minor units." } } } }, total: { type: "integer", format: "int64", minimum: 0, description: "Total in Gold minor units." } } } } }, responseFields: ["items", "total"] },
14234
14234
  { operationId: "ListBattleSubsidies", name: "list-battle-subsidies", method: "GET", path: "/api/battles/{id}/subsidies", spec: "battle.yaml", write: false, retry: "unsafe", description: "Public. Read active treasury rates for the battle.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "array", items: { type: "object", additionalProperties: false, required: ["country", "rate"], properties: { country: { type: "integer", minimum: 0 }, rate: { type: "integer", format: "int32", minimum: 1 } } } } } }, responseFields: [] },
14235
14235
  { operationId: "SetBattleSubsidy", name: "set-battle-subsidy", method: "PUT", path: "/api/battles/{id}/subsidies", spec: "battle.yaml", write: true, retry: "unsafe", description: "Set the current president's rate for their own country. Zero disables the subsidy.", 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: ["rate"], properties: { rate: { type: "integer", format: "int32", minimum: 0, maximum: 2147483647, description: "Gold minor units per 100000 damage. Zero disables the rate." } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "array", items: { type: "object", additionalProperties: false, required: ["country", "rate"], properties: { country: { type: "integer", minimum: 0 }, rate: { type: "integer", format: "int32", minimum: 1 } } } } } }, responseFields: [] },
14236
- { operationId: "HitBattle", name: "hit-battle", method: "POST", path: "/api/battles/{id}/hits", spec: "battle.yaml", write: true, retry: "key", description: "Citizen session required. Submit one hit or a five-hit burst for the supplied round. The receipt is sent after the batch commits and includes any subsidy payments. With a matching requestId and parameters, replay the committed receipt even after the round advances. Reusing the same ID with different parameters returns conflict. Use closed for a stale or finished round, insufficient_energy for energy, insufficient_stock for selected weapons, and weapon_disabled for armed hits during the Tank debuff. An undersized Military Unit Cup entry is rejected with unit_cup_members (403). An active pact with the opposing country rejects mercenary hits with non_aggression_pact (403).", 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: ["round", "weapon"], properties: { requestId: { type: "string", pattern: "^[A-Za-z0-9_-]{1,64}$", description: "Repeat the same ID and parameters to replay the committed receipt." }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "string", enum: ["attack", "defend"], description: "Required for resistance, civil and practice battles. For practice, attack is White Team and defend is Black Team. In other battles the server assigns the caller's side and validates any explicit selection." }, weapon: { type: ["string", "null"], enum: ["PISTOL", "RIFLE", "KNIFE", null], description: "Null is unarmed." }, strikeCount: { type: "integer", enum: [1, 5], default: 1 } } } }, requestKey: "requestId", requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["battleId", "round", "side", "hitAt", "energy", "outcomes"], properties: { newBoss: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, practiceRewards: { type: "object", additionalProperties: false, required: ["localCurrency", "xp"], properties: { localCurrency: { type: "integer", minimum: 0 }, xp: { type: "integer", minimum: 0 } } }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, eventDamageBonus: { type: "integer", format: "int64" }, rankName: { type: "string" }, battlePoints: { type: "integer", format: "int64" }, subsidies: { type: "array", items: { type: "object", additionalProperties: false, required: ["country", "strike", "damage", "amount"], properties: { country: { type: "integer", minimum: 0 }, strike: { type: "integer", minimum: 1, maximum: 5 }, damage: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } } }, battleId: { type: "integer", format: "int64", minimum: 1 }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "string", enum: ["attack", "defend"] }, hitAt: { type: "string", format: "date-time" }, energy: { description: "Remaining energy for this battle, including the round quota for practice battles.", type: "integer", format: "int64", minimum: 0, maximum: 100 }, outcomes: { type: "array", items: { type: "object", additionalProperties: false, required: ["grade", "damage", "energySpent", "weaponSpent", "weaponAwarded"], properties: { practiceBoss: { type: "object", additionalProperties: false, required: ["playerDamage", "bossDamage", "result", "encounter"], properties: { playerDamage: { type: "integer", format: "int64", minimum: 0 }, bossDamage: { type: "integer", format: "int64", minimum: 0 }, result: { type: "string", enum: ["NOTHING", "BOSS_KILLED", "PLAYER_KILLED"] }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, newBoss: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } } } }, grade: { type: "string", enum: ["miss", "weak", "normal", "strong", "critical", "monster"] }, damage: { type: "integer", format: "int64", minimum: 0 }, energySpent: { type: "integer", format: "int64", minimum: 0, maximum: 10 }, weaponSpent: { type: "boolean" }, weaponAwarded: { type: "boolean" } } }, minItems: 1, maxItems: 5 } } } } }, responseFields: ["newBoss", "practiceRewards", "encounter", "eventDamageBonus", "rankName", "battlePoints", "subsidies", "battleId", "round", "side", "hitAt", "energy", "outcomes"] },
14236
+ { operationId: "HitBattle", name: "hit-battle", method: "POST", path: "/api/battles/{id}/hits", spec: "battle.yaml", write: true, retry: "key", description: "Citizen session required. Submit one hit or a five-hit burst for the supplied round. The receipt is sent after the batch commits and includes any subsidy payments. With a matching requestId and parameters, replay the committed receipt even after the round advances. Reusing the same ID with different parameters returns conflict. Use closed for a stale or finished round, insufficient_energy for energy, insufficient_stock for selected weapons, and weapon_disabled for armed hits during the Tank debuff. An undersized Military Unit Cup entry is rejected with unit_cup_members (403). An active pact with the opposing country rejects mercenary hits with non_aggression_pact (403). National and resistance wars accept hits only from the battle region (not_in_battle_region, 403), and a belligerent country's citizen choosing the other side gets side_locked (409). Other citizens must name a side there (side_required, 400).", 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: ["round", "weapon"], properties: { requestId: { type: "string", pattern: "^[A-Za-z0-9_-]{1,64}$", description: "Repeat the same ID and parameters to replay the committed receipt." }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "string", enum: ["attack", "defend"], description: "Required for civil and practice battles, and in national and resistance wars for citizens of a third country. Citizens of a belligerent country may omit it; a different side is rejected with side_locked (409). For practice, attack is White Team and defend is Black Team. Tournament sides come from the roster." }, weapon: { type: ["string", "null"], enum: ["PISTOL", "RIFLE", "KNIFE", null], description: "Null is unarmed." }, strikeCount: { type: "integer", enum: [1, 5], default: 1 } } } }, requestKey: "requestId", requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["battleId", "round", "side", "hitAt", "energy", "outcomes"], properties: { newBoss: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, practiceRewards: { type: "object", additionalProperties: false, required: ["localCurrency", "xp"], properties: { localCurrency: { type: "integer", minimum: 0 }, xp: { type: "integer", minimum: 0 } } }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, eventDamageBonus: { type: "integer", format: "int64" }, rankName: { type: "string" }, battlePoints: { type: "integer", format: "int64" }, subsidies: { type: "array", items: { type: "object", additionalProperties: false, required: ["country", "strike", "damage", "amount"], properties: { country: { type: "integer", minimum: 0 }, strike: { type: "integer", minimum: 1, maximum: 5 }, damage: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } } }, battleId: { type: "integer", format: "int64", minimum: 1 }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "string", enum: ["attack", "defend"] }, hitAt: { type: "string", format: "date-time" }, energy: { description: "Remaining energy for this battle, including the round quota for practice battles.", type: "integer", format: "int64", minimum: 0, maximum: 100 }, outcomes: { type: "array", items: { type: "object", additionalProperties: false, required: ["grade", "damage", "energySpent", "weaponSpent", "weaponAwarded"], properties: { practiceBoss: { type: "object", additionalProperties: false, required: ["playerDamage", "bossDamage", "result", "encounter"], properties: { playerDamage: { type: "integer", format: "int64", minimum: 0 }, bossDamage: { type: "integer", format: "int64", minimum: 0 }, result: { type: "string", enum: ["NOTHING", "BOSS_KILLED", "PLAYER_KILLED"] }, encounter: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } }, newBoss: { type: "object", additionalProperties: false, required: ["name", "bossCurrentHp", "bossTotalHp", "playerCurrentHp", "playerTotalHp"], properties: { level: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, expectedHits: { type: "integer", format: "int64", minimum: 1, "x-go-type-skip-optional-pointer": true }, body: { type: "string", "x-go-type-skip-optional-pointer": true }, eyes: { type: "string", "x-go-type-skip-optional-pointer": true }, hat: { type: "string", "x-go-type-skip-optional-pointer": true }, weapon: { type: "string", "x-go-type-skip-optional-pointer": true }, name: { type: "string" }, bossCurrentHp: { type: "integer", format: "int64", minimum: 0 }, bossTotalHp: { type: "integer", format: "int64", minimum: 1 }, playerCurrentHp: { type: "integer", format: "int64", minimum: 0 }, playerTotalHp: { type: "integer", format: "int64", minimum: 1 } } } } }, grade: { type: "string", enum: ["miss", "weak", "normal", "strong", "critical", "monster"] }, damage: { type: "integer", format: "int64", minimum: 0 }, energySpent: { type: "integer", format: "int64", minimum: 0, maximum: 10 }, weaponSpent: { type: "boolean" }, weaponAwarded: { type: "boolean" } } }, minItems: 1, maxItems: 5 } } } } }, responseFields: ["newBoss", "practiceRewards", "encounter", "eventDamageBonus", "rankName", "battlePoints", "subsidies", "battleId", "round", "side", "hitAt", "energy", "outcomes"] },
14237
14237
  { operationId: "GetBattleDrops", name: "get-battle-drops", method: "GET", path: "/api/battles/{id}/drops", spec: "battle.yaml", write: false, retry: "unsafe", description: "Public settlement awards ordered by issuance. Counts cover the entire battle.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "cursor", in: "query", description: "Opaque cursor returned by the preceding page for the same filters.", schema: { type: "string", minLength: 1, maxLength: 512 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "category", in: "query", schema: { type: "string" } }, { name: "quality", in: "query", schema: { type: "integer" } }, { name: "slot", in: "query", schema: { type: "string" } }, { name: "potionType", in: "query", schema: { type: "string" } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["status", "counts", "items", "nextCursor"], properties: { status: { type: "string", enum: ["pending", "recorded", "unavailable"], "x-enum-varnames": ["DropsPending", "DropsRecorded", "DropsUnavailable"] }, counts: { type: "object", required: ["equipment", "potion", "byQuality", "byPotion"], properties: { equipment: { type: "integer", format: "int64" }, potion: { type: "integer", format: "int64" }, byQuality: { type: "array", description: "Whole-battle equipment counts, highest quality first.", items: { type: "object", required: ["quality", "count"], properties: { quality: { type: "integer" }, count: { type: "integer", format: "int64" } } } }, byPotion: { type: "array", description: "Whole-battle potion counts, ordered by potion type and then highest quality first.", items: { type: "object", required: ["potionType", "quality", "count"], properties: { potionType: { type: "string" }, quality: { type: "integer" }, count: { type: "integer", format: "int64" } } } } } }, items: { type: "array", items: { type: "object", required: ["ordinal", "winnerId", "winnerName", "category", "quality", "round", "at"], properties: { ordinal: { type: "integer", format: "int64" }, round: { type: ["integer", "null"], format: "int64", minimum: 1, description: "Settlement round. Null for older drops without a known round." }, at: { type: ["string", "null"], format: "date-time", description: "Settlement time. Null for older drops without a known time." }, winnerId: { type: "string" }, winnerName: { type: "string" }, category: { type: "string", enum: ["equipment", "potion"] }, quality: { type: "integer" }, slot: { type: "string" }, potionType: { type: "string" }, equipment: { type: "object", additionalProperties: false, required: ["id", "modifiers"], description: "Immutable equipment details at the time of the drop. Older drops may lack these details.", properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, set: { type: "string" }, modifiers: { type: "array", items: { type: "object", additionalProperties: false, required: ["kind", "value"], properties: { kind: { description: "For missChanceReduction, subtract the modifier value in basis points from the base miss chance.", type: "string", enum: ["baseHit", "strength", "missChanceReduction", "damagePercent", "criticalChance", "maxDamagePercent", "avoidEnergyChance", "morningDamagePercent", "noonDamagePercent", "eveningDamagePercent", "nightDamagePercent", "saveWeaponChance", "findWeaponChance", "economySkillHundredths", "freeFlightChance", "ironProductionPercent", "woodProductionPercent", "grainProductionPercent", "oilProductionPercent", "diamondProductionPercent", "foodProductionPercent", "weaponProductionPercent", "ticketProductionPercent", "improvedSplitChance", "saveAmmunitionChance", "restorationChance", "bonusMergeChance", "otherParametersPercent", "mergePriceReduction", "hitMinBonus", "hitMaxBonus", "accuracy", "endurance", "guard", "agility", "impact"] }, value: { type: "integer", minimum: 0, description: "Percentages use basis points. Economic skill uses hundredths of a point." } } } } } } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["status", "counts", "items", "nextCursor"] },
14238
14238
  { operationId: "GetBattleSupportingUnits", name: "get-battle-supporting-units", method: "GET", path: "/api/battles/{id}/supporting-units", spec: "battle.yaml", write: false, retry: "unsafe", description: "GetBattleSupportingUnits", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["available", "units"], properties: { available: { type: "boolean", description: "False before settlement or when no historical snapshot exists." }, units: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "name", "country", "side"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, country: { type: "integer" }, side: { type: "string", enum: ["attack", "defend"] } } } } } } } }, responseFields: ["available", "units"] },
14239
14239
  { operationId: "GetBattleStatistics", name: "get-battle-statistics", method: "GET", path: "/api/battles/{id}/statistics", spec: "battle.yaml", write: false, retry: "unsafe", description: "GetBattleStatistics", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["attributionAvailable", "countries", "units"], properties: { attributionAvailable: { type: "boolean", description: "False if hits predate attribution or the original hit history is absent." }, personalDamage: { type: "integer", format: "int64", description: "Total credited damage for the signed-in viewer across both sides." }, countries: { type: "array", items: { type: "object", additionalProperties: false, required: ["side", "country", "damage"], properties: { side: { type: "string", enum: ["attack", "defend"] }, country: { type: "integer" }, damage: { type: "integer", format: "int64" } } } }, units: { type: "array", items: { type: "object", additionalProperties: false, required: ["side", "id", "name", "country", "damage"], properties: { side: { type: "string", enum: ["attack", "defend"] }, id: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" }, country: { type: "integer" }, damage: { type: "integer", format: "int64" } } } } } } } }, responseFields: ["attributionAvailable", "personalDamage", "countries", "units"] },
@@ -14347,8 +14347,10 @@ var catalog = [
14347
14347
  { operationId: "updatePartySettings", name: "update-party-settings", method: "PUT", path: "/api/parties/{id}/settings", spec: "civic.yaml", write: true, retry: "natural", description: "更新党资料", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, properties: { image: { type: "string", description: "Standard base64 PNG or JPEG up to 200000 decoded bytes. Omit to preserve the image or send an empty string to remove it." }, name: { type: "string", minLength: 1, maxLength: 32 }, description: { type: "string", maxLength: 1000 }, color: { type: "string", pattern: "^(#[0-9A-Fa-f]{6})?$" }, platform: { type: "string", enum: ["", "radical_left", "far_left", "left", "centre_left", "centre", "centre_right", "right", "far_right", "radical_right"] } }, minProperties: 1 } }, requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
14348
14348
  { operationId: "CreateCitizenReport", name: "create-citizen-report", method: "POST", path: "/api/citizens/{id}/reports", spec: "civic.yaml", write: true, retry: "natural", description: "CreateCitizenReport", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, schema: { type: "string" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["category", "reason"], properties: { category: { type: "string", enum: ["STEALING_ORG", "POSSIBLE_MULTIPLE_ACCOUNTS", "AUTOMATED_SOFTWARE_OR_SCRIPTS", "UNPAID_DEBTS", "SLAVERY", "EXPLOITING_GAME_MECHANICS", "ACCOUNT_SITTING", "PROFILE_CONTENT", "OTHER", "All"] }, reason: { type: "string", maxLength: 500 } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "status"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, status: { type: "string", enum: ["accepted"] } } } } }, responseFields: ["id", "status"] },
14349
14349
  { operationId: "listContractTemplates", name: "list-contract-templates", method: "GET", path: "/api/contracts/templates", spec: "contracts.yaml", write: false, retry: "unsafe", description: "读取自己的合约模板", parameters: [{ name: "cursor", in: "query", description: "上一页返回的游标。", schema: { type: "string", minLength: 1 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "nextCursor"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "owner", "name", "terms"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["items", "nextCursor"] },
14350
- { operationId: "saveContractTemplate", name: "save-contract-template", method: "POST", path: "/api/contracts/templates", spec: "contracts.yaml", write: true, retry: "unsafe", description: "保存自己的合约模板", parameters: [{ name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["name", "terms"], properties: { templateId: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "owner", "name", "terms"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } } }, responseFields: ["id", "owner", "name", "terms"] },
14350
+ { operationId: "saveContractTemplate", name: "save-contract-template", method: "POST", path: "/api/contracts/templates", spec: "contracts.yaml", write: true, retry: "unsafe", description: "新建自己的合约模板", parameters: [{ name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["name", "terms"], properties: { name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "owner", "name", "terms"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } } }, responseFields: ["id", "owner", "name", "terms"] },
14351
14351
  { operationId: "getContractTemplate", name: "get-contract-template", method: "GET", path: "/api/contracts/templates/{id}", spec: "contracts.yaml", write: false, retry: "unsafe", description: "读取自己的合约模板详情", 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: ["id", "owner", "name", "terms"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } } }, responseFields: ["id", "owner", "name", "terms"] },
14352
+ { operationId: "updateContractTemplate", name: "update-contract-template", method: "PUT", path: "/api/contracts/templates/{id}", spec: "contracts.yaml", write: true, retry: "natural", description: "整份替换自己的合约模板", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["name", "terms"], properties: { name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "owner", "name", "terms"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, owner: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string", minLength: 1, maxLength: 48 }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } } } }, responseFields: ["id", "owner", "name", "terms"] },
14353
+ { operationId: "deleteContractTemplate", name: "delete-contract-template", method: "DELETE", path: "/api/contracts/templates/{id}", spec: "contracts.yaml", write: true, retry: "natural", description: "删除自己的合约模板", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
14352
14354
  { operationId: "listContractProposals", name: "list-contract-proposals", method: "GET", path: "/api/contracts/proposals", spec: "contracts.yaml", write: false, retry: "unsafe", description: "读取自己参与的合约", parameters: [{ name: "cursor", in: "query", description: "上一页返回的游标。", schema: { type: "string", minLength: 1 } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "status", in: "query", schema: { type: "string", enum: ["proposed", "signed", "rejected", "cancelled", "expired", "failed"] } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["items", "nextCursor"], properties: { items: { type: "array", items: { type: "object", additionalProperties: false, required: ["id", "from", "to", "terms", "status", "expiresAt"], properties: { fromName: { type: "string" }, fromNationId: { type: "integer", minimum: 0 }, toName: { type: "string" }, toNationId: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, from: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, to: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } }, status: { type: "string", enum: ["proposed", "signed", "rejected", "cancelled", "expired", "failed"] }, expiresAt: { type: "string", format: "date-time" } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["items", "nextCursor"] },
14353
14355
  { operationId: "proposeContract", name: "propose-contract", method: "POST", path: "/api/contracts/proposals", spec: "contracts.yaml", write: true, retry: "unsafe", description: "提出合约", parameters: [{ name: "Origin", in: "header", required: true, description: "网页的同源地址。", schema: { type: "string", format: "uri" } }], body: { required: true, schema: { oneOf: [{ type: "object", additionalProperties: false, required: ["target", "terms"], properties: { target: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } } } }, { type: "object", additionalProperties: false, required: ["target", "templateId"], properties: { target: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, templateId: { type: "integer", format: "int64", minimum: 1 } } }] } }, requiresCredentials: true, responses: { "201": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["id", "from", "to", "terms", "status", "expiresAt"], properties: { fromName: { type: "string" }, fromNationId: { type: "integer", minimum: 0 }, toName: { type: "string" }, toNationId: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, from: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, to: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } }, status: { type: "string", enum: ["proposed", "signed", "rejected", "cancelled", "expired", "failed"] }, expiresAt: { type: "string", format: "date-time" } } } } }, responseFields: ["fromName", "fromNationId", "toName", "toNationId", "id", "from", "to", "terms", "status", "expiresAt"] },
14354
14356
  { operationId: "getContractProposal", name: "get-contract-proposal", method: "GET", path: "/api/contracts/proposals/{id}", spec: "contracts.yaml", write: false, retry: "unsafe", description: "读取自己参与的合约详情", 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: ["id", "from", "to", "terms", "status", "expiresAt"], properties: { fromName: { type: "string" }, fromNationId: { type: "integer", minimum: 0 }, toName: { type: "string" }, toNationId: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, from: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, to: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, terms: { oneOf: [{ type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["trade"] }, loanDays: { type: "integer", const: 0 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }, { type: "object", additionalProperties: false, required: ["kind", "offer", "request", "expiresIn", "loanDays"], properties: { kind: { type: "string", enum: ["loan"] }, loanDays: { type: "integer", minimum: 1, maximum: 30 }, offer: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, request: { type: "object", additionalProperties: false, required: ["gold", "food", "weapons"], properties: { equipmentId: { type: "integer", minimum: 1, format: "int64" }, gold: { type: "integer", minimum: 0, maximum: 1000000000000, format: "int64", description: "金币以百分之一金币计。100 表示 1.00 金币。" }, food: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, weapons: { type: "integer", minimum: 0, maximum: 999999, format: "int64" }, products: { type: "array", maxItems: 21, items: { type: "object", additionalProperties: false, required: ["code", "quantity"], properties: { code: { type: "string", enum: ["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"] }, quantity: { type: "integer", format: "int64", minimum: 1, maximum: 999999 } } } }, currencies: { type: "array", items: { type: "object", additionalProperties: false, required: ["countryId", "amount"], properties: { countryId: { type: "integer", minimum: 0 }, amount: { type: "integer", format: "int64", minimum: 1, maximum: 1000000000000, description: "Currency in hundredths." } } } } } }, expiresIn: { type: "integer", minimum: 1, maximum: 30 } } }], discriminator: { propertyName: "kind", mapping: { trade: "#/components/schemas/TradeTerms", loan: "#/components/schemas/LoanTerms" } } }, status: { type: "string", enum: ["proposed", "signed", "rejected", "cancelled", "expired", "failed"] }, expiresAt: { type: "string", format: "date-time" } } } } }, responseFields: ["fromName", "fromNationId", "toName", "toNationId", "id", "from", "to", "terms", "status", "expiresAt"] },
@@ -14448,7 +14450,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
14448
14450
  { operationId: "ClaimMyTutorialMission", name: "claim-my-tutorial-mission", method: "POST", path: "/api/tutorial-missions/{task}/claim", spec: "missions.yaml", write: true, retry: "natural", description: "Claim the next completed tutorial mission once.", parameters: [{ name: "task", in: "path", required: true, schema: { type: "string", enum: ["visit_profile", "train", "find_job", "work", "practice_hits", "restore_energy", "practice_berserk", "upload_avatar", "check_notifications", "check_map", "buy_on_market", "travel_to_capital", "list_product_offer", "view_exchange", "list_exchange_offer", "view_wallet_ledger", "view_company", "view_equipment", "equip_gear", "view_auctions", "auction_gear", "view_country_shouts", "post_shout", "found_newspaper", "publish_article", "read_article", "subscribe_newspaper", "request_friendship", "send_gift", "write_profile_text", "view_battle", "practice_twenty_five_hits", "view_country_units", "travel_abroad", "view_tournaments", "view_country_congress", "view_country_laws", "view_country_elections", "view_country_parties", "view_country_treasury", "view_achievements", "play_game_room", "replace_gear", "unequip_gear", "merge_gear", "split_gear", "recycle_gear", "buy_potion", "drink_potion", "use_medkit", "view_inventory", "fight_with_rifle", "view_battle_damage", "cancel_product_offer", "buy_exchange_offer", "view_stock_companies", "view_contract_templates", "like_article", "comment_article", "view_inbox", "view_rankings", "view_world_events", "donate_to_treasury", "work_three_days", "train_three_days"] } }], body: { required: true, schema: { type: "object", additionalProperties: false } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "currentMission"], properties: { granted: { allOf: [{ description: "A reward bundle. Tutorial missions list their fixed reward with it, and every mission claim response reports the granted bundle with it.", type: "object", required: ["xp", "items", "money", "restoreEnergy"], properties: { xp: { type: "integer", minimum: 0 }, items: { type: "array", items: { type: "object", required: ["item", "quantity"], properties: { item: { type: "string", description: "Product code." }, quality: { type: "integer", minimum: 1, description: "Item quality, present only when the item has one." }, quantity: { type: "integer", format: "int64", minimum: 1 } } } }, money: { type: "integer", format: "int64", minimum: 0, description: "Reward in the citizen's national currency, in minor units." }, gold: { type: "integer", format: "int64", minimum: 0, description: "Gold reward in minor units." }, equipment: { type: "object", required: ["quality", "quantity"], properties: { quality: { type: "integer", minimum: 1, description: "Equipment quality. The games-room reward matches a worn slot when available; other equipment rewards use random slots." }, quantity: { type: "integer", minimum: 1 } } }, medals: { description: "Kinds of the medals this claim awarded. Present only in a claim response's granted bundle.", type: "array", items: { type: "string" } }, achievements: { description: "Ids of the achievements this claim unlocked. Present only in a claim response's granted bundle.", type: "array", items: { type: "string" } }, createdEquipment: { description: "The equipment items this claim created, with their ids. Present only in a claim response's granted bundle.", type: "array", items: { type: "object", required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", description: "Equipment slot, e.g. footwear." }, quality: { type: "integer", minimum: 1 }, set: { type: "string", description: "Equipment set name, when the item belongs to one." }, name: { type: "string", description: "The item's name, when it has one." } } } }, medkits: { type: "integer", format: "int64", minimum: 1, description: "Number of medical kits awarded." }, restoreEnergy: { type: "boolean", description: "Whether claiming this mission refills energy." } } }, { description: "What this claim actually granted, from the same transaction that credited it. Present only on claim responses." }] }, currentMission: { type: "integer", minimum: 1, description: "One-based number of the first unclaimed mission. After the listed missions are claimed, this is one past the end of the list." }, items: { type: "array", items: { type: "object", required: ["task", "number", "progress", "target", "completed", "claimed", "reward"], properties: { number: { type: "integer", minimum: 1 }, progress: { type: "integer", minimum: 0 }, target: { type: "integer", minimum: 1 }, task: { type: "string", enum: ["visit_profile", "train", "find_job", "work", "practice_hits", "restore_energy", "practice_berserk", "upload_avatar", "check_notifications", "check_map", "buy_on_market", "travel_to_capital", "list_product_offer", "view_exchange", "list_exchange_offer", "view_wallet_ledger", "view_company", "view_equipment", "equip_gear", "view_auctions", "auction_gear", "view_country_shouts", "post_shout", "found_newspaper", "publish_article", "read_article", "subscribe_newspaper", "request_friendship", "send_gift", "write_profile_text", "view_battle", "practice_twenty_five_hits", "view_country_units", "travel_abroad", "view_tournaments", "view_country_congress", "view_country_laws", "view_country_elections", "view_country_parties", "view_country_treasury", "view_achievements", "play_game_room", "replace_gear", "unequip_gear", "merge_gear", "split_gear", "recycle_gear", "buy_potion", "drink_potion", "use_medkit", "view_inventory", "fight_with_rifle", "view_battle_damage", "cancel_product_offer", "buy_exchange_offer", "view_stock_companies", "view_contract_templates", "like_article", "comment_article", "view_inbox", "view_rankings", "view_world_events", "donate_to_treasury", "work_three_days", "train_three_days"] }, completed: { type: "boolean" }, claimed: { type: "boolean" }, reward: { description: "A reward bundle. Tutorial missions list their fixed reward with it, and every mission claim response reports the granted bundle with it.", type: "object", required: ["xp", "items", "money", "restoreEnergy"], properties: { xp: { type: "integer", minimum: 0 }, items: { type: "array", items: { type: "object", required: ["item", "quantity"], properties: { item: { type: "string", description: "Product code." }, quality: { type: "integer", minimum: 1, description: "Item quality, present only when the item has one." }, quantity: { type: "integer", format: "int64", minimum: 1 } } } }, money: { type: "integer", format: "int64", minimum: 0, description: "Reward in the citizen's national currency, in minor units." }, gold: { type: "integer", format: "int64", minimum: 0, description: "Gold reward in minor units." }, equipment: { type: "object", required: ["quality", "quantity"], properties: { quality: { type: "integer", minimum: 1, description: "Equipment quality. The games-room reward matches a worn slot when available; other equipment rewards use random slots." }, quantity: { type: "integer", minimum: 1 } } }, medals: { description: "Kinds of the medals this claim awarded. Present only in a claim response's granted bundle.", type: "array", items: { type: "string" } }, achievements: { description: "Ids of the achievements this claim unlocked. Present only in a claim response's granted bundle.", type: "array", items: { type: "string" } }, createdEquipment: { description: "The equipment items this claim created, with their ids. Present only in a claim response's granted bundle.", type: "array", items: { type: "object", required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", description: "Equipment slot, e.g. footwear." }, quality: { type: "integer", minimum: 1 }, set: { type: "string", description: "Equipment set name, when the item belongs to one." }, name: { type: "string", description: "The item's name, when it has one." } } } }, medkits: { type: "integer", format: "int64", minimum: 1, description: "Number of medical kits awarded." }, restoreEnergy: { type: "boolean", description: "Whether claiming this mission refills energy." } } } } } } } } } }, responseFields: ["granted", "currentMission", "items"] },
14449
14451
  { operationId: "GetAuctionAlert", name: "get-auction-alert", method: "GET", path: "/api/me/auction-alerts/{auctionId}", spec: "notify.yaml", write: false, retry: "unsafe", description: "GetAuctionAlert", parameters: [{ name: "auctionId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["subscribed"], properties: { subscribed: { type: "boolean" } } } } }, responseFields: ["subscribed"] },
14450
14452
  { operationId: "SetAuctionAlert", name: "set-auction-alert", method: "PUT", path: "/api/me/auction-alerts/{auctionId}", spec: "notify.yaml", write: true, retry: "natural", description: "SetAuctionAlert", parameters: [{ name: "auctionId", in: "path", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }], body: { required: true, schema: { type: "object", additionalProperties: false, required: ["subscribed"], properties: { subscribed: { type: "boolean" } } } }, requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["subscribed"], properties: { subscribed: { type: "boolean" } } } } }, responseFields: ["subscribed"] },
14451
- { operationId: "ListNotifications", name: "list-notifications", method: "GET", path: "/api/me/notifications", spec: "notify.yaml", write: false, retry: "unsafe", description: "ListNotifications", parameters: [{ name: "cursor", in: "query", schema: { type: "string" } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "page", in: "query", description: "One-based page number. Mutually exclusive with cursor. Omit to use cursor pagination.", schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "category", in: "query", style: "form", explode: true, schema: { type: "array", minItems: 1, items: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] } } }, { name: "unreadOnly", in: "query", schema: { type: "boolean", default: false } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "nextCursor", "unreadCount"], properties: { items: { type: "array", items: { oneOf: [{ type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["fx.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["orderId", "quantity", "proceeds", "refundedQty"], properties: { orderId: { type: "integer", format: "int64", minimum: 1 }, quantity: { type: "integer", format: "int64" }, proceeds: { type: "integer", format: "int64" }, refundedQty: { type: "integer", format: "int64" }, sellAsset: { type: "string", description: "Asset sold and released from escrow." }, buyAsset: { type: "string", description: "Asset credited to the seller." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["market.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["orderId", "buyerId", "item", "quality", "quantity", "subtotal", "currencyCountryId"], properties: { orderId: { type: "integer", format: "int64", minimum: 1 }, buyerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, buyerName: { type: "string", description: "Current display name when the citizen exists." }, item: { type: "string", description: "Product market item code." }, quality: { type: "integer", format: "int64", minimum: 0 }, quantity: { type: "integer", format: "int64", minimum: 1 }, subtotal: { type: "integer", format: "int64", minimum: 1, description: "Trade amount before taxes in minor currency units." }, netProceeds: { type: "integer", format: "int64", minimum: 0, description: "Proceeds credited to the seller in minor currency units." }, currencyCountryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["article.published"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { oneOf: [{ type: "object", additionalProperties: false, required: ["newspaperId", "articleId"], properties: { newspaperId: { type: "integer", format: "int64", minimum: 1 }, articleId: { type: "integer", format: "int64", minimum: 1 } } }, { type: "object", additionalProperties: false, required: ["hidden"], properties: { hidden: { type: "boolean", enum: [true] } } }] }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId", "message"], properties: { countryId: { type: "integer" }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["battle.hero"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["round", "side", "gold"], properties: { battleId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "Omitted for practice battles." }] }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "integer", enum: [0, 1], description: "0 for attackers or black, 1 for defenders or white." }, gold: { type: "integer", minimum: 1, description: "Reward in whole Gold." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["battle.drops"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["round", "equipment", "potions"], properties: { battleId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "Omitted for practice battles." }] }, round: { type: "integer", format: "int64", minimum: 1 }, equipment: { type: "integer", format: "int64", minimum: 0 }, potions: { type: "integer", format: "int64", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["equipment.merged"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, description: "Primera's conversion notice. Items are snapshots from the merge transaction; the consumed items no longer exist.", required: ["consumed", "product", "fee"], properties: { consumed: { type: "array", description: "The three merged items in the order they were selected.", minItems: 3, maxItems: 3, items: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] }, quality: { type: "integer", minimum: 1, maximum: 8 }, name: { type: "string" }, set: { type: "string" }, mergedBy: { type: "string", description: "Name recorded when the equipment was merged." }, modifiers: { type: "array", description: "Original order, including repeated and historical kinds.", items: { type: "object", additionalProperties: false, required: ["kind", "value"], properties: { kind: { type: "string" }, value: { type: "integer", description: "Percentages use basis points. Economic skill uses hundredths of a point." } } } } } } }, product: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] }, quality: { type: "integer", minimum: 1, maximum: 8 }, name: { type: "string" }, set: { type: "string" }, mergedBy: { type: "string", description: "Name recorded when the equipment was merged." }, modifiers: { type: "array", description: "Original order, including repeated and historical kinds.", items: { type: "object", additionalProperties: false, required: ["kind", "value"], properties: { kind: { type: "string" }, value: { type: "integer", description: "Percentages use basis points. Economic skill uses hundredths of a point." } } } } } }, fee: { type: "integer", format: "int64", minimum: 0, description: "Gold paid for the conversion, in hundredths." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizen.level"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["level", "gold"], properties: { level: { type: "integer", format: "int64", minimum: 1 }, gold: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["achievement.awarded"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["achievementId"], properties: { achievementId: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["reward.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["source", "entityId", "gains"], properties: { source: { type: "string", enum: ["promotion", "motivation", "unit_supply", "unit_funds", "battle_subsidy", "contract", "invitation", "factory_sale", "tournament", "resistance_tournament"] }, entityId: { type: "integer", format: "int64" }, gains: { type: "array", minItems: 1, items: { type: "object", required: ["item", "quantity"], properties: { item: { type: "string", description: "Product code, special item code, equipment, xp, gold or cur:<countryId>. Money quantities are minor units." }, quantity: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1 }, reference: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" } } } } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["medal.awarded"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["medal", "gold"], properties: { medal: { type: "string", enum: ["super_soldier", "hard_worker", "media_mogul", "congress", "resistance", "tournament", "tester"] }, gold: { type: "integer", enum: [5], description: "Reward in whole Gold." }, medkits: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.ending"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["auctionId", "endsAt"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, endsAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.refund"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "asset", "amount"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, asset: { type: "string", enum: ["goods", "gold"] }, amount: { type: "integer", format: "int64", minimum: 1, description: "退回数量,金币以分计。" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["webhook.disabled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["friend.requested"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["citizenId", "countryId"], properties: { citizenId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, citizenName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["friend.accepted"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["citizenId", "countryId"], properties: { citizenId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, citizenName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["law.proposed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["lawId", "type", "title"], properties: { lawId: { type: "integer", format: "int64", minimum: 1 }, type: { type: "string" }, title: { type: "string" }, closesAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["law.resolved"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["lawId", "result"], properties: { lawId: { type: "integer", format: "int64", minimum: 1 }, result: { type: "string", enum: ["ACCEPTED_SUCCESS", "REJECTED", "ACCEPTED_FAILED"] }, failReason: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["election.result"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["electionType", "round", "countryId", "elected"], properties: { electionType: { type: "string", enum: ["congress", "president", "party"] }, round: { type: "integer" }, countryId: { type: "integer", minimum: 0 }, partyId: { type: "integer", format: "int64", minimum: 1 }, elected: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.applied"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "applicantId", "countryId"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, applicantId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, applicantName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "countryId", "approved"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, countryId: { type: "integer", minimum: 0 }, approved: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.revoked"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId"], properties: { countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["minister.changed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId", "office", "appointed", "lawId"], properties: { countryId: { type: "integer", minimum: 0 }, office: { type: "string" }, appointed: { type: "boolean" }, lawId: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.joined"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "memberId"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, memberId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, memberName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.removed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "reason"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, reason: { type: "string", enum: ["removed", "citizenship_changed"] } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "message"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.applied"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "unitId", "applicantId"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, applicantId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, applicantName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId", "approved"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, approved: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.removed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId", "message"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.outbid"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price", "endsAt"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 }, endsAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.won"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.sold"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.expired"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.hired"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "offerId", "wage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, offerId: { type: "integer", format: "int64", minimum: 1 }, wage: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.dismissed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "offerId", "wage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, offerId: { type: "integer", format: "int64", minimum: 1 }, wage: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.resigned"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "workerId"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, workerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, workerName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["work.blocked"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "workerId", "day", "reason", "resource", "shortage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, workerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, workerName: { type: "string", description: "Current display name when the citizen exists." }, day: { type: "integer", format: "int64", minimum: 1 }, reason: { type: "string" }, resource: { type: "string" }, shortage: { type: "integer", format: "int64", minimum: 1 }, personalAccount: { type: "boolean", description: "The owner’s personal wallet or inventory was short." }, closedOfferCount: { type: "integer", minimum: 1, description: "Number of open recruitment offers withdrawn by this failed shift." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["contract.proposed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "proposerId", "summary"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, proposerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, proposerName: { type: "string", description: "Current display name when the citizen exists." }, summary: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["contract.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "status"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, status: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.due"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "dueAt", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, dueAt: { type: "string", format: "date-time" }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.repaid"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.defaulted"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["stock.dividend"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "amount"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["stock.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "orderId", "quantity", "unitPrice"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, orderId: { type: "integer", format: "int64", minimum: 1 }, quantity: { type: "integer", format: "int64", minimum: 1 }, unitPrice: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["gift.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["giftId", "senderId"], properties: { giftId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, senderId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, senderName: { type: "string", description: "Current display name when the citizen exists." }, item: { type: "string" }, quality: { type: "integer", minimum: 0 }, quantity: { type: "integer", format: "int64", minimum: 1 }, equipmentId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["donation.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["donorId", "target", "targetId", "asset", "amount", "reason"], properties: { donorId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, donorName: { type: "string", description: "Current display name when the citizen exists." }, target: { type: "string", enum: ["citizen", "company", "unit", "treasury"] }, targetId: { type: "string", pattern: "^(0|[1-9][0-9]*)$" }, asset: { type: "string", pattern: "^(gold|cur:[0-9]+)$" }, amount: { type: "integer", format: "int64", minimum: 1, description: "Amount in minor currency units." }, reason: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["article.commented"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["articleId", "commentId", "commenterId", "summary"], properties: { articleId: { type: "integer", format: "int64", minimum: 1 }, commentId: { type: "integer", format: "int64", minimum: 1 }, commenterId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, commenterName: { type: "string", description: "Current display name when the citizen exists." }, summary: { type: "string", maxLength: 160 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["feedback.resolved"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["feedbackId", "title", "status", "reply"], properties: { feedbackId: { type: "integer", format: "int64", minimum: 1 }, title: { type: "string" }, status: { type: "string", enum: ["accepted", "rejected", "duplicate"] }, reply: { type: "string" }, duplicateOf: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }], discriminator: { propertyName: "kind", mapping: { "law.proposed": "#/components/schemas/LawProposedNotification", "law.resolved": "#/components/schemas/LawResolvedNotification", "election.result": "#/components/schemas/ElectionResultNotification", "citizenship.applied": "#/components/schemas/CitizenshipAppliedNotification", "citizenship.decided": "#/components/schemas/CitizenshipDecidedNotification", "citizenship.revoked": "#/components/schemas/CitizenshipRevokedNotification", "minister.changed": "#/components/schemas/MinisterChangedNotification", "party.joined": "#/components/schemas/PartyJoinedNotification", "party.removed": "#/components/schemas/PartyRemovedNotification", "party.welcome": "#/components/schemas/PartyWelcomeNotification", "unit.applied": "#/components/schemas/UnitAppliedNotification", "unit.decided": "#/components/schemas/UnitDecidedNotification", "unit.removed": "#/components/schemas/UnitRemovedNotification", "unit.welcome": "#/components/schemas/UnitWelcomeNotification", "friend.requested": "#/components/schemas/FriendRequestedNotification", "friend.accepted": "#/components/schemas/FriendAcceptedNotification", "fx.filled": "#/components/schemas/FXFilledNotification", "market.filled": "#/components/schemas/MarketFilledNotification", "article.published": "#/components/schemas/ArticlePublishedNotification", "battle.hero": "#/components/schemas/BattleHeroNotification", "battle.drops": "#/components/schemas/BattleDropsNotification", "equipment.merged": "#/components/schemas/EquipmentMergedNotification", "citizen.level": "#/components/schemas/CitizenLevelNotification", "achievement.awarded": "#/components/schemas/AchievementAwardedNotification", "reward.received": "#/components/schemas/RewardReceivedNotification", "medal.awarded": "#/components/schemas/MedalAwardedNotification", "auction.refund": "#/components/schemas/AuctionRefundNotification", "auction.ending": "#/components/schemas/AuctionEndingNotification", "webhook.disabled": "#/components/schemas/WebhookDisabledNotification", "auction.outbid": "#/components/schemas/AuctionOutbidNotification", "auction.won": "#/components/schemas/AuctionWonNotification", "auction.sold": "#/components/schemas/AuctionSoldNotification", "auction.expired": "#/components/schemas/AuctionExpiredNotification", "job.hired": "#/components/schemas/JobHiredNotification", "job.dismissed": "#/components/schemas/JobDismissedNotification", "job.resigned": "#/components/schemas/JobResignedNotification", "work.blocked": "#/components/schemas/WorkBlockedNotification", "contract.proposed": "#/components/schemas/ContractProposedNotification", "contract.decided": "#/components/schemas/ContractDecidedNotification", "loan.due": "#/components/schemas/LoanDueNotification", "loan.repaid": "#/components/schemas/LoanRepaidNotification", "loan.defaulted": "#/components/schemas/LoanDefaultedNotification", "stock.dividend": "#/components/schemas/StockDividendNotification", "stock.filled": "#/components/schemas/StockFilledNotification", "article.commented": "#/components/schemas/ArticleCommentedNotification", "feedback.resolved": "#/components/schemas/FeedbackResolvedNotification", "donation.received": "#/components/schemas/DonationReceivedNotification", "gift.received": "#/components/schemas/GiftReceivedNotification", welcome: "#/components/schemas/WelcomeNotification" } } } }, nextCursor: { type: ["string", "null"] }, unreadCount: { type: "integer", minimum: 0 }, page: { description: "Requested page number. Present only for numbered requests.", type: "integer", format: "int64", minimum: 1 }, total: { description: "Total visible notifications matching category and unreadOnly. Present only for numbered requests.", type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["items", "nextCursor", "unreadCount", "page", "total"] },
14453
+ { operationId: "ListNotifications", name: "list-notifications", method: "GET", path: "/api/me/notifications", spec: "notify.yaml", write: false, retry: "unsafe", description: "ListNotifications", parameters: [{ name: "cursor", in: "query", schema: { type: "string" } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }, { name: "page", in: "query", description: "One-based page number. Mutually exclusive with cursor. Omit to use cursor pagination.", schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "category", in: "query", style: "form", explode: true, schema: { type: "array", minItems: 1, items: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] } } }, { name: "unreadOnly", in: "query", schema: { type: "boolean", default: false } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "nextCursor", "unreadCount"], properties: { items: { type: "array", items: { oneOf: [{ type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["fx.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["orderId", "quantity", "proceeds", "refundedQty"], properties: { orderId: { type: "integer", format: "int64", minimum: 1 }, quantity: { type: "integer", format: "int64" }, proceeds: { type: "integer", format: "int64" }, refundedQty: { type: "integer", format: "int64" }, sellAsset: { type: "string", description: "Asset sold and released from escrow." }, buyAsset: { type: "string", description: "Asset credited to the seller." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["market.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["orderId", "buyerId", "item", "quality", "quantity", "subtotal", "currencyCountryId"], properties: { orderId: { type: "integer", format: "int64", minimum: 1 }, buyerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, buyerName: { type: "string", description: "Current display name when the citizen exists." }, item: { type: "string", description: "Product market item code." }, quality: { type: "integer", format: "int64", minimum: 0 }, quantity: { type: "integer", format: "int64", minimum: 1 }, subtotal: { type: "integer", format: "int64", minimum: 1, description: "Trade amount before taxes in minor currency units." }, netProceeds: { type: "integer", format: "int64", minimum: 0, description: "Proceeds credited to the seller in minor currency units." }, currencyCountryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["article.published"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { oneOf: [{ type: "object", additionalProperties: false, required: ["newspaperId", "articleId"], properties: { newspaperId: { type: "integer", format: "int64", minimum: 1 }, articleId: { type: "integer", format: "int64", minimum: 1 } } }, { type: "object", additionalProperties: false, required: ["hidden"], properties: { hidden: { type: "boolean", enum: [true] } } }] }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId", "message"], properties: { countryId: { type: "integer" }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["battle.hero"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["round", "side", "gold"], properties: { battleId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "Omitted for practice battles." }] }, round: { type: "integer", format: "int64", minimum: 1 }, side: { type: "integer", enum: [0, 1], description: "0 for attackers or black, 1 for defenders or white." }, gold: { type: "integer", minimum: 1, description: "Reward in whole Gold." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["battle.drops"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["round", "equipment", "potions"], properties: { battleId: { allOf: [{ type: "integer", format: "int64", minimum: 1 }, { description: "Omitted for practice battles." }] }, round: { type: "integer", format: "int64", minimum: 1 }, equipment: { type: "integer", format: "int64", minimum: 0 }, potions: { type: "integer", format: "int64", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["equipment.merged"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, description: "Primera's conversion notice. Items are snapshots from the merge transaction; the consumed items no longer exist.", required: ["consumed", "product", "fee"], properties: { consumed: { type: "array", description: "The three merged items in the order they were selected.", minItems: 3, maxItems: 3, items: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] }, quality: { type: "integer", minimum: 1, maximum: 8 }, name: { type: "string" }, set: { type: "string" }, mergedBy: { type: "string", description: "Name recorded when the equipment was merged." }, modifiers: { type: "array", description: "Original order, including repeated and historical kinds.", items: { type: "object", additionalProperties: false, required: ["kind", "value"], properties: { kind: { type: "string" }, value: { type: "integer", description: "Percentages use basis points. Economic skill uses hundredths of a point." } } } } } } }, product: { type: "object", additionalProperties: false, required: ["id", "slot", "quality"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, slot: { type: "string", enum: ["head", "body", "legs", "offHand", "footwear", "accessory", "charm", "eye"] }, quality: { type: "integer", minimum: 1, maximum: 8 }, name: { type: "string" }, set: { type: "string" }, mergedBy: { type: "string", description: "Name recorded when the equipment was merged." }, modifiers: { type: "array", description: "Original order, including repeated and historical kinds.", items: { type: "object", additionalProperties: false, required: ["kind", "value"], properties: { kind: { type: "string" }, value: { type: "integer", description: "Percentages use basis points. Economic skill uses hundredths of a point." } } } } } }, fee: { type: "integer", format: "int64", minimum: 0, description: "Gold paid for the conversion, in hundredths." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizen.level"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["level", "gold"], properties: { level: { type: "integer", format: "int64", minimum: 1 }, gold: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["achievement.awarded"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["achievementId"], properties: { achievementId: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["reward.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["source", "entityId", "gains"], properties: { source: { type: "string", enum: ["promotion", "motivation", "unit_supply", "unit_funds", "battle_subsidy", "contract", "invitation", "factory_sale", "tournament", "resistance_tournament"] }, entityId: { type: "integer", format: "int64" }, gains: { type: "array", minItems: 1, items: { type: "object", required: ["item", "quantity"], properties: { item: { type: "string", description: "Product code, special item code, equipment, xp, gold or cur:<countryId>. Money quantities are minor units." }, quantity: { type: "integer", format: "int64", minimum: 1 }, quality: { type: "integer", minimum: 1 }, reference: { type: "integer", format: "int64", minimum: 1 }, name: { type: "string" } } } } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["medal.awarded"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["medal", "gold"], properties: { medal: { type: "string", enum: ["super_soldier", "hard_worker", "media_mogul", "congress", "resistance", "tournament", "tester"] }, gold: { type: "integer", enum: [5], description: "Reward in whole Gold." }, medkits: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.ending"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["auctionId", "endsAt"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, endsAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.refund"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "asset", "amount"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, asset: { type: "string", enum: ["goods", "gold"] }, amount: { type: "integer", format: "int64", minimum: 1, description: "退回数量,金币以分计。" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["webhook.disabled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["friend.requested"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["citizenId", "countryId"], properties: { citizenId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, citizenName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["friend.accepted"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["citizenId", "countryId"], properties: { citizenId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, citizenName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["law.proposed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["lawId", "type", "title"], properties: { lawId: { type: "integer", format: "int64", minimum: 1 }, type: { type: "string" }, title: { type: "string" }, closesAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["law.resolved"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["lawId", "result"], properties: { lawId: { type: "integer", format: "int64", minimum: 1 }, result: { type: "string", enum: ["ACCEPTED_SUCCESS", "REJECTED", "ACCEPTED_FAILED"] }, failReason: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["election.result"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["electionType", "round", "countryId", "elected"], properties: { electionType: { type: "string", enum: ["congress", "president", "party"] }, round: { type: "integer" }, countryId: { type: "integer", minimum: 0 }, partyId: { type: "integer", format: "int64", minimum: 1 }, elected: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.applied"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "applicantId", "countryId"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, applicantId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, applicantName: { type: "string", description: "Current display name when the citizen exists." }, countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "countryId", "approved"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, countryId: { type: "integer", minimum: 0 }, approved: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["citizenship.revoked"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId"], properties: { countryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["minister.changed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["countryId", "office", "appointed", "lawId"], properties: { countryId: { type: "integer", minimum: 0 }, office: { type: "string" }, appointed: { type: "boolean" }, lawId: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.joined"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "memberId"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, memberId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, memberName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.removed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "reason"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, reason: { type: "string", enum: ["removed", "citizenship_changed"] } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["party.welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["partyId", "message"], properties: { partyId: { type: "integer", format: "int64", minimum: 1 }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.applied"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["applicationId", "unitId", "applicantId"], properties: { applicationId: { type: "integer", format: "int64", minimum: 1 }, unitId: { type: "integer", format: "int64", minimum: 1 }, applicantId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, applicantName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId", "approved"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, approved: { type: "boolean" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.removed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["unit.welcome"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["unitId", "message"], properties: { unitId: { type: "integer", format: "int64", minimum: 1 }, message: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.outbid"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price", "endsAt"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 }, endsAt: { type: "string", format: "date-time" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.won"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.sold"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot", "price"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" }, price: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["auction.expired"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["auctionId", "lot"], properties: { auctionId: { type: "integer", format: "int64", minimum: 1 }, lot: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.hired"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "offerId", "wage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, offerId: { type: "integer", format: "int64", minimum: 1 }, wage: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.dismissed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "offerId", "wage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, offerId: { type: "integer", format: "int64", minimum: 1 }, wage: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.wage_changed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "oldWage", "newWage", "currencyCountryId"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, oldWage: { type: "integer", format: "int64", minimum: 1, description: "Previous wage in minor currency units." }, newWage: { type: "integer", format: "int64", minimum: 1, description: "New wage in minor currency units." }, currencyCountryId: { type: "integer", minimum: 0 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["job.resigned"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "workerId"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, workerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, workerName: { type: "string", description: "Current display name when the citizen exists." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["work.blocked"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "workerId", "day", "reason", "resource", "shortage"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, workerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, workerName: { type: "string", description: "Current display name when the citizen exists." }, day: { type: "integer", format: "int64", minimum: 1 }, reason: { type: "string" }, resource: { type: "string" }, shortage: { type: "integer", format: "int64", minimum: 1 }, personalAccount: { type: "boolean", description: "The owner’s personal wallet or inventory was short." }, closedOfferCount: { type: "integer", minimum: 1, description: "Number of open recruitment offers withdrawn by this failed shift." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["contract.proposed"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "proposerId", "summary"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, proposerId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, proposerName: { type: "string", description: "Current display name when the citizen exists." }, summary: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["contract.decided"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "status"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, status: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.due"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "dueAt", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, dueAt: { type: "string", format: "date-time" }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.repaid"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["loan.defaulted"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["contractId", "amount"], properties: { contractId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["stock.dividend"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "amount"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, amount: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["stock.filled"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", additionalProperties: false, required: ["companyId", "orderId", "quantity", "unitPrice"], properties: { companyId: { type: "integer", format: "int64", minimum: 1 }, orderId: { type: "integer", format: "int64", minimum: 1 }, quantity: { type: "integer", format: "int64", minimum: 1 }, unitPrice: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["gift.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["giftId", "senderId"], properties: { giftId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, senderId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, senderName: { type: "string", description: "Current display name when the citizen exists." }, item: { type: "string" }, quality: { type: "integer", minimum: 0 }, quantity: { type: "integer", format: "int64", minimum: 1 }, equipmentId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["donation.received"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["donorId", "target", "targetId", "asset", "amount", "reason"], properties: { donorId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, donorName: { type: "string", description: "Current display name when the citizen exists." }, target: { type: "string", enum: ["citizen", "company", "unit", "treasury"] }, targetId: { type: "string", pattern: "^(0|[1-9][0-9]*)$" }, asset: { type: "string", pattern: "^(gold|cur:[0-9]+)$" }, amount: { type: "integer", format: "int64", minimum: 1, description: "Amount in minor currency units." }, reason: { type: "string" } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["article.commented"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["articleId", "commentId", "commenterId", "summary"], properties: { articleId: { type: "integer", format: "int64", minimum: 1 }, commentId: { type: "integer", format: "int64", minimum: 1 }, commenterId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, commenterName: { type: "string", description: "Current display name when the citizen exists." }, summary: { type: "string", maxLength: 160 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, { type: "object", required: ["id", "kind", "category", "payload", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, kind: { type: "string", enum: ["feedback.resolved"] }, category: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] }, payload: { type: "object", required: ["feedbackId", "title", "status", "reply"], properties: { feedbackId: { type: "integer", format: "int64", minimum: 1 }, title: { type: "string" }, status: { type: "string", enum: ["accepted", "rejected", "duplicate"] }, reply: { type: "string" }, duplicateOf: { type: "integer", format: "int64", minimum: 1 } } }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }], discriminator: { propertyName: "kind", mapping: { "law.proposed": "#/components/schemas/LawProposedNotification", "law.resolved": "#/components/schemas/LawResolvedNotification", "election.result": "#/components/schemas/ElectionResultNotification", "citizenship.applied": "#/components/schemas/CitizenshipAppliedNotification", "citizenship.decided": "#/components/schemas/CitizenshipDecidedNotification", "citizenship.revoked": "#/components/schemas/CitizenshipRevokedNotification", "minister.changed": "#/components/schemas/MinisterChangedNotification", "party.joined": "#/components/schemas/PartyJoinedNotification", "party.removed": "#/components/schemas/PartyRemovedNotification", "party.welcome": "#/components/schemas/PartyWelcomeNotification", "unit.applied": "#/components/schemas/UnitAppliedNotification", "unit.decided": "#/components/schemas/UnitDecidedNotification", "unit.removed": "#/components/schemas/UnitRemovedNotification", "unit.welcome": "#/components/schemas/UnitWelcomeNotification", "friend.requested": "#/components/schemas/FriendRequestedNotification", "friend.accepted": "#/components/schemas/FriendAcceptedNotification", "fx.filled": "#/components/schemas/FXFilledNotification", "market.filled": "#/components/schemas/MarketFilledNotification", "article.published": "#/components/schemas/ArticlePublishedNotification", "battle.hero": "#/components/schemas/BattleHeroNotification", "battle.drops": "#/components/schemas/BattleDropsNotification", "equipment.merged": "#/components/schemas/EquipmentMergedNotification", "citizen.level": "#/components/schemas/CitizenLevelNotification", "achievement.awarded": "#/components/schemas/AchievementAwardedNotification", "reward.received": "#/components/schemas/RewardReceivedNotification", "medal.awarded": "#/components/schemas/MedalAwardedNotification", "auction.refund": "#/components/schemas/AuctionRefundNotification", "auction.ending": "#/components/schemas/AuctionEndingNotification", "webhook.disabled": "#/components/schemas/WebhookDisabledNotification", "auction.outbid": "#/components/schemas/AuctionOutbidNotification", "auction.won": "#/components/schemas/AuctionWonNotification", "auction.sold": "#/components/schemas/AuctionSoldNotification", "auction.expired": "#/components/schemas/AuctionExpiredNotification", "job.hired": "#/components/schemas/JobHiredNotification", "job.dismissed": "#/components/schemas/JobDismissedNotification", "job.wage_changed": "#/components/schemas/JobWageChangedNotification", "job.resigned": "#/components/schemas/JobResignedNotification", "work.blocked": "#/components/schemas/WorkBlockedNotification", "contract.proposed": "#/components/schemas/ContractProposedNotification", "contract.decided": "#/components/schemas/ContractDecidedNotification", "loan.due": "#/components/schemas/LoanDueNotification", "loan.repaid": "#/components/schemas/LoanRepaidNotification", "loan.defaulted": "#/components/schemas/LoanDefaultedNotification", "stock.dividend": "#/components/schemas/StockDividendNotification", "stock.filled": "#/components/schemas/StockFilledNotification", "article.commented": "#/components/schemas/ArticleCommentedNotification", "feedback.resolved": "#/components/schemas/FeedbackResolvedNotification", "donation.received": "#/components/schemas/DonationReceivedNotification", "gift.received": "#/components/schemas/GiftReceivedNotification", welcome: "#/components/schemas/WelcomeNotification" } } } }, nextCursor: { type: ["string", "null"] }, unreadCount: { type: "integer", minimum: 0 }, page: { description: "Requested page number. Present only for numbered requests.", type: "integer", format: "int64", minimum: 1 }, total: { description: "Total visible notifications matching category and unreadOnly. Present only for numbered requests.", type: "integer", format: "int64", minimum: 0 } } } } }, responseFields: ["items", "nextCursor", "unreadCount", "page", "total"] },
14452
14454
  { operationId: "DismissNotifications", name: "dismiss-notifications", method: "DELETE", path: "/api/me/notifications", spec: "notify.yaml", write: true, retry: "natural", description: "DismissNotifications", parameters: [{ name: "upToId", in: "query", required: true, schema: { type: "integer", format: "int64", minimum: 1 } }, { name: "category", in: "query", style: "form", explode: true, schema: { type: "array", minItems: 1, items: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] } } }], requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
14453
14455
  { operationId: "ReadNotifications", name: "read-notifications", method: "POST", path: "/api/me/notifications/read", spec: "notify.yaml", write: true, retry: "natural", description: "ReadNotifications", parameters: [], body: { required: true, schema: { type: "object", required: ["upToId"], properties: { upToId: { type: "integer", format: "int64", minimum: 1 }, categories: { type: "array", minItems: 1, items: { type: "string", enum: ["MONETARY_MARKET_ALERT", "COMPANY_ALERT", "SUBSTIDY_RECEIVED", "CITIZEN_PROGRESS", "MEDAL_RECEIVED", "ELECTIONS", "CONGRESS", "CITIZENSHIP", "OTHER", "DONATION", "TUTORIAL", "CONTRACTS", "MODERATORS", "MILITARY_UNIT", "PREMIUM_ACCOUNT", "STOCK_MARKET", "EQUIPMENT", "AUCTIONS", "ACHIEVEMENT_RECEIVED", "FORCE_SELL_EQUIPMENT", "FORCE_EQUIPMENT_OFF", "ACCOUNT_SITTING", "MISSION_COMPLETED", "MOTIVATION", "EVENT", "BROADCAST_SENT", "PARTY", "MENTORING", "PRODUCT_MARKET", "SPECIAL_ITEM", "ARTICLE_COMMENT", "SOCIAL_MENTION", "TASK_QUEUE", "REFERRAL_ACTIVITY", "GAME_ROOM"] } } } } }, requiresCredentials: true, responses: { "204": { kind: "empty" } }, responseFields: [] },
14454
14456
  { operationId: "ListConversations", name: "list-conversations", method: "GET", path: "/api/me/conversations", spec: "notify.yaml", write: false, retry: "unsafe", description: "ListConversations", parameters: [{ name: "cursor", in: "query", schema: { type: "string" } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }], requiresCredentials: true, responses: { "200": { kind: "json", schema: { type: "object", required: ["items", "nextCursor", "unreadCount"], properties: { items: { type: "array", items: { type: "object", required: ["peer", "lastMessage", "unreadCount", "blockedByMe"], properties: { peer: { type: "object", required: ["id", "name", "nation", "level"], properties: { id: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, name: { type: "string" }, nation: { type: "integer", minimum: 0 }, level: { type: "integer", minimum: 1 }, avatarVersion: { type: "string" } } }, lastMessage: { type: "object", required: ["id", "sender", "recipient", "body", "createdAt"], properties: { id: { type: "integer", format: "int64", minimum: 1 }, sender: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, recipient: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, body: { type: "string", minLength: 1, maxLength: 1e4 }, subject: { type: "string", minLength: 1, maxLength: 100 }, createdAt: { type: "string", format: "date-time" }, readAt: { type: "string", format: "date-time" } } }, unreadCount: { type: "integer", minimum: 0 }, blockedByMe: { type: "boolean" } } } }, nextCursor: { type: ["string", "null"] }, unreadCount: { type: "integer", minimum: 0 } } } } }, responseFields: ["items", "nextCursor", "unreadCount"] },
@@ -14603,7 +14605,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
14603
14605
  { operationId: "getCountry", name: "get-country", method: "GET", path: "/api/countries/{id}", spec: "world.yaml", write: false, retry: "unsafe", description: "Public country summary and controlled land IDs.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", minimum: 0 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { allOf: [{ type: "object", required: ["id", "leader", "treasury", "tax", "taxCategories", "population", "landCount"], properties: { id: { type: "integer", minimum: 0 }, leader: { anyOf: [{ type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, { type: "null" }] }, leaderName: { type: "string" }, treasury: { type: "integer", format: "int64", minimum: 0 }, tax: { type: "integer", minimum: 0 }, taxCategories: { type: "object", additionalProperties: { type: "object", additionalProperties: false, required: ["vatPercent", "importPercent"], properties: { vatPercent: { type: "integer", minimum: 0 }, importPercent: { type: "integer", minimum: 0 }, incomePercent: { type: "integer", minimum: 0, maximum: 50 }, productionPercent: { type: "integer", minimum: 0, maximum: 100 } } } }, minimumWage: { type: "integer", format: "int64", minimum: 0, description: "Statutory minimum wage in hundredths of the national currency." }, population: { type: "integer", format: "int64", minimum: 0 }, landCount: { type: "integer", minimum: 0 } } }, { type: "object", required: ["lands"], properties: { defenceMinister: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, defenceMinisterName: { type: "string" }, financeMinister: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, financeMinisterName: { type: "string" }, lands: { type: "array", items: { type: "integer", minimum: 0 } } } }] } } }, responseFields: ["id", "leader", "leaderName", "treasury", "tax", "taxCategories", "minimumWage", "population", "landCount", "defenceMinister", "defenceMinisterName", "financeMinister", "financeMinisterName", "lands"] },
14604
14606
  { operationId: "getCountryTreasury", name: "get-country-treasury", method: "GET", path: "/api/countries/{id}/treasury", spec: "world.yaml", write: false, retry: "unsafe", description: "Public treasury balances, building stock and taxes from the preceding game day.", parameters: [{ name: "id", in: "path", required: true, schema: { type: "integer", minimum: 0 } }], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", required: ["balances", "buildingStock", "yesterdayTaxes"], properties: { balances: { type: "array", description: "Gold first, then positive national currency balances in descending amount order. Amounts are in hundredths of each asset, including pending credits.", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "string", pattern: "^(gold|cur:[0-9]+)$" }, amount: { type: "integer", format: "int64", minimum: 0 } } } }, buildingStock: { type: "array", description: "Current catalog counts per building product. Mapping Primera's star groups to the current catalog is unverified.", items: { type: "object", required: ["product", "quantity"], properties: { product: { type: "string", enum: ["DEFENSE_SYSTEM", "HOSPITAL"] }, quantity: { type: "integer", format: "int64", minimum: 0 } } } }, yesterdayTaxes: { type: "object", required: ["day", "totals", "byType"], properties: { day: { description: "Previous game day. Zero if the current game day is the first.", type: "integer", minimum: 0 }, totals: { type: "array", description: "Individual asset totals in hundredths. Different currencies are never added together.", items: { type: "object", additionalProperties: false, required: ["asset", "amount"], properties: { asset: { type: "string", pattern: "^(gold|cur:[0-9]+)$" }, amount: { type: "integer", format: "int64", minimum: 0 } } } }, byType: { type: "array", items: { type: "object", required: ["type", "asset", "amount"], properties: { type: { type: "string", enum: ["income", "vat", "import", "marketCombined"], description: "Legacy market postings did not distinguish VAT from import tax." }, asset: { type: "string" }, amount: { type: "integer", format: "int64", minimum: 0 } } } } } } } } } }, responseFields: ["balances", "buildingStock", "yesterdayTaxes"] },
14605
14607
  { operationId: "listWorldEvents", name: "list-world-events", method: "GET", path: "/api/world/events", spec: "world.yaml", write: false, retry: "unsafe", description: "Public world announcements, newest first. With country, only events that involve it as attacker, defender, the event's own country, or the current or rightful owner of the event's region.", parameters: [{ name: "category", in: "query", schema: { type: "string", enum: ["military", "political"] } }, { name: "country", in: "query", description: "Local country ID; the Primera events page country filter.", schema: { type: "integer", minimum: 0 } }, { name: "cursor", in: "query", schema: { type: "string" } }, { name: "limit", in: "query", schema: { type: "integer", minimum: 1, maximum: 100, default: 20 } }], 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", "day", "occurredAt", "category"], properties: { battleId: { type: "integer", format: "int64", minimum: 1 }, fieldBuildingProposal: { type: "object", additionalProperties: false, required: ["land", "id"], properties: { land: { type: "integer", minimum: 0 }, id: { type: "integer", format: "int64", minimum: 1 }, nation: { type: "integer", minimum: 0 }, kind: { type: "string", enum: ["hospital", "defense_system"] }, quality: { type: "integer", description: "Number of buildings of this kind in the deployment.", minimum: 1, maximum: 5 }, round: { type: "integer", minimum: 1, maximum: 15 } } }, id: { type: "integer", format: "int64", minimum: 1 }, day: { type: "integer", minimum: 1 }, occurredAt: { type: "string", format: "date-time" }, category: { type: "string", enum: ["military", "political"] }, message: { type: "string", description: "Legacy event display text." }, kind: { type: "string", enum: ["citizen_joined", "president_elected", "practice_started", "sailor_week_announced", "field_building_proposed", "war_declared", "battle_started", "battle_ended", "resistance_started"] }, params: { type: "object", additionalProperties: false, properties: { citizenId: { type: "string", pattern: "^[1-9][0-9]*$", description: "Decimal encoding of the citizen ID." }, countryId: { type: "integer", minimum: 0 }, regionId: { type: "integer", minimum: 0 }, attackerId: { type: "integer", minimum: 0 }, defenderId: { type: "integer", minimum: 0 }, winnerId: { type: "integer", minimum: 0 }, startsAt: { type: "string", format: "date-time" }, endsAt: { type: "string", format: "date-time" }, building: { type: "string", enum: ["hospital", "defense_system"] }, count: { type: "integer", minimum: 1 }, round: { type: "integer", minimum: 1 } } } } } }, nextCursor: { type: ["string", "null"] } } } } }, responseFields: ["items", "nextCursor"] },
14606
- { operationId: "getWorldClock", name: "clock", method: "GET", path: "/api/world/clock", spec: "world.yaml", write: false, retry: "unsafe", description: "getWorldClock", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["now", "timezone", "day", "date", "nextDayAt", "scale"], properties: { now: { type: "string", format: "date-time" }, timezone: { type: "string", const: "Asia/Shanghai" }, day: { type: "integer", minimum: 1 }, date: { type: "string", format: "date" }, nextDayAt: { type: "string", format: "date-time" }, scale: { type: "number", format: "double", exclusiveMinimum: 0, maximum: 1000, description: "Game seconds elapsed per real second." } } } } }, responseFields: ["now", "timezone", "day", "date", "nextDayAt", "scale"] }
14608
+ { operationId: "getWorldClock", name: "clock", method: "GET", path: "/api/world/clock", spec: "world.yaml", write: false, retry: "unsafe", description: "getWorldClock", parameters: [], requiresCredentials: false, responses: { "200": { kind: "json", schema: { type: "object", additionalProperties: false, required: ["now", "timezone", "day", "date", "nextDayAt", "speed", "dayLength"], properties: { now: { type: "string", format: "date-time" }, timezone: { type: "string", const: "Asia/Shanghai" }, day: { type: "integer", minimum: 1 }, date: { type: "string", format: "date" }, nextDayAt: { type: "string", format: "date-time" }, speed: { type: "number", format: "double", minimum: 1, maximum: 1440, description: "Factor by which game rule durations are shortened." }, dayLength: { type: "number", format: "double", description: "Game day length in real seconds." } } } } }, responseFields: ["now", "timezone", "day", "date", "nextDayAt", "speed", "dayLength"] }
14607
14609
  ];
14608
14610
 
14609
14611
  // operation-model.ts
@@ -15517,15 +15519,14 @@ class Context {
15517
15519
  const local = performance.now();
15518
15520
  const sample = row2(response);
15519
15521
  const game = Date.parse(string4(sample.now));
15520
- const scale = number4(sample.scale);
15521
- if (!Number.isFinite(game) || scale <= 0 || scale > 1000)
15522
+ if (!Number.isFinite(game))
15522
15523
  return invalidResponse();
15523
- this.clockSample = { game, local, scale };
15524
+ this.clockSample = { game, local };
15524
15525
  return response;
15525
15526
  }
15526
15527
  get now() {
15527
15528
  const sample = this.clockSample;
15528
- return sample ? sample.game + sample.scale * (performance.now() - sample.local) : Date.now();
15529
+ return sample ? sample.game + (performance.now() - sample.local) : Date.now();
15529
15530
  }
15530
15531
  referenceOutput;
15531
15532
  constructor(command, options, args) {
@@ -15879,7 +15880,7 @@ async function energyRecovery(ctx, account, shortfall, roundLimited = false) {
15879
15880
 
15880
15881
  // resolve/battle.ts
15881
15882
  function battleSide(battle, side) {
15882
- if (!side && ["practice", "resistance", "civil"].some((kind) => kind === battle.kind)) {
15883
+ if (!side && ["practice", "civil"].some((kind) => kind === battle.kind)) {
15883
15884
  return usage2("This battle requires a side. Set --side attack or --side defend.");
15884
15885
  }
15885
15886
  return side;
@@ -16895,7 +16896,7 @@ var pageOutput2 = {
16895
16896
  nextCursor: "Cursor for the following page",
16896
16897
  truncated: "Whether more battles remain"
16897
16898
  };
16898
- var fightKind = (kind) => ["practice", "civil", "resistance"].some((value) => value === kind);
16899
+ var picksSide = (kind, presence) => kind === "practice" || kind === "civil" || (kind === "war" || kind === "resistance") && !presence?.lockedSide;
16899
16900
  var battleRef = (id) => ({ id, name: `Battle ${id}` });
16900
16901
  function battleRegion(world, entry) {
16901
16902
  return {
@@ -17025,33 +17026,6 @@ function sideBySide(value, attack, defend) {
17025
17026
  const [a, d] = [sideName("attack", attack), sideName("defend", defend)];
17026
17027
  return Array.from({ length: Math.max(left.length, right.length) }, (_, index) => ({ rank: index + 1, [a]: cell(left[index], index, attack), [d]: cell(right[index], index, defend) }));
17027
17028
  }
17028
- function positionChoices(world, options) {
17029
- if (!options)
17030
- return;
17031
- const regions = options.regions.map((entry) => ({
17032
- region: ref(byId(world.lands, entry.land)),
17033
- controllingCountry: countryRef(world, entry.owner),
17034
- multiplier: number4(entry.multiplier),
17035
- current: entry.current === true
17036
- }));
17037
- const elsewhere = number4(options.elsewhereMultiplier);
17038
- const best = Math.max(elsewhere, ...regions.map((entry) => entry.multiplier));
17039
- return { elsewhere, ...typeof options.elsewhereReason === "string" ? { elsewhereReason: options.elsewhereReason } : {}, best, regions };
17040
- }
17041
- var better = (choices, current) => choices.regions.filter((entry) => entry.multiplier > current && !entry.current);
17042
- function positionText(choices, current) {
17043
- if (!choices || typeof current !== "number")
17044
- return;
17045
- const places = better(choices, current);
17046
- if (!places.length) {
17047
- if (choices.elsewhereReason && current <= choices.elsewhere)
17048
- return `×${current}: ${choices.elsewhereReason}`;
17049
- return current >= choices.best ? `×${current}, the best available` : `×${current}`;
17050
- }
17051
- const best = Math.max(...places.map((entry) => entry.multiplier));
17052
- return `×${current} now; ×${best} from ${places.filter((entry) => entry.multiplier === best).map((entry) => `${entry.region.name} #${String(entry.region.id)}`).join(", ")}`;
17053
- }
17054
- var travelHints = (side, choices, current) => !choices || typeof current !== "number" ? [] : better(choices, current).map((entry) => ({ run: `esim travel ${shellWord(entry.region.name)} --dry-run`, note: `${side} ×${entry.multiplier} from ${entry.region.name} (now ×${current}).` }));
17055
17029
  async function battleOrders(ctx, account, id) {
17056
17030
  const citizen = account.citizen;
17057
17031
  const brief = (battle, side, bonusBps) => ({
@@ -17128,7 +17102,21 @@ function damageText(value) {
17128
17102
  return value.note;
17129
17103
  return value.damage === 0 ? "no hits yet" : undefined;
17130
17104
  }
17105
+ function presenceLine(value) {
17106
+ if (!isRow(value))
17107
+ return;
17108
+ const here = refText(value.currentRegion) ?? "?";
17109
+ if (value.inBattleRegion === true)
17110
+ return `in ${here}, the battle region`;
17111
+ return `in ${here}; fight from ${refText(value.battleRegion) ?? "the battle region"}, travel there first`;
17112
+ }
17131
17113
  function sideLine(result, sideRows) {
17114
+ const presence = isRow(result.presence) ? result.presence : undefined;
17115
+ if (presence && presence.inBattleRegion !== true) {
17116
+ const locked = typeof presence.lockedSide === "string" ? presence.lockedSide : undefined;
17117
+ const entry = locked ? sideRows.find((item) => item.side === locked) : undefined;
17118
+ return locked ? `you fight for ${locked}${entry && refText(entry.country) ? ` (${refText(entry.country)}, your country)` : ""} once you are in the battle region` : "attack or defend, your pick with --side, once you are in the battle region";
17119
+ }
17132
17120
  const open = sideRows.filter((entry) => entry.eligible === true).map((entry) => string4(entry.side));
17133
17121
  const closed = sideRows.filter((entry) => entry.eligible !== true).map((entry) => `${String(entry.side)} is closed to you${typeof entry.reason === "string" && entry.reason ? `: ${entry.reason}` : ""}`);
17134
17122
  const country = (side) => {
@@ -17143,16 +17131,11 @@ function sideLine(result, sideRows) {
17143
17131
  }
17144
17132
  function modifierRows(sideRows) {
17145
17133
  return sideRows.map((entry) => {
17146
- const multiplier = num(entry.positionMultiplier);
17147
- const choices = isRow(entry.positionOptions) ? entry.positionOptions : undefined;
17148
- const place = refText(entry.positionRegion);
17149
- const elsewhere = choices && multiplier !== undefined && (better(choices, multiplier).length > 0 || choices.elsewhereReason !== undefined && multiplier <= choices.elsewhere);
17150
- const position = !elsewhere && (multiplier === undefined || multiplier === 1) ? "" : choices ? positionText(choices, multiplier) ?? "" : `×${multiplier}${place ? ` (${place})` : ""}`;
17151
17134
  const orders = Array.isArray(entry.orders) ? entry.orders.map(String).join(", ") : "";
17152
17135
  const buildings = Array.isArray(entry.buildings) ? rows(entry.buildings).map((building) => `${String(building.kind)} Q${String(building.quality)} ${String(building.effect)}`).join(", ") : "";
17153
17136
  const subsidy = isRow(entry.subsidyPer100kDamage) && num(entry.subsidyPer100kDamage.minor) ? `${moneyText2(entry.subsidyPer100kDamage)} per 100k damage` : "";
17154
- return { side: entry.side ?? "", position, orders, buildings, subsidy };
17155
- }).filter((entry) => entry.position || entry.orders || entry.buildings || entry.subsidy);
17137
+ return { side: entry.side ?? "", orders, buildings, subsidy };
17138
+ }).filter((entry) => entry.orders || entry.buildings || entry.subsidy);
17156
17139
  }
17157
17140
  function weaponRows(value) {
17158
17141
  if (!Array.isArray(value))
@@ -17239,6 +17222,7 @@ function battleShowView(data) {
17239
17222
  ...hasRoundLeaders ? { "attack top": roundContributorLabel(entry.attackTop), "defend top": roundContributorLabel(entry.defendTop) } : {}
17240
17223
  })) } : {},
17241
17224
  ...fighterFields(result),
17225
+ ...!done && presenceLine(result.presence) ? { "you are": presenceLine(result.presence) } : {},
17242
17226
  ...!done && sideRows.length ? { side: sideLine(result, sideRows) } : {},
17243
17227
  ...typeof result.contextRound === "number" ? { "side facts from round": result.contextRound } : {},
17244
17228
  ...modifiers.length ? { modifiers } : {},
@@ -17422,8 +17406,6 @@ function battleFightView(data) {
17422
17406
  }
17423
17407
  if (result.currentRegion !== undefined)
17424
17408
  view["current region"] = result.currentRegion;
17425
- if (typeof result.position === "string")
17426
- view.position = result.position;
17427
17409
  if (isRow(result.scoreChange)) {
17428
17410
  const before = row2(result.scoreChange.before);
17429
17411
  const after = row2(result.scoreChange.after);
@@ -17691,7 +17673,7 @@ var battle = [
17691
17673
  }),
17692
17674
  command3({
17693
17675
  path: ["battle", "show"],
17694
- summary: "Read the current round, side eligibility, positional bonuses and buildings",
17676
+ summary: "Read the current round, where you can fight from, side eligibility and buildings",
17695
17677
  args: [battleId2, flag("top", boolean2(), { source: "Ten fighters per side, this round and the whole battle, instead of three" })],
17696
17678
  examples: ["esim battle show 1", "esim battle show 1 --top"],
17697
17679
  session: true,
@@ -17711,7 +17693,8 @@ var battle = [
17711
17693
  roundTop: "Current round damage leaders",
17712
17694
  battleTop: "Overall damage leaders",
17713
17695
  territory: "Battle region and relevant neighboring regions",
17714
- sideContext: "Per side: country, whether it is yours, eligibility, position multiplier and where standing gives another, round score and gap, subsidy per 100,000 damage, your orders on it, buildings, and a dry-run command",
17696
+ sideContext: "Per side: country, whether it is yours, eligibility, round score and gap, subsidy per 100,000 damage, your orders on it, buildings, and a dry-run command",
17697
+ presence: "National and resistance wars: whether you are in the battle region (strikes count only from there), your current region, the battle region, and the side you are locked to as a citizen of a warring country (null when you pick)",
17715
17698
  contextRound: "Round used for side context when it differs from the battle status",
17716
17699
  participation: "Your participation record",
17717
17700
  subsidies: "Current subsidies",
@@ -17790,8 +17773,10 @@ var battle = [
17790
17773
  const armed = info.weapons && !info.weaponsDisabledReason ? info.weapons.filter((option) => option.weapon !== null && option.stock !== undefined && option.stock > 0).sort((a, b) => number4(b.damageMultiplier) - number4(a.damageMultiplier))[0] : undefined;
17791
17774
  const arm = armed?.weapon && armed.damageMultiplier > 0.5 ? armed.weapon.toLowerCase() : "none";
17792
17775
  const roundHits = "error" in roundStanding || !Array.isArray(roundStanding.you) ? [] : [...roundStanding.you].sort((a, b) => number4(b.damage) - number4(a.damage)).map((entry) => String(entry.side));
17793
- const yourSide = allowedSides.length === 1 ? String(allowedSides[0]) : roundHits.find((side) => allowedSides.some((open) => open === side)) ?? null;
17794
- const strikeSides = fightKind(battle.kind) ? yourSide ? [yourSide, ...allowedSides.map(String).filter((side) => side !== yourSide)] : allowedSides.map(String) : [undefined];
17776
+ const presence = info.presence;
17777
+ const yourSide = presence?.lockedSide ?? (allowedSides.length === 1 ? String(allowedSides[0]) : roundHits.find((side) => allowedSides.some((open) => open === side)) ?? null);
17778
+ const choosing = picksSide(battle.kind, presence);
17779
+ const strikeSides = choosing ? yourSide ? [yourSide, ...allowedSides.map(String).filter((side) => side !== yourSide)] : allowedSides.map(String) : [undefined];
17795
17780
  const armedHits = armed && arm !== "none" ? armed.consumedPerHit === true ? Math.min(number4(armed.stock), Math.floor(availableEnergy / 10)) : Math.floor(availableEnergy / 10) : Math.floor(availableEnergy / 10);
17796
17781
  const actions = !open || availableEnergy < 10 ? [] : [
17797
17782
  ...strikeSides.slice(0, 2).map((side) => ({ run: fightCommand(id, side, 1, arm) })),
@@ -17803,13 +17788,20 @@ var battle = [
17803
17788
  side: side.side,
17804
17789
  eligible: side.eligible,
17805
17790
  reason: side.reason,
17806
- positionMultiplier: side.positionMultiplier,
17807
- positionRegion: side.positionLand === undefined ? undefined : ref(byId(world.lands, side.positionLand)),
17808
- positionOptions: positionChoices(world, side.positionOptions),
17809
17791
  buildings: side.buildings
17810
17792
  }));
17811
- const travels = (sideContext ?? []).filter((side) => side.eligible === true && battle.done !== true).flatMap((side) => travelHints(string4(side.side), side.positionOptions, side.positionMultiplier));
17812
- const { sideContext: _sideContext, territory: _territory, contextRound, weapons: weaponOptions, weaponsDisabledReason, ...participationRecord } = info;
17793
+ const away = presence && !presence.inBattleRegion && battle.done !== true && typeof battle.land === "number";
17794
+ const travels = away ? [{
17795
+ run: travelPreview(battle.land),
17796
+ note: `Strikes count only from ${area?.region.name ?? "the battle region"}; travel there first.`
17797
+ }] : [];
17798
+ const presenceRecord = presence && {
17799
+ inBattleRegion: presence.inBattleRegion,
17800
+ currentRegion: ref(byId(world.lands, presence.currentLand)),
17801
+ ...area ? { battleRegion: area.region } : {},
17802
+ lockedSide: presence.lockedSide ?? null
17803
+ };
17804
+ const { sideContext: _sideContext, territory: _territory, presence: _presence, contextRound, weapons: weaponOptions, weaponsDisabledReason, ...participationRecord } = info;
17813
17805
  const { battle: reference, round: currentRound, ...battleSummary } = summary(battle, world);
17814
17806
  const score = sides(battle.score);
17815
17807
  const lead = battle.done === true || !score ? undefined : score.attack === score.defend ? { side: null, by: 0 } : { side: number4(score.attack) > number4(score.defend) ? "attack" : "defend", by: Math.abs(number4(score.attack) - number4(score.defend)) };
@@ -17839,7 +17831,7 @@ var battle = [
17839
17831
  round: gap === undefined ? null : { score: score?.[side] ?? null, gap },
17840
17832
  subsidyPer100kDamage: rate ?? (Array.isArray(subsidies) && battle.kind !== "practice" ? amount(0, "GOLD") : null),
17841
17833
  orders: orderNames,
17842
- next: entry.eligible === true && battle.done !== true ? [{ run: `esim battle fight ${id} --side ${side} --dry-run` }] : []
17834
+ next: entry.eligible === true && battle.done !== true ? [{ run: `esim battle fight ${id}${choosing ? ` --side ${side}` : ""} --dry-run` }] : []
17843
17835
  };
17844
17836
  });
17845
17837
  const perHit = strikeEnergy(1);
@@ -17849,7 +17841,7 @@ var battle = [
17849
17841
  const stock = option.stock ?? null;
17850
17842
  const hits = stock === null ? energyHits : option.consumedPerHit === true ? Math.min(energyHits, stock) : stock > 0 ? energyHits : 0;
17851
17843
  const multiplier = option.damageMultiplier;
17852
- const runs = !open || hits < 1 ? [] : (fightKind(battle.kind) ? allowedSides.map(String) : [undefined]).map((side) => ({ run: `esim battle fight ${id}${side ? ` --side ${side}` : ""} --weapon ${name.toLowerCase()} --hits ${hits >= 5 ? 5 : 1} --dry-run` }));
17844
+ const runs = !open || hits < 1 ? [] : (choosing ? allowedSides.map(String) : [undefined]).map((side) => ({ run: `esim battle fight ${id}${side ? ` --side ${side}` : ""} --weapon ${name.toLowerCase()} --hits ${hits >= 5 ? 5 : 1} --dry-run` }));
17853
17845
  return {
17854
17846
  weapon: name,
17855
17847
  damageMultiplier: multiplier,
@@ -17868,6 +17860,7 @@ var battle = [
17868
17860
  ...timestampField("roundEnds", battle.nextRoundAt),
17869
17861
  lead,
17870
17862
  yourSide,
17863
+ presence: presenceRecord,
17871
17864
  contextRound: contextRound === currentRound ? undefined : contextRound,
17872
17865
  sideContext: sideRows,
17873
17866
  territory: territory && { ...area, adjacent: territory.adjacent.map((entry) => battleRegion(world, entry)) },
@@ -17896,14 +17889,15 @@ var battle = [
17896
17889
  path: ["battle", "fight"],
17897
17890
  summary: "Strike in a battle",
17898
17891
  help: [
17899
- "You must be in the battlefield region for resistance. Civil battles require the country’s citizenship and a chosen side.",
17900
- "Your current region can change the position multiplier in territorial battles."
17892
+ "National and resistance wars take strikes only from the battle region; `esim battle show` says where you are and the travel command.",
17893
+ "Citizens of the two warring countries fight for their own country; everyone else picks a side with --side on each strike and may switch at any time.",
17894
+ "Civil battles require the country’s citizenship and a chosen side."
17901
17895
  ],
17902
17896
  session: true,
17903
17897
  retry: "key",
17904
17898
  args: [
17905
17899
  battleId2,
17906
- flag("side", _enum(["attack", "defend"]), { source: "Side to fight for; required in practice, resistance and civil battles; in other battles the server assigns your side" }),
17900
+ flag("side", _enum(["attack", "defend"]), { source: "Side to fight for; required in practice and civil battles, and in national and resistance wars unless you are a citizen of either warring country, whose side is fixed" }),
17907
17901
  flag("weapon", _enum(["none", "pistol", "rifle", "knife"]), { default: "none", source: "Weapon used for each hit; each hit costs 10 energy and one selected weapon, while none uses bare hands" }),
17908
17902
  flag("hits", _enum(["1", "5"]), { default: "1", source: "Number of hits submitted at once; 5 sends five together using the website's five-hit button" }),
17909
17903
  flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,64}$/), { source: "Reuse the returned ID to replay the same strike" }),
@@ -17930,7 +17924,6 @@ var battle = [
17930
17924
  newOpponent: "Next personal boss after this strike killed one",
17931
17925
  eventDamageBonusPct: "Event damage bonus applied, in percent",
17932
17926
  currentRegion: "Your current region for a territorial strike preview",
17933
- position: "Your position multiplier now and where a higher one is available, when it is",
17934
17927
  roundEndsAt: "Current round deadline",
17935
17928
  roundEndsInSec: "Seconds until the current round deadline",
17936
17929
  changed: "Energy, weapon stock, battle points, military rank on promotion, experience and balances before and after; with --dry-run, the most this strike can use",
@@ -17974,13 +17967,21 @@ var battle = [
17974
17967
  return region ? ref(region) : { id };
17975
17968
  };
17976
17969
  const sideFailure = async (info) => {
17977
- if (battle.kind === "resistance" && typeof battle.land === "number" && before.citizen.land !== battle.land) {
17978
- const [currentRegion, requiredRegion] = await Promise.all([regionReference(before.citizen.land), regionReference(battle.land)]);
17979
- return failure2("not_eligible", "You must be in the battlefield region to fight in resistance.", { currentRegion, requiredRegion }, [travelPreview(battle.land), `esim battle show ${id}`]);
17970
+ const presence = info.presence;
17971
+ if (presence && !presence.inBattleRegion && typeof battle.land === "number") {
17972
+ const [currentRegion, requiredRegion] = await Promise.all([regionReference(presence.currentLand), regionReference(battle.land)]);
17973
+ const where = "name" in requiredRegion ? `${requiredRegion.name}, the battle region` : "the battle region";
17974
+ return failure2("not_in_battle_region", `You must be in ${where}, to fight in Battle ${id}.`, { currentRegion, requiredRegion }, [travelPreview(battle.land), `esim battle show ${id}`]);
17975
+ }
17976
+ if (presence?.lockedSide && side && side !== presence.lockedSide) {
17977
+ return failure2("side_locked", `Citizens of a warring country fight for their own country; in Battle ${id} you fight for ${presence.lockedSide}.`, { lockedSide: presence.lockedSide }, [fightCommand(id, undefined, strikeCount, weaponArg), `esim battle show ${id}`]);
17980
17978
  }
17981
17979
  const allowed = info.sides;
17980
+ if (presence && !presence.lockedSide && !side && allowed.length) {
17981
+ return failure2("side_required", `Choose a side with --side ${allowed.join(" or --side ")}; only citizens of the two warring countries have their side set.`, { eligibleSides: allowed }, [...allowed.map((entry) => fightCommand(id, entry, strikeCount, weaponArg)), `esim battle show ${id}`]);
17982
+ }
17982
17983
  const reasons = info.sideContext?.map((entry) => ({ side: entry.side, eligible: entry.eligible === true ? "yes" : "no", reason: entry.reason ?? "" })) ?? [];
17983
- return failure2("not_eligible", allowed.length ? `You cannot fight for ${side ?? "this side"} in Battle ${id}; you can fight for ${allowed.join(" or ")}.` : `You cannot fight in Battle ${id}.`, { eligibleSides: allowed, sides: reasons }, [...allowed.map((entry) => fightCommand(id, fightKind(battle.kind) ? entry : undefined, strikeCount, weaponArg)), `esim battle show ${id}`]);
17984
+ return failure2("not_eligible", allowed.length ? `You cannot fight for ${side ?? "this side"} in Battle ${id}; you can fight for ${allowed.join(" or ")}.` : `You cannot fight in Battle ${id}.`, { eligibleSides: allowed, sides: reasons }, [...allowed.map((entry) => fightCommand(id, picksSide(battle.kind, presence) ? entry : undefined, strikeCount, weaponArg)), `esim battle show ${id}`]);
17984
17985
  };
17985
17986
  const energyFailure = async (have, roundEnergy) => {
17986
17987
  const short = Math.max(0, needEnergy - have);
@@ -17990,24 +17991,11 @@ var battle = [
17990
17991
  return failure2("insufficient_energy", `${strikeCount} ${strikeCount === 1 ? "strike needs" : "strikes need"} ${needEnergy} energy; you have ${have} (short ${short}).`, { energy: have, need: needEnergy, short, ...recovery.context, ...timestampField("roundEnds", battle.nextRoundAt) }, [], { next: follow });
17991
17992
  };
17992
17993
  const stockFailure = (have) => failure2("insufficient_stock", `${strikeCount} ${String(weapon)} ${strikeCount === 1 ? "strike needs" : "strikes need"} ${needWeapon} ${String(weapon)}; you have ${have} (short ${Math.max(0, needWeapon - have)}).`, { weapon, stock: have, need: needWeapon, short: Math.max(0, needWeapon - have) }, [unarmed, `esim market list ${weaponArg}`, "esim inventory"]);
17993
- const positionFor = async (info, forSide) => {
17994
- const entry = info?.sideContext?.find((item) => item.side === forSide);
17995
- if (!entry?.positionOptions)
17996
- return;
17997
- const map = await battleMap();
17998
- if ("error" in map)
17999
- return;
18000
- const choices = positionChoices(map, entry.positionOptions);
18001
- return choices && entry.positionMultiplier < choices.best ? {
18002
- text: positionText(choices, entry.positionMultiplier),
18003
- hints: travelHints(entry.side, choices, entry.positionMultiplier).slice(0, 3)
18004
- } : undefined;
18005
- };
18006
17994
  const territorial = typeof battle.land === "number" && battle.kind !== "practice" && battle.kind !== "tournament";
18007
17995
  if (dryRun) {
18008
17996
  const info = await participation();
18009
17997
  const allowed = info.sides;
18010
- if (!allowed.length || side && !allowed.some((option) => option === side) || battle.kind === "resistance" && typeof battle.land === "number" && before.citizen.land !== battle.land)
17998
+ if (!allowed.length || side && !allowed.some((option) => option === side) || info.presence && (!info.presence.inBattleRegion || !side && !info.presence.lockedSide))
18011
17999
  await sideFailure(info);
18012
18000
  const roundEnergy = battle.kind === "practice" ? info.roundEnergy : undefined;
18013
18001
  const available = Math.min(energyBefore, roundEnergy ?? energyBefore);
@@ -18016,22 +18004,20 @@ var battle = [
18016
18004
  const weaponStock = weapon ? stock(before, weapon) : 0;
18017
18005
  if (weapon && weaponStock < needWeapon)
18018
18006
  stockFailure(weaponStock);
18019
- const chosen = side ?? (allowed.length === 1 ? allowed[0] ?? null : null);
18020
- const position = await positionFor(info, chosen);
18007
+ const chosen = side ?? info.presence?.lockedSide ?? (allowed.length === 1 ? allowed[0] ?? null : null);
18021
18008
  return {
18022
18009
  dryRun: true,
18023
18010
  ...territorial ? { currentRegion: await regionReference(before.citizen.land) } : {},
18024
18011
  result: `Will strike ${strikeCount === 5 ? "five times" : "once"} ${weapon ? `with ${weapon}` : "unarmed"} in round ${round}${chosen ? ` for ${chosen}` : ""}, using at most ${needEnergy} energy${needWeapon ? ` and ${needWeapon} ${weapon}` : ""}.`,
18025
18012
  round,
18026
18013
  side: chosen,
18027
- position: position?.text,
18028
18014
  score: sides(battle.score),
18029
18015
  ...timestampField("roundEnds", battle.nextRoundAt),
18030
18016
  changed: {
18031
18017
  energy: [available, available - needEnergy],
18032
18018
  ...weapon && weapon !== "KNIFE" ? { weapons: { [weapon]: [weaponStock, weaponStock - needWeapon] } } : {}
18033
18019
  },
18034
- next: next({ run: retryHere }, ...position?.hints ?? [])
18020
+ next: next({ run: retryHere })
18035
18021
  };
18036
18022
  }
18037
18023
  const broker = ctx.options.authManaged ? undefined : ctx.options.broker;
@@ -18070,7 +18056,7 @@ var battle = [
18070
18056
  }
18071
18057
  if (error.error === "insufficient_stock" && weapon)
18072
18058
  await withRequest(async () => stockFailure(stock(before, weapon)));
18073
- if (error.error === "not_eligible") {
18059
+ if (["not_eligible", "not_in_battle_region", "side_locked", "side_required"].includes(error.error)) {
18074
18060
  const info = await observe(participation);
18075
18061
  if (!("error" in info))
18076
18062
  await withRequest(async () => sideFailure(info));
@@ -18125,14 +18111,12 @@ var battle = [
18125
18111
  const scorePending = latestScore !== null && damage > 0 && !counted(latestScore);
18126
18112
  const scoreAfter = scorePending ? null : latestScore;
18127
18113
  const scoreChange = scoreBefore && scoreAfter && !replay ? { before: scoreBefore, after: scoreAfter } : null;
18128
- const position = territorial ? await positionFor(await observe(participation).then((info) => ("error" in info) ? undefined : info), hitSide) : undefined;
18129
18114
  const step = await tutorialClaim(ctx);
18130
18115
  return {
18131
18116
  result: `Struck ${outcomes.length === 1 ? "once" : `${outcomes.length} times`} ${weapon ? `with ${weapon}` : "unarmed"} in round ${round}${hitSide ? ` for ${String(hitSide)}` : ""}: ${damage} damage.`,
18132
18117
  requestId,
18133
18118
  round,
18134
18119
  side: hitSide,
18135
- position: position?.text,
18136
18120
  hits: outcomes.map((hit, index) => ({
18137
18121
  hit: index + 1,
18138
18122
  grade: hit.grade,
@@ -25330,6 +25314,7 @@ var notificationText = {
25330
25314
  "auction.sold": (id, lot, price) => `Auction #${id} (${lot}) sold for ${price} Gold.`,
25331
25315
  "auction.expired": (id, lot) => `Auction #${id} (${lot}) ended without a sale.`,
25332
25316
  "job.hired": (company, offer, wage) => `You were hired by ${company} for job #${offer} at a wage of ${wage}.`,
25317
+ "job.wage_changed": (company, oldWage, newWage, currency) => `${company} changed your wage from ${oldWage} ${currency} to ${newWage} ${currency}.`,
25333
25318
  "job.dismissed": (company, offer, wage) => `${company} dismissed you from job #${offer} (wage ${wage}).`,
25334
25319
  "contract.proposed": (id, proposer, summary) => `Citizen #${proposer} proposed contract #${id} (${summary}).`,
25335
25320
  "contract.decided": (id, status) => `Your contract #${id} was ${status === "signed" ? "accepted" : "rejected"}.`,
@@ -26285,6 +26270,12 @@ function describeNotification({ kind, payload, id, category, createdAt, readAt }
26285
26270
  text = notificationText[kind](company, count2(payload.offerId), hundredths2(payload.wage));
26286
26271
  run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
26287
26272
  break;
26273
+ case "job.wage_changed": {
26274
+ const asset = typeof payload.currencyCountryId === "number" ? `cur:${payload.currencyCountryId}` : undefined;
26275
+ text = notificationText[kind](company, hundredths2(payload.oldWage), hundredths2(payload.newWage), notificationCurrency(asset, world));
26276
+ run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
26277
+ break;
26278
+ }
26288
26279
  case "job.resigned":
26289
26280
  text = `${name} resigned from ${company}.`;
26290
26281
  run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
@@ -26506,6 +26497,7 @@ async function notifications(ctx, items) {
26506
26497
  case "citizenship.revoked":
26507
26498
  case "minister.changed":
26508
26499
  case "market.filled":
26500
+ case "job.wage_changed":
26509
26501
  return true;
26510
26502
  case "fx.filled":
26511
26503
  return [item.payload.sellAsset, item.payload.buyAsset].some((asset) => asset?.startsWith("cur:"));
@@ -27070,7 +27062,7 @@ function todayView(data) {
27070
27062
  const current = isObject2(citizen) ? citizen : {};
27071
27063
  const { name, balances, ...stats } = current;
27072
27064
  const place = isObject2(location) && location.region !== undefined && location.country !== undefined ? [scalar2(location.region), scalar2(location.country)].filter(Boolean).join(", ") : location;
27073
- const clock = isObject2(day) && typeof day.day === "number" ? { "": day.day, nextAt: day.nextDayAt ?? null, nextInSec: day.nextDayInSec ?? null } : day;
27065
+ const clock = isObject2(day) && typeof day.day === "number" ? { "": day.day, date: day.date ?? null, nextAt: day.nextDayAt ?? null, nextInSec: day.nextDayInSec ?? null } : day;
27074
27066
  const activity = isObject2(routine) ? routine : {};
27075
27067
  const { work, train, meals, missions, tutorial } = activity;
27076
27068
  const status = (state) => isObject2(state) && typeof state.done === "boolean" ? state.done ? "done" : "todo" : state ?? null;
@@ -27132,7 +27124,7 @@ var today = command9({
27132
27124
  output: {
27133
27125
  citizen: "Name, level, experience, military rank and points, energy, strength, economy skill, first aid kits and balances",
27134
27126
  location: "Your region and its controlling country",
27135
- day: "Current game day and time until reset",
27127
+ day: "Current game day, game date and time until reset",
27136
27128
  routine: "Work, training, meals, daily rewards and current tutorial step; the step leads `next` until the tutorial is done",
27137
27129
  unread: "Unread counts and up to five notifications or conversations",
27138
27130
  deadlines: "Up to five relevant deadlines sorted by closing time, including the leading bidder and your proxy limit on outbid auctions",
@@ -27173,7 +27165,7 @@ var today = command9({
27173
27165
  const citizen = account.citizen;
27174
27166
  const day = await observe(async () => {
27175
27167
  const clock = await ctx.call("clock");
27176
- return { day: clock.day, nextDayAt: clock.nextDayAt };
27168
+ return { day: clock.day, date: clock.date, nextDayAt: clock.nextDayAt };
27177
27169
  });
27178
27170
  const world = geography(ctx);
27179
27171
  const here = await observe(async () => {
@@ -29856,15 +29848,30 @@ var contract = [
29856
29848
  examples: ["esim contract template save Loan --file terms.json"],
29857
29849
  output: resultOutput,
29858
29850
  confirmWith: ["esim contract templates"],
29859
- operations: ["list-contract-templates", "get-geography", "save-contract-template"],
29851
+ operations: ["list-contract-templates", "get-geography", "save-contract-template", "update-contract-template"],
29860
29852
  async run(ctx, args) {
29861
29853
  const input = await readTerms(ctx, string4(args.file));
29862
29854
  const name = string4(args.name);
29863
29855
  const templateId = await findTemplate(ctx, name, true);
29864
29856
  const world = await geography(ctx);
29865
- const saved = await ctx.call("save-contract-template", {}, { name, terms: input, ...templateId === undefined ? {} : { templateId } });
29857
+ const saved = row2(templateId === undefined ? await ctx.call("save-contract-template", {}, { name, terms: input }) : await ctx.call("update-contract-template", { id: templateId }, { name, terms: input }));
29866
29858
  const result = { id: saved.id, name: saved.name, terms: terms(row2(saved.terms), world) };
29867
- return { result, changed: { template: change(undefined, saved.id) } };
29859
+ return { result, changed: { template: change(templateId, saved.id) } };
29860
+ }
29861
+ }),
29862
+ command13({
29863
+ path: ["contract", "template", "delete"],
29864
+ session: true,
29865
+ summary: "Delete one of your saved templates",
29866
+ args: [positional("template", true, id)],
29867
+ examples: ["esim contract template delete 7"],
29868
+ output: resultOutput,
29869
+ confirmWith: ["esim contract templates"],
29870
+ operations: ["delete-contract-template"],
29871
+ async run(ctx, args) {
29872
+ const templateId = number4(intArg(args, "template"));
29873
+ await ctx.call("delete-contract-template", { id: templateId }, {});
29874
+ return { result: { id: templateId, status: "deleted" }, changed: { template: change(templateId, undefined) } };
29868
29875
  }
29869
29876
  }),
29870
29877
  command13({
@@ -32184,7 +32191,7 @@ var travel = [
32184
32191
  neighbors,
32185
32192
  buildings
32186
32193
  };
32187
- const hints = next(...here.battles.map((battle) => ({ run: `esim battle show ${battle.id}` })), ...travelHints2(here.neighbors));
32194
+ const hints = next(...here.battles.map((battle) => ({ run: `esim battle show ${battle.id}` })), ...travelHints(here.neighbors));
32188
32195
  const signedIn = ctx.options.authManaged || ctx.options.credentials || ctx.options.broker;
32189
32196
  if (signedIn) {
32190
32197
  try {
@@ -32316,7 +32323,7 @@ var travel = [
32316
32323
  }
32317
32324
  })
32318
32325
  ];
32319
- function travelHints2(neighbors) {
32326
+ function travelHints(neighbors) {
32320
32327
  const ranked = [...neighbors.filter((entry) => entry.resource), ...neighbors.filter((entry) => !entry.resource)];
32321
32328
  return next(...ranked.slice(0, 3).map(({ region, resource }) => ({
32322
32329
  run: `esim travel ${shellWord(region.name)} --dry-run`,
@@ -37039,7 +37046,7 @@ function saveCredentials(store, credentials) {
37039
37046
  }
37040
37047
 
37041
37048
  // version.ts
37042
- var version2 = "2026.1130.1";
37049
+ var version2 = "2026.1201.179";
37043
37050
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
37044
37051
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
37045
37052
  var releaseUrl = (release) => `https://github.com/CorrectRoadH/open-esim/releases/download/cli-v${release}`;