esim-cli 2026.1130.1 → 2026.1201.178

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/index.js CHANGED
@@ -14225,11 +14225,11 @@ var catalog = [
14225
14225
  { 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"] },
14226
14226
  { 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"] },
14227
14227
  { 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"] },
14228
- { 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"] },
14228
+ { 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"] },
14229
14229
  { 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"] },
14230
14230
  { 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: [] },
14231
14231
  { 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: [] },
14232
- { 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"] },
14232
+ { 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"] },
14233
14233
  { 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"] },
14234
14234
  { 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"] },
14235
14235
  { 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"] },
@@ -14343,8 +14343,10 @@ var catalog = [
14343
14343
  { 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: [] },
14344
14344
  { 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"] },
14345
14345
  { 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"] },
14346
- { 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"] },
14346
+ { 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"] },
14347
14347
  { 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"] },
14348
+ { 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"] },
14349
+ { 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: [] },
14348
14350
  { 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"] },
14349
14351
  { 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"] },
14350
14352
  { 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"] },
@@ -14444,7 +14446,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
14444
14446
  { 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"] },
14445
14447
  { 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"] },
14446
14448
  { 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"] },
14447
- { 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"] },
14449
+ { 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"] },
14448
14450
  { 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: [] },
14449
14451
  { 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: [] },
14450
14452
  { 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"] },
@@ -14599,7 +14601,7 @@ Each submission of the built-in gold code awards 50 gold. For other codes, a ret
14599
14601
  { 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"] },
14600
14602
  { 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"] },
14601
14603
  { 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"] },
14602
- { 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"] }
14604
+ { 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"] }
14603
14605
  ];
14604
14606
 
14605
14607
  // operation-model.ts
@@ -15513,15 +15515,14 @@ class Context {
15513
15515
  const local = performance.now();
15514
15516
  const sample = row2(response);
15515
15517
  const game = Date.parse(string4(sample.now));
15516
- const scale = number4(sample.scale);
15517
- if (!Number.isFinite(game) || scale <= 0 || scale > 1000)
15518
+ if (!Number.isFinite(game))
15518
15519
  return invalidResponse();
15519
- this.clockSample = { game, local, scale };
15520
+ this.clockSample = { game, local };
15520
15521
  return response;
15521
15522
  }
15522
15523
  get now() {
15523
15524
  const sample = this.clockSample;
15524
- return sample ? sample.game + sample.scale * (performance.now() - sample.local) : Date.now();
15525
+ return sample ? sample.game + (performance.now() - sample.local) : Date.now();
15525
15526
  }
15526
15527
  referenceOutput;
15527
15528
  constructor(command, options, args) {
@@ -15875,7 +15876,7 @@ async function energyRecovery(ctx, account, shortfall, roundLimited = false) {
15875
15876
 
15876
15877
  // resolve/battle.ts
15877
15878
  function battleSide(battle, side) {
15878
- if (!side && ["practice", "resistance", "civil"].some((kind) => kind === battle.kind)) {
15879
+ if (!side && ["practice", "civil"].some((kind) => kind === battle.kind)) {
15879
15880
  return usage2("This battle requires a side. Set --side attack or --side defend.");
15880
15881
  }
15881
15882
  return side;
@@ -16891,7 +16892,7 @@ var pageOutput2 = {
16891
16892
  nextCursor: "Cursor for the following page",
16892
16893
  truncated: "Whether more battles remain"
16893
16894
  };
16894
- var fightKind = (kind) => ["practice", "civil", "resistance"].some((value) => value === kind);
16895
+ var picksSide = (kind, presence) => kind === "practice" || kind === "civil" || (kind === "war" || kind === "resistance") && !presence?.lockedSide;
16895
16896
  var battleRef = (id) => ({ id, name: `Battle ${id}` });
16896
16897
  function battleRegion(world, entry) {
16897
16898
  return {
@@ -17021,33 +17022,6 @@ function sideBySide(value, attack, defend) {
17021
17022
  const [a, d] = [sideName("attack", attack), sideName("defend", defend)];
17022
17023
  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) }));
17023
17024
  }
17024
- function positionChoices(world, options) {
17025
- if (!options)
17026
- return;
17027
- const regions = options.regions.map((entry) => ({
17028
- region: ref(byId(world.lands, entry.land)),
17029
- controllingCountry: countryRef(world, entry.owner),
17030
- multiplier: number4(entry.multiplier),
17031
- current: entry.current === true
17032
- }));
17033
- const elsewhere = number4(options.elsewhereMultiplier);
17034
- const best = Math.max(elsewhere, ...regions.map((entry) => entry.multiplier));
17035
- return { elsewhere, ...typeof options.elsewhereReason === "string" ? { elsewhereReason: options.elsewhereReason } : {}, best, regions };
17036
- }
17037
- var better = (choices, current) => choices.regions.filter((entry) => entry.multiplier > current && !entry.current);
17038
- function positionText(choices, current) {
17039
- if (!choices || typeof current !== "number")
17040
- return;
17041
- const places = better(choices, current);
17042
- if (!places.length) {
17043
- if (choices.elsewhereReason && current <= choices.elsewhere)
17044
- return `×${current}: ${choices.elsewhereReason}`;
17045
- return current >= choices.best ? `×${current}, the best available` : `×${current}`;
17046
- }
17047
- const best = Math.max(...places.map((entry) => entry.multiplier));
17048
- return `×${current} now; ×${best} from ${places.filter((entry) => entry.multiplier === best).map((entry) => `${entry.region.name} #${String(entry.region.id)}`).join(", ")}`;
17049
- }
17050
- 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}).` }));
17051
17025
  async function battleOrders(ctx, account, id) {
17052
17026
  const citizen = account.citizen;
17053
17027
  const brief = (battle, side, bonusBps) => ({
@@ -17124,7 +17098,21 @@ function damageText(value) {
17124
17098
  return value.note;
17125
17099
  return value.damage === 0 ? "no hits yet" : undefined;
17126
17100
  }
17101
+ function presenceLine(value) {
17102
+ if (!isRow(value))
17103
+ return;
17104
+ const here = refText(value.currentRegion) ?? "?";
17105
+ if (value.inBattleRegion === true)
17106
+ return `in ${here}, the battle region`;
17107
+ return `in ${here}; fight from ${refText(value.battleRegion) ?? "the battle region"}, travel there first`;
17108
+ }
17127
17109
  function sideLine(result, sideRows) {
17110
+ const presence = isRow(result.presence) ? result.presence : undefined;
17111
+ if (presence && presence.inBattleRegion !== true) {
17112
+ const locked = typeof presence.lockedSide === "string" ? presence.lockedSide : undefined;
17113
+ const entry = locked ? sideRows.find((item) => item.side === locked) : undefined;
17114
+ 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";
17115
+ }
17128
17116
  const open = sideRows.filter((entry) => entry.eligible === true).map((entry) => string4(entry.side));
17129
17117
  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}` : ""}`);
17130
17118
  const country = (side) => {
@@ -17139,16 +17127,11 @@ function sideLine(result, sideRows) {
17139
17127
  }
17140
17128
  function modifierRows(sideRows) {
17141
17129
  return sideRows.map((entry) => {
17142
- const multiplier = num(entry.positionMultiplier);
17143
- const choices = isRow(entry.positionOptions) ? entry.positionOptions : undefined;
17144
- const place = refText(entry.positionRegion);
17145
- const elsewhere = choices && multiplier !== undefined && (better(choices, multiplier).length > 0 || choices.elsewhereReason !== undefined && multiplier <= choices.elsewhere);
17146
- const position = !elsewhere && (multiplier === undefined || multiplier === 1) ? "" : choices ? positionText(choices, multiplier) ?? "" : `×${multiplier}${place ? ` (${place})` : ""}`;
17147
17130
  const orders = Array.isArray(entry.orders) ? entry.orders.map(String).join(", ") : "";
17148
17131
  const buildings = Array.isArray(entry.buildings) ? rows(entry.buildings).map((building) => `${String(building.kind)} Q${String(building.quality)} ${String(building.effect)}`).join(", ") : "";
17149
17132
  const subsidy = isRow(entry.subsidyPer100kDamage) && num(entry.subsidyPer100kDamage.minor) ? `${moneyText2(entry.subsidyPer100kDamage)} per 100k damage` : "";
17150
- return { side: entry.side ?? "", position, orders, buildings, subsidy };
17151
- }).filter((entry) => entry.position || entry.orders || entry.buildings || entry.subsidy);
17133
+ return { side: entry.side ?? "", orders, buildings, subsidy };
17134
+ }).filter((entry) => entry.orders || entry.buildings || entry.subsidy);
17152
17135
  }
17153
17136
  function weaponRows(value) {
17154
17137
  if (!Array.isArray(value))
@@ -17235,6 +17218,7 @@ function battleShowView(data) {
17235
17218
  ...hasRoundLeaders ? { "attack top": roundContributorLabel(entry.attackTop), "defend top": roundContributorLabel(entry.defendTop) } : {}
17236
17219
  })) } : {},
17237
17220
  ...fighterFields(result),
17221
+ ...!done && presenceLine(result.presence) ? { "you are": presenceLine(result.presence) } : {},
17238
17222
  ...!done && sideRows.length ? { side: sideLine(result, sideRows) } : {},
17239
17223
  ...typeof result.contextRound === "number" ? { "side facts from round": result.contextRound } : {},
17240
17224
  ...modifiers.length ? { modifiers } : {},
@@ -17418,8 +17402,6 @@ function battleFightView(data) {
17418
17402
  }
17419
17403
  if (result.currentRegion !== undefined)
17420
17404
  view["current region"] = result.currentRegion;
17421
- if (typeof result.position === "string")
17422
- view.position = result.position;
17423
17405
  if (isRow(result.scoreChange)) {
17424
17406
  const before = row2(result.scoreChange.before);
17425
17407
  const after = row2(result.scoreChange.after);
@@ -17687,7 +17669,7 @@ var battle = [
17687
17669
  }),
17688
17670
  command3({
17689
17671
  path: ["battle", "show"],
17690
- summary: "Read the current round, side eligibility, positional bonuses and buildings",
17672
+ summary: "Read the current round, where you can fight from, side eligibility and buildings",
17691
17673
  args: [battleId2, flag("top", boolean2(), { source: "Ten fighters per side, this round and the whole battle, instead of three" })],
17692
17674
  examples: ["esim battle show 1", "esim battle show 1 --top"],
17693
17675
  session: true,
@@ -17707,7 +17689,8 @@ var battle = [
17707
17689
  roundTop: "Current round damage leaders",
17708
17690
  battleTop: "Overall damage leaders",
17709
17691
  territory: "Battle region and relevant neighboring regions",
17710
- 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",
17692
+ 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",
17693
+ 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)",
17711
17694
  contextRound: "Round used for side context when it differs from the battle status",
17712
17695
  participation: "Your participation record",
17713
17696
  subsidies: "Current subsidies",
@@ -17786,8 +17769,10 @@ var battle = [
17786
17769
  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;
17787
17770
  const arm = armed?.weapon && armed.damageMultiplier > 0.5 ? armed.weapon.toLowerCase() : "none";
17788
17771
  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));
17789
- const yourSide = allowedSides.length === 1 ? String(allowedSides[0]) : roundHits.find((side) => allowedSides.some((open) => open === side)) ?? null;
17790
- const strikeSides = fightKind(battle.kind) ? yourSide ? [yourSide, ...allowedSides.map(String).filter((side) => side !== yourSide)] : allowedSides.map(String) : [undefined];
17772
+ const presence = info.presence;
17773
+ const yourSide = presence?.lockedSide ?? (allowedSides.length === 1 ? String(allowedSides[0]) : roundHits.find((side) => allowedSides.some((open) => open === side)) ?? null);
17774
+ const choosing = picksSide(battle.kind, presence);
17775
+ const strikeSides = choosing ? yourSide ? [yourSide, ...allowedSides.map(String).filter((side) => side !== yourSide)] : allowedSides.map(String) : [undefined];
17791
17776
  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);
17792
17777
  const actions = !open || availableEnergy < 10 ? [] : [
17793
17778
  ...strikeSides.slice(0, 2).map((side) => ({ run: fightCommand(id, side, 1, arm) })),
@@ -17799,13 +17784,20 @@ var battle = [
17799
17784
  side: side.side,
17800
17785
  eligible: side.eligible,
17801
17786
  reason: side.reason,
17802
- positionMultiplier: side.positionMultiplier,
17803
- positionRegion: side.positionLand === undefined ? undefined : ref(byId(world.lands, side.positionLand)),
17804
- positionOptions: positionChoices(world, side.positionOptions),
17805
17787
  buildings: side.buildings
17806
17788
  }));
17807
- const travels = (sideContext ?? []).filter((side) => side.eligible === true && battle.done !== true).flatMap((side) => travelHints(string4(side.side), side.positionOptions, side.positionMultiplier));
17808
- const { sideContext: _sideContext, territory: _territory, contextRound, weapons: weaponOptions, weaponsDisabledReason, ...participationRecord } = info;
17789
+ const away = presence && !presence.inBattleRegion && battle.done !== true && typeof battle.land === "number";
17790
+ const travels = away ? [{
17791
+ run: travelPreview(battle.land),
17792
+ note: `Strikes count only from ${area?.region.name ?? "the battle region"}; travel there first.`
17793
+ }] : [];
17794
+ const presenceRecord = presence && {
17795
+ inBattleRegion: presence.inBattleRegion,
17796
+ currentRegion: ref(byId(world.lands, presence.currentLand)),
17797
+ ...area ? { battleRegion: area.region } : {},
17798
+ lockedSide: presence.lockedSide ?? null
17799
+ };
17800
+ const { sideContext: _sideContext, territory: _territory, presence: _presence, contextRound, weapons: weaponOptions, weaponsDisabledReason, ...participationRecord } = info;
17809
17801
  const { battle: reference, round: currentRound, ...battleSummary } = summary(battle, world);
17810
17802
  const score = sides(battle.score);
17811
17803
  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)) };
@@ -17835,7 +17827,7 @@ var battle = [
17835
17827
  round: gap === undefined ? null : { score: score?.[side] ?? null, gap },
17836
17828
  subsidyPer100kDamage: rate ?? (Array.isArray(subsidies) && battle.kind !== "practice" ? amount(0, "GOLD") : null),
17837
17829
  orders: orderNames,
17838
- next: entry.eligible === true && battle.done !== true ? [{ run: `esim battle fight ${id} --side ${side} --dry-run` }] : []
17830
+ next: entry.eligible === true && battle.done !== true ? [{ run: `esim battle fight ${id}${choosing ? ` --side ${side}` : ""} --dry-run` }] : []
17839
17831
  };
17840
17832
  });
17841
17833
  const perHit = strikeEnergy(1);
@@ -17845,7 +17837,7 @@ var battle = [
17845
17837
  const stock = option.stock ?? null;
17846
17838
  const hits = stock === null ? energyHits : option.consumedPerHit === true ? Math.min(energyHits, stock) : stock > 0 ? energyHits : 0;
17847
17839
  const multiplier = option.damageMultiplier;
17848
- 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` }));
17840
+ 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` }));
17849
17841
  return {
17850
17842
  weapon: name,
17851
17843
  damageMultiplier: multiplier,
@@ -17864,6 +17856,7 @@ var battle = [
17864
17856
  ...timestampField("roundEnds", battle.nextRoundAt),
17865
17857
  lead,
17866
17858
  yourSide,
17859
+ presence: presenceRecord,
17867
17860
  contextRound: contextRound === currentRound ? undefined : contextRound,
17868
17861
  sideContext: sideRows,
17869
17862
  territory: territory && { ...area, adjacent: territory.adjacent.map((entry) => battleRegion(world, entry)) },
@@ -17892,14 +17885,15 @@ var battle = [
17892
17885
  path: ["battle", "fight"],
17893
17886
  summary: "Strike in a battle",
17894
17887
  help: [
17895
- "You must be in the battlefield region for resistance. Civil battles require the country’s citizenship and a chosen side.",
17896
- "Your current region can change the position multiplier in territorial battles."
17888
+ "National and resistance wars take strikes only from the battle region; `esim battle show` says where you are and the travel command.",
17889
+ "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.",
17890
+ "Civil battles require the country’s citizenship and a chosen side."
17897
17891
  ],
17898
17892
  session: true,
17899
17893
  retry: "key",
17900
17894
  args: [
17901
17895
  battleId2,
17902
- 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" }),
17896
+ 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" }),
17903
17897
  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" }),
17904
17898
  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" }),
17905
17899
  flag("request-id", string2().regex(/^[A-Za-z0-9_-]{1,64}$/), { source: "Reuse the returned ID to replay the same strike" }),
@@ -17926,7 +17920,6 @@ var battle = [
17926
17920
  newOpponent: "Next personal boss after this strike killed one",
17927
17921
  eventDamageBonusPct: "Event damage bonus applied, in percent",
17928
17922
  currentRegion: "Your current region for a territorial strike preview",
17929
- position: "Your position multiplier now and where a higher one is available, when it is",
17930
17923
  roundEndsAt: "Current round deadline",
17931
17924
  roundEndsInSec: "Seconds until the current round deadline",
17932
17925
  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",
@@ -17970,13 +17963,21 @@ var battle = [
17970
17963
  return region ? ref(region) : { id };
17971
17964
  };
17972
17965
  const sideFailure = async (info) => {
17973
- if (battle.kind === "resistance" && typeof battle.land === "number" && before.citizen.land !== battle.land) {
17974
- const [currentRegion, requiredRegion] = await Promise.all([regionReference(before.citizen.land), regionReference(battle.land)]);
17975
- return failure2("not_eligible", "You must be in the battlefield region to fight in resistance.", { currentRegion, requiredRegion }, [travelPreview(battle.land), `esim battle show ${id}`]);
17966
+ const presence = info.presence;
17967
+ if (presence && !presence.inBattleRegion && typeof battle.land === "number") {
17968
+ const [currentRegion, requiredRegion] = await Promise.all([regionReference(presence.currentLand), regionReference(battle.land)]);
17969
+ const where = "name" in requiredRegion ? `${requiredRegion.name}, the battle region` : "the battle region";
17970
+ 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}`]);
17971
+ }
17972
+ if (presence?.lockedSide && side && side !== presence.lockedSide) {
17973
+ 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}`]);
17976
17974
  }
17977
17975
  const allowed = info.sides;
17976
+ if (presence && !presence.lockedSide && !side && allowed.length) {
17977
+ 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}`]);
17978
+ }
17978
17979
  const reasons = info.sideContext?.map((entry) => ({ side: entry.side, eligible: entry.eligible === true ? "yes" : "no", reason: entry.reason ?? "" })) ?? [];
17979
- 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}`]);
17980
+ 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}`]);
17980
17981
  };
17981
17982
  const energyFailure = async (have, roundEnergy) => {
17982
17983
  const short = Math.max(0, needEnergy - have);
@@ -17986,24 +17987,11 @@ var battle = [
17986
17987
  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 });
17987
17988
  };
17988
17989
  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"]);
17989
- const positionFor = async (info, forSide) => {
17990
- const entry = info?.sideContext?.find((item) => item.side === forSide);
17991
- if (!entry?.positionOptions)
17992
- return;
17993
- const map = await battleMap();
17994
- if ("error" in map)
17995
- return;
17996
- const choices = positionChoices(map, entry.positionOptions);
17997
- return choices && entry.positionMultiplier < choices.best ? {
17998
- text: positionText(choices, entry.positionMultiplier),
17999
- hints: travelHints(entry.side, choices, entry.positionMultiplier).slice(0, 3)
18000
- } : undefined;
18001
- };
18002
17990
  const territorial = typeof battle.land === "number" && battle.kind !== "practice" && battle.kind !== "tournament";
18003
17991
  if (dryRun) {
18004
17992
  const info = await participation();
18005
17993
  const allowed = info.sides;
18006
- if (!allowed.length || side && !allowed.some((option) => option === side) || battle.kind === "resistance" && typeof battle.land === "number" && before.citizen.land !== battle.land)
17994
+ if (!allowed.length || side && !allowed.some((option) => option === side) || info.presence && (!info.presence.inBattleRegion || !side && !info.presence.lockedSide))
18007
17995
  await sideFailure(info);
18008
17996
  const roundEnergy = battle.kind === "practice" ? info.roundEnergy : undefined;
18009
17997
  const available = Math.min(energyBefore, roundEnergy ?? energyBefore);
@@ -18012,22 +18000,20 @@ var battle = [
18012
18000
  const weaponStock = weapon ? stock(before, weapon) : 0;
18013
18001
  if (weapon && weaponStock < needWeapon)
18014
18002
  stockFailure(weaponStock);
18015
- const chosen = side ?? (allowed.length === 1 ? allowed[0] ?? null : null);
18016
- const position = await positionFor(info, chosen);
18003
+ const chosen = side ?? info.presence?.lockedSide ?? (allowed.length === 1 ? allowed[0] ?? null : null);
18017
18004
  return {
18018
18005
  dryRun: true,
18019
18006
  ...territorial ? { currentRegion: await regionReference(before.citizen.land) } : {},
18020
18007
  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}` : ""}.`,
18021
18008
  round,
18022
18009
  side: chosen,
18023
- position: position?.text,
18024
18010
  score: sides(battle.score),
18025
18011
  ...timestampField("roundEnds", battle.nextRoundAt),
18026
18012
  changed: {
18027
18013
  energy: [available, available - needEnergy],
18028
18014
  ...weapon && weapon !== "KNIFE" ? { weapons: { [weapon]: [weaponStock, weaponStock - needWeapon] } } : {}
18029
18015
  },
18030
- next: next({ run: retryHere }, ...position?.hints ?? [])
18016
+ next: next({ run: retryHere })
18031
18017
  };
18032
18018
  }
18033
18019
  const broker = ctx.options.authManaged ? undefined : ctx.options.broker;
@@ -18066,7 +18052,7 @@ var battle = [
18066
18052
  }
18067
18053
  if (error.error === "insufficient_stock" && weapon)
18068
18054
  await withRequest(async () => stockFailure(stock(before, weapon)));
18069
- if (error.error === "not_eligible") {
18055
+ if (["not_eligible", "not_in_battle_region", "side_locked", "side_required"].includes(error.error)) {
18070
18056
  const info = await observe(participation);
18071
18057
  if (!("error" in info))
18072
18058
  await withRequest(async () => sideFailure(info));
@@ -18121,14 +18107,12 @@ var battle = [
18121
18107
  const scorePending = latestScore !== null && damage > 0 && !counted(latestScore);
18122
18108
  const scoreAfter = scorePending ? null : latestScore;
18123
18109
  const scoreChange = scoreBefore && scoreAfter && !replay ? { before: scoreBefore, after: scoreAfter } : null;
18124
- const position = territorial ? await positionFor(await observe(participation).then((info) => ("error" in info) ? undefined : info), hitSide) : undefined;
18125
18110
  const step = await tutorialClaim(ctx);
18126
18111
  return {
18127
18112
  result: `Struck ${outcomes.length === 1 ? "once" : `${outcomes.length} times`} ${weapon ? `with ${weapon}` : "unarmed"} in round ${round}${hitSide ? ` for ${String(hitSide)}` : ""}: ${damage} damage.`,
18128
18113
  requestId,
18129
18114
  round,
18130
18115
  side: hitSide,
18131
- position: position?.text,
18132
18116
  hits: outcomes.map((hit, index) => ({
18133
18117
  hit: index + 1,
18134
18118
  grade: hit.grade,
@@ -25326,6 +25310,7 @@ var notificationText = {
25326
25310
  "auction.sold": (id, lot, price) => `Auction #${id} (${lot}) sold for ${price} Gold.`,
25327
25311
  "auction.expired": (id, lot) => `Auction #${id} (${lot}) ended without a sale.`,
25328
25312
  "job.hired": (company, offer, wage) => `You were hired by ${company} for job #${offer} at a wage of ${wage}.`,
25313
+ "job.wage_changed": (company, oldWage, newWage, currency) => `${company} changed your wage from ${oldWage} ${currency} to ${newWage} ${currency}.`,
25329
25314
  "job.dismissed": (company, offer, wage) => `${company} dismissed you from job #${offer} (wage ${wage}).`,
25330
25315
  "contract.proposed": (id, proposer, summary) => `Citizen #${proposer} proposed contract #${id} (${summary}).`,
25331
25316
  "contract.decided": (id, status) => `Your contract #${id} was ${status === "signed" ? "accepted" : "rejected"}.`,
@@ -26281,6 +26266,12 @@ function describeNotification({ kind, payload, id, category, createdAt, readAt }
26281
26266
  text = notificationText[kind](company, count2(payload.offerId), hundredths2(payload.wage));
26282
26267
  run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
26283
26268
  break;
26269
+ case "job.wage_changed": {
26270
+ const asset = typeof payload.currencyCountryId === "number" ? `cur:${payload.currencyCountryId}` : undefined;
26271
+ text = notificationText[kind](company, hundredths2(payload.oldWage), hundredths2(payload.newWage), notificationCurrency(asset, world));
26272
+ run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
26273
+ break;
26274
+ }
26284
26275
  case "job.resigned":
26285
26276
  text = `${name} resigned from ${company}.`;
26286
26277
  run = typeof payload.companyId === "number" ? `esim company show ${payload.companyId}` : undefined;
@@ -26502,6 +26493,7 @@ async function notifications(ctx, items) {
26502
26493
  case "citizenship.revoked":
26503
26494
  case "minister.changed":
26504
26495
  case "market.filled":
26496
+ case "job.wage_changed":
26505
26497
  return true;
26506
26498
  case "fx.filled":
26507
26499
  return [item.payload.sellAsset, item.payload.buyAsset].some((asset) => asset?.startsWith("cur:"));
@@ -27066,7 +27058,7 @@ function todayView(data) {
27066
27058
  const current = isObject2(citizen) ? citizen : {};
27067
27059
  const { name, balances, ...stats } = current;
27068
27060
  const place = isObject2(location) && location.region !== undefined && location.country !== undefined ? [scalar2(location.region), scalar2(location.country)].filter(Boolean).join(", ") : location;
27069
- const clock = isObject2(day) && typeof day.day === "number" ? { "": day.day, nextAt: day.nextDayAt ?? null, nextInSec: day.nextDayInSec ?? null } : day;
27061
+ const clock = isObject2(day) && typeof day.day === "number" ? { "": day.day, date: day.date ?? null, nextAt: day.nextDayAt ?? null, nextInSec: day.nextDayInSec ?? null } : day;
27070
27062
  const activity = isObject2(routine) ? routine : {};
27071
27063
  const { work, train, meals, missions, tutorial } = activity;
27072
27064
  const status = (state) => isObject2(state) && typeof state.done === "boolean" ? state.done ? "done" : "todo" : state ?? null;
@@ -27128,7 +27120,7 @@ var today = command9({
27128
27120
  output: {
27129
27121
  citizen: "Name, level, experience, military rank and points, energy, strength, economy skill, first aid kits and balances",
27130
27122
  location: "Your region and its controlling country",
27131
- day: "Current game day and time until reset",
27123
+ day: "Current game day, game date and time until reset",
27132
27124
  routine: "Work, training, meals, daily rewards and current tutorial step; the step leads `next` until the tutorial is done",
27133
27125
  unread: "Unread counts and up to five notifications or conversations",
27134
27126
  deadlines: "Up to five relevant deadlines sorted by closing time, including the leading bidder and your proxy limit on outbid auctions",
@@ -27169,7 +27161,7 @@ var today = command9({
27169
27161
  const citizen = account.citizen;
27170
27162
  const day = await observe(async () => {
27171
27163
  const clock = await ctx.call("clock");
27172
- return { day: clock.day, nextDayAt: clock.nextDayAt };
27164
+ return { day: clock.day, date: clock.date, nextDayAt: clock.nextDayAt };
27173
27165
  });
27174
27166
  const world = geography(ctx);
27175
27167
  const here = await observe(async () => {
@@ -29852,15 +29844,30 @@ var contract = [
29852
29844
  examples: ["esim contract template save Loan --file terms.json"],
29853
29845
  output: resultOutput,
29854
29846
  confirmWith: ["esim contract templates"],
29855
- operations: ["list-contract-templates", "get-geography", "save-contract-template"],
29847
+ operations: ["list-contract-templates", "get-geography", "save-contract-template", "update-contract-template"],
29856
29848
  async run(ctx, args) {
29857
29849
  const input = await readTerms(ctx, string4(args.file));
29858
29850
  const name = string4(args.name);
29859
29851
  const templateId = await findTemplate(ctx, name, true);
29860
29852
  const world = await geography(ctx);
29861
- const saved = await ctx.call("save-contract-template", {}, { name, terms: input, ...templateId === undefined ? {} : { templateId } });
29853
+ 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 }));
29862
29854
  const result = { id: saved.id, name: saved.name, terms: terms(row2(saved.terms), world) };
29863
- return { result, changed: { template: change(undefined, saved.id) } };
29855
+ return { result, changed: { template: change(templateId, saved.id) } };
29856
+ }
29857
+ }),
29858
+ command13({
29859
+ path: ["contract", "template", "delete"],
29860
+ session: true,
29861
+ summary: "Delete one of your saved templates",
29862
+ args: [positional("template", true, id)],
29863
+ examples: ["esim contract template delete 7"],
29864
+ output: resultOutput,
29865
+ confirmWith: ["esim contract templates"],
29866
+ operations: ["delete-contract-template"],
29867
+ async run(ctx, args) {
29868
+ const templateId = number4(intArg(args, "template"));
29869
+ await ctx.call("delete-contract-template", { id: templateId }, {});
29870
+ return { result: { id: templateId, status: "deleted" }, changed: { template: change(templateId, undefined) } };
29864
29871
  }
29865
29872
  }),
29866
29873
  command13({
@@ -32180,7 +32187,7 @@ var travel = [
32180
32187
  neighbors,
32181
32188
  buildings
32182
32189
  };
32183
- const hints = next(...here.battles.map((battle) => ({ run: `esim battle show ${battle.id}` })), ...travelHints2(here.neighbors));
32190
+ const hints = next(...here.battles.map((battle) => ({ run: `esim battle show ${battle.id}` })), ...travelHints(here.neighbors));
32184
32191
  const signedIn = ctx.options.authManaged || ctx.options.credentials || ctx.options.broker;
32185
32192
  if (signedIn) {
32186
32193
  try {
@@ -32312,7 +32319,7 @@ var travel = [
32312
32319
  }
32313
32320
  })
32314
32321
  ];
32315
- function travelHints2(neighbors) {
32322
+ function travelHints(neighbors) {
32316
32323
  const ranked = [...neighbors.filter((entry) => entry.resource), ...neighbors.filter((entry) => !entry.resource)];
32317
32324
  return next(...ranked.slice(0, 3).map(({ region, resource }) => ({
32318
32325
  run: `esim travel ${shellWord(region.name)} --dry-run`,
@@ -37116,7 +37123,7 @@ function saveCredentials(store, credentials) {
37116
37123
  }
37117
37124
 
37118
37125
  // version.ts
37119
- var version2 = "2026.1130.1";
37126
+ var version2 = "2026.1201.178";
37120
37127
  var installKind = version2 === "dev" ? "source" : typeof ESIM_CLI_EXECUTABLE === "boolean" && ESIM_CLI_EXECUTABLE ? "executable" : "npm";
37121
37128
  var npmLatestUrl = "https://registry.npmjs.org/esim-cli/latest";
37122
37129
  var releaseVersion = /^\d+\.\d+\.\d+$/;