Version history
Every save of an endpoint or workflow is kept, newest first (up to 50 per resource), for Island survival demo.
Published game revisions
Each package sync that publishes a revision keeps an immutable snapshot of its endpoints, workflows, collections, queries and game values. Old builds inside their support window run their own revision's definitions and values; player records are always shared live data, so collection schema changes must stay backward-compatible.
| Revision | Published (UTC) | Support | Players (24h) | Schema | Actions |
|---|---|---|---|---|---|
42 |
2026-11-23 12:40:29 UTC | Live | 0 | — | — |
Versions of economy_spend 1
2026-10-14 11:18:49 UTC
Changes from this version to the live definition
This version matches the live definition.
Full source of this version
sourceVersion: 1
kind: endpoint
id: economy_spend
name: Spend gold
description: Removes gold after checking the balance on the server. Fails with INSUFFICIENT_FUNDS instead of going negative.
method: POST
enabled: true
input:
type: object
properties:
amount:
type: number
required:
- amount
steps:
- id: amount_ok
type: assert
check:
all:
- field: input.amount
op: '>'
value: 0
- field: input.amount
op: <=
value: '{{values.economy_limits.max_spend_per_call}}'
status: 422
errorCode: INVALID_AMOUNT
message: Amount must be between 1 and the per-call limit.
- id: player
type: read
collection: economy_balance
key: '{{steamId}}'
- id: can_afford
type: condition
check:
field: player.gold|0
op: '>='
value: '{{input.amount}}'
onFail:
status: 409
error: INSUFFICIENT_FUNDS
message: Not enough gold to spend {{input.amount}}.
- id: take
type: write
collection: economy_balance
key: '{{steamId}}'
ops:
- op: inc
path: gold
valueExpression: 0 - {{input.amount}}
source: spend
reason: Spent gold
response:
status: 200
body:
success: true
spent: '{{input.amount}}'
module: economy