Skip to content

five-on-it / apps/api/src/store / Run

Interface: Run ​

Defined in: apps/api/src/store.ts:374

A run (runs.ts, TECHNICAL_SPECS §9.5): one play of one mission in a room of its own, for a roster (RunPlayer). It is open until its game server reports how it ended (complete, failed, abandoned; won or a draw in versus) or the sweep finds it lost (no result in time, or its room gone): a lost run counts for nothing. The token its server reports with is kept as its SHA-256 alone, and the result it took as the hash of its body, so the same result sent again is taken once and a different one refused.

Properties ​

createdAt ​

createdAt: string

Defined in: apps/api/src/store.ts:402

ISO times.


endedAt? ​

optional endedAt?: string

Defined in: apps/api/src/store.ts:403


game ​

game: string

Defined in: apps/api/src/store.ts:378

The game: a published game's id (g-…), or a curated bundled level's name.


id ​

id: string

Defined in: apps/api/src/store.ts:376

run-….


lostAfter ​

lostAfter: string

Defined in: apps/api/src/store.ts:389

When it counts as lost if no result came and its room is out of sight (ISO): its mission's attempts and a margin.


mission ​

mission: string

Defined in: apps/api/src/store.ts:382

The mission's id and title.


owner ​

owner: string

Defined in: apps/api/src/store.ts:391

The account that opened it.


paidAt? ​

optional paidAt?: string

Defined in: apps/api/src/store.ts:405

ISO time its seats' standing was paid (respect.ts): a settled run without it is paid by the sweep.


playtest ​

playtest: boolean

Defined in: apps/api/src/store.ts:393

A creator's playtest: its minimum of players relaxed, counting for nothing.


reportHash ​

reportHash: string

Defined in: apps/api/src/store.ts:397

The SHA-256 of the token its game server reports with.


result? ​

optional result?: object

Defined in: apps/api/src/store.ts:400

debug? ​

optional debug?: boolean

forfeit? ​

optional forfeit?: boolean

missionHash ​

missionHash: string

outcome ​

outcome: "complete" | "failed" | "abandoned" | "won" | "draw"

runId ​

runId: string

seats ​

seats: object[]

seconds ​

seconds: number

winner? ​

optional winner?: string


resultHash? ​

optional resultHash?: string

Defined in: apps/api/src/store.ts:399

The SHA-256 of the result's body it took, and the result.


room ​

room: string

Defined in: apps/api/src/store.ts:385

The room it was opened in (room-…).


server ​

server: string

Defined in: apps/api/src/store.ts:387

Where the API reaches the game server its room is on (its internal address): what the sweep asks.


state ​

state: "open" | "complete" | "failed" | "abandoned" | "won" | "draw" | "lost"

Defined in: apps/api/src/store.ts:395

Where it stands: a versus run ends won (its result names the winner) or a draw.


title ​

title: string

Defined in: apps/api/src/store.ts:383


version? ​

optional version?: number

Defined in: apps/api/src/store.ts:380

The published version played; none for a bundled game.