@dreamboard-games/api-client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +89 -0
- package/NOTICE +1 -0
- package/dist/@tanstack/react-query.gen.d.ts +1037 -0
- package/dist/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/@tanstack/react-query.gen.js +1016 -0
- package/dist/client/client.gen.d.ts +3 -0
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/client.gen.js +235 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +6 -0
- package/dist/client/types.gen.d.ts +118 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/types.gen.js +2 -0
- package/dist/client/utils.gen.d.ts +34 -0
- package/dist/client/utils.gen.d.ts.map +1 -0
- package/dist/client/utils.gen.js +233 -0
- package/dist/client.gen.d.ts +13 -0
- package/dist/client.gen.d.ts.map +1 -0
- package/dist/client.gen.js +3 -0
- package/dist/core/auth.gen.d.ts +19 -0
- package/dist/core/auth.gen.d.ts.map +1 -0
- package/dist/core/auth.gen.js +14 -0
- package/dist/core/bodySerializer.gen.d.ts +26 -0
- package/dist/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/core/bodySerializer.gen.js +57 -0
- package/dist/core/params.gen.d.ts +44 -0
- package/dist/core/params.gen.d.ts.map +1 -0
- package/dist/core/params.gen.js +100 -0
- package/dist/core/pathSerializer.gen.d.ts +34 -0
- package/dist/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/core/pathSerializer.gen.js +114 -0
- package/dist/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/core/queryKeySerializer.gen.js +99 -0
- package/dist/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/core/serverSentEvents.gen.js +136 -0
- package/dist/core/types.gen.d.ts +79 -0
- package/dist/core/types.gen.d.ts.map +1 -0
- package/dist/core/types.gen.js +2 -0
- package/dist/core/utils.gen.d.ts +20 -0
- package/dist/core/utils.gen.d.ts.map +1 -0
- package/dist/core/utils.gen.js +87 -0
- package/dist/generated/problem-types.gen.d.ts +26 -0
- package/dist/generated/problem-types.gen.d.ts.map +1 -0
- package/dist/generated/problem-types.gen.js +23 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/sdk.gen.d.ts +364 -0
- package/dist/sdk.gen.d.ts.map +1 -0
- package/dist/sdk.gen.js +634 -0
- package/dist/source-revisions.d.ts +27 -0
- package/dist/source-revisions.d.ts.map +1 -0
- package/dist/source-revisions.js +174 -0
- package/dist/storage-paths.d.ts +17 -0
- package/dist/storage-paths.d.ts.map +1 -0
- package/dist/storage-paths.js +16 -0
- package/dist/types.gen.d.ts +5007 -0
- package/dist/types.gen.d.ts.map +1 -0
- package/dist/types.gen.js +2 -0
- package/dist/zod.gen.d.ts +37398 -0
- package/dist/zod.gen.d.ts.map +1 -0
- package/dist/zod.gen.js +2396 -0
- package/package.json +105 -0
- package/src/@tanstack/react-query.gen.ts +1114 -0
- package/src/client/client.gen.ts +311 -0
- package/src/client/index.ts +25 -0
- package/src/client/types.gen.ts +241 -0
- package/src/client/utils.gen.ts +332 -0
- package/src/client.gen.ts +16 -0
- package/src/core/auth.gen.ts +42 -0
- package/src/core/bodySerializer.gen.ts +100 -0
- package/src/core/params.gen.ts +176 -0
- package/src/core/pathSerializer.gen.ts +181 -0
- package/src/core/queryKeySerializer.gen.ts +136 -0
- package/src/core/serverSentEvents.gen.ts +265 -0
- package/src/core/types.gen.ts +118 -0
- package/src/core/utils.gen.ts +143 -0
- package/src/generated/problem-types.gen.ts +35 -0
- package/src/index.ts +7 -0
- package/src/sdk.gen.ts +709 -0
- package/src/source-revisions.ts +283 -0
- package/src/storage-paths.ts +19 -0
- package/src/types.gen.ts +5486 -0
- package/src/zod.gen.ts +2705 -0
|
@@ -0,0 +1,5007 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: 'https://dreamboard.games' | 'http://localhost:8080' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Backend runtime version metadata used by local development hosts.
|
|
6
|
+
*/
|
|
7
|
+
export type ApiVersionResponse = {
|
|
8
|
+
/**
|
|
9
|
+
* Deployed backend application revision or git SHA, when available.
|
|
10
|
+
*/
|
|
11
|
+
backendRevision: string;
|
|
12
|
+
/**
|
|
13
|
+
* UI SDK version expected by the backend runtime.
|
|
14
|
+
*/
|
|
15
|
+
uiSdkVersion: string;
|
|
16
|
+
};
|
|
17
|
+
export type GameMetadata = {
|
|
18
|
+
/**
|
|
19
|
+
* URL to the game's cover image
|
|
20
|
+
*/
|
|
21
|
+
coverImage?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Estimated play time
|
|
24
|
+
*/
|
|
25
|
+
playTime?: '15-30 minutes' | '30-60 minutes' | '1-2 hours' | '2-3 hours' | '3+ hours';
|
|
26
|
+
/**
|
|
27
|
+
* Recommended age range
|
|
28
|
+
*/
|
|
29
|
+
ageRange?: '3+' | '6+' | '8+' | '10+' | '12+' | '14+' | '16+' | '18+';
|
|
30
|
+
/**
|
|
31
|
+
* Game category or genre
|
|
32
|
+
*/
|
|
33
|
+
gameCategory?: 'Abstract' | 'Strategy' | 'Eurogame' | 'Ameritrash' | 'Card Game' | 'Dice Game' | 'Party Game' | 'Cooperative' | 'Competitive' | 'Solo' | 'Family Game' | 'Wargame' | 'Tile-Placement' | 'Worker Placement' | 'Deck Builder';
|
|
34
|
+
/**
|
|
35
|
+
* Key game mechanics
|
|
36
|
+
*/
|
|
37
|
+
keyMechanics?: 'Area Control' | 'Set Collection' | 'Hand Management' | 'Dice Rolling' | 'Route Building' | 'Pick-up and Deliver' | 'Auction/Bidding' | 'Hidden Roles' | 'Bluffing' | 'Push Your Luck';
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Tracks which steps have been completed for a game
|
|
41
|
+
*/
|
|
42
|
+
export type CompletedSteps = {
|
|
43
|
+
/**
|
|
44
|
+
* Whether the rule has been saved
|
|
45
|
+
*/
|
|
46
|
+
ruleSaved?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the manifest has been generated
|
|
49
|
+
*/
|
|
50
|
+
manifestGenerated?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the app has been built
|
|
53
|
+
*/
|
|
54
|
+
appBuilt?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the UI has been built
|
|
57
|
+
*/
|
|
58
|
+
uiBuilt?: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Development status light shown in the dashboard
|
|
62
|
+
*/
|
|
63
|
+
export type StepLightStatus = 'yellow' | 'green' | 'red';
|
|
64
|
+
/**
|
|
65
|
+
* Per-area development lights shown for a game
|
|
66
|
+
*/
|
|
67
|
+
export type GameCompletionLights = {
|
|
68
|
+
/**
|
|
69
|
+
* Rule authoring status light
|
|
70
|
+
*/
|
|
71
|
+
rules: StepLightStatus;
|
|
72
|
+
/**
|
|
73
|
+
* Manifest authoring status light
|
|
74
|
+
*/
|
|
75
|
+
manifest: StepLightStatus;
|
|
76
|
+
/**
|
|
77
|
+
* Phase logic status light
|
|
78
|
+
*/
|
|
79
|
+
phases: StepLightStatus;
|
|
80
|
+
/**
|
|
81
|
+
* UI implementation status light
|
|
82
|
+
*/
|
|
83
|
+
ui: StepLightStatus;
|
|
84
|
+
};
|
|
85
|
+
export type Game = {
|
|
86
|
+
/**
|
|
87
|
+
* Unique identifier for the game
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
/**
|
|
91
|
+
* URL-safe game slug (lowercase kebab-case)
|
|
92
|
+
*/
|
|
93
|
+
slug: string;
|
|
94
|
+
/**
|
|
95
|
+
* Display name of the game
|
|
96
|
+
*/
|
|
97
|
+
name: string;
|
|
98
|
+
/**
|
|
99
|
+
* Detailed description of the game
|
|
100
|
+
*/
|
|
101
|
+
description?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Game rules text
|
|
104
|
+
*/
|
|
105
|
+
ruleText?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the game is publicly visible
|
|
108
|
+
*/
|
|
109
|
+
public: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* When the game was created
|
|
112
|
+
*/
|
|
113
|
+
createdAt: string;
|
|
114
|
+
/**
|
|
115
|
+
* When the game was last updated
|
|
116
|
+
*/
|
|
117
|
+
updatedAt: string;
|
|
118
|
+
/**
|
|
119
|
+
* ID of the script that defines the game logic
|
|
120
|
+
*/
|
|
121
|
+
scriptId?: string;
|
|
122
|
+
metadata?: GameMetadata;
|
|
123
|
+
/**
|
|
124
|
+
* Tracks which steps have been completed for this game
|
|
125
|
+
*/
|
|
126
|
+
completedSteps: CompletedSteps;
|
|
127
|
+
/**
|
|
128
|
+
* Color lights representing progress since scaffold for rules, manifest, phases, and UI
|
|
129
|
+
*/
|
|
130
|
+
completionLights: GameCompletionLights;
|
|
131
|
+
/**
|
|
132
|
+
* Whether the game is ready to play (all completion lights are green)
|
|
133
|
+
*/
|
|
134
|
+
readyToPlay: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Whether the game has completed initial setup (all steps complete: rule saved, manifest generated, app built, UI built)
|
|
137
|
+
*/
|
|
138
|
+
initialized: boolean;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Stable machine-readable problem identifier
|
|
142
|
+
*/
|
|
143
|
+
export type ProblemType = 'urn:dreamboard:problem:action-rejected' | 'urn:dreamboard:problem:active-job-conflict' | 'urn:dreamboard:problem:authoring-state-base-missing' | 'urn:dreamboard:problem:authoring-state-drift' | 'urn:dreamboard:problem:forbidden' | 'urn:dreamboard:problem:game-slug-conflict' | 'urn:dreamboard:problem:internal-error' | 'urn:dreamboard:problem:resource-not-found' | 'urn:dreamboard:problem:source-revision-base-missing' | 'urn:dreamboard:problem:source-revision-drift' | 'urn:dreamboard:problem:source-revision-not-found' | 'urn:dreamboard:problem:state-conflict' | 'urn:dreamboard:problem:too-many-requests' | 'urn:dreamboard:problem:unauthorized' | 'urn:dreamboard:problem:validation-failed';
|
|
144
|
+
export type ProblemViolation = {
|
|
145
|
+
/**
|
|
146
|
+
* Optional field or input path associated with the issue
|
|
147
|
+
*/
|
|
148
|
+
field?: string;
|
|
149
|
+
/**
|
|
150
|
+
* Optional machine-readable issue code
|
|
151
|
+
*/
|
|
152
|
+
code?: string;
|
|
153
|
+
/**
|
|
154
|
+
* Human-readable issue description
|
|
155
|
+
*/
|
|
156
|
+
message: string;
|
|
157
|
+
};
|
|
158
|
+
export type ProblemDetails = {
|
|
159
|
+
type: ProblemType;
|
|
160
|
+
/**
|
|
161
|
+
* Short summary of the problem type
|
|
162
|
+
*/
|
|
163
|
+
title: string;
|
|
164
|
+
/**
|
|
165
|
+
* HTTP status code for this problem
|
|
166
|
+
*/
|
|
167
|
+
status: number;
|
|
168
|
+
/**
|
|
169
|
+
* Human-readable explanation specific to this occurrence
|
|
170
|
+
*/
|
|
171
|
+
detail: string;
|
|
172
|
+
/**
|
|
173
|
+
* Request URI or other occurrence identifier
|
|
174
|
+
*/
|
|
175
|
+
instance?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Correlation ID for tracing this request across logs and support tooling
|
|
178
|
+
*/
|
|
179
|
+
requestId?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Whether retrying the same request may succeed without changing input
|
|
182
|
+
*/
|
|
183
|
+
retryable?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Structured context for programmatic handling and richer UX
|
|
186
|
+
*/
|
|
187
|
+
context?: {
|
|
188
|
+
[key: string]: string;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Optional structured issues associated with the problem
|
|
192
|
+
*/
|
|
193
|
+
violations?: Array<ProblemViolation>;
|
|
194
|
+
/**
|
|
195
|
+
* ISO 8601 timestamp of the problem response
|
|
196
|
+
*/
|
|
197
|
+
timestamp?: string;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Request to create a new game
|
|
201
|
+
*/
|
|
202
|
+
export type CreateGameRequest = {
|
|
203
|
+
/**
|
|
204
|
+
* URL-safe game slug (lowercase kebab-case). Optional for legacy clients.
|
|
205
|
+
*/
|
|
206
|
+
slug?: string;
|
|
207
|
+
/**
|
|
208
|
+
* Name of the game (default: 'Untitled Game')
|
|
209
|
+
*/
|
|
210
|
+
name?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Optional description of the game
|
|
213
|
+
*/
|
|
214
|
+
description?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Optional initial rule text
|
|
217
|
+
*/
|
|
218
|
+
ruleText?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Whether to enhance the rules using AI before saving
|
|
221
|
+
*/
|
|
222
|
+
enhanceRule?: boolean;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Request to extract a structured game spec from rule text.
|
|
226
|
+
*/
|
|
227
|
+
export type ExtractGameSpecRequest = {
|
|
228
|
+
ruleText: string;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Supported player count range for a generated game.
|
|
232
|
+
*/
|
|
233
|
+
export type GameSpecPlayers = {
|
|
234
|
+
min: number;
|
|
235
|
+
max: number;
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Component family expected in the generated game.
|
|
239
|
+
*/
|
|
240
|
+
export type GameSpecComponent = 'deck' | 'dice' | 'board' | 'resource' | 'token' | 'tracker';
|
|
241
|
+
/**
|
|
242
|
+
* A single component instance in the generated game. Multiple instances of
|
|
243
|
+
* the same `kind` are allowed (e.g. two decks). `name` is a short label and
|
|
244
|
+
* `notes` is freeform detail the agent will expand into manifest entries.
|
|
245
|
+
*
|
|
246
|
+
*/
|
|
247
|
+
export type GameSpecComponentSpec = {
|
|
248
|
+
kind: GameSpecComponent;
|
|
249
|
+
name: string;
|
|
250
|
+
notes?: string;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* Structured game specification submitted by the new-game flow.
|
|
254
|
+
*/
|
|
255
|
+
export type GameSpecForm = {
|
|
256
|
+
name: string;
|
|
257
|
+
players: GameSpecPlayers;
|
|
258
|
+
components: Array<GameSpecComponentSpec>;
|
|
259
|
+
winCondition: string;
|
|
260
|
+
additionalRules: string;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Structured game spec extracted from rule text.
|
|
264
|
+
*/
|
|
265
|
+
export type ExtractGameSpecResponse = {
|
|
266
|
+
gameSpec: GameSpecForm;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* Supported player-count metadata for the game
|
|
270
|
+
*/
|
|
271
|
+
export type PlayersDefinition = {
|
|
272
|
+
minPlayers: number;
|
|
273
|
+
maxPlayers: number;
|
|
274
|
+
optimalPlayers?: number;
|
|
275
|
+
};
|
|
276
|
+
export type PresetCardSetDefinition = {
|
|
277
|
+
/**
|
|
278
|
+
* Unique local identifier for the authored card set
|
|
279
|
+
*/
|
|
280
|
+
id: string;
|
|
281
|
+
/**
|
|
282
|
+
* Built-in preset card-set selector
|
|
283
|
+
*/
|
|
284
|
+
presetId: string;
|
|
285
|
+
/**
|
|
286
|
+
* Display name of the card set
|
|
287
|
+
*/
|
|
288
|
+
name: string;
|
|
289
|
+
/**
|
|
290
|
+
* Type of card set source
|
|
291
|
+
*/
|
|
292
|
+
type: 'preset';
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Arbitrary authored JSON value.
|
|
296
|
+
*/
|
|
297
|
+
export type JsonValue = string | number | number | boolean | null | Array<JsonValue> | {
|
|
298
|
+
[key: string]: JsonValue;
|
|
299
|
+
};
|
|
300
|
+
export type PropertySchema = {
|
|
301
|
+
/**
|
|
302
|
+
* The data type of the property.
|
|
303
|
+
*/
|
|
304
|
+
type: 'string' | 'integer' | 'number' | 'boolean' | 'zoneId' | 'cardId' | 'playerId' | 'boardId' | 'edgeId' | 'vertexId' | 'spaceId' | 'pieceId' | 'dieId' | 'resourceId' | 'array' | 'object' | 'record' | 'enum';
|
|
305
|
+
/**
|
|
306
|
+
* Optional description of the property's purpose and usage.
|
|
307
|
+
*/
|
|
308
|
+
description?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Whether an object property may be omitted.
|
|
311
|
+
*/
|
|
312
|
+
optional?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Whether the value may be null.
|
|
315
|
+
*/
|
|
316
|
+
nullable?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Optional authored default value for this property. When present, omitted
|
|
319
|
+
* seed values materialize to the default and generated TypeScript treats
|
|
320
|
+
* the property as present even if `optional: true` is also set.
|
|
321
|
+
*
|
|
322
|
+
*/
|
|
323
|
+
default?: JsonValue;
|
|
324
|
+
/**
|
|
325
|
+
* For array types, the schema of the array items. Required if type is 'array'.
|
|
326
|
+
*/
|
|
327
|
+
items?: PropertySchema;
|
|
328
|
+
/**
|
|
329
|
+
* For object types, the schema of the object's properties. Required if type is 'object'.
|
|
330
|
+
*/
|
|
331
|
+
properties?: {
|
|
332
|
+
[key: string]: PropertySchema;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* For enum types, the list of allowed string values. Required if type is 'enum'.
|
|
336
|
+
*/
|
|
337
|
+
enums?: Array<string>;
|
|
338
|
+
/**
|
|
339
|
+
* For record types, the schema of the record's values. Required if type is 'record'.
|
|
340
|
+
*/
|
|
341
|
+
values?: PropertySchema;
|
|
342
|
+
};
|
|
343
|
+
export type ObjectSchema = {
|
|
344
|
+
/**
|
|
345
|
+
* Map of property names to their schemas. Type is always 'object' and all properties are required.
|
|
346
|
+
*/
|
|
347
|
+
properties: {
|
|
348
|
+
[key: string]: PropertySchema;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
export type CardPropertySchemaVariants = {
|
|
352
|
+
/**
|
|
353
|
+
* Property schemas present on every card-type variant.
|
|
354
|
+
*/
|
|
355
|
+
shared?: {
|
|
356
|
+
[key: string]: PropertySchema;
|
|
357
|
+
};
|
|
358
|
+
/**
|
|
359
|
+
* Property schema for each card type in this manual card set.
|
|
360
|
+
*/
|
|
361
|
+
variants: {
|
|
362
|
+
[key: string]: ObjectSchema;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
export type CardPropertySchema = ObjectSchema | CardPropertySchemaVariants;
|
|
366
|
+
export type DetachedHomeSpec = {
|
|
367
|
+
type: 'detached';
|
|
368
|
+
};
|
|
369
|
+
export type ZoneHomeSpec = {
|
|
370
|
+
type: 'zone';
|
|
371
|
+
zoneId: string;
|
|
372
|
+
};
|
|
373
|
+
export type SpaceHomeSpec = {
|
|
374
|
+
type: 'space';
|
|
375
|
+
boardId: string;
|
|
376
|
+
spaceId: string;
|
|
377
|
+
};
|
|
378
|
+
export type ContainerHomeSpec = {
|
|
379
|
+
type: 'container';
|
|
380
|
+
boardId: string;
|
|
381
|
+
containerId: string;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Tiled board edge identified by the spaces that border it
|
|
385
|
+
*/
|
|
386
|
+
export type BoardEdgeRef = {
|
|
387
|
+
spaces: Array<string>;
|
|
388
|
+
};
|
|
389
|
+
export type EdgeHomeSpec = {
|
|
390
|
+
type: 'edge';
|
|
391
|
+
boardId: string;
|
|
392
|
+
ref: BoardEdgeRef;
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Tiled board vertex identified by the spaces that touch it
|
|
396
|
+
*/
|
|
397
|
+
export type BoardVertexRef = {
|
|
398
|
+
spaces: Array<string>;
|
|
399
|
+
};
|
|
400
|
+
export type VertexHomeSpec = {
|
|
401
|
+
type: 'vertex';
|
|
402
|
+
boardId: string;
|
|
403
|
+
ref: BoardVertexRef;
|
|
404
|
+
};
|
|
405
|
+
export type PieceSlotHostRef = {
|
|
406
|
+
kind: 'piece';
|
|
407
|
+
id: string;
|
|
408
|
+
};
|
|
409
|
+
export type DieSlotHostRef = {
|
|
410
|
+
kind: 'die';
|
|
411
|
+
id: string;
|
|
412
|
+
};
|
|
413
|
+
export type SlotHostRef = ({
|
|
414
|
+
kind: 'piece';
|
|
415
|
+
} & PieceSlotHostRef) | ({
|
|
416
|
+
kind: 'die';
|
|
417
|
+
} & DieSlotHostRef);
|
|
418
|
+
export type SlotHomeSpec = {
|
|
419
|
+
type: 'slot';
|
|
420
|
+
host: SlotHostRef;
|
|
421
|
+
slotId: string;
|
|
422
|
+
};
|
|
423
|
+
export type ComponentHomeSpec = ({
|
|
424
|
+
type: 'detached';
|
|
425
|
+
} & DetachedHomeSpec) | ({
|
|
426
|
+
type: 'zone';
|
|
427
|
+
} & ZoneHomeSpec) | ({
|
|
428
|
+
type: 'space';
|
|
429
|
+
} & SpaceHomeSpec) | ({
|
|
430
|
+
type: 'container';
|
|
431
|
+
} & ContainerHomeSpec) | ({
|
|
432
|
+
type: 'edge';
|
|
433
|
+
} & EdgeHomeSpec) | ({
|
|
434
|
+
type: 'vertex';
|
|
435
|
+
} & VertexHomeSpec) | ({
|
|
436
|
+
type: 'slot';
|
|
437
|
+
} & SlotHomeSpec);
|
|
438
|
+
/**
|
|
439
|
+
* Default authored visibility for a component instance
|
|
440
|
+
*/
|
|
441
|
+
export type ComponentVisibilitySpec = {
|
|
442
|
+
faceUp?: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* When omitted, visible to all players
|
|
445
|
+
*/
|
|
446
|
+
visibleTo?: Array<string>;
|
|
447
|
+
};
|
|
448
|
+
export type BoardCard = {
|
|
449
|
+
/**
|
|
450
|
+
* Card type identifier used to generate runtime CardIds. When count > 1, runtime IDs are generated as '{type}-1', '{type}-2', etc.
|
|
451
|
+
*/
|
|
452
|
+
type: string;
|
|
453
|
+
/**
|
|
454
|
+
* Display name of the card
|
|
455
|
+
*/
|
|
456
|
+
name: string;
|
|
457
|
+
/**
|
|
458
|
+
* URL to the card's image
|
|
459
|
+
*/
|
|
460
|
+
imageUrl?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Text content on the card
|
|
463
|
+
*/
|
|
464
|
+
text?: string;
|
|
465
|
+
/**
|
|
466
|
+
* Number of copies of this card
|
|
467
|
+
*/
|
|
468
|
+
count: number;
|
|
469
|
+
/**
|
|
470
|
+
* Optional authored card category or subtype identifier
|
|
471
|
+
*/
|
|
472
|
+
cardType?: string;
|
|
473
|
+
/**
|
|
474
|
+
* Optional authored home for this card inventory. When omitted, cards start detached until reducer setup places them.
|
|
475
|
+
*/
|
|
476
|
+
home?: ComponentHomeSpec;
|
|
477
|
+
/**
|
|
478
|
+
* Default authored visibility for the card inventory
|
|
479
|
+
*/
|
|
480
|
+
visibility?: ComponentVisibilitySpec;
|
|
481
|
+
/**
|
|
482
|
+
* Actual property values for this specific card instance. Keys must match the properties defined in the referenced cardSchema.
|
|
483
|
+
*/
|
|
484
|
+
properties: {
|
|
485
|
+
[key: string]: JsonValue;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
export type ManualCardSetDefinition = {
|
|
489
|
+
/**
|
|
490
|
+
* Unique identifier for the card set
|
|
491
|
+
*/
|
|
492
|
+
id: string;
|
|
493
|
+
/**
|
|
494
|
+
* Display name of the card set
|
|
495
|
+
*/
|
|
496
|
+
name: string;
|
|
497
|
+
/**
|
|
498
|
+
* Type of card set source
|
|
499
|
+
*/
|
|
500
|
+
type: 'manual';
|
|
501
|
+
/**
|
|
502
|
+
* Schema definition for authored card properties in this card set
|
|
503
|
+
*/
|
|
504
|
+
cardSchema: CardPropertySchema;
|
|
505
|
+
/**
|
|
506
|
+
* List of authored cards in this card set
|
|
507
|
+
*/
|
|
508
|
+
cards: Array<BoardCard>;
|
|
509
|
+
};
|
|
510
|
+
export type CardSetDefinition = ({
|
|
511
|
+
type: 'preset';
|
|
512
|
+
} & PresetCardSetDefinition) | ({
|
|
513
|
+
type: 'manual';
|
|
514
|
+
} & ManualCardSetDefinition);
|
|
515
|
+
/**
|
|
516
|
+
* Whether authored topology exists once for the table or once per player
|
|
517
|
+
*/
|
|
518
|
+
export type TopologyScope = 'shared' | 'perPlayer';
|
|
519
|
+
/**
|
|
520
|
+
* Default topology visibility for a zone or slot
|
|
521
|
+
*/
|
|
522
|
+
export type ZoneVisibility = 'ownerOnly' | 'public' | 'hidden';
|
|
523
|
+
/**
|
|
524
|
+
* Generic authored container that can hold cards, pieces, or dice
|
|
525
|
+
*/
|
|
526
|
+
export type ZoneSpec = {
|
|
527
|
+
/**
|
|
528
|
+
* Stable zone identifier
|
|
529
|
+
*/
|
|
530
|
+
id: string;
|
|
531
|
+
/**
|
|
532
|
+
* Display name for the zone
|
|
533
|
+
*/
|
|
534
|
+
name: string;
|
|
535
|
+
scope: TopologyScope;
|
|
536
|
+
/**
|
|
537
|
+
* Optional card-set restriction for this zone
|
|
538
|
+
*/
|
|
539
|
+
allowedCardSetIds?: Array<string>;
|
|
540
|
+
visibility?: ZoneVisibility;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Stable authored board space or slot anchor
|
|
544
|
+
*/
|
|
545
|
+
export type BoardSpaceSpec = {
|
|
546
|
+
/**
|
|
547
|
+
* Stable space identifier local to the board
|
|
548
|
+
*/
|
|
549
|
+
id: string;
|
|
550
|
+
/**
|
|
551
|
+
* Human-readable space name
|
|
552
|
+
*/
|
|
553
|
+
name?: string;
|
|
554
|
+
/**
|
|
555
|
+
* Optional authored space type identifier
|
|
556
|
+
*/
|
|
557
|
+
typeId?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Typed authored fields validated against the board's spaceFieldsSchema
|
|
560
|
+
*/
|
|
561
|
+
fields?: {
|
|
562
|
+
[key: string]: JsonValue;
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
/**
|
|
566
|
+
* Named relation between two authored spaces
|
|
567
|
+
*/
|
|
568
|
+
export type BoardRelationSpec = {
|
|
569
|
+
/**
|
|
570
|
+
* Optional stable relation identifier
|
|
571
|
+
*/
|
|
572
|
+
id?: string;
|
|
573
|
+
/**
|
|
574
|
+
* Relation type identifier such as adjacent, covers, blocks, or linked
|
|
575
|
+
*/
|
|
576
|
+
typeId: string;
|
|
577
|
+
fromSpaceId: string;
|
|
578
|
+
toSpaceId: string;
|
|
579
|
+
directed?: boolean;
|
|
580
|
+
/**
|
|
581
|
+
* Typed authored relation fields validated against relationFieldsSchema
|
|
582
|
+
*/
|
|
583
|
+
fields?: {
|
|
584
|
+
[key: string]: JsonValue;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
export type BoardHostSpec = {
|
|
588
|
+
type: 'board';
|
|
589
|
+
};
|
|
590
|
+
export type SpaceHostSpec = {
|
|
591
|
+
type: 'space';
|
|
592
|
+
spaceId: string;
|
|
593
|
+
};
|
|
594
|
+
export type BoardContainerHostSpec = ({
|
|
595
|
+
type: 'board';
|
|
596
|
+
} & BoardHostSpec) | ({
|
|
597
|
+
type: 'space';
|
|
598
|
+
} & SpaceHostSpec);
|
|
599
|
+
/**
|
|
600
|
+
* Authored board-attached or space-attached container/slot
|
|
601
|
+
*/
|
|
602
|
+
export type BoardContainerSpec = {
|
|
603
|
+
/**
|
|
604
|
+
* Stable container identifier local to the board
|
|
605
|
+
*/
|
|
606
|
+
id: string;
|
|
607
|
+
/**
|
|
608
|
+
* Display name for the container
|
|
609
|
+
*/
|
|
610
|
+
name: string;
|
|
611
|
+
host: BoardContainerHostSpec;
|
|
612
|
+
allowedCardSetIds?: Array<string>;
|
|
613
|
+
/**
|
|
614
|
+
* Typed authored container fields validated against containerFieldsSchema
|
|
615
|
+
*/
|
|
616
|
+
fields?: {
|
|
617
|
+
[key: string]: JsonValue;
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
/**
|
|
621
|
+
* Reusable authored board topology template
|
|
622
|
+
*/
|
|
623
|
+
export type GenericBoardTemplateSpec = {
|
|
624
|
+
/**
|
|
625
|
+
* Stable template identifier
|
|
626
|
+
*/
|
|
627
|
+
id: string;
|
|
628
|
+
name: string;
|
|
629
|
+
layout: 'generic';
|
|
630
|
+
/**
|
|
631
|
+
* Optional authored board type identifier such as track, map, tableau, or grid
|
|
632
|
+
*/
|
|
633
|
+
typeId?: string;
|
|
634
|
+
boardFieldsSchema?: ObjectSchema;
|
|
635
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
636
|
+
relationFieldsSchema?: ObjectSchema;
|
|
637
|
+
containerFieldsSchema?: ObjectSchema;
|
|
638
|
+
spaces?: Array<BoardSpaceSpec>;
|
|
639
|
+
relations?: Array<BoardRelationSpec>;
|
|
640
|
+
containers?: Array<BoardContainerSpec>;
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* Visual orientation for authored hex coordinates
|
|
644
|
+
*/
|
|
645
|
+
export type HexOrientation = 'pointy-top' | 'flat-top';
|
|
646
|
+
/**
|
|
647
|
+
* One authored hex space in axial coordinates
|
|
648
|
+
*/
|
|
649
|
+
export type HexSpaceSpec = {
|
|
650
|
+
/**
|
|
651
|
+
* Stable space identifier local to the board
|
|
652
|
+
*/
|
|
653
|
+
id: string;
|
|
654
|
+
/**
|
|
655
|
+
* Axial q coordinate
|
|
656
|
+
*/
|
|
657
|
+
q: number;
|
|
658
|
+
/**
|
|
659
|
+
* Axial r coordinate
|
|
660
|
+
*/
|
|
661
|
+
r: number;
|
|
662
|
+
/**
|
|
663
|
+
* Optional authored space type identifier
|
|
664
|
+
*/
|
|
665
|
+
typeId?: string;
|
|
666
|
+
/**
|
|
667
|
+
* Optional hex-space label for setup or rendering
|
|
668
|
+
*/
|
|
669
|
+
label?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Typed authored fields validated against the board's spaceFieldsSchema
|
|
672
|
+
*/
|
|
673
|
+
fields?: {
|
|
674
|
+
[key: string]: JsonValue;
|
|
675
|
+
};
|
|
676
|
+
};
|
|
677
|
+
/**
|
|
678
|
+
* Hex edge identified by two adjacent hex spaces
|
|
679
|
+
*/
|
|
680
|
+
export type HexEdgeRef = {
|
|
681
|
+
spaces: [
|
|
682
|
+
string,
|
|
683
|
+
string
|
|
684
|
+
];
|
|
685
|
+
};
|
|
686
|
+
/**
|
|
687
|
+
* Authored metadata attached to one derived hex edge
|
|
688
|
+
*/
|
|
689
|
+
export type HexEdgeSpec = {
|
|
690
|
+
ref: HexEdgeRef;
|
|
691
|
+
/**
|
|
692
|
+
* Optional authored edge type identifier
|
|
693
|
+
*/
|
|
694
|
+
typeId?: string;
|
|
695
|
+
/**
|
|
696
|
+
* Optional edge label for setup or rendering
|
|
697
|
+
*/
|
|
698
|
+
label?: string;
|
|
699
|
+
tags?: Array<string>;
|
|
700
|
+
/**
|
|
701
|
+
* Typed authored edge fields validated against edgeFieldsSchema
|
|
702
|
+
*/
|
|
703
|
+
fields?: {
|
|
704
|
+
[key: string]: JsonValue;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* Hex vertex identified by three touching hex spaces
|
|
709
|
+
*/
|
|
710
|
+
export type HexVertexRef = {
|
|
711
|
+
spaces: [
|
|
712
|
+
string,
|
|
713
|
+
string,
|
|
714
|
+
string
|
|
715
|
+
];
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Authored metadata attached to one derived hex vertex
|
|
719
|
+
*/
|
|
720
|
+
export type HexVertexSpec = {
|
|
721
|
+
ref: HexVertexRef;
|
|
722
|
+
/**
|
|
723
|
+
* Optional authored vertex type identifier
|
|
724
|
+
*/
|
|
725
|
+
typeId?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Optional vertex label for setup or rendering
|
|
728
|
+
*/
|
|
729
|
+
label?: string;
|
|
730
|
+
tags?: Array<string>;
|
|
731
|
+
/**
|
|
732
|
+
* Typed authored vertex fields validated against vertexFieldsSchema
|
|
733
|
+
*/
|
|
734
|
+
fields?: {
|
|
735
|
+
[key: string]: JsonValue;
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
/**
|
|
739
|
+
* Reusable authored hex board topology template
|
|
740
|
+
*/
|
|
741
|
+
export type HexBoardTemplateSpec = {
|
|
742
|
+
/**
|
|
743
|
+
* Stable template identifier
|
|
744
|
+
*/
|
|
745
|
+
id: string;
|
|
746
|
+
name: string;
|
|
747
|
+
layout: 'hex';
|
|
748
|
+
/**
|
|
749
|
+
* Optional authored board type identifier
|
|
750
|
+
*/
|
|
751
|
+
typeId?: string;
|
|
752
|
+
orientation?: HexOrientation;
|
|
753
|
+
boardFieldsSchema?: ObjectSchema;
|
|
754
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
755
|
+
edgeFieldsSchema?: ObjectSchema;
|
|
756
|
+
vertexFieldsSchema?: ObjectSchema;
|
|
757
|
+
spaces?: Array<HexSpaceSpec>;
|
|
758
|
+
edges?: Array<HexEdgeSpec>;
|
|
759
|
+
vertices?: Array<HexVertexSpec>;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* One authored square space in row/column coordinates
|
|
763
|
+
*/
|
|
764
|
+
export type SquareSpaceSpec = {
|
|
765
|
+
/**
|
|
766
|
+
* Stable space identifier local to the board
|
|
767
|
+
*/
|
|
768
|
+
id: string;
|
|
769
|
+
/**
|
|
770
|
+
* Zero-based row coordinate
|
|
771
|
+
*/
|
|
772
|
+
row: number;
|
|
773
|
+
/**
|
|
774
|
+
* Zero-based column coordinate
|
|
775
|
+
*/
|
|
776
|
+
col: number;
|
|
777
|
+
/**
|
|
778
|
+
* Optional authored space type identifier
|
|
779
|
+
*/
|
|
780
|
+
typeId?: string;
|
|
781
|
+
/**
|
|
782
|
+
* Optional square-space label for setup or rendering
|
|
783
|
+
*/
|
|
784
|
+
label?: string;
|
|
785
|
+
/**
|
|
786
|
+
* Typed authored fields validated against the board's spaceFieldsSchema
|
|
787
|
+
*/
|
|
788
|
+
fields?: {
|
|
789
|
+
[key: string]: JsonValue;
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
/**
|
|
793
|
+
* Authored metadata attached to one derived square edge
|
|
794
|
+
*/
|
|
795
|
+
export type SquareEdgeSpec = {
|
|
796
|
+
ref: BoardEdgeRef;
|
|
797
|
+
/**
|
|
798
|
+
* Optional authored edge type identifier
|
|
799
|
+
*/
|
|
800
|
+
typeId?: string;
|
|
801
|
+
/**
|
|
802
|
+
* Optional edge label for setup or rendering
|
|
803
|
+
*/
|
|
804
|
+
label?: string;
|
|
805
|
+
tags?: Array<string>;
|
|
806
|
+
/**
|
|
807
|
+
* Typed authored edge fields validated against edgeFieldsSchema
|
|
808
|
+
*/
|
|
809
|
+
fields?: {
|
|
810
|
+
[key: string]: JsonValue;
|
|
811
|
+
};
|
|
812
|
+
};
|
|
813
|
+
/**
|
|
814
|
+
* Authored metadata attached to one derived square vertex
|
|
815
|
+
*/
|
|
816
|
+
export type SquareVertexSpec = {
|
|
817
|
+
ref: BoardVertexRef;
|
|
818
|
+
/**
|
|
819
|
+
* Optional authored vertex type identifier
|
|
820
|
+
*/
|
|
821
|
+
typeId?: string;
|
|
822
|
+
/**
|
|
823
|
+
* Optional vertex label for setup or rendering
|
|
824
|
+
*/
|
|
825
|
+
label?: string;
|
|
826
|
+
tags?: Array<string>;
|
|
827
|
+
/**
|
|
828
|
+
* Typed authored vertex fields validated against vertexFieldsSchema
|
|
829
|
+
*/
|
|
830
|
+
fields?: {
|
|
831
|
+
[key: string]: JsonValue;
|
|
832
|
+
};
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* Reusable authored square board topology template
|
|
836
|
+
*/
|
|
837
|
+
export type SquareBoardTemplateSpec = {
|
|
838
|
+
/**
|
|
839
|
+
* Stable template identifier
|
|
840
|
+
*/
|
|
841
|
+
id: string;
|
|
842
|
+
name: string;
|
|
843
|
+
layout: 'square';
|
|
844
|
+
/**
|
|
845
|
+
* Optional authored board type identifier
|
|
846
|
+
*/
|
|
847
|
+
typeId?: string;
|
|
848
|
+
boardFieldsSchema?: ObjectSchema;
|
|
849
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
850
|
+
relationFieldsSchema?: ObjectSchema;
|
|
851
|
+
containerFieldsSchema?: ObjectSchema;
|
|
852
|
+
edgeFieldsSchema?: ObjectSchema;
|
|
853
|
+
vertexFieldsSchema?: ObjectSchema;
|
|
854
|
+
spaces?: Array<SquareSpaceSpec>;
|
|
855
|
+
relations?: Array<BoardRelationSpec>;
|
|
856
|
+
containers?: Array<BoardContainerSpec>;
|
|
857
|
+
edges?: Array<SquareEdgeSpec>;
|
|
858
|
+
vertices?: Array<SquareVertexSpec>;
|
|
859
|
+
};
|
|
860
|
+
export type BoardTemplateSpec = ({
|
|
861
|
+
layout: 'generic';
|
|
862
|
+
} & GenericBoardTemplateSpec) | ({
|
|
863
|
+
layout: 'hex';
|
|
864
|
+
} & HexBoardTemplateSpec) | ({
|
|
865
|
+
layout: 'square';
|
|
866
|
+
} & SquareBoardTemplateSpec);
|
|
867
|
+
/**
|
|
868
|
+
* Shared or per-player authored board instance shell
|
|
869
|
+
*/
|
|
870
|
+
export type GenericBoardSpec = {
|
|
871
|
+
/**
|
|
872
|
+
* Stable board identifier
|
|
873
|
+
*/
|
|
874
|
+
id: string;
|
|
875
|
+
name: string;
|
|
876
|
+
layout: 'generic';
|
|
877
|
+
/**
|
|
878
|
+
* Optional authored board type identifier such as track, map, tableau, or grid
|
|
879
|
+
*/
|
|
880
|
+
typeId?: string;
|
|
881
|
+
scope: TopologyScope;
|
|
882
|
+
/**
|
|
883
|
+
* Optional board template to clone before applying inline authored additions
|
|
884
|
+
*/
|
|
885
|
+
templateId?: string;
|
|
886
|
+
boardFieldsSchema?: ObjectSchema;
|
|
887
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
888
|
+
relationFieldsSchema?: ObjectSchema;
|
|
889
|
+
containerFieldsSchema?: ObjectSchema;
|
|
890
|
+
/**
|
|
891
|
+
* Typed authored board fields validated against boardFieldsSchema
|
|
892
|
+
*/
|
|
893
|
+
fields?: {
|
|
894
|
+
[key: string]: JsonValue;
|
|
895
|
+
};
|
|
896
|
+
spaces?: Array<BoardSpaceSpec>;
|
|
897
|
+
relations?: Array<BoardRelationSpec>;
|
|
898
|
+
containers?: Array<BoardContainerSpec>;
|
|
899
|
+
};
|
|
900
|
+
/**
|
|
901
|
+
* Shared or per-player authored hex board instance shell
|
|
902
|
+
*/
|
|
903
|
+
export type HexBoardSpec = {
|
|
904
|
+
/**
|
|
905
|
+
* Stable board identifier
|
|
906
|
+
*/
|
|
907
|
+
id: string;
|
|
908
|
+
name: string;
|
|
909
|
+
layout: 'hex';
|
|
910
|
+
/**
|
|
911
|
+
* Optional authored board type identifier
|
|
912
|
+
*/
|
|
913
|
+
typeId?: string;
|
|
914
|
+
scope: TopologyScope;
|
|
915
|
+
/**
|
|
916
|
+
* Optional hex board template to clone before applying inline authored additions
|
|
917
|
+
*/
|
|
918
|
+
templateId?: string;
|
|
919
|
+
orientation?: HexOrientation;
|
|
920
|
+
boardFieldsSchema?: ObjectSchema;
|
|
921
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
922
|
+
edgeFieldsSchema?: ObjectSchema;
|
|
923
|
+
vertexFieldsSchema?: ObjectSchema;
|
|
924
|
+
/**
|
|
925
|
+
* Typed authored board fields validated against boardFieldsSchema
|
|
926
|
+
*/
|
|
927
|
+
fields?: {
|
|
928
|
+
[key: string]: JsonValue;
|
|
929
|
+
};
|
|
930
|
+
spaces?: Array<HexSpaceSpec>;
|
|
931
|
+
edges?: Array<HexEdgeSpec>;
|
|
932
|
+
vertices?: Array<HexVertexSpec>;
|
|
933
|
+
};
|
|
934
|
+
/**
|
|
935
|
+
* Shared or per-player authored square board instance shell
|
|
936
|
+
*/
|
|
937
|
+
export type SquareBoardSpec = {
|
|
938
|
+
/**
|
|
939
|
+
* Stable board identifier
|
|
940
|
+
*/
|
|
941
|
+
id: string;
|
|
942
|
+
name: string;
|
|
943
|
+
layout: 'square';
|
|
944
|
+
/**
|
|
945
|
+
* Optional authored board type identifier
|
|
946
|
+
*/
|
|
947
|
+
typeId?: string;
|
|
948
|
+
scope: TopologyScope;
|
|
949
|
+
/**
|
|
950
|
+
* Optional square board template to clone before applying inline authored additions
|
|
951
|
+
*/
|
|
952
|
+
templateId?: string;
|
|
953
|
+
boardFieldsSchema?: ObjectSchema;
|
|
954
|
+
spaceFieldsSchema?: ObjectSchema;
|
|
955
|
+
relationFieldsSchema?: ObjectSchema;
|
|
956
|
+
containerFieldsSchema?: ObjectSchema;
|
|
957
|
+
edgeFieldsSchema?: ObjectSchema;
|
|
958
|
+
vertexFieldsSchema?: ObjectSchema;
|
|
959
|
+
/**
|
|
960
|
+
* Typed authored board fields validated against boardFieldsSchema
|
|
961
|
+
*/
|
|
962
|
+
fields?: {
|
|
963
|
+
[key: string]: JsonValue;
|
|
964
|
+
};
|
|
965
|
+
spaces?: Array<SquareSpaceSpec>;
|
|
966
|
+
relations?: Array<BoardRelationSpec>;
|
|
967
|
+
containers?: Array<BoardContainerSpec>;
|
|
968
|
+
edges?: Array<SquareEdgeSpec>;
|
|
969
|
+
vertices?: Array<SquareVertexSpec>;
|
|
970
|
+
};
|
|
971
|
+
export type BoardSpec = ({
|
|
972
|
+
layout: 'generic';
|
|
973
|
+
} & GenericBoardSpec) | ({
|
|
974
|
+
layout: 'hex';
|
|
975
|
+
} & HexBoardSpec) | ({
|
|
976
|
+
layout: 'square';
|
|
977
|
+
} & SquareBoardSpec);
|
|
978
|
+
/**
|
|
979
|
+
* Named authored slot exposed by a piece or die type
|
|
980
|
+
*/
|
|
981
|
+
export type ComponentSlotSpec = {
|
|
982
|
+
id: string;
|
|
983
|
+
name?: string;
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Reusable authored piece type
|
|
987
|
+
*/
|
|
988
|
+
export type PieceTypeSpec = {
|
|
989
|
+
id: string;
|
|
990
|
+
name: string;
|
|
991
|
+
fieldsSchema?: ObjectSchema;
|
|
992
|
+
slots?: Array<ComponentSlotSpec>;
|
|
993
|
+
};
|
|
994
|
+
/**
|
|
995
|
+
* Authored seeded piece inventory or supply definition
|
|
996
|
+
*/
|
|
997
|
+
export type PieceSeedSpec = {
|
|
998
|
+
/**
|
|
999
|
+
* Stable piece id seed. When count > 1, runtime ids are generated as '{id}-1', '{id}-2', etc.
|
|
1000
|
+
*/
|
|
1001
|
+
id?: string;
|
|
1002
|
+
name?: string;
|
|
1003
|
+
typeId: string;
|
|
1004
|
+
count?: number;
|
|
1005
|
+
ownerId?: string;
|
|
1006
|
+
home?: ComponentHomeSpec;
|
|
1007
|
+
visibility?: ComponentVisibilitySpec;
|
|
1008
|
+
/**
|
|
1009
|
+
* Typed authored piece fields validated against the piece type schema
|
|
1010
|
+
*/
|
|
1011
|
+
fields?: {
|
|
1012
|
+
[key: string]: JsonValue;
|
|
1013
|
+
};
|
|
1014
|
+
};
|
|
1015
|
+
/**
|
|
1016
|
+
* Reusable authored die type
|
|
1017
|
+
*/
|
|
1018
|
+
export type DieTypeSpec = {
|
|
1019
|
+
id: string;
|
|
1020
|
+
name: string;
|
|
1021
|
+
sides?: number;
|
|
1022
|
+
fieldsSchema?: ObjectSchema;
|
|
1023
|
+
slots?: Array<ComponentSlotSpec>;
|
|
1024
|
+
};
|
|
1025
|
+
/**
|
|
1026
|
+
* Authored seeded die inventory or supply definition
|
|
1027
|
+
*/
|
|
1028
|
+
export type DieSeedSpec = {
|
|
1029
|
+
/**
|
|
1030
|
+
* Stable die id seed. When count > 1, runtime ids are generated as '{id}-1', '{id}-2', etc.
|
|
1031
|
+
*/
|
|
1032
|
+
id?: string;
|
|
1033
|
+
name?: string;
|
|
1034
|
+
typeId: string;
|
|
1035
|
+
count?: number;
|
|
1036
|
+
ownerId?: string;
|
|
1037
|
+
home?: ComponentHomeSpec;
|
|
1038
|
+
visibility?: ComponentVisibilitySpec;
|
|
1039
|
+
/**
|
|
1040
|
+
* Typed authored die fields validated against the die type schema
|
|
1041
|
+
*/
|
|
1042
|
+
fields?: {
|
|
1043
|
+
[key: string]: JsonValue;
|
|
1044
|
+
};
|
|
1045
|
+
};
|
|
1046
|
+
/**
|
|
1047
|
+
* Definition of a game resource type
|
|
1048
|
+
*/
|
|
1049
|
+
export type ResourceDefinition = {
|
|
1050
|
+
/**
|
|
1051
|
+
* Unique identifier for the resource. Used as a typed ResourceId.
|
|
1052
|
+
*/
|
|
1053
|
+
id: string;
|
|
1054
|
+
/**
|
|
1055
|
+
* Human-readable display name for the resource
|
|
1056
|
+
*/
|
|
1057
|
+
name: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* Optional compact icon or emoji rendered by generic UI resource controls.
|
|
1060
|
+
*/
|
|
1061
|
+
icon?: string;
|
|
1062
|
+
};
|
|
1063
|
+
/**
|
|
1064
|
+
* One authored setup option choice
|
|
1065
|
+
*/
|
|
1066
|
+
export type SetupOptionChoiceSpec = {
|
|
1067
|
+
id: string;
|
|
1068
|
+
label: string;
|
|
1069
|
+
description?: string;
|
|
1070
|
+
};
|
|
1071
|
+
/**
|
|
1072
|
+
* Authored setup module/variant axis metadata
|
|
1073
|
+
*/
|
|
1074
|
+
export type SetupOptionSpec = {
|
|
1075
|
+
id: string;
|
|
1076
|
+
name: string;
|
|
1077
|
+
description?: string;
|
|
1078
|
+
choices?: Array<SetupOptionChoiceSpec>;
|
|
1079
|
+
};
|
|
1080
|
+
/**
|
|
1081
|
+
* Reducer-consumed authored setup profile, recipe, or loadout metadata
|
|
1082
|
+
*/
|
|
1083
|
+
export type SetupProfileSpec = {
|
|
1084
|
+
id: string;
|
|
1085
|
+
name: string;
|
|
1086
|
+
description?: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* Selected setup-option values for this profile
|
|
1089
|
+
*/
|
|
1090
|
+
optionValues?: {
|
|
1091
|
+
[key: string]: string;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
/**
|
|
1095
|
+
* Authoritative topology manifest for reducer-native games
|
|
1096
|
+
*/
|
|
1097
|
+
export type GameTopologyManifest = {
|
|
1098
|
+
players: PlayersDefinition;
|
|
1099
|
+
/**
|
|
1100
|
+
* Authored card catalogs and schemas
|
|
1101
|
+
*/
|
|
1102
|
+
cardSets: Array<CardSetDefinition>;
|
|
1103
|
+
/**
|
|
1104
|
+
* Shared and per-player authored containers
|
|
1105
|
+
*/
|
|
1106
|
+
zones?: Array<ZoneSpec>;
|
|
1107
|
+
/**
|
|
1108
|
+
* Reusable board topology templates
|
|
1109
|
+
*/
|
|
1110
|
+
boardTemplates?: Array<BoardTemplateSpec>;
|
|
1111
|
+
/**
|
|
1112
|
+
* Shared and per-player authored board shells
|
|
1113
|
+
*/
|
|
1114
|
+
boards?: Array<BoardSpec>;
|
|
1115
|
+
pieceTypes?: Array<PieceTypeSpec>;
|
|
1116
|
+
pieceSeeds?: Array<PieceSeedSpec>;
|
|
1117
|
+
dieTypes?: Array<DieTypeSpec>;
|
|
1118
|
+
dieSeeds?: Array<DieSeedSpec>;
|
|
1119
|
+
resources?: Array<ResourceDefinition>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Authored setup-option metadata consumed by reducer-owned setup flows
|
|
1122
|
+
*/
|
|
1123
|
+
setupOptions?: Array<SetupOptionSpec>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Authored setup recipes, loadouts, or module profiles consumed by reducer setup code
|
|
1126
|
+
*/
|
|
1127
|
+
setupProfiles?: Array<SetupProfileSpec>;
|
|
1128
|
+
};
|
|
1129
|
+
export type UpdateGameRequest = {
|
|
1130
|
+
/**
|
|
1131
|
+
* Updated display name
|
|
1132
|
+
*/
|
|
1133
|
+
name?: string;
|
|
1134
|
+
/**
|
|
1135
|
+
* Updated description
|
|
1136
|
+
*/
|
|
1137
|
+
description?: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Updated game rules text
|
|
1140
|
+
*/
|
|
1141
|
+
rule?: string;
|
|
1142
|
+
/**
|
|
1143
|
+
* Updated visibility setting
|
|
1144
|
+
*/
|
|
1145
|
+
public?: boolean;
|
|
1146
|
+
manifest?: GameTopologyManifest;
|
|
1147
|
+
metadata?: GameMetadata;
|
|
1148
|
+
};
|
|
1149
|
+
export type DeleteGameResponse = {
|
|
1150
|
+
/**
|
|
1151
|
+
* Confirms the resource was deleted
|
|
1152
|
+
*/
|
|
1153
|
+
deleted: boolean;
|
|
1154
|
+
};
|
|
1155
|
+
export type WorkshopRuleTextResponse = {
|
|
1156
|
+
/**
|
|
1157
|
+
* Extracted rulebook text from the first valid candidate.
|
|
1158
|
+
*/
|
|
1159
|
+
ruleText: string;
|
|
1160
|
+
};
|
|
1161
|
+
export type GameManifestSummaryDto = {
|
|
1162
|
+
/**
|
|
1163
|
+
* Unique identifier for this manifest version
|
|
1164
|
+
*/
|
|
1165
|
+
manifestId: string;
|
|
1166
|
+
/**
|
|
1167
|
+
* Game identifier
|
|
1168
|
+
*/
|
|
1169
|
+
gameId: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* User who created this version
|
|
1172
|
+
*/
|
|
1173
|
+
userId: string;
|
|
1174
|
+
/**
|
|
1175
|
+
* Agent job that created this manifest
|
|
1176
|
+
*/
|
|
1177
|
+
jobId?: string;
|
|
1178
|
+
/**
|
|
1179
|
+
* Game rule used for this manifest
|
|
1180
|
+
*/
|
|
1181
|
+
ruleId: string;
|
|
1182
|
+
/**
|
|
1183
|
+
* Version number for this game
|
|
1184
|
+
*/
|
|
1185
|
+
version: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* Whether this is the latest/current manifest version
|
|
1188
|
+
*/
|
|
1189
|
+
current: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* When this version was created
|
|
1192
|
+
*/
|
|
1193
|
+
createdAt: string;
|
|
1194
|
+
};
|
|
1195
|
+
export type FindManifestsResponse = {
|
|
1196
|
+
/**
|
|
1197
|
+
* List of manifest versions, ordered by version descending (newest first)
|
|
1198
|
+
*/
|
|
1199
|
+
manifests: Array<GameManifestSummaryDto>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Unique identifier of the current (latest) manifest version
|
|
1202
|
+
*/
|
|
1203
|
+
currentManifestId?: string;
|
|
1204
|
+
};
|
|
1205
|
+
export type SaveManifestRequest = {
|
|
1206
|
+
/**
|
|
1207
|
+
* The board manifest to save
|
|
1208
|
+
*/
|
|
1209
|
+
manifest: GameTopologyManifest;
|
|
1210
|
+
/**
|
|
1211
|
+
* Agent job that created this manifest
|
|
1212
|
+
*/
|
|
1213
|
+
jobId?: string;
|
|
1214
|
+
ruleId: string;
|
|
1215
|
+
};
|
|
1216
|
+
export type SaveManifestResponse = {
|
|
1217
|
+
/**
|
|
1218
|
+
* Unique identifier for the saved manifest version
|
|
1219
|
+
*/
|
|
1220
|
+
manifestId: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Auto-incremented version number for this game
|
|
1223
|
+
*/
|
|
1224
|
+
version: number;
|
|
1225
|
+
/**
|
|
1226
|
+
* Game identifier
|
|
1227
|
+
*/
|
|
1228
|
+
gameId: string;
|
|
1229
|
+
/**
|
|
1230
|
+
* SHA-256 hash of the canonical manifest content, for local change detection
|
|
1231
|
+
*/
|
|
1232
|
+
contentHash: string;
|
|
1233
|
+
};
|
|
1234
|
+
export type GameManifestDto = {
|
|
1235
|
+
/**
|
|
1236
|
+
* Unique identifier for this manifest version
|
|
1237
|
+
*/
|
|
1238
|
+
manifestId: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* Game identifier
|
|
1241
|
+
*/
|
|
1242
|
+
gameId: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* User who created this version
|
|
1245
|
+
*/
|
|
1246
|
+
userId: string;
|
|
1247
|
+
/**
|
|
1248
|
+
* Agent job that created this manifest
|
|
1249
|
+
*/
|
|
1250
|
+
jobId?: string;
|
|
1251
|
+
/**
|
|
1252
|
+
* Game rule used for this manifest
|
|
1253
|
+
*/
|
|
1254
|
+
ruleId: string;
|
|
1255
|
+
/**
|
|
1256
|
+
* The board manifest data
|
|
1257
|
+
*/
|
|
1258
|
+
manifest: GameTopologyManifest;
|
|
1259
|
+
/**
|
|
1260
|
+
* Version number for this game
|
|
1261
|
+
*/
|
|
1262
|
+
version: number;
|
|
1263
|
+
/**
|
|
1264
|
+
* When this version was created
|
|
1265
|
+
*/
|
|
1266
|
+
createdAt: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* SHA-256 hash of the canonical manifest content, for local change detection
|
|
1269
|
+
*/
|
|
1270
|
+
contentHash: string;
|
|
1271
|
+
};
|
|
1272
|
+
/**
|
|
1273
|
+
* Diagnostic severity level
|
|
1274
|
+
*/
|
|
1275
|
+
export type CompilationDiagnosticSeverity = 'error' | 'warning';
|
|
1276
|
+
/**
|
|
1277
|
+
* Diagnostic tied to a specific project file and source location
|
|
1278
|
+
*/
|
|
1279
|
+
export type FileCompilationDiagnostic = {
|
|
1280
|
+
type: 'file';
|
|
1281
|
+
/**
|
|
1282
|
+
* Project-relative file path where the diagnostic occurred
|
|
1283
|
+
*/
|
|
1284
|
+
file: string;
|
|
1285
|
+
/**
|
|
1286
|
+
* Line number where the diagnostic occurred (1-based)
|
|
1287
|
+
*/
|
|
1288
|
+
line: number;
|
|
1289
|
+
/**
|
|
1290
|
+
* Column number where the diagnostic occurred (1-based)
|
|
1291
|
+
*/
|
|
1292
|
+
column: number;
|
|
1293
|
+
/**
|
|
1294
|
+
* Human-readable diagnostic message
|
|
1295
|
+
*/
|
|
1296
|
+
message: string;
|
|
1297
|
+
severity: CompilationDiagnosticSeverity;
|
|
1298
|
+
/**
|
|
1299
|
+
* Optional machine-readable diagnostic code (for example, a TypeScript diagnostic code)
|
|
1300
|
+
*/
|
|
1301
|
+
code?: string;
|
|
1302
|
+
};
|
|
1303
|
+
/**
|
|
1304
|
+
* Category of a project-level compilation diagnostic
|
|
1305
|
+
*/
|
|
1306
|
+
export type ProjectCompilationDiagnosticCategory = 'configuration' | 'module_resolution' | 'project' | 'system' | 'source_validation';
|
|
1307
|
+
/**
|
|
1308
|
+
* Additional structured context for a project-level diagnostic
|
|
1309
|
+
*/
|
|
1310
|
+
export type ProjectCompilationDiagnosticContext = {
|
|
1311
|
+
/**
|
|
1312
|
+
* Related project-relative file path if one exists
|
|
1313
|
+
*/
|
|
1314
|
+
file?: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* Additional human-readable context
|
|
1317
|
+
*/
|
|
1318
|
+
details?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Module or import specifier related to the diagnostic
|
|
1321
|
+
*/
|
|
1322
|
+
moduleName?: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* Related project-relative paths involved in the diagnostic
|
|
1325
|
+
*/
|
|
1326
|
+
affectedPaths?: Array<string>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Expected scaffold SDK version when validating static scaffold inputs
|
|
1329
|
+
*/
|
|
1330
|
+
expectedSdkVersion?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* Actual scaffold SDK version detected in the source snapshot
|
|
1333
|
+
*/
|
|
1334
|
+
actualSdkVersion?: string;
|
|
1335
|
+
};
|
|
1336
|
+
/**
|
|
1337
|
+
* Diagnostic that applies to the project as a whole rather than a specific source location
|
|
1338
|
+
*/
|
|
1339
|
+
export type ProjectCompilationDiagnostic = {
|
|
1340
|
+
type: 'project';
|
|
1341
|
+
category: ProjectCompilationDiagnosticCategory;
|
|
1342
|
+
/**
|
|
1343
|
+
* Human-readable diagnostic message
|
|
1344
|
+
*/
|
|
1345
|
+
message: string;
|
|
1346
|
+
severity: CompilationDiagnosticSeverity;
|
|
1347
|
+
/**
|
|
1348
|
+
* Optional machine-readable diagnostic code for project-level failures
|
|
1349
|
+
*/
|
|
1350
|
+
code?: string;
|
|
1351
|
+
context?: ProjectCompilationDiagnosticContext;
|
|
1352
|
+
};
|
|
1353
|
+
export type CompilationDiagnostic = ({
|
|
1354
|
+
type: 'file';
|
|
1355
|
+
} & FileCompilationDiagnostic) | ({
|
|
1356
|
+
type: 'project';
|
|
1357
|
+
} & ProjectCompilationDiagnostic);
|
|
1358
|
+
/**
|
|
1359
|
+
* Storage backend type for compiled game artifacts
|
|
1360
|
+
*/
|
|
1361
|
+
export type CompiledResultStorageType = 'local' | 'supabase';
|
|
1362
|
+
/**
|
|
1363
|
+
* Unified compiled result containing both APP and UI outputs from a single source
|
|
1364
|
+
*/
|
|
1365
|
+
export type CompiledResult = {
|
|
1366
|
+
/**
|
|
1367
|
+
* Compiled result identifier
|
|
1368
|
+
*/
|
|
1369
|
+
id: string;
|
|
1370
|
+
gameId: string;
|
|
1371
|
+
userId: string;
|
|
1372
|
+
/**
|
|
1373
|
+
* Authoring state used for this compilation
|
|
1374
|
+
*/
|
|
1375
|
+
authoringStateId: string;
|
|
1376
|
+
/**
|
|
1377
|
+
* Manifest used for this compilation
|
|
1378
|
+
*/
|
|
1379
|
+
manifestId: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* Game rule used for this compilation
|
|
1382
|
+
*/
|
|
1383
|
+
ruleId: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* Client- or server-generated request correlation id
|
|
1386
|
+
*/
|
|
1387
|
+
compilationRequestId?: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* Parent compiled result ID in the lineage graph
|
|
1390
|
+
*/
|
|
1391
|
+
parentResultId?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* Root compiled result ID for this lineage
|
|
1394
|
+
*/
|
|
1395
|
+
lineageRootId?: string;
|
|
1396
|
+
/**
|
|
1397
|
+
* Whether the compilation was successful
|
|
1398
|
+
*/
|
|
1399
|
+
success: boolean;
|
|
1400
|
+
/**
|
|
1401
|
+
* Compilation diagnostics (only present when success=false)
|
|
1402
|
+
*/
|
|
1403
|
+
diagnostics?: Array<CompilationDiagnostic>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Where compiled APP (game logic) artifacts are stored
|
|
1406
|
+
*/
|
|
1407
|
+
appStorageType: CompiledResultStorageType;
|
|
1408
|
+
/**
|
|
1409
|
+
* Key/path for compiled APP artifacts. Null when APP compilation fails.
|
|
1410
|
+
*/
|
|
1411
|
+
appStorageKey?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Where compiled UI (frontend) artifacts are stored
|
|
1414
|
+
*/
|
|
1415
|
+
uiStorageType: CompiledResultStorageType;
|
|
1416
|
+
/**
|
|
1417
|
+
* Key/path for compiled UI artifacts. Null when UI compilation fails.
|
|
1418
|
+
*/
|
|
1419
|
+
uiStorageKey?: string;
|
|
1420
|
+
/**
|
|
1421
|
+
* Deterministic fingerprint for the APP target inputs used by this compilation.
|
|
1422
|
+
*/
|
|
1423
|
+
appFingerprint?: string;
|
|
1424
|
+
/**
|
|
1425
|
+
* Deterministic fingerprint for the UI target inputs used by this compilation.
|
|
1426
|
+
*/
|
|
1427
|
+
uiFingerprint?: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Source revision used to produce this compilation
|
|
1430
|
+
*/
|
|
1431
|
+
sourceRevisionId: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* Version of the UI SDK used for this compilation
|
|
1434
|
+
*/
|
|
1435
|
+
sdkVersion?: string;
|
|
1436
|
+
createdAt: string;
|
|
1437
|
+
lastModifiedAt: string;
|
|
1438
|
+
};
|
|
1439
|
+
/**
|
|
1440
|
+
* Response containing a list of compiled results for a game
|
|
1441
|
+
*/
|
|
1442
|
+
export type ListCompiledResultsResponse = {
|
|
1443
|
+
/**
|
|
1444
|
+
* List of compiled results, sorted by creation date (newest first)
|
|
1445
|
+
*/
|
|
1446
|
+
results: Array<CompiledResult>;
|
|
1447
|
+
};
|
|
1448
|
+
export type QueueCompiledResultJobRequest = {
|
|
1449
|
+
/**
|
|
1450
|
+
* Authoring state to compile
|
|
1451
|
+
*/
|
|
1452
|
+
authoringStateId: string;
|
|
1453
|
+
};
|
|
1454
|
+
/**
|
|
1455
|
+
* Accepted compile request response. The compilation continues asynchronously and can be tracked via the returned job ID.
|
|
1456
|
+
*/
|
|
1457
|
+
export type QueueCompiledResultJobResponse = {
|
|
1458
|
+
/**
|
|
1459
|
+
* Agent job identifier for the queued compile
|
|
1460
|
+
*/
|
|
1461
|
+
jobId: string;
|
|
1462
|
+
};
|
|
1463
|
+
/**
|
|
1464
|
+
* How the submitted change set should be applied against the base source revision.
|
|
1465
|
+
*/
|
|
1466
|
+
export type SourceChangeMode = 'incremental' | 'replace';
|
|
1467
|
+
/**
|
|
1468
|
+
* Upsert a file in the authored source tree.
|
|
1469
|
+
*/
|
|
1470
|
+
export type SourceFileUpsert = {
|
|
1471
|
+
kind: 'upsert';
|
|
1472
|
+
/**
|
|
1473
|
+
* Relative file path within the authored source tree.
|
|
1474
|
+
*/
|
|
1475
|
+
path: string;
|
|
1476
|
+
/**
|
|
1477
|
+
* SHA-256 hash of the UTF-8 file content stored in the blob store.
|
|
1478
|
+
*/
|
|
1479
|
+
contentHash: string;
|
|
1480
|
+
/**
|
|
1481
|
+
* Size of the UTF-8 file content in bytes.
|
|
1482
|
+
*/
|
|
1483
|
+
byteSize: number;
|
|
1484
|
+
};
|
|
1485
|
+
/**
|
|
1486
|
+
* Delete a file from the authored source tree.
|
|
1487
|
+
*/
|
|
1488
|
+
export type SourcePathDelete = {
|
|
1489
|
+
kind: 'delete';
|
|
1490
|
+
/**
|
|
1491
|
+
* Relative file path within the authored source tree.
|
|
1492
|
+
*/
|
|
1493
|
+
path: string;
|
|
1494
|
+
};
|
|
1495
|
+
export type SourceChangeOperation = ({
|
|
1496
|
+
kind: 'upsert';
|
|
1497
|
+
} & SourceFileUpsert) | ({
|
|
1498
|
+
kind: 'delete';
|
|
1499
|
+
} & SourcePathDelete);
|
|
1500
|
+
/**
|
|
1501
|
+
* Request to create a new authored source revision from a change set.
|
|
1502
|
+
*/
|
|
1503
|
+
export type CreateSourceRevisionRequest = {
|
|
1504
|
+
/**
|
|
1505
|
+
* Base source revision the change set must apply to. Must match the current head revision when present.
|
|
1506
|
+
*/
|
|
1507
|
+
baseSourceRevisionId?: string;
|
|
1508
|
+
mode: SourceChangeMode;
|
|
1509
|
+
/**
|
|
1510
|
+
* Canonical change set applied to the authored source tree.
|
|
1511
|
+
*/
|
|
1512
|
+
changes: Array<SourceChangeOperation>;
|
|
1513
|
+
};
|
|
1514
|
+
/**
|
|
1515
|
+
* Request to reuse or create a private dev compilation for an exact local workspace fingerprint.
|
|
1516
|
+
*/
|
|
1517
|
+
export type EnsureDevCompileRequest = {
|
|
1518
|
+
/**
|
|
1519
|
+
* Client-computed deterministic fingerprint of the compile-relevant local workspace inputs.
|
|
1520
|
+
*/
|
|
1521
|
+
devFingerprint: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Dreamboard environment the dev compile targets.
|
|
1524
|
+
*/
|
|
1525
|
+
env: string;
|
|
1526
|
+
sourceRevision: CreateSourceRevisionRequest;
|
|
1527
|
+
/**
|
|
1528
|
+
* Current local rule text for cache misses.
|
|
1529
|
+
*/
|
|
1530
|
+
ruleText: string;
|
|
1531
|
+
manifest: GameTopologyManifest;
|
|
1532
|
+
};
|
|
1533
|
+
/**
|
|
1534
|
+
* Response for a fingerprint-backed dev compile ensure request.
|
|
1535
|
+
*/
|
|
1536
|
+
export type EnsureDevCompileResponse = {
|
|
1537
|
+
/**
|
|
1538
|
+
* Whether an existing successful dev compiled result was reused.
|
|
1539
|
+
*/
|
|
1540
|
+
reused: boolean;
|
|
1541
|
+
compiledResult?: CompiledResult;
|
|
1542
|
+
/**
|
|
1543
|
+
* Compile job identifier when a new dev compile was queued.
|
|
1544
|
+
*/
|
|
1545
|
+
jobId?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* Private dev authoring state used for a queued compile.
|
|
1548
|
+
*/
|
|
1549
|
+
authoringStateId?: string;
|
|
1550
|
+
};
|
|
1551
|
+
/**
|
|
1552
|
+
* Response containing authored source files resolved through an authoring state.
|
|
1553
|
+
*/
|
|
1554
|
+
export type GameSourcesResponse = {
|
|
1555
|
+
/**
|
|
1556
|
+
* Current or requested authoring state identifier
|
|
1557
|
+
*/
|
|
1558
|
+
authoringStateId: string;
|
|
1559
|
+
/**
|
|
1560
|
+
* Map of file path to file content (e.g., 'App.tsx' -> 'export ...')
|
|
1561
|
+
*/
|
|
1562
|
+
files: {
|
|
1563
|
+
[key: string]: string;
|
|
1564
|
+
};
|
|
1565
|
+
/**
|
|
1566
|
+
* Source revision identifier used to fetch the authored source files
|
|
1567
|
+
*/
|
|
1568
|
+
sourceRevisionId: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* Deterministic hash of the authored source tree
|
|
1571
|
+
*/
|
|
1572
|
+
treeHash: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* ID of the manifest associated with this authoring state
|
|
1575
|
+
*/
|
|
1576
|
+
manifestId?: string;
|
|
1577
|
+
/**
|
|
1578
|
+
* SHA-256 hash of the canonical manifest content for this authoring state
|
|
1579
|
+
*/
|
|
1580
|
+
manifestContentHash?: string;
|
|
1581
|
+
/**
|
|
1582
|
+
* The board manifest data (null if no manifest is associated)
|
|
1583
|
+
*/
|
|
1584
|
+
manifest?: GameTopologyManifest;
|
|
1585
|
+
/**
|
|
1586
|
+
* ID of the game rule associated with this authoring state
|
|
1587
|
+
*/
|
|
1588
|
+
ruleId?: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* The game rules text content (null if no rule is associated)
|
|
1591
|
+
*/
|
|
1592
|
+
ruleText?: string;
|
|
1593
|
+
};
|
|
1594
|
+
/**
|
|
1595
|
+
* Immutable authored source revision for a game.
|
|
1596
|
+
*/
|
|
1597
|
+
export type SourceRevision = {
|
|
1598
|
+
/**
|
|
1599
|
+
* Source revision identifier
|
|
1600
|
+
*/
|
|
1601
|
+
id: string;
|
|
1602
|
+
/**
|
|
1603
|
+
* Game identifier
|
|
1604
|
+
*/
|
|
1605
|
+
gameId: string;
|
|
1606
|
+
/**
|
|
1607
|
+
* User who created the source revision
|
|
1608
|
+
*/
|
|
1609
|
+
userId: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Parent source revision identifier
|
|
1612
|
+
*/
|
|
1613
|
+
parentSourceRevisionId?: string;
|
|
1614
|
+
/**
|
|
1615
|
+
* Deterministic hash of the authored source tree
|
|
1616
|
+
*/
|
|
1617
|
+
treeHash: string;
|
|
1618
|
+
/**
|
|
1619
|
+
* Number of authored files stored in this revision
|
|
1620
|
+
*/
|
|
1621
|
+
fileCount: number;
|
|
1622
|
+
/**
|
|
1623
|
+
* Revision creation timestamp
|
|
1624
|
+
*/
|
|
1625
|
+
createdAt: string;
|
|
1626
|
+
};
|
|
1627
|
+
/**
|
|
1628
|
+
* Metadata describing a blob the client may need to upload before finalizing a source revision.
|
|
1629
|
+
*/
|
|
1630
|
+
export type SourceBlobUploadDescriptor = {
|
|
1631
|
+
/**
|
|
1632
|
+
* SHA-256 hash of the UTF-8 file content.
|
|
1633
|
+
*/
|
|
1634
|
+
contentHash: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* Size of the UTF-8 file content in bytes.
|
|
1637
|
+
*/
|
|
1638
|
+
byteSize: number;
|
|
1639
|
+
};
|
|
1640
|
+
/**
|
|
1641
|
+
* Request upload targets for one or more source blobs.
|
|
1642
|
+
*/
|
|
1643
|
+
export type CreateSourceBlobUploadSessionRequest = {
|
|
1644
|
+
/**
|
|
1645
|
+
* Unique blobs the client may need to upload.
|
|
1646
|
+
*/
|
|
1647
|
+
blobs: Array<SourceBlobUploadDescriptor>;
|
|
1648
|
+
};
|
|
1649
|
+
/**
|
|
1650
|
+
* Provider-agnostic direct-upload target for a source blob.
|
|
1651
|
+
*/
|
|
1652
|
+
export type SourceBlobUploadTarget = {
|
|
1653
|
+
/**
|
|
1654
|
+
* HTTP method the client must use when uploading the blob.
|
|
1655
|
+
*/
|
|
1656
|
+
method: string;
|
|
1657
|
+
/**
|
|
1658
|
+
* Fully qualified direct-upload URL.
|
|
1659
|
+
*/
|
|
1660
|
+
url: string;
|
|
1661
|
+
/**
|
|
1662
|
+
* Required request headers for the direct upload.
|
|
1663
|
+
*/
|
|
1664
|
+
headers: {
|
|
1665
|
+
[key: string]: string;
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
/**
|
|
1669
|
+
* Upload instructions for a single source blob.
|
|
1670
|
+
*/
|
|
1671
|
+
export type SourceBlobUploadSessionEntry = {
|
|
1672
|
+
/**
|
|
1673
|
+
* SHA-256 hash of the UTF-8 file content.
|
|
1674
|
+
*/
|
|
1675
|
+
contentHash: string;
|
|
1676
|
+
/**
|
|
1677
|
+
* Whether the blob already exists in storage or requires upload.
|
|
1678
|
+
*/
|
|
1679
|
+
status: 'exists' | 'upload_required';
|
|
1680
|
+
/**
|
|
1681
|
+
* Present only when status is upload_required.
|
|
1682
|
+
*/
|
|
1683
|
+
uploadTarget?: SourceBlobUploadTarget;
|
|
1684
|
+
};
|
|
1685
|
+
/**
|
|
1686
|
+
* Direct-upload session for source blobs needed by a source revision.
|
|
1687
|
+
*/
|
|
1688
|
+
export type SourceBlobUploadSession = {
|
|
1689
|
+
/**
|
|
1690
|
+
* Opaque identifier for the upload session.
|
|
1691
|
+
*/
|
|
1692
|
+
sessionId: string;
|
|
1693
|
+
/**
|
|
1694
|
+
* Expiration time for any issued upload targets.
|
|
1695
|
+
*/
|
|
1696
|
+
expiresAt: string;
|
|
1697
|
+
/**
|
|
1698
|
+
* Upload instructions for each requested blob.
|
|
1699
|
+
*/
|
|
1700
|
+
uploads: Array<SourceBlobUploadSessionEntry>;
|
|
1701
|
+
};
|
|
1702
|
+
/**
|
|
1703
|
+
* Immutable authored workspace checkpoint tying together rule, manifest, and source revision.
|
|
1704
|
+
*/
|
|
1705
|
+
export type AuthoringState = {
|
|
1706
|
+
/**
|
|
1707
|
+
* Authoring state identifier
|
|
1708
|
+
*/
|
|
1709
|
+
authoringStateId: string;
|
|
1710
|
+
/**
|
|
1711
|
+
* Game identifier
|
|
1712
|
+
*/
|
|
1713
|
+
gameId: string;
|
|
1714
|
+
/**
|
|
1715
|
+
* User who created this authoring state
|
|
1716
|
+
*/
|
|
1717
|
+
userId: string;
|
|
1718
|
+
/**
|
|
1719
|
+
* Parent authoring state identifier
|
|
1720
|
+
*/
|
|
1721
|
+
parentAuthoringStateId?: string;
|
|
1722
|
+
/**
|
|
1723
|
+
* Source revision identifier
|
|
1724
|
+
*/
|
|
1725
|
+
sourceRevisionId: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* Deterministic hash of the authored source tree
|
|
1728
|
+
*/
|
|
1729
|
+
sourceTreeHash: string;
|
|
1730
|
+
/**
|
|
1731
|
+
* Manifest identifier
|
|
1732
|
+
*/
|
|
1733
|
+
manifestId: string;
|
|
1734
|
+
/**
|
|
1735
|
+
* SHA-256 hash of the canonical manifest content
|
|
1736
|
+
*/
|
|
1737
|
+
manifestContentHash: string;
|
|
1738
|
+
/**
|
|
1739
|
+
* Rule identifier
|
|
1740
|
+
*/
|
|
1741
|
+
ruleId: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* Authoring state creation timestamp
|
|
1744
|
+
*/
|
|
1745
|
+
createdAt: string;
|
|
1746
|
+
};
|
|
1747
|
+
/**
|
|
1748
|
+
* Advance the current authoring head to a new immutable state.
|
|
1749
|
+
*/
|
|
1750
|
+
export type CreateAuthoringStateRequest = {
|
|
1751
|
+
/**
|
|
1752
|
+
* Expected current authoring head before advancing. Required once a head exists.
|
|
1753
|
+
*/
|
|
1754
|
+
baseAuthoringStateId?: string;
|
|
1755
|
+
/**
|
|
1756
|
+
* Source revision for the next authored state
|
|
1757
|
+
*/
|
|
1758
|
+
sourceRevisionId: string;
|
|
1759
|
+
/**
|
|
1760
|
+
* Deterministic hash of the authored source tree for the next state
|
|
1761
|
+
*/
|
|
1762
|
+
sourceTreeHash: string;
|
|
1763
|
+
/**
|
|
1764
|
+
* Manifest identifier for the next state
|
|
1765
|
+
*/
|
|
1766
|
+
manifestId: string;
|
|
1767
|
+
/**
|
|
1768
|
+
* SHA-256 hash of the canonical manifest content for the next state
|
|
1769
|
+
*/
|
|
1770
|
+
manifestContentHash: string;
|
|
1771
|
+
/**
|
|
1772
|
+
* Rule identifier for the next state
|
|
1773
|
+
*/
|
|
1774
|
+
ruleId: string;
|
|
1775
|
+
};
|
|
1776
|
+
export type GameScriptsResponse = {
|
|
1777
|
+
/**
|
|
1778
|
+
* List of compiled app (game logic) scripts
|
|
1779
|
+
*/
|
|
1780
|
+
appScripts: Array<CompiledResult>;
|
|
1781
|
+
/**
|
|
1782
|
+
* List of compiled UI scripts
|
|
1783
|
+
*/
|
|
1784
|
+
uiScripts: Array<CompiledResult>;
|
|
1785
|
+
};
|
|
1786
|
+
/**
|
|
1787
|
+
* Type of async backend job
|
|
1788
|
+
*/
|
|
1789
|
+
export type JobKind = 'GAME_BUILD' | 'COMPILE';
|
|
1790
|
+
/**
|
|
1791
|
+
* Status of an async backend job
|
|
1792
|
+
*/
|
|
1793
|
+
export type JobStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'INTERRUPTED';
|
|
1794
|
+
/**
|
|
1795
|
+
* Summary information about an async backend job
|
|
1796
|
+
*/
|
|
1797
|
+
export type JobSummary = {
|
|
1798
|
+
/**
|
|
1799
|
+
* Unique identifier for the job
|
|
1800
|
+
*/
|
|
1801
|
+
jobId: string;
|
|
1802
|
+
/**
|
|
1803
|
+
* Unique identifier for the game
|
|
1804
|
+
*/
|
|
1805
|
+
gameId: string;
|
|
1806
|
+
kind: JobKind;
|
|
1807
|
+
status: JobStatus;
|
|
1808
|
+
/**
|
|
1809
|
+
* User-facing job title
|
|
1810
|
+
*/
|
|
1811
|
+
title: string;
|
|
1812
|
+
/**
|
|
1813
|
+
* When the job was created
|
|
1814
|
+
*/
|
|
1815
|
+
createdAt: string;
|
|
1816
|
+
/**
|
|
1817
|
+
* When the job started running
|
|
1818
|
+
*/
|
|
1819
|
+
startedAt?: string;
|
|
1820
|
+
};
|
|
1821
|
+
/**
|
|
1822
|
+
* Response containing the active job for a game, if any
|
|
1823
|
+
*/
|
|
1824
|
+
export type ActiveJobResponse = {
|
|
1825
|
+
/**
|
|
1826
|
+
* The active job, or null if no job is currently running
|
|
1827
|
+
*/
|
|
1828
|
+
activeJob?: JobSummary;
|
|
1829
|
+
/**
|
|
1830
|
+
* True if there is an active job for this game
|
|
1831
|
+
*/
|
|
1832
|
+
hasActiveJob: boolean;
|
|
1833
|
+
};
|
|
1834
|
+
/**
|
|
1835
|
+
* Cache result for a specific compile target.
|
|
1836
|
+
*/
|
|
1837
|
+
export type CompileJobCacheStatus = 'hit' | 'miss';
|
|
1838
|
+
/**
|
|
1839
|
+
* Cache reuse summary for an async compile job.
|
|
1840
|
+
*/
|
|
1841
|
+
export type CompileJobCacheSummary = {
|
|
1842
|
+
app?: CompileJobCacheStatus;
|
|
1843
|
+
ui?: CompileJobCacheStatus;
|
|
1844
|
+
};
|
|
1845
|
+
/**
|
|
1846
|
+
* Arbitrary numeric metrics recorded for a job. Keys are implementation-defined.
|
|
1847
|
+
*/
|
|
1848
|
+
export type JobNumericMetrics = {
|
|
1849
|
+
[key: string]: number;
|
|
1850
|
+
};
|
|
1851
|
+
/**
|
|
1852
|
+
* Status of a user-facing job task
|
|
1853
|
+
*/
|
|
1854
|
+
export type JobTaskStatus = 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
1855
|
+
/**
|
|
1856
|
+
* User-facing task progress for an async job
|
|
1857
|
+
*/
|
|
1858
|
+
export type JobTaskSummary = {
|
|
1859
|
+
/**
|
|
1860
|
+
* Stable task key
|
|
1861
|
+
*/
|
|
1862
|
+
taskKey: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* User-facing task title
|
|
1865
|
+
*/
|
|
1866
|
+
title: string;
|
|
1867
|
+
status: JobTaskStatus;
|
|
1868
|
+
/**
|
|
1869
|
+
* Latest high-level status for the task
|
|
1870
|
+
*/
|
|
1871
|
+
latestStatus?: string;
|
|
1872
|
+
/**
|
|
1873
|
+
* Display order
|
|
1874
|
+
*/
|
|
1875
|
+
orderIndex: number;
|
|
1876
|
+
startedAt?: string;
|
|
1877
|
+
completedAt?: string;
|
|
1878
|
+
};
|
|
1879
|
+
/**
|
|
1880
|
+
* Detailed information for an async backend job
|
|
1881
|
+
*/
|
|
1882
|
+
export type JobDetailResponse = {
|
|
1883
|
+
/**
|
|
1884
|
+
* Unique identifier for the job
|
|
1885
|
+
*/
|
|
1886
|
+
jobId: string;
|
|
1887
|
+
/**
|
|
1888
|
+
* Unique identifier for the game
|
|
1889
|
+
*/
|
|
1890
|
+
gameId: string;
|
|
1891
|
+
kind: JobKind;
|
|
1892
|
+
status: JobStatus;
|
|
1893
|
+
/**
|
|
1894
|
+
* User-facing job title
|
|
1895
|
+
*/
|
|
1896
|
+
title: string;
|
|
1897
|
+
/**
|
|
1898
|
+
* Error message if the job failed
|
|
1899
|
+
*/
|
|
1900
|
+
errorMessage?: string;
|
|
1901
|
+
/**
|
|
1902
|
+
* When the job was created
|
|
1903
|
+
*/
|
|
1904
|
+
createdAt: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* When the job started running
|
|
1907
|
+
*/
|
|
1908
|
+
startedAt?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* When the job completed
|
|
1911
|
+
*/
|
|
1912
|
+
completedAt?: string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Current compile phase for COMPILE jobs.
|
|
1915
|
+
*/
|
|
1916
|
+
phase?: string;
|
|
1917
|
+
/**
|
|
1918
|
+
* Zero-based queue position for queued compile jobs, when known.
|
|
1919
|
+
*/
|
|
1920
|
+
queuePosition?: number;
|
|
1921
|
+
cache?: CompileJobCacheSummary;
|
|
1922
|
+
/**
|
|
1923
|
+
* User-facing status message for the current phase or terminal result.
|
|
1924
|
+
*/
|
|
1925
|
+
message?: string;
|
|
1926
|
+
timings?: JobNumericMetrics;
|
|
1927
|
+
memory?: JobNumericMetrics;
|
|
1928
|
+
/**
|
|
1929
|
+
* Ordered user-facing task progress for this job.
|
|
1930
|
+
*/
|
|
1931
|
+
tasks: Array<JobTaskSummary>;
|
|
1932
|
+
/**
|
|
1933
|
+
* Rule ID created by this job
|
|
1934
|
+
*/
|
|
1935
|
+
createdRuleId?: string;
|
|
1936
|
+
/**
|
|
1937
|
+
* Manifest ID created by this job
|
|
1938
|
+
*/
|
|
1939
|
+
createdManifestId?: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* App script (compiled result) ID created by this job
|
|
1942
|
+
*/
|
|
1943
|
+
createdAppScriptId?: string;
|
|
1944
|
+
/**
|
|
1945
|
+
* Compiled result ID created by this job
|
|
1946
|
+
*/
|
|
1947
|
+
createdCompiledResultId?: string;
|
|
1948
|
+
};
|
|
1949
|
+
/**
|
|
1950
|
+
* Request to create a Cursor Cloud game build run.
|
|
1951
|
+
*/
|
|
1952
|
+
export type CreateGameRunRequest = {
|
|
1953
|
+
gameSpec: GameSpecForm;
|
|
1954
|
+
ruleText?: string;
|
|
1955
|
+
/**
|
|
1956
|
+
* Optional pointer to a previous COMPLETED build for the same game,
|
|
1957
|
+
* signaling the runner should resume that build's Cursor agent
|
|
1958
|
+
* session if it is still alive. The backend validates ownership
|
|
1959
|
+
* and resolves the underlying Cursor agent identifier server-side;
|
|
1960
|
+
* this id is never propagated through to the runner directly.
|
|
1961
|
+
*
|
|
1962
|
+
*/
|
|
1963
|
+
parentJobId?: string;
|
|
1964
|
+
};
|
|
1965
|
+
/**
|
|
1966
|
+
* Response for an accepted game build run.
|
|
1967
|
+
*/
|
|
1968
|
+
export type CreateGameRunResponse = {
|
|
1969
|
+
jobId: string;
|
|
1970
|
+
gameId: string;
|
|
1971
|
+
};
|
|
1972
|
+
export type GameRuleSummaryDto = {
|
|
1973
|
+
/**
|
|
1974
|
+
* Unique identifier for this rule version
|
|
1975
|
+
*/
|
|
1976
|
+
ruleId: string;
|
|
1977
|
+
/**
|
|
1978
|
+
* Game identifier
|
|
1979
|
+
*/
|
|
1980
|
+
gameId: string;
|
|
1981
|
+
/**
|
|
1982
|
+
* User who created this version
|
|
1983
|
+
*/
|
|
1984
|
+
userId: string;
|
|
1985
|
+
/**
|
|
1986
|
+
* Version number for this game's rules
|
|
1987
|
+
*/
|
|
1988
|
+
version: number;
|
|
1989
|
+
/**
|
|
1990
|
+
* When this version was created
|
|
1991
|
+
*/
|
|
1992
|
+
createdAt: string;
|
|
1993
|
+
/**
|
|
1994
|
+
* Preview snippet of the rule text (first 200 characters)
|
|
1995
|
+
*/
|
|
1996
|
+
preview?: string;
|
|
1997
|
+
};
|
|
1998
|
+
export type ListGameRulesResponse = {
|
|
1999
|
+
/**
|
|
2000
|
+
* List of game rule versions, ordered by version descending (newest first)
|
|
2001
|
+
*/
|
|
2002
|
+
rules: Array<GameRuleSummaryDto>;
|
|
2003
|
+
};
|
|
2004
|
+
export type CreateGameRuleRequest = {
|
|
2005
|
+
/**
|
|
2006
|
+
* The game rules text content
|
|
2007
|
+
*/
|
|
2008
|
+
ruleText: string;
|
|
2009
|
+
};
|
|
2010
|
+
export type CreateGameRuleResponse = {
|
|
2011
|
+
/**
|
|
2012
|
+
* Unique identifier for the created rule version
|
|
2013
|
+
*/
|
|
2014
|
+
ruleId: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Auto-incremented version number for this game
|
|
2017
|
+
*/
|
|
2018
|
+
version: number;
|
|
2019
|
+
/**
|
|
2020
|
+
* Game identifier
|
|
2021
|
+
*/
|
|
2022
|
+
gameId: string;
|
|
2023
|
+
};
|
|
2024
|
+
export type GameRule = {
|
|
2025
|
+
/**
|
|
2026
|
+
* Unique identifier for this rule version
|
|
2027
|
+
*/
|
|
2028
|
+
ruleId: string;
|
|
2029
|
+
/**
|
|
2030
|
+
* Game identifier
|
|
2031
|
+
*/
|
|
2032
|
+
gameId: string;
|
|
2033
|
+
/**
|
|
2034
|
+
* User who created this version
|
|
2035
|
+
*/
|
|
2036
|
+
userId: string;
|
|
2037
|
+
/**
|
|
2038
|
+
* The game rules text content
|
|
2039
|
+
*/
|
|
2040
|
+
ruleText: string;
|
|
2041
|
+
/**
|
|
2042
|
+
* Version number for this game's rules
|
|
2043
|
+
*/
|
|
2044
|
+
version: number;
|
|
2045
|
+
/**
|
|
2046
|
+
* When this version was created
|
|
2047
|
+
*/
|
|
2048
|
+
createdAt: string;
|
|
2049
|
+
};
|
|
2050
|
+
export type CreateSessionRequest = {
|
|
2051
|
+
/**
|
|
2052
|
+
* Compiled result ID to use for game logic and UI. If omitted, the latest successful compiled result is used.
|
|
2053
|
+
*/
|
|
2054
|
+
compiledResultId?: string;
|
|
2055
|
+
/**
|
|
2056
|
+
* Optional deterministic RNG seed used when starting gameplay for this session.
|
|
2057
|
+
*/
|
|
2058
|
+
seed?: number;
|
|
2059
|
+
/**
|
|
2060
|
+
* Number of players to create seats for (defaults to manifest minPlayers)
|
|
2061
|
+
*/
|
|
2062
|
+
playerCount?: number;
|
|
2063
|
+
/**
|
|
2064
|
+
* If true, assign all seats to the host user (skips lobby seat assignment)
|
|
2065
|
+
*/
|
|
2066
|
+
autoAssignSeats?: boolean;
|
|
2067
|
+
/**
|
|
2068
|
+
* Optional authored setup profile to apply when creating the session
|
|
2069
|
+
*/
|
|
2070
|
+
setupProfileId?: string;
|
|
2071
|
+
};
|
|
2072
|
+
/**
|
|
2073
|
+
* Authenticated Supabase user acting in a session.
|
|
2074
|
+
*/
|
|
2075
|
+
export type SessionActorAuthUser = {
|
|
2076
|
+
kind: 'AUTH_USER';
|
|
2077
|
+
/**
|
|
2078
|
+
* auth.users id
|
|
2079
|
+
*/
|
|
2080
|
+
id: string;
|
|
2081
|
+
};
|
|
2082
|
+
/**
|
|
2083
|
+
* Anonymous demo principal for one demo_sessions row (shared across tabs).
|
|
2084
|
+
*/
|
|
2085
|
+
export type SessionActorDemoGuest = {
|
|
2086
|
+
kind: 'DEMO_GUEST';
|
|
2087
|
+
/**
|
|
2088
|
+
* demo_sessions.id
|
|
2089
|
+
*/
|
|
2090
|
+
demoActorSessionId: string;
|
|
2091
|
+
};
|
|
2092
|
+
export type SessionActor = ({
|
|
2093
|
+
kind: 'AUTH_USER';
|
|
2094
|
+
} & SessionActorAuthUser) | ({
|
|
2095
|
+
kind: 'DEMO_GUEST';
|
|
2096
|
+
} & SessionActorDemoGuest);
|
|
2097
|
+
export type SessionGameSourceUserCompiled = {
|
|
2098
|
+
kind: 'USER_COMPILED';
|
|
2099
|
+
ownerUserId: string;
|
|
2100
|
+
gameId: string;
|
|
2101
|
+
compiledResultId: string;
|
|
2102
|
+
};
|
|
2103
|
+
export type SessionGameSourceDemoRevision = {
|
|
2104
|
+
kind: 'DEMO_REVISION';
|
|
2105
|
+
slug: string;
|
|
2106
|
+
revisionId: string;
|
|
2107
|
+
};
|
|
2108
|
+
export type SessionGameSource = ({
|
|
2109
|
+
kind: 'USER_COMPILED';
|
|
2110
|
+
} & SessionGameSourceUserCompiled) | ({
|
|
2111
|
+
kind: 'DEMO_REVISION';
|
|
2112
|
+
} & SessionGameSourceDemoRevision);
|
|
2113
|
+
export type CreateSessionResponse = {
|
|
2114
|
+
/**
|
|
2115
|
+
* Unique identifier for the created session
|
|
2116
|
+
*/
|
|
2117
|
+
sessionId: string;
|
|
2118
|
+
/**
|
|
2119
|
+
* Memorable short code for sharing (e.g., 'swift-falcon-73')
|
|
2120
|
+
*/
|
|
2121
|
+
shortCode: string;
|
|
2122
|
+
hostActor: SessionActor;
|
|
2123
|
+
gameSource: SessionGameSource;
|
|
2124
|
+
};
|
|
2125
|
+
/**
|
|
2126
|
+
* Request to create a gameplay session by restoring a reducer-native snapshot produced by the CLI scenario harness.
|
|
2127
|
+
*/
|
|
2128
|
+
export type CreateSessionFromReducerSnapshotRequest = {
|
|
2129
|
+
/**
|
|
2130
|
+
* Compiled result ID that produced the reducer bundle used to create the snapshot.
|
|
2131
|
+
*/
|
|
2132
|
+
compiledResultId: string;
|
|
2133
|
+
/**
|
|
2134
|
+
* Deterministic RNG seed associated with the generated base.
|
|
2135
|
+
*/
|
|
2136
|
+
seed: number;
|
|
2137
|
+
/**
|
|
2138
|
+
* Number of players materialized in the reducer snapshot.
|
|
2139
|
+
*/
|
|
2140
|
+
playerCount: number;
|
|
2141
|
+
/**
|
|
2142
|
+
* Authored setup profile associated with the generated base, if any.
|
|
2143
|
+
*/
|
|
2144
|
+
setupProfileId?: string;
|
|
2145
|
+
/**
|
|
2146
|
+
* Generated base artifact id used to hydrate the reducer shadow.
|
|
2147
|
+
*/
|
|
2148
|
+
baseId: string;
|
|
2149
|
+
/**
|
|
2150
|
+
* Scenario id materialized into this session.
|
|
2151
|
+
*/
|
|
2152
|
+
scenarioId: string;
|
|
2153
|
+
/**
|
|
2154
|
+
* Final reducer-native session state after running scenario.when locally.
|
|
2155
|
+
*/
|
|
2156
|
+
reducerState: {
|
|
2157
|
+
[key: string]: unknown;
|
|
2158
|
+
};
|
|
2159
|
+
/**
|
|
2160
|
+
* Reducer runtime version corresponding to reducerState.
|
|
2161
|
+
*/
|
|
2162
|
+
reducerStateVersion: number;
|
|
2163
|
+
/**
|
|
2164
|
+
* CLI-computed fingerprint diagnostics for the generated base and scenario materialization.
|
|
2165
|
+
*/
|
|
2166
|
+
fingerprintMetadata?: {
|
|
2167
|
+
[key: string]: string;
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
export type SessionSnapshotPhase = 'lobby' | 'gameplay' | 'ended';
|
|
2171
|
+
export type HostSessionStatus = 'active' | 'ended';
|
|
2172
|
+
/**
|
|
2173
|
+
* Summary of a game state history entry.
|
|
2174
|
+
*/
|
|
2175
|
+
export type HistoryEntrySummary = {
|
|
2176
|
+
id: string;
|
|
2177
|
+
version: number;
|
|
2178
|
+
timestamp: string;
|
|
2179
|
+
description: string;
|
|
2180
|
+
playerId?: string;
|
|
2181
|
+
actionType?: string;
|
|
2182
|
+
isCurrent: boolean;
|
|
2183
|
+
};
|
|
2184
|
+
export type SessionSnapshotHistory = {
|
|
2185
|
+
entries: Array<HistoryEntrySummary>;
|
|
2186
|
+
currentIndex: number;
|
|
2187
|
+
canGoBack: boolean;
|
|
2188
|
+
canGoForward: boolean;
|
|
2189
|
+
};
|
|
2190
|
+
export type HostSessionContext = {
|
|
2191
|
+
/**
|
|
2192
|
+
* Unique identifier for the session.
|
|
2193
|
+
*/
|
|
2194
|
+
sessionId: string;
|
|
2195
|
+
/**
|
|
2196
|
+
* Memorable short code for sharing.
|
|
2197
|
+
*/
|
|
2198
|
+
shortCode: string;
|
|
2199
|
+
phase: SessionSnapshotPhase;
|
|
2200
|
+
status: HostSessionStatus;
|
|
2201
|
+
hostActor: SessionActor;
|
|
2202
|
+
gameSource: SessionGameSource;
|
|
2203
|
+
/**
|
|
2204
|
+
* Selected authored setup profile for this session.
|
|
2205
|
+
*/
|
|
2206
|
+
setupProfileId?: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* Player IDs the authenticated session actor may select.
|
|
2209
|
+
*/
|
|
2210
|
+
switchablePlayerIds: Array<string>;
|
|
2211
|
+
history?: SessionSnapshotHistory;
|
|
2212
|
+
};
|
|
2213
|
+
export type SeatAssignment = {
|
|
2214
|
+
/**
|
|
2215
|
+
* Player identifier (e.g., 'player-1')
|
|
2216
|
+
*/
|
|
2217
|
+
playerId: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* Session actor controlling this seat (null if empty)
|
|
2220
|
+
*/
|
|
2221
|
+
controllerActor?: SessionActor;
|
|
2222
|
+
/**
|
|
2223
|
+
* Display name for this seat/player
|
|
2224
|
+
*/
|
|
2225
|
+
displayName: string;
|
|
2226
|
+
/**
|
|
2227
|
+
* Hex color code for the player (e.g., '#FF5733')
|
|
2228
|
+
*/
|
|
2229
|
+
playerColor?: string;
|
|
2230
|
+
/**
|
|
2231
|
+
* Whether this seat is the host
|
|
2232
|
+
*/
|
|
2233
|
+
isHost?: boolean;
|
|
2234
|
+
};
|
|
2235
|
+
export type HostLobbyView = {
|
|
2236
|
+
/**
|
|
2237
|
+
* Current public seat assignments for the session.
|
|
2238
|
+
*/
|
|
2239
|
+
seats: Array<SeatAssignment>;
|
|
2240
|
+
/**
|
|
2241
|
+
* Whether the lobby can currently be started.
|
|
2242
|
+
*/
|
|
2243
|
+
canStart: boolean;
|
|
2244
|
+
/**
|
|
2245
|
+
* Session actor that hosts this session.
|
|
2246
|
+
*/
|
|
2247
|
+
hostActor: SessionActor;
|
|
2248
|
+
/**
|
|
2249
|
+
* Selected authored setup profile for this session.
|
|
2250
|
+
*/
|
|
2251
|
+
setupProfileId?: string;
|
|
2252
|
+
};
|
|
2253
|
+
export type HostLobbySessionSnapshot = {
|
|
2254
|
+
type: 'lobby';
|
|
2255
|
+
context: HostSessionContext;
|
|
2256
|
+
lobby: HostLobbyView;
|
|
2257
|
+
};
|
|
2258
|
+
export type SimultaneousPhaseSnapshot = {
|
|
2259
|
+
phaseName: string;
|
|
2260
|
+
interactionId: string;
|
|
2261
|
+
actorIds: Array<string>;
|
|
2262
|
+
sealedPlayerIds: Array<string>;
|
|
2263
|
+
pendingPlayerIds: Array<string>;
|
|
2264
|
+
};
|
|
2265
|
+
/**
|
|
2266
|
+
* Draft commit policy consumed by default UI surfaces.
|
|
2267
|
+
*/
|
|
2268
|
+
export type InteractionCommitPolicy = {
|
|
2269
|
+
mode: 'manual' | 'autoWhenReady';
|
|
2270
|
+
};
|
|
2271
|
+
export type ResourceMapDomainEntry = {
|
|
2272
|
+
resourceId: string;
|
|
2273
|
+
label?: string;
|
|
2274
|
+
icon?: string;
|
|
2275
|
+
min: number;
|
|
2276
|
+
max: number;
|
|
2277
|
+
};
|
|
2278
|
+
export type ChoiceDomainOption = {
|
|
2279
|
+
value: string;
|
|
2280
|
+
label: string;
|
|
2281
|
+
icon?: string;
|
|
2282
|
+
badge?: string;
|
|
2283
|
+
description?: string;
|
|
2284
|
+
disabled?: boolean;
|
|
2285
|
+
disabledReason?: string;
|
|
2286
|
+
};
|
|
2287
|
+
/**
|
|
2288
|
+
* Selection cardinality for an input domain.
|
|
2289
|
+
*/
|
|
2290
|
+
export type InputSelection = {
|
|
2291
|
+
mode: 'single' | 'many';
|
|
2292
|
+
min?: number;
|
|
2293
|
+
max?: number;
|
|
2294
|
+
distinct?: boolean;
|
|
2295
|
+
};
|
|
2296
|
+
export type InputDomain = {
|
|
2297
|
+
type: 'target' | 'resourceMap' | 'boundedNumber' | 'choice' | 'choiceList';
|
|
2298
|
+
targetKind?: string;
|
|
2299
|
+
boardId?: string;
|
|
2300
|
+
zoneId?: string;
|
|
2301
|
+
zoneIds?: Array<string>;
|
|
2302
|
+
eligibleTargets?: Array<string>;
|
|
2303
|
+
resources?: Array<ResourceMapDomainEntry>;
|
|
2304
|
+
min?: number;
|
|
2305
|
+
max?: number;
|
|
2306
|
+
step?: number;
|
|
2307
|
+
choices?: Array<ChoiceDomainOption>;
|
|
2308
|
+
selection?: InputSelection;
|
|
2309
|
+
};
|
|
2310
|
+
/**
|
|
2311
|
+
* Canonical descriptor for one interaction input collector.
|
|
2312
|
+
*/
|
|
2313
|
+
export type InteractionInputDescriptor = {
|
|
2314
|
+
key: string;
|
|
2315
|
+
kind: string;
|
|
2316
|
+
domain: InputDomain;
|
|
2317
|
+
/**
|
|
2318
|
+
* Optional default value applied to this input when the player has not
|
|
2319
|
+
* yet drafted a value. Mirrors the input collector's `defaultValue`
|
|
2320
|
+
* from the authored interaction, so plugins can render a sensible
|
|
2321
|
+
* starting state (e.g. a pre-selected resource for a bank trade).
|
|
2322
|
+
*
|
|
2323
|
+
*/
|
|
2324
|
+
defaultValue?: JsonValue;
|
|
2325
|
+
};
|
|
2326
|
+
export type InteractionContextOption = {
|
|
2327
|
+
id: string;
|
|
2328
|
+
label: string;
|
|
2329
|
+
};
|
|
2330
|
+
export type InteractionContext = {
|
|
2331
|
+
to: string;
|
|
2332
|
+
title?: string;
|
|
2333
|
+
payload?: {
|
|
2334
|
+
[key: string]: JsonValue;
|
|
2335
|
+
};
|
|
2336
|
+
options?: Array<InteractionContextOption>;
|
|
2337
|
+
};
|
|
2338
|
+
/**
|
|
2339
|
+
* Authoritative interaction descriptor resolved by the trusted bundle.
|
|
2340
|
+
*/
|
|
2341
|
+
export type InteractionDescriptor = {
|
|
2342
|
+
phaseName: string;
|
|
2343
|
+
interactionKey: string;
|
|
2344
|
+
interactionId: string;
|
|
2345
|
+
kind: 'action' | 'prompt';
|
|
2346
|
+
zoneId?: string;
|
|
2347
|
+
/**
|
|
2348
|
+
* Draft commit policy materialized by the trusted reducer bundle. Omitted authoring specs default to manual before this descriptor crosses the runtime boundary.
|
|
2349
|
+
*/
|
|
2350
|
+
commit: InteractionCommitPolicy;
|
|
2351
|
+
/**
|
|
2352
|
+
* Ordered input descriptors. Each entry is the canonical source for its collector key, collector kind, and valid-value domain.
|
|
2353
|
+
*/
|
|
2354
|
+
inputs: Array<InteractionInputDescriptor>;
|
|
2355
|
+
cost?: {
|
|
2356
|
+
[key: string]: JsonValue;
|
|
2357
|
+
};
|
|
2358
|
+
currentResources?: {
|
|
2359
|
+
[key: string]: JsonValue;
|
|
2360
|
+
};
|
|
2361
|
+
/**
|
|
2362
|
+
* Resource shortfall by resource id when a costed interaction is not currently affordable.
|
|
2363
|
+
*/
|
|
2364
|
+
missingResources?: {
|
|
2365
|
+
[key: string]: number;
|
|
2366
|
+
};
|
|
2367
|
+
available: boolean;
|
|
2368
|
+
unavailableReason?: string;
|
|
2369
|
+
context?: InteractionContext;
|
|
2370
|
+
};
|
|
2371
|
+
export type ZoneHandles = {
|
|
2372
|
+
cardIds: Array<string>;
|
|
2373
|
+
cardsById: {
|
|
2374
|
+
[key: string]: string;
|
|
2375
|
+
};
|
|
2376
|
+
playableByCardId: {
|
|
2377
|
+
[key: string]: Array<InteractionDescriptor>;
|
|
2378
|
+
};
|
|
2379
|
+
};
|
|
2380
|
+
export type HostPlayerGameplayView = {
|
|
2381
|
+
/**
|
|
2382
|
+
* Monotonic gameplay version for stale-client detection.
|
|
2383
|
+
*/
|
|
2384
|
+
version: number;
|
|
2385
|
+
/**
|
|
2386
|
+
* Opaque revision token for the selected player's current descriptors and input domains.
|
|
2387
|
+
*/
|
|
2388
|
+
actionSetVersion: string;
|
|
2389
|
+
/**
|
|
2390
|
+
* Player ID this gameplay snapshot is scoped to.
|
|
2391
|
+
*/
|
|
2392
|
+
playerId: string;
|
|
2393
|
+
/**
|
|
2394
|
+
* Player IDs currently active in the game state.
|
|
2395
|
+
*/
|
|
2396
|
+
activePlayers: Array<string>;
|
|
2397
|
+
/**
|
|
2398
|
+
* Current reducer-native gameplay phase.
|
|
2399
|
+
*/
|
|
2400
|
+
currentPhase: string;
|
|
2401
|
+
/**
|
|
2402
|
+
* Current stage within the phase. Null when the phase has no active stage.
|
|
2403
|
+
*/
|
|
2404
|
+
currentStage: string;
|
|
2405
|
+
/**
|
|
2406
|
+
* Player IDs this stage currently admits.
|
|
2407
|
+
*/
|
|
2408
|
+
stageSeats: Array<string>;
|
|
2409
|
+
/**
|
|
2410
|
+
* Visibility-safe progress metadata for an active simultaneous-player phase.
|
|
2411
|
+
*/
|
|
2412
|
+
simultaneousPhase?: SimultaneousPhaseSnapshot;
|
|
2413
|
+
/**
|
|
2414
|
+
* JSON-serialized reducer-projected UI view for the scoped player.
|
|
2415
|
+
*/
|
|
2416
|
+
view: string;
|
|
2417
|
+
/**
|
|
2418
|
+
* Interaction descriptors for the scoped player, resolved authoritatively by the trusted bundle.
|
|
2419
|
+
*/
|
|
2420
|
+
availableInteractions: Array<InteractionDescriptor>;
|
|
2421
|
+
/**
|
|
2422
|
+
* Zone handles for the scoped player, keyed by zone id.
|
|
2423
|
+
*/
|
|
2424
|
+
zones: {
|
|
2425
|
+
[key: string]: ZoneHandles;
|
|
2426
|
+
};
|
|
2427
|
+
/**
|
|
2428
|
+
* JSON-serialized session-scoped static view. Populated on gameplay bootstrap payloads only.
|
|
2429
|
+
*/
|
|
2430
|
+
boardStatic?: string;
|
|
2431
|
+
/**
|
|
2432
|
+
* Content hash of the session-scoped static view held on the host.
|
|
2433
|
+
*/
|
|
2434
|
+
boardStaticHash?: string;
|
|
2435
|
+
};
|
|
2436
|
+
export type HostGameplaySessionSnapshot = {
|
|
2437
|
+
type: 'gameplay';
|
|
2438
|
+
context: HostSessionContext;
|
|
2439
|
+
lobby: HostLobbyView;
|
|
2440
|
+
gameplay: HostPlayerGameplayView;
|
|
2441
|
+
};
|
|
2442
|
+
export type HostEndedSessionSnapshot = {
|
|
2443
|
+
type: 'ended';
|
|
2444
|
+
context: HostSessionContext;
|
|
2445
|
+
lobby: HostLobbyView;
|
|
2446
|
+
};
|
|
2447
|
+
export type HostSessionSnapshot = ({
|
|
2448
|
+
type: 'lobby';
|
|
2449
|
+
} & HostLobbySessionSnapshot) | ({
|
|
2450
|
+
type: 'gameplay';
|
|
2451
|
+
} & HostGameplaySessionSnapshot) | ({
|
|
2452
|
+
type: 'ended';
|
|
2453
|
+
} & HostEndedSessionSnapshot);
|
|
2454
|
+
export type HostSessionSnapshotReason = 'load' | 'start' | 'switch-player' | 'resync';
|
|
2455
|
+
export type HostSessionSnapshotEvent = {
|
|
2456
|
+
type: 'session.snapshot';
|
|
2457
|
+
reason: HostSessionSnapshotReason;
|
|
2458
|
+
snapshot: HostSessionSnapshot;
|
|
2459
|
+
};
|
|
2460
|
+
export type HostSessionLobbyUpdatedEvent = {
|
|
2461
|
+
type: 'session.lobbyUpdated';
|
|
2462
|
+
context: HostSessionContext;
|
|
2463
|
+
lobby: HostLobbyView;
|
|
2464
|
+
};
|
|
2465
|
+
export type HostSessionEventCausation = {
|
|
2466
|
+
clientActionId?: string;
|
|
2467
|
+
};
|
|
2468
|
+
export type HostSessionGameplayUpdatedEvent = {
|
|
2469
|
+
type: 'session.gameplayUpdated';
|
|
2470
|
+
context: HostSessionContext;
|
|
2471
|
+
gameplay: HostPlayerGameplayView;
|
|
2472
|
+
causation?: HostSessionEventCausation;
|
|
2473
|
+
};
|
|
2474
|
+
export type HostSessionHistoryUpdatedEvent = {
|
|
2475
|
+
type: 'session.historyUpdated';
|
|
2476
|
+
context: HostSessionContext;
|
|
2477
|
+
};
|
|
2478
|
+
export type HostSessionEndedEvent = {
|
|
2479
|
+
type: 'session.ended';
|
|
2480
|
+
context: HostSessionContext;
|
|
2481
|
+
lobby: HostLobbyView;
|
|
2482
|
+
};
|
|
2483
|
+
export type HostSessionErrorEvent = {
|
|
2484
|
+
type: 'session.error';
|
|
2485
|
+
sessionId: string;
|
|
2486
|
+
code?: string;
|
|
2487
|
+
message: string;
|
|
2488
|
+
recoverable: boolean;
|
|
2489
|
+
};
|
|
2490
|
+
export type HostSessionEvent = ({
|
|
2491
|
+
type: 'session.snapshot';
|
|
2492
|
+
} & HostSessionSnapshotEvent) | ({
|
|
2493
|
+
type: 'session.lobbyUpdated';
|
|
2494
|
+
} & HostSessionLobbyUpdatedEvent) | ({
|
|
2495
|
+
type: 'session.gameplayUpdated';
|
|
2496
|
+
} & HostSessionGameplayUpdatedEvent) | ({
|
|
2497
|
+
type: 'session.historyUpdated';
|
|
2498
|
+
} & HostSessionHistoryUpdatedEvent) | ({
|
|
2499
|
+
type: 'session.ended';
|
|
2500
|
+
} & HostSessionEndedEvent) | ({
|
|
2501
|
+
type: 'session.error';
|
|
2502
|
+
} & HostSessionErrorEvent);
|
|
2503
|
+
/**
|
|
2504
|
+
* Log entry from the game engine console output
|
|
2505
|
+
*/
|
|
2506
|
+
export type LogMessageDto = {
|
|
2507
|
+
/**
|
|
2508
|
+
* Unique identifier for the log entry
|
|
2509
|
+
*/
|
|
2510
|
+
id: number;
|
|
2511
|
+
/**
|
|
2512
|
+
* Type of log entry
|
|
2513
|
+
*/
|
|
2514
|
+
type: string;
|
|
2515
|
+
/**
|
|
2516
|
+
* The log message content
|
|
2517
|
+
*/
|
|
2518
|
+
message: string;
|
|
2519
|
+
/**
|
|
2520
|
+
* When the log was recorded
|
|
2521
|
+
*/
|
|
2522
|
+
timestamp: string;
|
|
2523
|
+
};
|
|
2524
|
+
export type PlayerActionsResponse = {
|
|
2525
|
+
version: number;
|
|
2526
|
+
actionSetVersion: string;
|
|
2527
|
+
actions: Array<InteractionDescriptor>;
|
|
2528
|
+
};
|
|
2529
|
+
export type PlayerActionResponse = {
|
|
2530
|
+
version: number;
|
|
2531
|
+
actionSetVersion: string;
|
|
2532
|
+
action: InteractionDescriptor;
|
|
2533
|
+
};
|
|
2534
|
+
export type PlayerActionTargetsResponse = {
|
|
2535
|
+
version: number;
|
|
2536
|
+
actionSetVersion: string;
|
|
2537
|
+
interactionId: string;
|
|
2538
|
+
inputKey: string;
|
|
2539
|
+
domain: InputDomain;
|
|
2540
|
+
zoneCardsById?: {
|
|
2541
|
+
[key: string]: string;
|
|
2542
|
+
};
|
|
2543
|
+
};
|
|
2544
|
+
export type PlayerActionRequest = {
|
|
2545
|
+
expectedVersion: number;
|
|
2546
|
+
actionSetVersion: string;
|
|
2547
|
+
inputs: {
|
|
2548
|
+
[key: string]: JsonValue;
|
|
2549
|
+
};
|
|
2550
|
+
};
|
|
2551
|
+
export type PlayerActionValidateResponse = {
|
|
2552
|
+
valid: boolean;
|
|
2553
|
+
version: number;
|
|
2554
|
+
actionSetVersion: string;
|
|
2555
|
+
errorCode?: string;
|
|
2556
|
+
message?: string;
|
|
2557
|
+
fieldErrors?: {
|
|
2558
|
+
[key: string]: string;
|
|
2559
|
+
};
|
|
2560
|
+
};
|
|
2561
|
+
export type HostActionSubmitResponse = {
|
|
2562
|
+
success: boolean;
|
|
2563
|
+
version: number;
|
|
2564
|
+
actionSetVersion: string;
|
|
2565
|
+
accepted?: boolean;
|
|
2566
|
+
errorCode?: string;
|
|
2567
|
+
message?: string;
|
|
2568
|
+
event?: HostSessionEvent;
|
|
2569
|
+
};
|
|
2570
|
+
/**
|
|
2571
|
+
* Request to update seat settings (display name and/or player color)
|
|
2572
|
+
*/
|
|
2573
|
+
export type UpdateSeatRequest = {
|
|
2574
|
+
/**
|
|
2575
|
+
* New display name for the player
|
|
2576
|
+
*/
|
|
2577
|
+
displayName?: string;
|
|
2578
|
+
/**
|
|
2579
|
+
* Hex color code for the player (e.g., '#FF5733')
|
|
2580
|
+
*/
|
|
2581
|
+
playerColor?: string;
|
|
2582
|
+
};
|
|
2583
|
+
/**
|
|
2584
|
+
* Request to restore game state to a previous history point.
|
|
2585
|
+
*/
|
|
2586
|
+
export type RestoreHistoryRequest = {
|
|
2587
|
+
entryId: string;
|
|
2588
|
+
};
|
|
2589
|
+
export type RestoreHistoryResponse = {
|
|
2590
|
+
success: boolean;
|
|
2591
|
+
restoredToVersion: number;
|
|
2592
|
+
message?: string;
|
|
2593
|
+
};
|
|
2594
|
+
/**
|
|
2595
|
+
* Public demo game summary.
|
|
2596
|
+
*/
|
|
2597
|
+
export type DemoGameSummary = {
|
|
2598
|
+
slug: string;
|
|
2599
|
+
name: string;
|
|
2600
|
+
description?: string;
|
|
2601
|
+
/**
|
|
2602
|
+
* Short public overview shown before starting the demo.
|
|
2603
|
+
*/
|
|
2604
|
+
overview?: string;
|
|
2605
|
+
/**
|
|
2606
|
+
* Relative URL for the bundled static demo thumbnail.
|
|
2607
|
+
*/
|
|
2608
|
+
thumbnailUrl?: string;
|
|
2609
|
+
/**
|
|
2610
|
+
* Public creator or publisher attribution shown in the demo dialog.
|
|
2611
|
+
*/
|
|
2612
|
+
creator?: string;
|
|
2613
|
+
/**
|
|
2614
|
+
* Minimum supported player count for the demo game.
|
|
2615
|
+
*/
|
|
2616
|
+
minPlayers?: number;
|
|
2617
|
+
/**
|
|
2618
|
+
* Maximum supported player count for the demo game.
|
|
2619
|
+
*/
|
|
2620
|
+
maxPlayers?: number;
|
|
2621
|
+
/**
|
|
2622
|
+
* Lower bound for the expected play time.
|
|
2623
|
+
*/
|
|
2624
|
+
playTimeMinMinutes?: number;
|
|
2625
|
+
/**
|
|
2626
|
+
* Upper bound for the expected play time.
|
|
2627
|
+
*/
|
|
2628
|
+
playTimeMaxMinutes?: number;
|
|
2629
|
+
/**
|
|
2630
|
+
* Lightweight public difficulty rating on a 1-5 scale.
|
|
2631
|
+
*/
|
|
2632
|
+
difficulty?: number;
|
|
2633
|
+
/**
|
|
2634
|
+
* Public mechanics shown as chips in the demo dialog.
|
|
2635
|
+
*/
|
|
2636
|
+
mechanics?: Array<string>;
|
|
2637
|
+
/**
|
|
2638
|
+
* Public categories shown as chips in the demo dialog.
|
|
2639
|
+
*/
|
|
2640
|
+
categories?: Array<string>;
|
|
2641
|
+
/**
|
|
2642
|
+
* Public hero image URL for the demo dialog.
|
|
2643
|
+
*/
|
|
2644
|
+
heroImageUrl?: string;
|
|
2645
|
+
/**
|
|
2646
|
+
* Approximate time needed to try the local demo.
|
|
2647
|
+
*/
|
|
2648
|
+
estimatedMinutes?: number;
|
|
2649
|
+
/**
|
|
2650
|
+
* Number of player seats shown for the local teaching demo.
|
|
2651
|
+
*/
|
|
2652
|
+
demoPlayerCount: number;
|
|
2653
|
+
registrationStatus: 'PENDING' | 'REGISTERING' | 'REGISTERED' | 'FAILED';
|
|
2654
|
+
playable: boolean;
|
|
2655
|
+
};
|
|
2656
|
+
export type DemoGameDetails = DemoGameSummary & {
|
|
2657
|
+
/**
|
|
2658
|
+
* Active immutable catalog revision when registered.
|
|
2659
|
+
*/
|
|
2660
|
+
activeRevisionId?: string;
|
|
2661
|
+
bundleFingerprint?: string;
|
|
2662
|
+
error?: string;
|
|
2663
|
+
};
|
|
2664
|
+
/**
|
|
2665
|
+
* Guest-play session created for a public demo game.
|
|
2666
|
+
*/
|
|
2667
|
+
export type DemoSessionResponse = {
|
|
2668
|
+
/**
|
|
2669
|
+
* game_sessions.session_id
|
|
2670
|
+
*/
|
|
2671
|
+
sessionId: string;
|
|
2672
|
+
shortCode: string;
|
|
2673
|
+
/**
|
|
2674
|
+
* demo_sessions.id; send with demo session secret headers to authorize as DemoGuest.
|
|
2675
|
+
*/
|
|
2676
|
+
demoActorSessionId: string;
|
|
2677
|
+
/**
|
|
2678
|
+
* Per-session secret; send with demo headers (hashed server-side).
|
|
2679
|
+
*/
|
|
2680
|
+
guestSessionSecret: string;
|
|
2681
|
+
seed: number;
|
|
2682
|
+
selectedPlayerId?: string;
|
|
2683
|
+
gameSource: SessionGameSource;
|
|
2684
|
+
};
|
|
2685
|
+
export type HistoryUpdatedEvent = {
|
|
2686
|
+
type: 'history.updated';
|
|
2687
|
+
history: SessionSnapshotHistory;
|
|
2688
|
+
};
|
|
2689
|
+
/**
|
|
2690
|
+
* Type of parameter accepted by a runtime action
|
|
2691
|
+
*/
|
|
2692
|
+
export type ParameterType = 'cardId' | 'cardType' | 'playerId' | 'string' | 'number' | 'boolean' | 'zoneId' | 'pieceId' | 'dieId' | 'boardId' | 'edgeId' | 'vertexId' | 'spaceId' | 'resourceId';
|
|
2693
|
+
/**
|
|
2694
|
+
* Defines a parameter for an action
|
|
2695
|
+
*/
|
|
2696
|
+
export type ActionParameterDefinition = {
|
|
2697
|
+
name: string;
|
|
2698
|
+
type: ParameterType;
|
|
2699
|
+
required?: boolean;
|
|
2700
|
+
array?: boolean;
|
|
2701
|
+
minLength?: number;
|
|
2702
|
+
maxLength?: number;
|
|
2703
|
+
/**
|
|
2704
|
+
* Optional card set ID to specify which card set a CARD_ID parameter refers to
|
|
2705
|
+
*/
|
|
2706
|
+
cardSetId?: string;
|
|
2707
|
+
description?: string;
|
|
2708
|
+
};
|
|
2709
|
+
/**
|
|
2710
|
+
* Defines an available player action with metadata and parameter definitions
|
|
2711
|
+
*/
|
|
2712
|
+
export type ActionDefinition = {
|
|
2713
|
+
/**
|
|
2714
|
+
* Unique action identifier
|
|
2715
|
+
*/
|
|
2716
|
+
actionType: string;
|
|
2717
|
+
/**
|
|
2718
|
+
* UI display name for this action
|
|
2719
|
+
*/
|
|
2720
|
+
displayName: string;
|
|
2721
|
+
/**
|
|
2722
|
+
* Optional help text describing the action
|
|
2723
|
+
*/
|
|
2724
|
+
description?: string;
|
|
2725
|
+
/**
|
|
2726
|
+
* List of parameters this action accepts
|
|
2727
|
+
*/
|
|
2728
|
+
parameters: Array<ActionParameterDefinition>;
|
|
2729
|
+
/**
|
|
2730
|
+
* List of possible validation error codes
|
|
2731
|
+
*/
|
|
2732
|
+
errorCodes?: Array<string>;
|
|
2733
|
+
};
|
|
2734
|
+
/**
|
|
2735
|
+
* Type of source for the card set
|
|
2736
|
+
*/
|
|
2737
|
+
export type CardSetSourceType = 'preset' | 'csv' | 'manual';
|
|
2738
|
+
/**
|
|
2739
|
+
* Engine-level structural board layout discriminator
|
|
2740
|
+
*/
|
|
2741
|
+
export type BoardLayout = 'generic' | 'hex' | 'square';
|
|
2742
|
+
export type GameManifestResponse = {
|
|
2743
|
+
/**
|
|
2744
|
+
* Unique identifier for this manifest version
|
|
2745
|
+
*/
|
|
2746
|
+
manifestId: string;
|
|
2747
|
+
/**
|
|
2748
|
+
* Game identifier
|
|
2749
|
+
*/
|
|
2750
|
+
gameId: string;
|
|
2751
|
+
/**
|
|
2752
|
+
* User who created this version
|
|
2753
|
+
*/
|
|
2754
|
+
userId: string;
|
|
2755
|
+
/**
|
|
2756
|
+
* Agent job that created this manifest
|
|
2757
|
+
*/
|
|
2758
|
+
jobId?: string;
|
|
2759
|
+
/**
|
|
2760
|
+
* The board manifest data
|
|
2761
|
+
*/
|
|
2762
|
+
manifest: GameTopologyManifest;
|
|
2763
|
+
/**
|
|
2764
|
+
* Version number for this game
|
|
2765
|
+
*/
|
|
2766
|
+
version: number;
|
|
2767
|
+
/**
|
|
2768
|
+
* When this version was created
|
|
2769
|
+
*/
|
|
2770
|
+
createdAt: string;
|
|
2771
|
+
};
|
|
2772
|
+
/**
|
|
2773
|
+
* Unique identifier for the game
|
|
2774
|
+
*/
|
|
2775
|
+
export type GameId = string;
|
|
2776
|
+
/**
|
|
2777
|
+
* URL-safe game slug
|
|
2778
|
+
*/
|
|
2779
|
+
export type GameSlug = string;
|
|
2780
|
+
/**
|
|
2781
|
+
* Unique identifier for the game session
|
|
2782
|
+
*/
|
|
2783
|
+
export type SessionId = string;
|
|
2784
|
+
/**
|
|
2785
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
2786
|
+
*/
|
|
2787
|
+
export type PlayerId = string;
|
|
2788
|
+
export type HealthCheckData = {
|
|
2789
|
+
body?: never;
|
|
2790
|
+
path?: never;
|
|
2791
|
+
query?: never;
|
|
2792
|
+
url: '/';
|
|
2793
|
+
};
|
|
2794
|
+
export type HealthCheckResponses = {
|
|
2795
|
+
/**
|
|
2796
|
+
* Service is healthy
|
|
2797
|
+
*/
|
|
2798
|
+
200: string;
|
|
2799
|
+
};
|
|
2800
|
+
export type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
|
|
2801
|
+
export type GetApiVersionData = {
|
|
2802
|
+
body?: never;
|
|
2803
|
+
path?: never;
|
|
2804
|
+
query?: never;
|
|
2805
|
+
url: '/api/version';
|
|
2806
|
+
};
|
|
2807
|
+
export type GetApiVersionResponses = {
|
|
2808
|
+
/**
|
|
2809
|
+
* Successfully retrieved backend version metadata
|
|
2810
|
+
*/
|
|
2811
|
+
200: ApiVersionResponse;
|
|
2812
|
+
};
|
|
2813
|
+
export type GetApiVersionResponse = GetApiVersionResponses[keyof GetApiVersionResponses];
|
|
2814
|
+
export type ListGamesData = {
|
|
2815
|
+
body?: never;
|
|
2816
|
+
path?: never;
|
|
2817
|
+
query?: {
|
|
2818
|
+
/**
|
|
2819
|
+
* Include games that haven't been fully initialized (missing rules, manifest, app, or UI). Defaults to false.
|
|
2820
|
+
*/
|
|
2821
|
+
includeNotInitialized?: boolean;
|
|
2822
|
+
};
|
|
2823
|
+
url: '/api/games';
|
|
2824
|
+
};
|
|
2825
|
+
export type ListGamesErrors = {
|
|
2826
|
+
/**
|
|
2827
|
+
* Unauthorized - authentication required
|
|
2828
|
+
*/
|
|
2829
|
+
401: ProblemDetails;
|
|
2830
|
+
/**
|
|
2831
|
+
* Internal server error
|
|
2832
|
+
*/
|
|
2833
|
+
500: ProblemDetails;
|
|
2834
|
+
};
|
|
2835
|
+
export type ListGamesError = ListGamesErrors[keyof ListGamesErrors];
|
|
2836
|
+
export type ListGamesResponses = {
|
|
2837
|
+
/**
|
|
2838
|
+
* Successfully retrieved games list
|
|
2839
|
+
*/
|
|
2840
|
+
200: Array<Game>;
|
|
2841
|
+
};
|
|
2842
|
+
export type ListGamesResponse = ListGamesResponses[keyof ListGamesResponses];
|
|
2843
|
+
export type CreateGameData = {
|
|
2844
|
+
body: CreateGameRequest;
|
|
2845
|
+
path?: never;
|
|
2846
|
+
query?: never;
|
|
2847
|
+
url: '/api/games';
|
|
2848
|
+
};
|
|
2849
|
+
export type CreateGameErrors = {
|
|
2850
|
+
/**
|
|
2851
|
+
* Bad request - invalid input parameters
|
|
2852
|
+
*/
|
|
2853
|
+
400: ProblemDetails;
|
|
2854
|
+
/**
|
|
2855
|
+
* Unauthorized - authentication required
|
|
2856
|
+
*/
|
|
2857
|
+
401: ProblemDetails;
|
|
2858
|
+
/**
|
|
2859
|
+
* Conflict - version mismatch or resource state conflict
|
|
2860
|
+
*/
|
|
2861
|
+
409: ProblemDetails;
|
|
2862
|
+
/**
|
|
2863
|
+
* Internal server error
|
|
2864
|
+
*/
|
|
2865
|
+
500: ProblemDetails;
|
|
2866
|
+
};
|
|
2867
|
+
export type CreateGameError = CreateGameErrors[keyof CreateGameErrors];
|
|
2868
|
+
export type CreateGameResponses = {
|
|
2869
|
+
/**
|
|
2870
|
+
* Game created successfully
|
|
2871
|
+
*/
|
|
2872
|
+
201: Game;
|
|
2873
|
+
};
|
|
2874
|
+
export type CreateGameResponse = CreateGameResponses[keyof CreateGameResponses];
|
|
2875
|
+
export type ExtractGameSpecData = {
|
|
2876
|
+
body: ExtractGameSpecRequest;
|
|
2877
|
+
path?: never;
|
|
2878
|
+
query?: never;
|
|
2879
|
+
url: '/api/games/extract-spec';
|
|
2880
|
+
};
|
|
2881
|
+
export type ExtractGameSpecErrors = {
|
|
2882
|
+
/**
|
|
2883
|
+
* Bad request - invalid input parameters
|
|
2884
|
+
*/
|
|
2885
|
+
400: ProblemDetails;
|
|
2886
|
+
/**
|
|
2887
|
+
* Too many requests or live connections
|
|
2888
|
+
*/
|
|
2889
|
+
429: ProblemDetails;
|
|
2890
|
+
/**
|
|
2891
|
+
* Internal server error
|
|
2892
|
+
*/
|
|
2893
|
+
500: ProblemDetails;
|
|
2894
|
+
/**
|
|
2895
|
+
* Internal server error
|
|
2896
|
+
*/
|
|
2897
|
+
503: ProblemDetails;
|
|
2898
|
+
};
|
|
2899
|
+
export type ExtractGameSpecError = ExtractGameSpecErrors[keyof ExtractGameSpecErrors];
|
|
2900
|
+
export type ExtractGameSpecResponses = {
|
|
2901
|
+
/**
|
|
2902
|
+
* Structured game spec extracted
|
|
2903
|
+
*/
|
|
2904
|
+
200: ExtractGameSpecResponse;
|
|
2905
|
+
};
|
|
2906
|
+
export type ExtractGameSpecResponse2 = ExtractGameSpecResponses[keyof ExtractGameSpecResponses];
|
|
2907
|
+
export type DeleteGameData = {
|
|
2908
|
+
body?: never;
|
|
2909
|
+
path: {
|
|
2910
|
+
/**
|
|
2911
|
+
* Unique identifier for the game
|
|
2912
|
+
*/
|
|
2913
|
+
gameId: string;
|
|
2914
|
+
};
|
|
2915
|
+
query?: never;
|
|
2916
|
+
url: '/api/games/{gameId}';
|
|
2917
|
+
};
|
|
2918
|
+
export type DeleteGameErrors = {
|
|
2919
|
+
/**
|
|
2920
|
+
* Bad request - invalid input parameters
|
|
2921
|
+
*/
|
|
2922
|
+
400: ProblemDetails;
|
|
2923
|
+
/**
|
|
2924
|
+
* Unauthorized - authentication required
|
|
2925
|
+
*/
|
|
2926
|
+
401: ProblemDetails;
|
|
2927
|
+
/**
|
|
2928
|
+
* Resource not found
|
|
2929
|
+
*/
|
|
2930
|
+
404: ProblemDetails;
|
|
2931
|
+
/**
|
|
2932
|
+
* Internal server error
|
|
2933
|
+
*/
|
|
2934
|
+
500: ProblemDetails;
|
|
2935
|
+
};
|
|
2936
|
+
export type DeleteGameError = DeleteGameErrors[keyof DeleteGameErrors];
|
|
2937
|
+
export type DeleteGameResponses = {
|
|
2938
|
+
/**
|
|
2939
|
+
* Game deleted successfully
|
|
2940
|
+
*/
|
|
2941
|
+
200: DeleteGameResponse;
|
|
2942
|
+
};
|
|
2943
|
+
export type DeleteGameResponse2 = DeleteGameResponses[keyof DeleteGameResponses];
|
|
2944
|
+
export type GetGameData = {
|
|
2945
|
+
body?: never;
|
|
2946
|
+
path: {
|
|
2947
|
+
/**
|
|
2948
|
+
* Unique identifier for the game
|
|
2949
|
+
*/
|
|
2950
|
+
gameId: string;
|
|
2951
|
+
};
|
|
2952
|
+
query?: never;
|
|
2953
|
+
url: '/api/games/{gameId}';
|
|
2954
|
+
};
|
|
2955
|
+
export type GetGameErrors = {
|
|
2956
|
+
/**
|
|
2957
|
+
* Bad request - invalid input parameters
|
|
2958
|
+
*/
|
|
2959
|
+
400: ProblemDetails;
|
|
2960
|
+
/**
|
|
2961
|
+
* Unauthorized - authentication required
|
|
2962
|
+
*/
|
|
2963
|
+
401: ProblemDetails;
|
|
2964
|
+
/**
|
|
2965
|
+
* Resource not found
|
|
2966
|
+
*/
|
|
2967
|
+
404: ProblemDetails;
|
|
2968
|
+
/**
|
|
2969
|
+
* Internal server error
|
|
2970
|
+
*/
|
|
2971
|
+
500: ProblemDetails;
|
|
2972
|
+
};
|
|
2973
|
+
export type GetGameError = GetGameErrors[keyof GetGameErrors];
|
|
2974
|
+
export type GetGameResponses = {
|
|
2975
|
+
/**
|
|
2976
|
+
* Successfully retrieved game
|
|
2977
|
+
*/
|
|
2978
|
+
200: Game;
|
|
2979
|
+
};
|
|
2980
|
+
export type GetGameResponse = GetGameResponses[keyof GetGameResponses];
|
|
2981
|
+
export type UpdateGameData = {
|
|
2982
|
+
body: UpdateGameRequest;
|
|
2983
|
+
path: {
|
|
2984
|
+
/**
|
|
2985
|
+
* Unique identifier for the game
|
|
2986
|
+
*/
|
|
2987
|
+
gameId: string;
|
|
2988
|
+
};
|
|
2989
|
+
query?: never;
|
|
2990
|
+
url: '/api/games/{gameId}';
|
|
2991
|
+
};
|
|
2992
|
+
export type UpdateGameErrors = {
|
|
2993
|
+
/**
|
|
2994
|
+
* Bad request - invalid input parameters
|
|
2995
|
+
*/
|
|
2996
|
+
400: ProblemDetails;
|
|
2997
|
+
/**
|
|
2998
|
+
* Unauthorized - authentication required
|
|
2999
|
+
*/
|
|
3000
|
+
401: ProblemDetails;
|
|
3001
|
+
/**
|
|
3002
|
+
* Resource not found
|
|
3003
|
+
*/
|
|
3004
|
+
404: ProblemDetails;
|
|
3005
|
+
/**
|
|
3006
|
+
* Internal server error
|
|
3007
|
+
*/
|
|
3008
|
+
500: ProblemDetails;
|
|
3009
|
+
};
|
|
3010
|
+
export type UpdateGameError = UpdateGameErrors[keyof UpdateGameErrors];
|
|
3011
|
+
export type UpdateGameResponses = {
|
|
3012
|
+
/**
|
|
3013
|
+
* Success message
|
|
3014
|
+
*/
|
|
3015
|
+
200: string;
|
|
3016
|
+
};
|
|
3017
|
+
export type UpdateGameResponse = UpdateGameResponses[keyof UpdateGameResponses];
|
|
3018
|
+
export type GetGameBySlugData = {
|
|
3019
|
+
body?: never;
|
|
3020
|
+
path: {
|
|
3021
|
+
/**
|
|
3022
|
+
* URL-safe game slug
|
|
3023
|
+
*/
|
|
3024
|
+
slug: string;
|
|
3025
|
+
};
|
|
3026
|
+
query?: {
|
|
3027
|
+
/**
|
|
3028
|
+
* Include soft-deleted games in the lookup. Defaults to false.
|
|
3029
|
+
*/
|
|
3030
|
+
includeDeleted?: boolean;
|
|
3031
|
+
};
|
|
3032
|
+
url: '/api/games/slug/{slug}';
|
|
3033
|
+
};
|
|
3034
|
+
export type GetGameBySlugErrors = {
|
|
3035
|
+
/**
|
|
3036
|
+
* Bad request - invalid input parameters
|
|
3037
|
+
*/
|
|
3038
|
+
400: ProblemDetails;
|
|
3039
|
+
/**
|
|
3040
|
+
* Unauthorized - authentication required
|
|
3041
|
+
*/
|
|
3042
|
+
401: ProblemDetails;
|
|
3043
|
+
/**
|
|
3044
|
+
* Resource not found
|
|
3045
|
+
*/
|
|
3046
|
+
404: ProblemDetails;
|
|
3047
|
+
/**
|
|
3048
|
+
* Internal server error
|
|
3049
|
+
*/
|
|
3050
|
+
500: ProblemDetails;
|
|
3051
|
+
};
|
|
3052
|
+
export type GetGameBySlugError = GetGameBySlugErrors[keyof GetGameBySlugErrors];
|
|
3053
|
+
export type GetGameBySlugResponses = {
|
|
3054
|
+
/**
|
|
3055
|
+
* Successfully retrieved game
|
|
3056
|
+
*/
|
|
3057
|
+
200: Game;
|
|
3058
|
+
};
|
|
3059
|
+
export type GetGameBySlugResponse = GetGameBySlugResponses[keyof GetGameBySlugResponses];
|
|
3060
|
+
export type QueryWorkshopRulebookData = {
|
|
3061
|
+
body?: never;
|
|
3062
|
+
path?: never;
|
|
3063
|
+
query: {
|
|
3064
|
+
/**
|
|
3065
|
+
* Board game title to search for in the rulebook library.
|
|
3066
|
+
*/
|
|
3067
|
+
title: string;
|
|
3068
|
+
};
|
|
3069
|
+
url: '/api/workshop/query';
|
|
3070
|
+
};
|
|
3071
|
+
export type QueryWorkshopRulebookErrors = {
|
|
3072
|
+
/**
|
|
3073
|
+
* Bad request - invalid input parameters
|
|
3074
|
+
*/
|
|
3075
|
+
400: ProblemDetails;
|
|
3076
|
+
/**
|
|
3077
|
+
* Unauthorized - authentication required
|
|
3078
|
+
*/
|
|
3079
|
+
401: ProblemDetails;
|
|
3080
|
+
/**
|
|
3081
|
+
* Resource not found
|
|
3082
|
+
*/
|
|
3083
|
+
404: ProblemDetails;
|
|
3084
|
+
/**
|
|
3085
|
+
* Internal server error
|
|
3086
|
+
*/
|
|
3087
|
+
500: ProblemDetails;
|
|
3088
|
+
};
|
|
3089
|
+
export type QueryWorkshopRulebookError = QueryWorkshopRulebookErrors[keyof QueryWorkshopRulebookErrors];
|
|
3090
|
+
export type QueryWorkshopRulebookResponses = {
|
|
3091
|
+
/**
|
|
3092
|
+
* Extracted rulebook text for the first valid candidate.
|
|
3093
|
+
*/
|
|
3094
|
+
200: WorkshopRuleTextResponse;
|
|
3095
|
+
};
|
|
3096
|
+
export type QueryWorkshopRulebookResponse = QueryWorkshopRulebookResponses[keyof QueryWorkshopRulebookResponses];
|
|
3097
|
+
export type FindManifestsData = {
|
|
3098
|
+
body?: never;
|
|
3099
|
+
path: {
|
|
3100
|
+
/**
|
|
3101
|
+
* Unique identifier for the game
|
|
3102
|
+
*/
|
|
3103
|
+
gameId: string;
|
|
3104
|
+
};
|
|
3105
|
+
query: {
|
|
3106
|
+
/**
|
|
3107
|
+
* Maximum number of manifests to return (default: 10, max: 100)
|
|
3108
|
+
*/
|
|
3109
|
+
limit?: number;
|
|
3110
|
+
/**
|
|
3111
|
+
* Filter to only return manifests for a specific rule
|
|
3112
|
+
*/
|
|
3113
|
+
ruleId: string;
|
|
3114
|
+
};
|
|
3115
|
+
url: '/api/games/{gameId}/manifests';
|
|
3116
|
+
};
|
|
3117
|
+
export type FindManifestsErrors = {
|
|
3118
|
+
/**
|
|
3119
|
+
* Bad request - invalid input parameters
|
|
3120
|
+
*/
|
|
3121
|
+
400: ProblemDetails;
|
|
3122
|
+
/**
|
|
3123
|
+
* Unauthorized - authentication required
|
|
3124
|
+
*/
|
|
3125
|
+
401: ProblemDetails;
|
|
3126
|
+
/**
|
|
3127
|
+
* Resource not found
|
|
3128
|
+
*/
|
|
3129
|
+
404: ProblemDetails;
|
|
3130
|
+
/**
|
|
3131
|
+
* Internal server error
|
|
3132
|
+
*/
|
|
3133
|
+
500: ProblemDetails;
|
|
3134
|
+
};
|
|
3135
|
+
export type FindManifestsError = FindManifestsErrors[keyof FindManifestsErrors];
|
|
3136
|
+
export type FindManifestsResponses = {
|
|
3137
|
+
/**
|
|
3138
|
+
* Manifests retrieved successfully
|
|
3139
|
+
*/
|
|
3140
|
+
200: FindManifestsResponse;
|
|
3141
|
+
};
|
|
3142
|
+
export type FindManifestsResponse2 = FindManifestsResponses[keyof FindManifestsResponses];
|
|
3143
|
+
export type SaveManifestData = {
|
|
3144
|
+
body: SaveManifestRequest;
|
|
3145
|
+
path: {
|
|
3146
|
+
/**
|
|
3147
|
+
* Unique identifier for the game
|
|
3148
|
+
*/
|
|
3149
|
+
gameId: string;
|
|
3150
|
+
};
|
|
3151
|
+
query?: never;
|
|
3152
|
+
url: '/api/games/{gameId}/manifests';
|
|
3153
|
+
};
|
|
3154
|
+
export type SaveManifestErrors = {
|
|
3155
|
+
/**
|
|
3156
|
+
* Bad request - invalid input parameters
|
|
3157
|
+
*/
|
|
3158
|
+
400: ProblemDetails;
|
|
3159
|
+
/**
|
|
3160
|
+
* Unauthorized - authentication required
|
|
3161
|
+
*/
|
|
3162
|
+
401: ProblemDetails;
|
|
3163
|
+
/**
|
|
3164
|
+
* Resource not found
|
|
3165
|
+
*/
|
|
3166
|
+
404: ProblemDetails;
|
|
3167
|
+
/**
|
|
3168
|
+
* Internal server error
|
|
3169
|
+
*/
|
|
3170
|
+
500: ProblemDetails;
|
|
3171
|
+
};
|
|
3172
|
+
export type SaveManifestError = SaveManifestErrors[keyof SaveManifestErrors];
|
|
3173
|
+
export type SaveManifestResponses = {
|
|
3174
|
+
/**
|
|
3175
|
+
* Manifest saved successfully
|
|
3176
|
+
*/
|
|
3177
|
+
201: SaveManifestResponse;
|
|
3178
|
+
};
|
|
3179
|
+
export type SaveManifestResponse2 = SaveManifestResponses[keyof SaveManifestResponses];
|
|
3180
|
+
export type GetManifestData = {
|
|
3181
|
+
body?: never;
|
|
3182
|
+
path: {
|
|
3183
|
+
/**
|
|
3184
|
+
* Unique identifier for the manifest
|
|
3185
|
+
*/
|
|
3186
|
+
manifestId: string;
|
|
3187
|
+
};
|
|
3188
|
+
query?: never;
|
|
3189
|
+
url: '/api/manifests/{manifestId}';
|
|
3190
|
+
};
|
|
3191
|
+
export type GetManifestErrors = {
|
|
3192
|
+
/**
|
|
3193
|
+
* Unauthorized - authentication required
|
|
3194
|
+
*/
|
|
3195
|
+
401: ProblemDetails;
|
|
3196
|
+
/**
|
|
3197
|
+
* Resource not found
|
|
3198
|
+
*/
|
|
3199
|
+
404: ProblemDetails;
|
|
3200
|
+
/**
|
|
3201
|
+
* Internal server error
|
|
3202
|
+
*/
|
|
3203
|
+
500: ProblemDetails;
|
|
3204
|
+
};
|
|
3205
|
+
export type GetManifestError = GetManifestErrors[keyof GetManifestErrors];
|
|
3206
|
+
export type GetManifestResponses = {
|
|
3207
|
+
/**
|
|
3208
|
+
* Manifest retrieved successfully
|
|
3209
|
+
*/
|
|
3210
|
+
200: GameManifestDto;
|
|
3211
|
+
};
|
|
3212
|
+
export type GetManifestResponse = GetManifestResponses[keyof GetManifestResponses];
|
|
3213
|
+
export type GetLatestCompiledResultData = {
|
|
3214
|
+
body?: never;
|
|
3215
|
+
path: {
|
|
3216
|
+
/**
|
|
3217
|
+
* Unique identifier for the game
|
|
3218
|
+
*/
|
|
3219
|
+
gameId: string;
|
|
3220
|
+
};
|
|
3221
|
+
query?: {
|
|
3222
|
+
/**
|
|
3223
|
+
* If true, only return results where success=true and uiStorageKey is present
|
|
3224
|
+
*/
|
|
3225
|
+
successOnly?: boolean;
|
|
3226
|
+
};
|
|
3227
|
+
url: '/api/games/{gameId}/compiled-results/latest';
|
|
3228
|
+
};
|
|
3229
|
+
export type GetLatestCompiledResultErrors = {
|
|
3230
|
+
/**
|
|
3231
|
+
* Unauthorized - authentication required
|
|
3232
|
+
*/
|
|
3233
|
+
401: ProblemDetails;
|
|
3234
|
+
/**
|
|
3235
|
+
* Resource not found
|
|
3236
|
+
*/
|
|
3237
|
+
404: ProblemDetails;
|
|
3238
|
+
/**
|
|
3239
|
+
* Internal server error
|
|
3240
|
+
*/
|
|
3241
|
+
500: ProblemDetails;
|
|
3242
|
+
};
|
|
3243
|
+
export type GetLatestCompiledResultError = GetLatestCompiledResultErrors[keyof GetLatestCompiledResultErrors];
|
|
3244
|
+
export type GetLatestCompiledResultResponses = {
|
|
3245
|
+
/**
|
|
3246
|
+
* Latest compiled result found
|
|
3247
|
+
*/
|
|
3248
|
+
200: CompiledResult;
|
|
3249
|
+
};
|
|
3250
|
+
export type GetLatestCompiledResultResponse = GetLatestCompiledResultResponses[keyof GetLatestCompiledResultResponses];
|
|
3251
|
+
export type ListCompiledResultsData = {
|
|
3252
|
+
body?: never;
|
|
3253
|
+
path: {
|
|
3254
|
+
/**
|
|
3255
|
+
* Unique identifier for the game
|
|
3256
|
+
*/
|
|
3257
|
+
gameId: string;
|
|
3258
|
+
};
|
|
3259
|
+
query?: {
|
|
3260
|
+
/**
|
|
3261
|
+
* Maximum number of results to return. Default is 10.
|
|
3262
|
+
*/
|
|
3263
|
+
limit?: number;
|
|
3264
|
+
/**
|
|
3265
|
+
* Optional authoring state ID to limit results to a single authored head.
|
|
3266
|
+
*/
|
|
3267
|
+
authoringStateId?: string;
|
|
3268
|
+
};
|
|
3269
|
+
url: '/api/games/{gameId}/compiled-results';
|
|
3270
|
+
};
|
|
3271
|
+
export type ListCompiledResultsErrors = {
|
|
3272
|
+
/**
|
|
3273
|
+
* Unauthorized - authentication required
|
|
3274
|
+
*/
|
|
3275
|
+
401: ProblemDetails;
|
|
3276
|
+
/**
|
|
3277
|
+
* Resource not found
|
|
3278
|
+
*/
|
|
3279
|
+
404: ProblemDetails;
|
|
3280
|
+
/**
|
|
3281
|
+
* Internal server error
|
|
3282
|
+
*/
|
|
3283
|
+
500: ProblemDetails;
|
|
3284
|
+
};
|
|
3285
|
+
export type ListCompiledResultsError = ListCompiledResultsErrors[keyof ListCompiledResultsErrors];
|
|
3286
|
+
export type ListCompiledResultsResponses = {
|
|
3287
|
+
/**
|
|
3288
|
+
* Compiled results retrieved successfully
|
|
3289
|
+
*/
|
|
3290
|
+
200: ListCompiledResultsResponse;
|
|
3291
|
+
};
|
|
3292
|
+
export type ListCompiledResultsResponse2 = ListCompiledResultsResponses[keyof ListCompiledResultsResponses];
|
|
3293
|
+
export type QueueCompiledResultJobData = {
|
|
3294
|
+
body: QueueCompiledResultJobRequest;
|
|
3295
|
+
path: {
|
|
3296
|
+
/**
|
|
3297
|
+
* Unique identifier for the game
|
|
3298
|
+
*/
|
|
3299
|
+
gameId: string;
|
|
3300
|
+
};
|
|
3301
|
+
query?: never;
|
|
3302
|
+
url: '/api/games/{gameId}/compiled-results';
|
|
3303
|
+
};
|
|
3304
|
+
export type QueueCompiledResultJobErrors = {
|
|
3305
|
+
/**
|
|
3306
|
+
* Bad request - invalid input parameters
|
|
3307
|
+
*/
|
|
3308
|
+
400: ProblemDetails;
|
|
3309
|
+
/**
|
|
3310
|
+
* Unauthorized - authentication required
|
|
3311
|
+
*/
|
|
3312
|
+
401: ProblemDetails;
|
|
3313
|
+
/**
|
|
3314
|
+
* Internal server error
|
|
3315
|
+
*/
|
|
3316
|
+
500: ProblemDetails;
|
|
3317
|
+
};
|
|
3318
|
+
export type QueueCompiledResultJobError = QueueCompiledResultJobErrors[keyof QueueCompiledResultJobErrors];
|
|
3319
|
+
export type QueueCompiledResultJobResponses = {
|
|
3320
|
+
/**
|
|
3321
|
+
* Compile job accepted
|
|
3322
|
+
*/
|
|
3323
|
+
202: QueueCompiledResultJobResponse;
|
|
3324
|
+
};
|
|
3325
|
+
export type QueueCompiledResultJobResponse2 = QueueCompiledResultJobResponses[keyof QueueCompiledResultJobResponses];
|
|
3326
|
+
export type EnsureDevCompileData = {
|
|
3327
|
+
body: EnsureDevCompileRequest;
|
|
3328
|
+
path: {
|
|
3329
|
+
/**
|
|
3330
|
+
* Unique identifier for the game
|
|
3331
|
+
*/
|
|
3332
|
+
gameId: string;
|
|
3333
|
+
};
|
|
3334
|
+
query?: never;
|
|
3335
|
+
url: '/api/games/{gameId}/dev-compiles/ensure';
|
|
3336
|
+
};
|
|
3337
|
+
export type EnsureDevCompileErrors = {
|
|
3338
|
+
/**
|
|
3339
|
+
* Bad request - invalid input parameters
|
|
3340
|
+
*/
|
|
3341
|
+
400: ProblemDetails;
|
|
3342
|
+
/**
|
|
3343
|
+
* Unauthorized - authentication required
|
|
3344
|
+
*/
|
|
3345
|
+
401: ProblemDetails;
|
|
3346
|
+
/**
|
|
3347
|
+
* Resource not found
|
|
3348
|
+
*/
|
|
3349
|
+
404: ProblemDetails;
|
|
3350
|
+
/**
|
|
3351
|
+
* Conflict - version mismatch or resource state conflict
|
|
3352
|
+
*/
|
|
3353
|
+
409: ProblemDetails;
|
|
3354
|
+
/**
|
|
3355
|
+
* Internal server error
|
|
3356
|
+
*/
|
|
3357
|
+
500: ProblemDetails;
|
|
3358
|
+
};
|
|
3359
|
+
export type EnsureDevCompileError = EnsureDevCompileErrors[keyof EnsureDevCompileErrors];
|
|
3360
|
+
export type EnsureDevCompileResponses = {
|
|
3361
|
+
/**
|
|
3362
|
+
* Existing dev compile reused or cache miss reported
|
|
3363
|
+
*/
|
|
3364
|
+
200: EnsureDevCompileResponse;
|
|
3365
|
+
/**
|
|
3366
|
+
* Dev compile job accepted
|
|
3367
|
+
*/
|
|
3368
|
+
202: EnsureDevCompileResponse;
|
|
3369
|
+
};
|
|
3370
|
+
export type EnsureDevCompileResponse2 = EnsureDevCompileResponses[keyof EnsureDevCompileResponses];
|
|
3371
|
+
export type GetCompiledResultData = {
|
|
3372
|
+
body?: never;
|
|
3373
|
+
path: {
|
|
3374
|
+
/**
|
|
3375
|
+
* Unique identifier for the game
|
|
3376
|
+
*/
|
|
3377
|
+
gameId: string;
|
|
3378
|
+
/**
|
|
3379
|
+
* Unique identifier for the compiled result
|
|
3380
|
+
*/
|
|
3381
|
+
compiledResultId: string;
|
|
3382
|
+
};
|
|
3383
|
+
query?: never;
|
|
3384
|
+
url: '/api/games/{gameId}/compiled-results/{compiledResultId}';
|
|
3385
|
+
};
|
|
3386
|
+
export type GetCompiledResultErrors = {
|
|
3387
|
+
/**
|
|
3388
|
+
* Bad request - invalid input parameters
|
|
3389
|
+
*/
|
|
3390
|
+
400: ProblemDetails;
|
|
3391
|
+
/**
|
|
3392
|
+
* Unauthorized - authentication required
|
|
3393
|
+
*/
|
|
3394
|
+
401: ProblemDetails;
|
|
3395
|
+
/**
|
|
3396
|
+
* Resource not found
|
|
3397
|
+
*/
|
|
3398
|
+
404: ProblemDetails;
|
|
3399
|
+
/**
|
|
3400
|
+
* Internal server error
|
|
3401
|
+
*/
|
|
3402
|
+
500: ProblemDetails;
|
|
3403
|
+
};
|
|
3404
|
+
export type GetCompiledResultError = GetCompiledResultErrors[keyof GetCompiledResultErrors];
|
|
3405
|
+
export type GetCompiledResultResponses = {
|
|
3406
|
+
/**
|
|
3407
|
+
* Compiled result found
|
|
3408
|
+
*/
|
|
3409
|
+
200: CompiledResult;
|
|
3410
|
+
};
|
|
3411
|
+
export type GetCompiledResultResponse = GetCompiledResultResponses[keyof GetCompiledResultResponses];
|
|
3412
|
+
export type DownloadGameSourcesData = {
|
|
3413
|
+
body?: never;
|
|
3414
|
+
path: {
|
|
3415
|
+
/**
|
|
3416
|
+
* Unique identifier for the game
|
|
3417
|
+
*/
|
|
3418
|
+
gameId: string;
|
|
3419
|
+
};
|
|
3420
|
+
query?: never;
|
|
3421
|
+
url: '/api/games/{gameId}/download';
|
|
3422
|
+
};
|
|
3423
|
+
export type DownloadGameSourcesErrors = {
|
|
3424
|
+
/**
|
|
3425
|
+
* Unauthorized - authentication required
|
|
3426
|
+
*/
|
|
3427
|
+
401: ProblemDetails;
|
|
3428
|
+
/**
|
|
3429
|
+
* Resource not found
|
|
3430
|
+
*/
|
|
3431
|
+
404: ProblemDetails;
|
|
3432
|
+
/**
|
|
3433
|
+
* Internal server error
|
|
3434
|
+
*/
|
|
3435
|
+
500: ProblemDetails;
|
|
3436
|
+
};
|
|
3437
|
+
export type DownloadGameSourcesError = DownloadGameSourcesErrors[keyof DownloadGameSourcesErrors];
|
|
3438
|
+
export type DownloadGameSourcesResponses = {
|
|
3439
|
+
/**
|
|
3440
|
+
* ZIP archive containing source files
|
|
3441
|
+
*/
|
|
3442
|
+
200: Blob | File;
|
|
3443
|
+
};
|
|
3444
|
+
export type DownloadGameSourcesResponse = DownloadGameSourcesResponses[keyof DownloadGameSourcesResponses];
|
|
3445
|
+
export type GetGameSourcesData = {
|
|
3446
|
+
body?: never;
|
|
3447
|
+
path: {
|
|
3448
|
+
/**
|
|
3449
|
+
* Unique identifier for the game
|
|
3450
|
+
*/
|
|
3451
|
+
gameId: string;
|
|
3452
|
+
};
|
|
3453
|
+
query?: {
|
|
3454
|
+
/**
|
|
3455
|
+
* Optional authoring state ID to fetch sources from. If not provided, uses the current authoring head.
|
|
3456
|
+
*/
|
|
3457
|
+
authoringStateId?: string;
|
|
3458
|
+
};
|
|
3459
|
+
url: '/api/games/{gameId}/sources';
|
|
3460
|
+
};
|
|
3461
|
+
export type GetGameSourcesErrors = {
|
|
3462
|
+
/**
|
|
3463
|
+
* Unauthorized - authentication required
|
|
3464
|
+
*/
|
|
3465
|
+
401: ProblemDetails;
|
|
3466
|
+
/**
|
|
3467
|
+
* Resource not found
|
|
3468
|
+
*/
|
|
3469
|
+
404: ProblemDetails;
|
|
3470
|
+
/**
|
|
3471
|
+
* Internal server error
|
|
3472
|
+
*/
|
|
3473
|
+
500: ProblemDetails;
|
|
3474
|
+
};
|
|
3475
|
+
export type GetGameSourcesError = GetGameSourcesErrors[keyof GetGameSourcesErrors];
|
|
3476
|
+
export type GetGameSourcesResponses = {
|
|
3477
|
+
/**
|
|
3478
|
+
* Source files retrieved successfully
|
|
3479
|
+
*/
|
|
3480
|
+
200: GameSourcesResponse;
|
|
3481
|
+
};
|
|
3482
|
+
export type GetGameSourcesResponse = GetGameSourcesResponses[keyof GetGameSourcesResponses];
|
|
3483
|
+
export type CreateSourceRevisionData = {
|
|
3484
|
+
body: CreateSourceRevisionRequest;
|
|
3485
|
+
path: {
|
|
3486
|
+
/**
|
|
3487
|
+
* Unique identifier for the game
|
|
3488
|
+
*/
|
|
3489
|
+
gameId: string;
|
|
3490
|
+
};
|
|
3491
|
+
query?: never;
|
|
3492
|
+
url: '/api/games/{gameId}/source-revisions';
|
|
3493
|
+
};
|
|
3494
|
+
export type CreateSourceRevisionErrors = {
|
|
3495
|
+
/**
|
|
3496
|
+
* Bad request - invalid input parameters
|
|
3497
|
+
*/
|
|
3498
|
+
400: ProblemDetails;
|
|
3499
|
+
/**
|
|
3500
|
+
* Unauthorized - authentication required
|
|
3501
|
+
*/
|
|
3502
|
+
401: ProblemDetails;
|
|
3503
|
+
/**
|
|
3504
|
+
* Base source revision does not match the current head revision
|
|
3505
|
+
*/
|
|
3506
|
+
409: ProblemDetails;
|
|
3507
|
+
/**
|
|
3508
|
+
* Internal server error
|
|
3509
|
+
*/
|
|
3510
|
+
500: ProblemDetails;
|
|
3511
|
+
};
|
|
3512
|
+
export type CreateSourceRevisionError = CreateSourceRevisionErrors[keyof CreateSourceRevisionErrors];
|
|
3513
|
+
export type CreateSourceRevisionResponses = {
|
|
3514
|
+
/**
|
|
3515
|
+
* Source revision created
|
|
3516
|
+
*/
|
|
3517
|
+
201: SourceRevision;
|
|
3518
|
+
};
|
|
3519
|
+
export type CreateSourceRevisionResponse = CreateSourceRevisionResponses[keyof CreateSourceRevisionResponses];
|
|
3520
|
+
export type CreateSourceBlobUploadSessionData = {
|
|
3521
|
+
body: CreateSourceBlobUploadSessionRequest;
|
|
3522
|
+
path: {
|
|
3523
|
+
/**
|
|
3524
|
+
* Unique identifier for the game
|
|
3525
|
+
*/
|
|
3526
|
+
gameId: string;
|
|
3527
|
+
};
|
|
3528
|
+
query?: never;
|
|
3529
|
+
url: '/api/games/{gameId}/source-blobs/upload-sessions';
|
|
3530
|
+
};
|
|
3531
|
+
export type CreateSourceBlobUploadSessionErrors = {
|
|
3532
|
+
/**
|
|
3533
|
+
* Bad request - invalid input parameters
|
|
3534
|
+
*/
|
|
3535
|
+
400: ProblemDetails;
|
|
3536
|
+
/**
|
|
3537
|
+
* Unauthorized - authentication required
|
|
3538
|
+
*/
|
|
3539
|
+
401: ProblemDetails;
|
|
3540
|
+
/**
|
|
3541
|
+
* Internal server error
|
|
3542
|
+
*/
|
|
3543
|
+
500: ProblemDetails;
|
|
3544
|
+
};
|
|
3545
|
+
export type CreateSourceBlobUploadSessionError = CreateSourceBlobUploadSessionErrors[keyof CreateSourceBlobUploadSessionErrors];
|
|
3546
|
+
export type CreateSourceBlobUploadSessionResponses = {
|
|
3547
|
+
/**
|
|
3548
|
+
* Upload session created
|
|
3549
|
+
*/
|
|
3550
|
+
201: SourceBlobUploadSession;
|
|
3551
|
+
};
|
|
3552
|
+
export type CreateSourceBlobUploadSessionResponse = CreateSourceBlobUploadSessionResponses[keyof CreateSourceBlobUploadSessionResponses];
|
|
3553
|
+
export type GetAuthoringHeadData = {
|
|
3554
|
+
body?: never;
|
|
3555
|
+
path: {
|
|
3556
|
+
/**
|
|
3557
|
+
* Unique identifier for the game
|
|
3558
|
+
*/
|
|
3559
|
+
gameId: string;
|
|
3560
|
+
};
|
|
3561
|
+
query?: never;
|
|
3562
|
+
url: '/api/games/{gameId}/authoring/head';
|
|
3563
|
+
};
|
|
3564
|
+
export type GetAuthoringHeadErrors = {
|
|
3565
|
+
/**
|
|
3566
|
+
* Unauthorized - authentication required
|
|
3567
|
+
*/
|
|
3568
|
+
401: ProblemDetails;
|
|
3569
|
+
/**
|
|
3570
|
+
* Resource not found
|
|
3571
|
+
*/
|
|
3572
|
+
404: ProblemDetails;
|
|
3573
|
+
/**
|
|
3574
|
+
* Internal server error
|
|
3575
|
+
*/
|
|
3576
|
+
500: ProblemDetails;
|
|
3577
|
+
};
|
|
3578
|
+
export type GetAuthoringHeadError = GetAuthoringHeadErrors[keyof GetAuthoringHeadErrors];
|
|
3579
|
+
export type GetAuthoringHeadResponses = {
|
|
3580
|
+
/**
|
|
3581
|
+
* Current authoring head found
|
|
3582
|
+
*/
|
|
3583
|
+
200: AuthoringState;
|
|
3584
|
+
};
|
|
3585
|
+
export type GetAuthoringHeadResponse = GetAuthoringHeadResponses[keyof GetAuthoringHeadResponses];
|
|
3586
|
+
export type CreateAuthoringStateData = {
|
|
3587
|
+
body: CreateAuthoringStateRequest;
|
|
3588
|
+
path: {
|
|
3589
|
+
/**
|
|
3590
|
+
* Unique identifier for the game
|
|
3591
|
+
*/
|
|
3592
|
+
gameId: string;
|
|
3593
|
+
};
|
|
3594
|
+
query?: never;
|
|
3595
|
+
url: '/api/games/{gameId}/authoring/states';
|
|
3596
|
+
};
|
|
3597
|
+
export type CreateAuthoringStateErrors = {
|
|
3598
|
+
/**
|
|
3599
|
+
* Bad request - invalid input parameters
|
|
3600
|
+
*/
|
|
3601
|
+
400: ProblemDetails;
|
|
3602
|
+
/**
|
|
3603
|
+
* Unauthorized - authentication required
|
|
3604
|
+
*/
|
|
3605
|
+
401: ProblemDetails;
|
|
3606
|
+
/**
|
|
3607
|
+
* Resource not found
|
|
3608
|
+
*/
|
|
3609
|
+
404: ProblemDetails;
|
|
3610
|
+
/**
|
|
3611
|
+
* Base authoring state does not match the current head
|
|
3612
|
+
*/
|
|
3613
|
+
409: ProblemDetails;
|
|
3614
|
+
/**
|
|
3615
|
+
* Internal server error
|
|
3616
|
+
*/
|
|
3617
|
+
500: ProblemDetails;
|
|
3618
|
+
};
|
|
3619
|
+
export type CreateAuthoringStateError = CreateAuthoringStateErrors[keyof CreateAuthoringStateErrors];
|
|
3620
|
+
export type CreateAuthoringStateResponses = {
|
|
3621
|
+
/**
|
|
3622
|
+
* Authoring state created and promoted to head
|
|
3623
|
+
*/
|
|
3624
|
+
201: AuthoringState;
|
|
3625
|
+
};
|
|
3626
|
+
export type CreateAuthoringStateResponse = CreateAuthoringStateResponses[keyof CreateAuthoringStateResponses];
|
|
3627
|
+
export type GetGameScriptsData = {
|
|
3628
|
+
body?: never;
|
|
3629
|
+
path: {
|
|
3630
|
+
/**
|
|
3631
|
+
* Unique identifier for the game
|
|
3632
|
+
*/
|
|
3633
|
+
gameId: string;
|
|
3634
|
+
};
|
|
3635
|
+
query: {
|
|
3636
|
+
/**
|
|
3637
|
+
* The manifest ID to get compiled scripts for
|
|
3638
|
+
*/
|
|
3639
|
+
manifestId: string;
|
|
3640
|
+
};
|
|
3641
|
+
url: '/api/games/{gameId}/scripts';
|
|
3642
|
+
};
|
|
3643
|
+
export type GetGameScriptsErrors = {
|
|
3644
|
+
/**
|
|
3645
|
+
* Unauthorized - authentication required
|
|
3646
|
+
*/
|
|
3647
|
+
401: ProblemDetails;
|
|
3648
|
+
/**
|
|
3649
|
+
* Resource not found
|
|
3650
|
+
*/
|
|
3651
|
+
404: ProblemDetails;
|
|
3652
|
+
/**
|
|
3653
|
+
* Internal server error
|
|
3654
|
+
*/
|
|
3655
|
+
500: ProblemDetails;
|
|
3656
|
+
};
|
|
3657
|
+
export type GetGameScriptsError = GetGameScriptsErrors[keyof GetGameScriptsErrors];
|
|
3658
|
+
export type GetGameScriptsResponses = {
|
|
3659
|
+
/**
|
|
3660
|
+
* Game scripts retrieved successfully
|
|
3661
|
+
*/
|
|
3662
|
+
200: GameScriptsResponse;
|
|
3663
|
+
};
|
|
3664
|
+
export type GetGameScriptsResponse = GetGameScriptsResponses[keyof GetGameScriptsResponses];
|
|
3665
|
+
export type GetActiveJobData = {
|
|
3666
|
+
body?: never;
|
|
3667
|
+
path: {
|
|
3668
|
+
/**
|
|
3669
|
+
* Unique identifier for the game
|
|
3670
|
+
*/
|
|
3671
|
+
gameId: string;
|
|
3672
|
+
};
|
|
3673
|
+
query?: never;
|
|
3674
|
+
url: '/api/games/{gameId}/jobs/active';
|
|
3675
|
+
};
|
|
3676
|
+
export type GetActiveJobErrors = {
|
|
3677
|
+
/**
|
|
3678
|
+
* Bad request - invalid input parameters
|
|
3679
|
+
*/
|
|
3680
|
+
400: ProblemDetails;
|
|
3681
|
+
/**
|
|
3682
|
+
* Unauthorized - authentication required
|
|
3683
|
+
*/
|
|
3684
|
+
401: ProblemDetails;
|
|
3685
|
+
/**
|
|
3686
|
+
* Resource not found
|
|
3687
|
+
*/
|
|
3688
|
+
404: ProblemDetails;
|
|
3689
|
+
/**
|
|
3690
|
+
* Internal server error
|
|
3691
|
+
*/
|
|
3692
|
+
500: ProblemDetails;
|
|
3693
|
+
};
|
|
3694
|
+
export type GetActiveJobError = GetActiveJobErrors[keyof GetActiveJobErrors];
|
|
3695
|
+
export type GetActiveJobResponses = {
|
|
3696
|
+
/**
|
|
3697
|
+
* Active job status (null if no active job)
|
|
3698
|
+
*/
|
|
3699
|
+
200: ActiveJobResponse;
|
|
3700
|
+
};
|
|
3701
|
+
export type GetActiveJobResponse = GetActiveJobResponses[keyof GetActiveJobResponses];
|
|
3702
|
+
export type GetJobData = {
|
|
3703
|
+
body?: never;
|
|
3704
|
+
path: {
|
|
3705
|
+
/**
|
|
3706
|
+
* Unique identifier for any async job
|
|
3707
|
+
*/
|
|
3708
|
+
jobId: string;
|
|
3709
|
+
};
|
|
3710
|
+
query?: never;
|
|
3711
|
+
url: '/api/jobs/{jobId}';
|
|
3712
|
+
};
|
|
3713
|
+
export type GetJobErrors = {
|
|
3714
|
+
/**
|
|
3715
|
+
* Bad request - invalid input parameters
|
|
3716
|
+
*/
|
|
3717
|
+
400: ProblemDetails;
|
|
3718
|
+
/**
|
|
3719
|
+
* Unauthorized - authentication required
|
|
3720
|
+
*/
|
|
3721
|
+
401: ProblemDetails;
|
|
3722
|
+
/**
|
|
3723
|
+
* Forbidden - insufficient permissions
|
|
3724
|
+
*/
|
|
3725
|
+
403: ProblemDetails;
|
|
3726
|
+
/**
|
|
3727
|
+
* Resource not found
|
|
3728
|
+
*/
|
|
3729
|
+
404: ProblemDetails;
|
|
3730
|
+
/**
|
|
3731
|
+
* Internal server error
|
|
3732
|
+
*/
|
|
3733
|
+
500: ProblemDetails;
|
|
3734
|
+
};
|
|
3735
|
+
export type GetJobError = GetJobErrors[keyof GetJobErrors];
|
|
3736
|
+
export type GetJobResponses = {
|
|
3737
|
+
/**
|
|
3738
|
+
* Job details
|
|
3739
|
+
*/
|
|
3740
|
+
200: JobDetailResponse;
|
|
3741
|
+
};
|
|
3742
|
+
export type GetJobResponse = GetJobResponses[keyof GetJobResponses];
|
|
3743
|
+
export type SubscribeToJobEventsData = {
|
|
3744
|
+
body?: never;
|
|
3745
|
+
path: {
|
|
3746
|
+
/**
|
|
3747
|
+
* Unique identifier for any async job
|
|
3748
|
+
*/
|
|
3749
|
+
jobId: string;
|
|
3750
|
+
};
|
|
3751
|
+
query?: never;
|
|
3752
|
+
url: '/api/jobs/{jobId}/events';
|
|
3753
|
+
};
|
|
3754
|
+
export type SubscribeToJobEventsErrors = {
|
|
3755
|
+
/**
|
|
3756
|
+
* Bad request - invalid input parameters
|
|
3757
|
+
*/
|
|
3758
|
+
400: ProblemDetails;
|
|
3759
|
+
/**
|
|
3760
|
+
* Unauthorized - authentication required
|
|
3761
|
+
*/
|
|
3762
|
+
401: ProblemDetails;
|
|
3763
|
+
/**
|
|
3764
|
+
* Forbidden - insufficient permissions
|
|
3765
|
+
*/
|
|
3766
|
+
403: ProblemDetails;
|
|
3767
|
+
/**
|
|
3768
|
+
* Resource not found
|
|
3769
|
+
*/
|
|
3770
|
+
404: ProblemDetails;
|
|
3771
|
+
/**
|
|
3772
|
+
* Internal server error
|
|
3773
|
+
*/
|
|
3774
|
+
500: ProblemDetails;
|
|
3775
|
+
};
|
|
3776
|
+
export type SubscribeToJobEventsError = SubscribeToJobEventsErrors[keyof SubscribeToJobEventsErrors];
|
|
3777
|
+
export type SubscribeToJobEventsResponses = {
|
|
3778
|
+
/**
|
|
3779
|
+
* SSE connection established
|
|
3780
|
+
*/
|
|
3781
|
+
200: JobDetailResponse;
|
|
3782
|
+
};
|
|
3783
|
+
export type SubscribeToJobEventsResponse = SubscribeToJobEventsResponses[keyof SubscribeToJobEventsResponses];
|
|
3784
|
+
export type CreateGameRunData = {
|
|
3785
|
+
body: CreateGameRunRequest;
|
|
3786
|
+
path?: never;
|
|
3787
|
+
query?: never;
|
|
3788
|
+
url: '/api/runs';
|
|
3789
|
+
};
|
|
3790
|
+
export type CreateGameRunErrors = {
|
|
3791
|
+
/**
|
|
3792
|
+
* Bad request - invalid input parameters
|
|
3793
|
+
*/
|
|
3794
|
+
400: ProblemDetails;
|
|
3795
|
+
/**
|
|
3796
|
+
* Unauthorized - authentication required
|
|
3797
|
+
*/
|
|
3798
|
+
401: ProblemDetails;
|
|
3799
|
+
/**
|
|
3800
|
+
* Conflict - version mismatch or resource state conflict
|
|
3801
|
+
*/
|
|
3802
|
+
409: ProblemDetails;
|
|
3803
|
+
/**
|
|
3804
|
+
* Internal server error
|
|
3805
|
+
*/
|
|
3806
|
+
500: ProblemDetails;
|
|
3807
|
+
};
|
|
3808
|
+
export type CreateGameRunError = CreateGameRunErrors[keyof CreateGameRunErrors];
|
|
3809
|
+
export type CreateGameRunResponses = {
|
|
3810
|
+
/**
|
|
3811
|
+
* Game build run accepted
|
|
3812
|
+
*/
|
|
3813
|
+
202: CreateGameRunResponse;
|
|
3814
|
+
};
|
|
3815
|
+
export type CreateGameRunResponse2 = CreateGameRunResponses[keyof CreateGameRunResponses];
|
|
3816
|
+
export type CancelGameRunData = {
|
|
3817
|
+
body?: never;
|
|
3818
|
+
path: {
|
|
3819
|
+
jobId: string;
|
|
3820
|
+
};
|
|
3821
|
+
query?: never;
|
|
3822
|
+
url: '/api/runs/{jobId}/cancel';
|
|
3823
|
+
};
|
|
3824
|
+
export type CancelGameRunErrors = {
|
|
3825
|
+
/**
|
|
3826
|
+
* Unauthorized - authentication required
|
|
3827
|
+
*/
|
|
3828
|
+
401: ProblemDetails;
|
|
3829
|
+
/**
|
|
3830
|
+
* Forbidden - insufficient permissions
|
|
3831
|
+
*/
|
|
3832
|
+
403: ProblemDetails;
|
|
3833
|
+
/**
|
|
3834
|
+
* Resource not found
|
|
3835
|
+
*/
|
|
3836
|
+
404: ProblemDetails;
|
|
3837
|
+
/**
|
|
3838
|
+
* Internal server error
|
|
3839
|
+
*/
|
|
3840
|
+
500: ProblemDetails;
|
|
3841
|
+
};
|
|
3842
|
+
export type CancelGameRunError = CancelGameRunErrors[keyof CancelGameRunErrors];
|
|
3843
|
+
export type CancelGameRunResponses = {
|
|
3844
|
+
/**
|
|
3845
|
+
* Game build run cancellation accepted
|
|
3846
|
+
*/
|
|
3847
|
+
202: unknown;
|
|
3848
|
+
};
|
|
3849
|
+
export type ListGameRulesData = {
|
|
3850
|
+
body?: never;
|
|
3851
|
+
path: {
|
|
3852
|
+
/**
|
|
3853
|
+
* Unique identifier for the game
|
|
3854
|
+
*/
|
|
3855
|
+
gameId: string;
|
|
3856
|
+
};
|
|
3857
|
+
query?: {
|
|
3858
|
+
/**
|
|
3859
|
+
* Maximum number of rules to return (default: 10, max: 100)
|
|
3860
|
+
*/
|
|
3861
|
+
limit?: number;
|
|
3862
|
+
};
|
|
3863
|
+
url: '/api/games/{gameId}/rules';
|
|
3864
|
+
};
|
|
3865
|
+
export type ListGameRulesErrors = {
|
|
3866
|
+
/**
|
|
3867
|
+
* Bad request - invalid input parameters
|
|
3868
|
+
*/
|
|
3869
|
+
400: ProblemDetails;
|
|
3870
|
+
/**
|
|
3871
|
+
* Unauthorized - authentication required
|
|
3872
|
+
*/
|
|
3873
|
+
401: ProblemDetails;
|
|
3874
|
+
/**
|
|
3875
|
+
* Resource not found
|
|
3876
|
+
*/
|
|
3877
|
+
404: ProblemDetails;
|
|
3878
|
+
/**
|
|
3879
|
+
* Internal server error
|
|
3880
|
+
*/
|
|
3881
|
+
500: ProblemDetails;
|
|
3882
|
+
};
|
|
3883
|
+
export type ListGameRulesError = ListGameRulesErrors[keyof ListGameRulesErrors];
|
|
3884
|
+
export type ListGameRulesResponses = {
|
|
3885
|
+
/**
|
|
3886
|
+
* Game rules retrieved successfully
|
|
3887
|
+
*/
|
|
3888
|
+
200: ListGameRulesResponse;
|
|
3889
|
+
};
|
|
3890
|
+
export type ListGameRulesResponse2 = ListGameRulesResponses[keyof ListGameRulesResponses];
|
|
3891
|
+
export type CreateGameRuleData = {
|
|
3892
|
+
body: CreateGameRuleRequest;
|
|
3893
|
+
path: {
|
|
3894
|
+
/**
|
|
3895
|
+
* Unique identifier for the game
|
|
3896
|
+
*/
|
|
3897
|
+
gameId: string;
|
|
3898
|
+
};
|
|
3899
|
+
query?: never;
|
|
3900
|
+
url: '/api/games/{gameId}/rules';
|
|
3901
|
+
};
|
|
3902
|
+
export type CreateGameRuleErrors = {
|
|
3903
|
+
/**
|
|
3904
|
+
* Bad request - invalid input parameters
|
|
3905
|
+
*/
|
|
3906
|
+
400: ProblemDetails;
|
|
3907
|
+
/**
|
|
3908
|
+
* Unauthorized - authentication required
|
|
3909
|
+
*/
|
|
3910
|
+
401: ProblemDetails;
|
|
3911
|
+
/**
|
|
3912
|
+
* Resource not found
|
|
3913
|
+
*/
|
|
3914
|
+
404: ProblemDetails;
|
|
3915
|
+
/**
|
|
3916
|
+
* Internal server error
|
|
3917
|
+
*/
|
|
3918
|
+
500: ProblemDetails;
|
|
3919
|
+
};
|
|
3920
|
+
export type CreateGameRuleError = CreateGameRuleErrors[keyof CreateGameRuleErrors];
|
|
3921
|
+
export type CreateGameRuleResponses = {
|
|
3922
|
+
/**
|
|
3923
|
+
* Game rule created successfully
|
|
3924
|
+
*/
|
|
3925
|
+
201: CreateGameRuleResponse;
|
|
3926
|
+
};
|
|
3927
|
+
export type CreateGameRuleResponse2 = CreateGameRuleResponses[keyof CreateGameRuleResponses];
|
|
3928
|
+
export type GetLatestGameRuleData = {
|
|
3929
|
+
body?: never;
|
|
3930
|
+
path: {
|
|
3931
|
+
/**
|
|
3932
|
+
* Unique identifier for the game
|
|
3933
|
+
*/
|
|
3934
|
+
gameId: string;
|
|
3935
|
+
};
|
|
3936
|
+
query?: never;
|
|
3937
|
+
url: '/api/games/{gameId}/rules/latest';
|
|
3938
|
+
};
|
|
3939
|
+
export type GetLatestGameRuleErrors = {
|
|
3940
|
+
/**
|
|
3941
|
+
* Unauthorized - authentication required
|
|
3942
|
+
*/
|
|
3943
|
+
401: ProblemDetails;
|
|
3944
|
+
/**
|
|
3945
|
+
* Resource not found
|
|
3946
|
+
*/
|
|
3947
|
+
404: ProblemDetails;
|
|
3948
|
+
/**
|
|
3949
|
+
* Internal server error
|
|
3950
|
+
*/
|
|
3951
|
+
500: ProblemDetails;
|
|
3952
|
+
};
|
|
3953
|
+
export type GetLatestGameRuleError = GetLatestGameRuleErrors[keyof GetLatestGameRuleErrors];
|
|
3954
|
+
export type GetLatestGameRuleResponses = {
|
|
3955
|
+
/**
|
|
3956
|
+
* Latest game rule retrieved successfully
|
|
3957
|
+
*/
|
|
3958
|
+
200: GameRule;
|
|
3959
|
+
};
|
|
3960
|
+
export type GetLatestGameRuleResponse = GetLatestGameRuleResponses[keyof GetLatestGameRuleResponses];
|
|
3961
|
+
export type GetGameRuleData = {
|
|
3962
|
+
body?: never;
|
|
3963
|
+
path: {
|
|
3964
|
+
/**
|
|
3965
|
+
* Unique identifier for the game rule
|
|
3966
|
+
*/
|
|
3967
|
+
ruleId: string;
|
|
3968
|
+
};
|
|
3969
|
+
query?: never;
|
|
3970
|
+
url: '/api/rules/{ruleId}';
|
|
3971
|
+
};
|
|
3972
|
+
export type GetGameRuleErrors = {
|
|
3973
|
+
/**
|
|
3974
|
+
* Unauthorized - authentication required
|
|
3975
|
+
*/
|
|
3976
|
+
401: ProblemDetails;
|
|
3977
|
+
/**
|
|
3978
|
+
* Resource not found
|
|
3979
|
+
*/
|
|
3980
|
+
404: ProblemDetails;
|
|
3981
|
+
/**
|
|
3982
|
+
* Internal server error
|
|
3983
|
+
*/
|
|
3984
|
+
500: ProblemDetails;
|
|
3985
|
+
};
|
|
3986
|
+
export type GetGameRuleError = GetGameRuleErrors[keyof GetGameRuleErrors];
|
|
3987
|
+
export type GetGameRuleResponses = {
|
|
3988
|
+
/**
|
|
3989
|
+
* Game rule retrieved successfully
|
|
3990
|
+
*/
|
|
3991
|
+
200: GameRule;
|
|
3992
|
+
};
|
|
3993
|
+
export type GetGameRuleResponse = GetGameRuleResponses[keyof GetGameRuleResponses];
|
|
3994
|
+
export type CreateSessionData = {
|
|
3995
|
+
body: CreateSessionRequest;
|
|
3996
|
+
path: {
|
|
3997
|
+
/**
|
|
3998
|
+
* Unique identifier for the game
|
|
3999
|
+
*/
|
|
4000
|
+
gameId: string;
|
|
4001
|
+
};
|
|
4002
|
+
query?: never;
|
|
4003
|
+
url: '/api/games/{gameId}/sessions';
|
|
4004
|
+
};
|
|
4005
|
+
export type CreateSessionErrors = {
|
|
4006
|
+
/**
|
|
4007
|
+
* Bad request - invalid input parameters
|
|
4008
|
+
*/
|
|
4009
|
+
400: ProblemDetails;
|
|
4010
|
+
/**
|
|
4011
|
+
* Unauthorized - authentication required
|
|
4012
|
+
*/
|
|
4013
|
+
401: ProblemDetails;
|
|
4014
|
+
/**
|
|
4015
|
+
* Resource not found
|
|
4016
|
+
*/
|
|
4017
|
+
404: ProblemDetails;
|
|
4018
|
+
/**
|
|
4019
|
+
* Internal server error
|
|
4020
|
+
*/
|
|
4021
|
+
500: ProblemDetails;
|
|
4022
|
+
};
|
|
4023
|
+
export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors];
|
|
4024
|
+
export type CreateSessionResponses = {
|
|
4025
|
+
/**
|
|
4026
|
+
* Session created successfully
|
|
4027
|
+
*/
|
|
4028
|
+
201: CreateSessionResponse;
|
|
4029
|
+
};
|
|
4030
|
+
export type CreateSessionResponse2 = CreateSessionResponses[keyof CreateSessionResponses];
|
|
4031
|
+
export type CreateSessionFromReducerSnapshotData = {
|
|
4032
|
+
body: CreateSessionFromReducerSnapshotRequest;
|
|
4033
|
+
path: {
|
|
4034
|
+
/**
|
|
4035
|
+
* Unique identifier for the game
|
|
4036
|
+
*/
|
|
4037
|
+
gameId: string;
|
|
4038
|
+
};
|
|
4039
|
+
query?: never;
|
|
4040
|
+
url: '/api/games/{gameId}/sessions/from-reducer-snapshot';
|
|
4041
|
+
};
|
|
4042
|
+
export type CreateSessionFromReducerSnapshotErrors = {
|
|
4043
|
+
/**
|
|
4044
|
+
* Bad request - invalid input parameters
|
|
4045
|
+
*/
|
|
4046
|
+
400: ProblemDetails;
|
|
4047
|
+
/**
|
|
4048
|
+
* Unauthorized - authentication required
|
|
4049
|
+
*/
|
|
4050
|
+
401: ProblemDetails;
|
|
4051
|
+
/**
|
|
4052
|
+
* Forbidden - insufficient permissions
|
|
4053
|
+
*/
|
|
4054
|
+
403: ProblemDetails;
|
|
4055
|
+
/**
|
|
4056
|
+
* Resource not found
|
|
4057
|
+
*/
|
|
4058
|
+
404: ProblemDetails;
|
|
4059
|
+
/**
|
|
4060
|
+
* Internal server error
|
|
4061
|
+
*/
|
|
4062
|
+
500: ProblemDetails;
|
|
4063
|
+
};
|
|
4064
|
+
export type CreateSessionFromReducerSnapshotError = CreateSessionFromReducerSnapshotErrors[keyof CreateSessionFromReducerSnapshotErrors];
|
|
4065
|
+
export type CreateSessionFromReducerSnapshotResponses = {
|
|
4066
|
+
/**
|
|
4067
|
+
* Session materialized successfully
|
|
4068
|
+
*/
|
|
4069
|
+
200: HostSessionSnapshot;
|
|
4070
|
+
};
|
|
4071
|
+
export type CreateSessionFromReducerSnapshotResponse = CreateSessionFromReducerSnapshotResponses[keyof CreateSessionFromReducerSnapshotResponses];
|
|
4072
|
+
export type GetSessionByShortCodeData = {
|
|
4073
|
+
body?: never;
|
|
4074
|
+
path: {
|
|
4075
|
+
/**
|
|
4076
|
+
* Memorable short code for the session (e.g., 'swift-falcon-73')
|
|
4077
|
+
*/
|
|
4078
|
+
shortCode: string;
|
|
4079
|
+
};
|
|
4080
|
+
query?: {
|
|
4081
|
+
/**
|
|
4082
|
+
* Optional controlled player to include in the selected-perspective gameplay snapshot.
|
|
4083
|
+
*/
|
|
4084
|
+
playerId?: string;
|
|
4085
|
+
};
|
|
4086
|
+
url: '/api/sessions/code/{shortCode}';
|
|
4087
|
+
};
|
|
4088
|
+
export type GetSessionByShortCodeErrors = {
|
|
4089
|
+
/**
|
|
4090
|
+
* Unauthorized - authentication required
|
|
4091
|
+
*/
|
|
4092
|
+
401: ProblemDetails;
|
|
4093
|
+
/**
|
|
4094
|
+
* Resource not found
|
|
4095
|
+
*/
|
|
4096
|
+
404: ProblemDetails;
|
|
4097
|
+
/**
|
|
4098
|
+
* Internal server error
|
|
4099
|
+
*/
|
|
4100
|
+
500: ProblemDetails;
|
|
4101
|
+
};
|
|
4102
|
+
export type GetSessionByShortCodeError = GetSessionByShortCodeErrors[keyof GetSessionByShortCodeErrors];
|
|
4103
|
+
export type GetSessionByShortCodeResponses = {
|
|
4104
|
+
/**
|
|
4105
|
+
* Session found successfully
|
|
4106
|
+
*/
|
|
4107
|
+
200: HostSessionSnapshot;
|
|
4108
|
+
};
|
|
4109
|
+
export type GetSessionByShortCodeResponse = GetSessionByShortCodeResponses[keyof GetSessionByShortCodeResponses];
|
|
4110
|
+
export type GetSessionSnapshotData = {
|
|
4111
|
+
body?: never;
|
|
4112
|
+
path: {
|
|
4113
|
+
/**
|
|
4114
|
+
* Unique identifier for the game session
|
|
4115
|
+
*/
|
|
4116
|
+
sessionId: string;
|
|
4117
|
+
};
|
|
4118
|
+
query?: {
|
|
4119
|
+
/**
|
|
4120
|
+
* Optional controlled player to include in the selected-perspective gameplay snapshot.
|
|
4121
|
+
*/
|
|
4122
|
+
playerId?: string;
|
|
4123
|
+
};
|
|
4124
|
+
url: '/api/sessions/{sessionId}/snapshot';
|
|
4125
|
+
};
|
|
4126
|
+
export type GetSessionSnapshotErrors = {
|
|
4127
|
+
/**
|
|
4128
|
+
* Bad request - invalid input parameters
|
|
4129
|
+
*/
|
|
4130
|
+
400: ProblemDetails;
|
|
4131
|
+
/**
|
|
4132
|
+
* Unauthorized - authentication required
|
|
4133
|
+
*/
|
|
4134
|
+
401: ProblemDetails;
|
|
4135
|
+
/**
|
|
4136
|
+
* Forbidden - insufficient permissions
|
|
4137
|
+
*/
|
|
4138
|
+
403: ProblemDetails;
|
|
4139
|
+
/**
|
|
4140
|
+
* Resource not found
|
|
4141
|
+
*/
|
|
4142
|
+
404: ProblemDetails;
|
|
4143
|
+
/**
|
|
4144
|
+
* Internal server error
|
|
4145
|
+
*/
|
|
4146
|
+
500: ProblemDetails;
|
|
4147
|
+
};
|
|
4148
|
+
export type GetSessionSnapshotError = GetSessionSnapshotErrors[keyof GetSessionSnapshotErrors];
|
|
4149
|
+
export type GetSessionSnapshotResponses = {
|
|
4150
|
+
/**
|
|
4151
|
+
* Session snapshot retrieved successfully
|
|
4152
|
+
*/
|
|
4153
|
+
200: HostSessionSnapshot;
|
|
4154
|
+
};
|
|
4155
|
+
export type GetSessionSnapshotResponse = GetSessionSnapshotResponses[keyof GetSessionSnapshotResponses];
|
|
4156
|
+
export type SubscribeToSessionEventsData = {
|
|
4157
|
+
body?: never;
|
|
4158
|
+
path: {
|
|
4159
|
+
/**
|
|
4160
|
+
* Unique identifier for the game session
|
|
4161
|
+
*/
|
|
4162
|
+
sessionId: string;
|
|
4163
|
+
};
|
|
4164
|
+
query: {
|
|
4165
|
+
/**
|
|
4166
|
+
* Stable browser-tab identifier used to replace stale reconnects from the same tab.
|
|
4167
|
+
*/
|
|
4168
|
+
clientId: string;
|
|
4169
|
+
/**
|
|
4170
|
+
* Unique identifier for this specific connection attempt.
|
|
4171
|
+
*/
|
|
4172
|
+
connectionAttemptId: string;
|
|
4173
|
+
/**
|
|
4174
|
+
* Optional caller label for diagnostics, such as `play-page` or `session-play-panel`.
|
|
4175
|
+
*/
|
|
4176
|
+
clientSource?: string;
|
|
4177
|
+
/**
|
|
4178
|
+
* Optional controlled player for the selected gameplay perspective.
|
|
4179
|
+
*/
|
|
4180
|
+
playerId?: string;
|
|
4181
|
+
};
|
|
4182
|
+
url: '/api/sessions/{sessionId}/events';
|
|
4183
|
+
};
|
|
4184
|
+
export type SubscribeToSessionEventsErrors = {
|
|
4185
|
+
/**
|
|
4186
|
+
* Bad request - invalid input parameters
|
|
4187
|
+
*/
|
|
4188
|
+
400: ProblemDetails;
|
|
4189
|
+
/**
|
|
4190
|
+
* Unauthorized - authentication required
|
|
4191
|
+
*/
|
|
4192
|
+
401: ProblemDetails;
|
|
4193
|
+
/**
|
|
4194
|
+
* Forbidden - insufficient permissions
|
|
4195
|
+
*/
|
|
4196
|
+
403: ProblemDetails;
|
|
4197
|
+
/**
|
|
4198
|
+
* Resource not found
|
|
4199
|
+
*/
|
|
4200
|
+
404: ProblemDetails;
|
|
4201
|
+
/**
|
|
4202
|
+
* Too many requests or live connections
|
|
4203
|
+
*/
|
|
4204
|
+
429: ProblemDetails;
|
|
4205
|
+
/**
|
|
4206
|
+
* Internal server error
|
|
4207
|
+
*/
|
|
4208
|
+
500: ProblemDetails;
|
|
4209
|
+
};
|
|
4210
|
+
export type SubscribeToSessionEventsError = SubscribeToSessionEventsErrors[keyof SubscribeToSessionEventsErrors];
|
|
4211
|
+
export type SubscribeToSessionEventsResponses = {
|
|
4212
|
+
/**
|
|
4213
|
+
* Server-Sent Events stream. Each event contains a JSON-serialized HostSessionEvent.
|
|
4214
|
+
*
|
|
4215
|
+
*/
|
|
4216
|
+
200: HostSessionEvent;
|
|
4217
|
+
};
|
|
4218
|
+
export type SubscribeToSessionEventsResponse = SubscribeToSessionEventsResponses[keyof SubscribeToSessionEventsResponses];
|
|
4219
|
+
export type DisconnectSessionEventsData = {
|
|
4220
|
+
body?: never;
|
|
4221
|
+
path: {
|
|
4222
|
+
/**
|
|
4223
|
+
* Unique identifier for the game session
|
|
4224
|
+
*/
|
|
4225
|
+
sessionId: string;
|
|
4226
|
+
};
|
|
4227
|
+
query: {
|
|
4228
|
+
/**
|
|
4229
|
+
* Stable browser-tab identifier originally used to open the session event stream.
|
|
4230
|
+
*/
|
|
4231
|
+
clientId: string;
|
|
4232
|
+
/**
|
|
4233
|
+
* Unique identifier for the specific connection attempt being released.
|
|
4234
|
+
*/
|
|
4235
|
+
connectionAttemptId: string;
|
|
4236
|
+
/**
|
|
4237
|
+
* Optional selected player scope originally used to open the stream.
|
|
4238
|
+
*/
|
|
4239
|
+
playerId?: string;
|
|
4240
|
+
};
|
|
4241
|
+
url: '/api/sessions/{sessionId}/events/disconnect';
|
|
4242
|
+
};
|
|
4243
|
+
export type DisconnectSessionEventsErrors = {
|
|
4244
|
+
/**
|
|
4245
|
+
* Bad request - invalid input parameters
|
|
4246
|
+
*/
|
|
4247
|
+
400: ProblemDetails;
|
|
4248
|
+
/**
|
|
4249
|
+
* Unauthorized - authentication required
|
|
4250
|
+
*/
|
|
4251
|
+
401: ProblemDetails;
|
|
4252
|
+
/**
|
|
4253
|
+
* Forbidden - insufficient permissions
|
|
4254
|
+
*/
|
|
4255
|
+
403: ProblemDetails;
|
|
4256
|
+
/**
|
|
4257
|
+
* Resource not found
|
|
4258
|
+
*/
|
|
4259
|
+
404: ProblemDetails;
|
|
4260
|
+
};
|
|
4261
|
+
export type DisconnectSessionEventsError = DisconnectSessionEventsErrors[keyof DisconnectSessionEventsErrors];
|
|
4262
|
+
export type DisconnectSessionEventsResponses = {
|
|
4263
|
+
/**
|
|
4264
|
+
* Disconnect request accepted
|
|
4265
|
+
*/
|
|
4266
|
+
202: unknown;
|
|
4267
|
+
};
|
|
4268
|
+
export type SubscribeToGameLogsData = {
|
|
4269
|
+
body?: never;
|
|
4270
|
+
path: {
|
|
4271
|
+
/**
|
|
4272
|
+
* Unique identifier for the game session
|
|
4273
|
+
*/
|
|
4274
|
+
sessionId: string;
|
|
4275
|
+
};
|
|
4276
|
+
query?: {
|
|
4277
|
+
/**
|
|
4278
|
+
* Last log ID received (for reconnection/replay)
|
|
4279
|
+
*/
|
|
4280
|
+
lastLogId?: number;
|
|
4281
|
+
};
|
|
4282
|
+
url: '/api/sessions/{sessionId}/logs';
|
|
4283
|
+
};
|
|
4284
|
+
export type SubscribeToGameLogsErrors = {
|
|
4285
|
+
/**
|
|
4286
|
+
* Bad request - invalid input parameters
|
|
4287
|
+
*/
|
|
4288
|
+
400: ProblemDetails;
|
|
4289
|
+
/**
|
|
4290
|
+
* Unauthorized - authentication required
|
|
4291
|
+
*/
|
|
4292
|
+
401: ProblemDetails;
|
|
4293
|
+
/**
|
|
4294
|
+
* Forbidden - insufficient permissions
|
|
4295
|
+
*/
|
|
4296
|
+
403: ProblemDetails;
|
|
4297
|
+
/**
|
|
4298
|
+
* Resource not found
|
|
4299
|
+
*/
|
|
4300
|
+
404: ProblemDetails;
|
|
4301
|
+
/**
|
|
4302
|
+
* Internal server error
|
|
4303
|
+
*/
|
|
4304
|
+
500: ProblemDetails;
|
|
4305
|
+
};
|
|
4306
|
+
export type SubscribeToGameLogsError = SubscribeToGameLogsErrors[keyof SubscribeToGameLogsErrors];
|
|
4307
|
+
export type SubscribeToGameLogsResponses = {
|
|
4308
|
+
/**
|
|
4309
|
+
* SSE connection established
|
|
4310
|
+
*/
|
|
4311
|
+
200: LogMessageDto;
|
|
4312
|
+
};
|
|
4313
|
+
export type SubscribeToGameLogsResponse = SubscribeToGameLogsResponses[keyof SubscribeToGameLogsResponses];
|
|
4314
|
+
export type StartGameData = {
|
|
4315
|
+
body?: never;
|
|
4316
|
+
path: {
|
|
4317
|
+
/**
|
|
4318
|
+
* Unique identifier for the game session
|
|
4319
|
+
*/
|
|
4320
|
+
sessionId: string;
|
|
4321
|
+
};
|
|
4322
|
+
query?: never;
|
|
4323
|
+
url: '/api/sessions/{sessionId}/start';
|
|
4324
|
+
};
|
|
4325
|
+
export type StartGameErrors = {
|
|
4326
|
+
/**
|
|
4327
|
+
* Bad request - invalid input parameters
|
|
4328
|
+
*/
|
|
4329
|
+
400: ProblemDetails;
|
|
4330
|
+
/**
|
|
4331
|
+
* Unauthorized - authentication required
|
|
4332
|
+
*/
|
|
4333
|
+
401: ProblemDetails;
|
|
4334
|
+
/**
|
|
4335
|
+
* Forbidden - insufficient permissions
|
|
4336
|
+
*/
|
|
4337
|
+
403: ProblemDetails;
|
|
4338
|
+
/**
|
|
4339
|
+
* Resource not found
|
|
4340
|
+
*/
|
|
4341
|
+
404: ProblemDetails;
|
|
4342
|
+
/**
|
|
4343
|
+
* Internal server error
|
|
4344
|
+
*/
|
|
4345
|
+
500: ProblemDetails;
|
|
4346
|
+
};
|
|
4347
|
+
export type StartGameError = StartGameErrors[keyof StartGameErrors];
|
|
4348
|
+
export type StartGameResponses = {
|
|
4349
|
+
/**
|
|
4350
|
+
* Game started successfully
|
|
4351
|
+
*/
|
|
4352
|
+
200: HostSessionSnapshot;
|
|
4353
|
+
};
|
|
4354
|
+
export type StartGameResponse = StartGameResponses[keyof StartGameResponses];
|
|
4355
|
+
export type ListPlayerActionsData = {
|
|
4356
|
+
body?: never;
|
|
4357
|
+
path: {
|
|
4358
|
+
/**
|
|
4359
|
+
* Unique identifier for the game session
|
|
4360
|
+
*/
|
|
4361
|
+
sessionId: string;
|
|
4362
|
+
/**
|
|
4363
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4364
|
+
*/
|
|
4365
|
+
playerId: string;
|
|
4366
|
+
};
|
|
4367
|
+
query?: never;
|
|
4368
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions';
|
|
4369
|
+
};
|
|
4370
|
+
export type ListPlayerActionsErrors = {
|
|
4371
|
+
/**
|
|
4372
|
+
* Bad request - invalid input parameters
|
|
4373
|
+
*/
|
|
4374
|
+
400: ProblemDetails;
|
|
4375
|
+
/**
|
|
4376
|
+
* Unauthorized - authentication required
|
|
4377
|
+
*/
|
|
4378
|
+
401: ProblemDetails;
|
|
4379
|
+
/**
|
|
4380
|
+
* Forbidden - insufficient permissions
|
|
4381
|
+
*/
|
|
4382
|
+
403: ProblemDetails;
|
|
4383
|
+
/**
|
|
4384
|
+
* Resource not found
|
|
4385
|
+
*/
|
|
4386
|
+
404: ProblemDetails;
|
|
4387
|
+
/**
|
|
4388
|
+
* Internal server error
|
|
4389
|
+
*/
|
|
4390
|
+
500: ProblemDetails;
|
|
4391
|
+
};
|
|
4392
|
+
export type ListPlayerActionsError = ListPlayerActionsErrors[keyof ListPlayerActionsErrors];
|
|
4393
|
+
export type ListPlayerActionsResponses = {
|
|
4394
|
+
/**
|
|
4395
|
+
* Current actions returned successfully
|
|
4396
|
+
*/
|
|
4397
|
+
200: PlayerActionsResponse;
|
|
4398
|
+
};
|
|
4399
|
+
export type ListPlayerActionsResponse = ListPlayerActionsResponses[keyof ListPlayerActionsResponses];
|
|
4400
|
+
export type DescribePlayerActionData = {
|
|
4401
|
+
body?: never;
|
|
4402
|
+
path: {
|
|
4403
|
+
/**
|
|
4404
|
+
* Unique identifier for the game session
|
|
4405
|
+
*/
|
|
4406
|
+
sessionId: string;
|
|
4407
|
+
/**
|
|
4408
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4409
|
+
*/
|
|
4410
|
+
playerId: string;
|
|
4411
|
+
interactionId: string;
|
|
4412
|
+
};
|
|
4413
|
+
query?: never;
|
|
4414
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}';
|
|
4415
|
+
};
|
|
4416
|
+
export type DescribePlayerActionErrors = {
|
|
4417
|
+
/**
|
|
4418
|
+
* Bad request - invalid input parameters
|
|
4419
|
+
*/
|
|
4420
|
+
400: ProblemDetails;
|
|
4421
|
+
/**
|
|
4422
|
+
* Unauthorized - authentication required
|
|
4423
|
+
*/
|
|
4424
|
+
401: ProblemDetails;
|
|
4425
|
+
/**
|
|
4426
|
+
* Forbidden - insufficient permissions
|
|
4427
|
+
*/
|
|
4428
|
+
403: ProblemDetails;
|
|
4429
|
+
/**
|
|
4430
|
+
* Resource not found
|
|
4431
|
+
*/
|
|
4432
|
+
404: ProblemDetails;
|
|
4433
|
+
/**
|
|
4434
|
+
* Internal server error
|
|
4435
|
+
*/
|
|
4436
|
+
500: ProblemDetails;
|
|
4437
|
+
};
|
|
4438
|
+
export type DescribePlayerActionError = DescribePlayerActionErrors[keyof DescribePlayerActionErrors];
|
|
4439
|
+
export type DescribePlayerActionResponses = {
|
|
4440
|
+
/**
|
|
4441
|
+
* Action descriptor returned successfully
|
|
4442
|
+
*/
|
|
4443
|
+
200: PlayerActionResponse;
|
|
4444
|
+
};
|
|
4445
|
+
export type DescribePlayerActionResponse = DescribePlayerActionResponses[keyof DescribePlayerActionResponses];
|
|
4446
|
+
export type GetPlayerActionTargetsData = {
|
|
4447
|
+
body?: never;
|
|
4448
|
+
path: {
|
|
4449
|
+
/**
|
|
4450
|
+
* Unique identifier for the game session
|
|
4451
|
+
*/
|
|
4452
|
+
sessionId: string;
|
|
4453
|
+
/**
|
|
4454
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4455
|
+
*/
|
|
4456
|
+
playerId: string;
|
|
4457
|
+
interactionId: string;
|
|
4458
|
+
inputKey: string;
|
|
4459
|
+
};
|
|
4460
|
+
query?: never;
|
|
4461
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/targets/{inputKey}';
|
|
4462
|
+
};
|
|
4463
|
+
export type GetPlayerActionTargetsErrors = {
|
|
4464
|
+
/**
|
|
4465
|
+
* Bad request - invalid input parameters
|
|
4466
|
+
*/
|
|
4467
|
+
400: ProblemDetails;
|
|
4468
|
+
/**
|
|
4469
|
+
* Unauthorized - authentication required
|
|
4470
|
+
*/
|
|
4471
|
+
401: ProblemDetails;
|
|
4472
|
+
/**
|
|
4473
|
+
* Forbidden - insufficient permissions
|
|
4474
|
+
*/
|
|
4475
|
+
403: ProblemDetails;
|
|
4476
|
+
/**
|
|
4477
|
+
* Resource not found
|
|
4478
|
+
*/
|
|
4479
|
+
404: ProblemDetails;
|
|
4480
|
+
/**
|
|
4481
|
+
* Internal server error
|
|
4482
|
+
*/
|
|
4483
|
+
500: ProblemDetails;
|
|
4484
|
+
};
|
|
4485
|
+
export type GetPlayerActionTargetsError = GetPlayerActionTargetsErrors[keyof GetPlayerActionTargetsErrors];
|
|
4486
|
+
export type GetPlayerActionTargetsResponses = {
|
|
4487
|
+
/**
|
|
4488
|
+
* Input domain returned successfully
|
|
4489
|
+
*/
|
|
4490
|
+
200: PlayerActionTargetsResponse;
|
|
4491
|
+
};
|
|
4492
|
+
export type GetPlayerActionTargetsResponse = GetPlayerActionTargetsResponses[keyof GetPlayerActionTargetsResponses];
|
|
4493
|
+
export type ValidatePlayerActionData = {
|
|
4494
|
+
body: PlayerActionRequest;
|
|
4495
|
+
path: {
|
|
4496
|
+
/**
|
|
4497
|
+
* Unique identifier for the game session
|
|
4498
|
+
*/
|
|
4499
|
+
sessionId: string;
|
|
4500
|
+
/**
|
|
4501
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4502
|
+
*/
|
|
4503
|
+
playerId: string;
|
|
4504
|
+
interactionId: string;
|
|
4505
|
+
};
|
|
4506
|
+
query?: never;
|
|
4507
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/validate';
|
|
4508
|
+
};
|
|
4509
|
+
export type ValidatePlayerActionErrors = {
|
|
4510
|
+
/**
|
|
4511
|
+
* Bad request - invalid input parameters
|
|
4512
|
+
*/
|
|
4513
|
+
400: ProblemDetails;
|
|
4514
|
+
/**
|
|
4515
|
+
* Unauthorized - authentication required
|
|
4516
|
+
*/
|
|
4517
|
+
401: ProblemDetails;
|
|
4518
|
+
/**
|
|
4519
|
+
* Forbidden - insufficient permissions
|
|
4520
|
+
*/
|
|
4521
|
+
403: ProblemDetails;
|
|
4522
|
+
/**
|
|
4523
|
+
* Resource not found
|
|
4524
|
+
*/
|
|
4525
|
+
404: ProblemDetails;
|
|
4526
|
+
/**
|
|
4527
|
+
* Conflict - version mismatch or resource state conflict
|
|
4528
|
+
*/
|
|
4529
|
+
409: ProblemDetails;
|
|
4530
|
+
/**
|
|
4531
|
+
* Internal server error
|
|
4532
|
+
*/
|
|
4533
|
+
500: ProblemDetails;
|
|
4534
|
+
};
|
|
4535
|
+
export type ValidatePlayerActionError = ValidatePlayerActionErrors[keyof ValidatePlayerActionErrors];
|
|
4536
|
+
export type ValidatePlayerActionResponses = {
|
|
4537
|
+
/**
|
|
4538
|
+
* Validation result returned successfully
|
|
4539
|
+
*/
|
|
4540
|
+
200: PlayerActionValidateResponse;
|
|
4541
|
+
};
|
|
4542
|
+
export type ValidatePlayerActionResponse = ValidatePlayerActionResponses[keyof ValidatePlayerActionResponses];
|
|
4543
|
+
export type SubmitPlayerActionData = {
|
|
4544
|
+
body: PlayerActionRequest;
|
|
4545
|
+
path: {
|
|
4546
|
+
/**
|
|
4547
|
+
* Unique identifier for the game session
|
|
4548
|
+
*/
|
|
4549
|
+
sessionId: string;
|
|
4550
|
+
/**
|
|
4551
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4552
|
+
*/
|
|
4553
|
+
playerId: string;
|
|
4554
|
+
interactionId: string;
|
|
4555
|
+
};
|
|
4556
|
+
query?: never;
|
|
4557
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/submit';
|
|
4558
|
+
};
|
|
4559
|
+
export type SubmitPlayerActionErrors = {
|
|
4560
|
+
/**
|
|
4561
|
+
* Bad request - invalid input parameters
|
|
4562
|
+
*/
|
|
4563
|
+
400: ProblemDetails;
|
|
4564
|
+
/**
|
|
4565
|
+
* Unauthorized - authentication required
|
|
4566
|
+
*/
|
|
4567
|
+
401: ProblemDetails;
|
|
4568
|
+
/**
|
|
4569
|
+
* Forbidden - insufficient permissions
|
|
4570
|
+
*/
|
|
4571
|
+
403: ProblemDetails;
|
|
4572
|
+
/**
|
|
4573
|
+
* Resource not found
|
|
4574
|
+
*/
|
|
4575
|
+
404: ProblemDetails;
|
|
4576
|
+
/**
|
|
4577
|
+
* Conflict - version mismatch or resource state conflict
|
|
4578
|
+
*/
|
|
4579
|
+
409: ProblemDetails;
|
|
4580
|
+
/**
|
|
4581
|
+
* Internal server error
|
|
4582
|
+
*/
|
|
4583
|
+
500: ProblemDetails;
|
|
4584
|
+
};
|
|
4585
|
+
export type SubmitPlayerActionError = SubmitPlayerActionErrors[keyof SubmitPlayerActionErrors];
|
|
4586
|
+
export type SubmitPlayerActionResponses = {
|
|
4587
|
+
/**
|
|
4588
|
+
* Submission result returned successfully
|
|
4589
|
+
*/
|
|
4590
|
+
200: HostActionSubmitResponse;
|
|
4591
|
+
};
|
|
4592
|
+
export type SubmitPlayerActionResponse = SubmitPlayerActionResponses[keyof SubmitPlayerActionResponses];
|
|
4593
|
+
export type AddSeatData = {
|
|
4594
|
+
body?: never;
|
|
4595
|
+
path: {
|
|
4596
|
+
/**
|
|
4597
|
+
* Unique identifier for the game session
|
|
4598
|
+
*/
|
|
4599
|
+
sessionId: string;
|
|
4600
|
+
};
|
|
4601
|
+
query?: never;
|
|
4602
|
+
url: '/api/sessions/{sessionId}/seats';
|
|
4603
|
+
};
|
|
4604
|
+
export type AddSeatErrors = {
|
|
4605
|
+
/**
|
|
4606
|
+
* Bad request - invalid input parameters
|
|
4607
|
+
*/
|
|
4608
|
+
400: ProblemDetails;
|
|
4609
|
+
/**
|
|
4610
|
+
* Unauthorized - authentication required
|
|
4611
|
+
*/
|
|
4612
|
+
401: ProblemDetails;
|
|
4613
|
+
/**
|
|
4614
|
+
* Forbidden - insufficient permissions
|
|
4615
|
+
*/
|
|
4616
|
+
403: ProblemDetails;
|
|
4617
|
+
/**
|
|
4618
|
+
* Resource not found
|
|
4619
|
+
*/
|
|
4620
|
+
404: ProblemDetails;
|
|
4621
|
+
/**
|
|
4622
|
+
* Internal server error
|
|
4623
|
+
*/
|
|
4624
|
+
500: ProblemDetails;
|
|
4625
|
+
};
|
|
4626
|
+
export type AddSeatError = AddSeatErrors[keyof AddSeatErrors];
|
|
4627
|
+
export type AddSeatResponses = {
|
|
4628
|
+
/**
|
|
4629
|
+
* Seat added successfully
|
|
4630
|
+
*/
|
|
4631
|
+
201: SeatAssignment;
|
|
4632
|
+
};
|
|
4633
|
+
export type AddSeatResponse = AddSeatResponses[keyof AddSeatResponses];
|
|
4634
|
+
export type RemoveSeatData = {
|
|
4635
|
+
body?: never;
|
|
4636
|
+
path: {
|
|
4637
|
+
/**
|
|
4638
|
+
* Unique identifier for the game session
|
|
4639
|
+
*/
|
|
4640
|
+
sessionId: string;
|
|
4641
|
+
/**
|
|
4642
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4643
|
+
*/
|
|
4644
|
+
playerId: string;
|
|
4645
|
+
};
|
|
4646
|
+
query?: never;
|
|
4647
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}';
|
|
4648
|
+
};
|
|
4649
|
+
export type RemoveSeatErrors = {
|
|
4650
|
+
/**
|
|
4651
|
+
* Bad request - invalid input parameters
|
|
4652
|
+
*/
|
|
4653
|
+
400: ProblemDetails;
|
|
4654
|
+
/**
|
|
4655
|
+
* Unauthorized - authentication required
|
|
4656
|
+
*/
|
|
4657
|
+
401: ProblemDetails;
|
|
4658
|
+
/**
|
|
4659
|
+
* Forbidden - insufficient permissions
|
|
4660
|
+
*/
|
|
4661
|
+
403: ProblemDetails;
|
|
4662
|
+
/**
|
|
4663
|
+
* Resource not found
|
|
4664
|
+
*/
|
|
4665
|
+
404: ProblemDetails;
|
|
4666
|
+
/**
|
|
4667
|
+
* Internal server error
|
|
4668
|
+
*/
|
|
4669
|
+
500: ProblemDetails;
|
|
4670
|
+
};
|
|
4671
|
+
export type RemoveSeatError = RemoveSeatErrors[keyof RemoveSeatErrors];
|
|
4672
|
+
export type RemoveSeatResponses = {
|
|
4673
|
+
/**
|
|
4674
|
+
* Seat removed successfully
|
|
4675
|
+
*/
|
|
4676
|
+
204: void;
|
|
4677
|
+
};
|
|
4678
|
+
export type RemoveSeatResponse = RemoveSeatResponses[keyof RemoveSeatResponses];
|
|
4679
|
+
export type UpdateSeatData = {
|
|
4680
|
+
body: UpdateSeatRequest;
|
|
4681
|
+
path: {
|
|
4682
|
+
/**
|
|
4683
|
+
* Unique identifier for the game session
|
|
4684
|
+
*/
|
|
4685
|
+
sessionId: string;
|
|
4686
|
+
/**
|
|
4687
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4688
|
+
*/
|
|
4689
|
+
playerId: string;
|
|
4690
|
+
};
|
|
4691
|
+
query?: never;
|
|
4692
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}';
|
|
4693
|
+
};
|
|
4694
|
+
export type UpdateSeatErrors = {
|
|
4695
|
+
/**
|
|
4696
|
+
* Bad request - invalid input parameters
|
|
4697
|
+
*/
|
|
4698
|
+
400: ProblemDetails;
|
|
4699
|
+
/**
|
|
4700
|
+
* Unauthorized - authentication required
|
|
4701
|
+
*/
|
|
4702
|
+
401: ProblemDetails;
|
|
4703
|
+
/**
|
|
4704
|
+
* Forbidden - insufficient permissions
|
|
4705
|
+
*/
|
|
4706
|
+
403: ProblemDetails;
|
|
4707
|
+
/**
|
|
4708
|
+
* Resource not found
|
|
4709
|
+
*/
|
|
4710
|
+
404: ProblemDetails;
|
|
4711
|
+
/**
|
|
4712
|
+
* Internal server error
|
|
4713
|
+
*/
|
|
4714
|
+
500: ProblemDetails;
|
|
4715
|
+
};
|
|
4716
|
+
export type UpdateSeatError = UpdateSeatErrors[keyof UpdateSeatErrors];
|
|
4717
|
+
export type UpdateSeatResponses = {
|
|
4718
|
+
/**
|
|
4719
|
+
* Seat updated successfully
|
|
4720
|
+
*/
|
|
4721
|
+
200: SeatAssignment;
|
|
4722
|
+
};
|
|
4723
|
+
export type UpdateSeatResponse = UpdateSeatResponses[keyof UpdateSeatResponses];
|
|
4724
|
+
export type AssignSeatData = {
|
|
4725
|
+
body?: never;
|
|
4726
|
+
path: {
|
|
4727
|
+
/**
|
|
4728
|
+
* Unique identifier for the game session
|
|
4729
|
+
*/
|
|
4730
|
+
sessionId: string;
|
|
4731
|
+
/**
|
|
4732
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4733
|
+
*/
|
|
4734
|
+
playerId: string;
|
|
4735
|
+
};
|
|
4736
|
+
query?: never;
|
|
4737
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}/assign';
|
|
4738
|
+
};
|
|
4739
|
+
export type AssignSeatErrors = {
|
|
4740
|
+
/**
|
|
4741
|
+
* Bad request - invalid input parameters
|
|
4742
|
+
*/
|
|
4743
|
+
400: ProblemDetails;
|
|
4744
|
+
/**
|
|
4745
|
+
* Unauthorized - authentication required
|
|
4746
|
+
*/
|
|
4747
|
+
401: ProblemDetails;
|
|
4748
|
+
/**
|
|
4749
|
+
* Resource not found
|
|
4750
|
+
*/
|
|
4751
|
+
404: ProblemDetails;
|
|
4752
|
+
/**
|
|
4753
|
+
* Internal server error
|
|
4754
|
+
*/
|
|
4755
|
+
500: ProblemDetails;
|
|
4756
|
+
};
|
|
4757
|
+
export type AssignSeatError = AssignSeatErrors[keyof AssignSeatErrors];
|
|
4758
|
+
export type AssignSeatResponses = {
|
|
4759
|
+
/**
|
|
4760
|
+
* Seat assigned successfully
|
|
4761
|
+
*/
|
|
4762
|
+
204: void;
|
|
4763
|
+
};
|
|
4764
|
+
export type AssignSeatResponse = AssignSeatResponses[keyof AssignSeatResponses];
|
|
4765
|
+
export type RestoreHistoryData = {
|
|
4766
|
+
body: RestoreHistoryRequest;
|
|
4767
|
+
path: {
|
|
4768
|
+
/**
|
|
4769
|
+
* Unique identifier for the game session
|
|
4770
|
+
*/
|
|
4771
|
+
sessionId: string;
|
|
4772
|
+
};
|
|
4773
|
+
query?: never;
|
|
4774
|
+
url: '/api/sessions/{sessionId}/history/restore';
|
|
4775
|
+
};
|
|
4776
|
+
export type RestoreHistoryErrors = {
|
|
4777
|
+
/**
|
|
4778
|
+
* Bad request - invalid input parameters
|
|
4779
|
+
*/
|
|
4780
|
+
400: ProblemDetails;
|
|
4781
|
+
/**
|
|
4782
|
+
* Unauthorized - authentication required
|
|
4783
|
+
*/
|
|
4784
|
+
401: ProblemDetails;
|
|
4785
|
+
/**
|
|
4786
|
+
* Forbidden - insufficient permissions
|
|
4787
|
+
*/
|
|
4788
|
+
403: ProblemDetails;
|
|
4789
|
+
/**
|
|
4790
|
+
* Resource not found
|
|
4791
|
+
*/
|
|
4792
|
+
404: ProblemDetails;
|
|
4793
|
+
/**
|
|
4794
|
+
* Internal server error
|
|
4795
|
+
*/
|
|
4796
|
+
500: ProblemDetails;
|
|
4797
|
+
};
|
|
4798
|
+
export type RestoreHistoryError = RestoreHistoryErrors[keyof RestoreHistoryErrors];
|
|
4799
|
+
export type RestoreHistoryResponses = {
|
|
4800
|
+
/**
|
|
4801
|
+
* Game state restored successfully
|
|
4802
|
+
*/
|
|
4803
|
+
200: RestoreHistoryResponse;
|
|
4804
|
+
};
|
|
4805
|
+
export type RestoreHistoryResponse2 = RestoreHistoryResponses[keyof RestoreHistoryResponses];
|
|
4806
|
+
export type UnassignSeatData = {
|
|
4807
|
+
body?: never;
|
|
4808
|
+
path: {
|
|
4809
|
+
/**
|
|
4810
|
+
* Unique identifier for the game session
|
|
4811
|
+
*/
|
|
4812
|
+
sessionId: string;
|
|
4813
|
+
/**
|
|
4814
|
+
* Unique identifier for the player (e.g., 'player-1')
|
|
4815
|
+
*/
|
|
4816
|
+
playerId: string;
|
|
4817
|
+
};
|
|
4818
|
+
query?: never;
|
|
4819
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}/unassign';
|
|
4820
|
+
};
|
|
4821
|
+
export type UnassignSeatErrors = {
|
|
4822
|
+
/**
|
|
4823
|
+
* Bad request - invalid input parameters
|
|
4824
|
+
*/
|
|
4825
|
+
400: ProblemDetails;
|
|
4826
|
+
/**
|
|
4827
|
+
* Unauthorized - authentication required
|
|
4828
|
+
*/
|
|
4829
|
+
401: ProblemDetails;
|
|
4830
|
+
/**
|
|
4831
|
+
* Forbidden - insufficient permissions
|
|
4832
|
+
*/
|
|
4833
|
+
403: ProblemDetails;
|
|
4834
|
+
/**
|
|
4835
|
+
* Resource not found
|
|
4836
|
+
*/
|
|
4837
|
+
404: ProblemDetails;
|
|
4838
|
+
/**
|
|
4839
|
+
* Internal server error
|
|
4840
|
+
*/
|
|
4841
|
+
500: ProblemDetails;
|
|
4842
|
+
};
|
|
4843
|
+
export type UnassignSeatError = UnassignSeatErrors[keyof UnassignSeatErrors];
|
|
4844
|
+
export type UnassignSeatResponses = {
|
|
4845
|
+
/**
|
|
4846
|
+
* Seat unassigned successfully
|
|
4847
|
+
*/
|
|
4848
|
+
204: void;
|
|
4849
|
+
};
|
|
4850
|
+
export type UnassignSeatResponse = UnassignSeatResponses[keyof UnassignSeatResponses];
|
|
4851
|
+
export type FetchUiBundleData = {
|
|
4852
|
+
body?: never;
|
|
4853
|
+
path?: never;
|
|
4854
|
+
query?: {
|
|
4855
|
+
/**
|
|
4856
|
+
* ID of the game to fetch the UI bundle for (user-compiled sessions)
|
|
4857
|
+
*/
|
|
4858
|
+
gameId?: string;
|
|
4859
|
+
/**
|
|
4860
|
+
* When set with demo auth headers, fetch the UI bundle for that demo session's catalog revision
|
|
4861
|
+
*/
|
|
4862
|
+
sessionId?: string;
|
|
4863
|
+
};
|
|
4864
|
+
url: '/api/ui-bundles/fetch';
|
|
4865
|
+
};
|
|
4866
|
+
export type FetchUiBundleErrors = {
|
|
4867
|
+
/**
|
|
4868
|
+
* Bad request - invalid input parameters
|
|
4869
|
+
*/
|
|
4870
|
+
400: ProblemDetails;
|
|
4871
|
+
/**
|
|
4872
|
+
* Unauthorized - authentication required
|
|
4873
|
+
*/
|
|
4874
|
+
401: ProblemDetails;
|
|
4875
|
+
/**
|
|
4876
|
+
* Resource not found
|
|
4877
|
+
*/
|
|
4878
|
+
404: ProblemDetails;
|
|
4879
|
+
/**
|
|
4880
|
+
* Internal server error
|
|
4881
|
+
*/
|
|
4882
|
+
500: ProblemDetails;
|
|
4883
|
+
};
|
|
4884
|
+
export type FetchUiBundleError = FetchUiBundleErrors[keyof FetchUiBundleErrors];
|
|
4885
|
+
export type FetchUiBundleResponses = {
|
|
4886
|
+
/**
|
|
4887
|
+
* HTML content of the UI bundle
|
|
4888
|
+
*/
|
|
4889
|
+
200: string;
|
|
4890
|
+
};
|
|
4891
|
+
export type FetchUiBundleResponse = FetchUiBundleResponses[keyof FetchUiBundleResponses];
|
|
4892
|
+
export type ListDemoGamesData = {
|
|
4893
|
+
body?: never;
|
|
4894
|
+
path?: never;
|
|
4895
|
+
query?: never;
|
|
4896
|
+
url: '/api/demo-games';
|
|
4897
|
+
};
|
|
4898
|
+
export type ListDemoGamesErrors = {
|
|
4899
|
+
/**
|
|
4900
|
+
* Internal server error
|
|
4901
|
+
*/
|
|
4902
|
+
500: ProblemDetails;
|
|
4903
|
+
};
|
|
4904
|
+
export type ListDemoGamesError = ListDemoGamesErrors[keyof ListDemoGamesErrors];
|
|
4905
|
+
export type ListDemoGamesResponses = {
|
|
4906
|
+
/**
|
|
4907
|
+
* Successfully retrieved demo games
|
|
4908
|
+
*/
|
|
4909
|
+
200: Array<DemoGameSummary>;
|
|
4910
|
+
};
|
|
4911
|
+
export type ListDemoGamesResponse = ListDemoGamesResponses[keyof ListDemoGamesResponses];
|
|
4912
|
+
export type GetDemoGameData = {
|
|
4913
|
+
body?: never;
|
|
4914
|
+
path: {
|
|
4915
|
+
/**
|
|
4916
|
+
* Demo game slug
|
|
4917
|
+
*/
|
|
4918
|
+
slug: string;
|
|
4919
|
+
};
|
|
4920
|
+
query?: never;
|
|
4921
|
+
url: '/api/demo-games/{slug}';
|
|
4922
|
+
};
|
|
4923
|
+
export type GetDemoGameErrors = {
|
|
4924
|
+
/**
|
|
4925
|
+
* Bad request - invalid input parameters
|
|
4926
|
+
*/
|
|
4927
|
+
400: ProblemDetails;
|
|
4928
|
+
/**
|
|
4929
|
+
* Resource not found
|
|
4930
|
+
*/
|
|
4931
|
+
404: ProblemDetails;
|
|
4932
|
+
/**
|
|
4933
|
+
* Internal server error
|
|
4934
|
+
*/
|
|
4935
|
+
500: ProblemDetails;
|
|
4936
|
+
};
|
|
4937
|
+
export type GetDemoGameError = GetDemoGameErrors[keyof GetDemoGameErrors];
|
|
4938
|
+
export type GetDemoGameResponses = {
|
|
4939
|
+
/**
|
|
4940
|
+
* Successfully retrieved demo game metadata
|
|
4941
|
+
*/
|
|
4942
|
+
200: DemoGameDetails;
|
|
4943
|
+
};
|
|
4944
|
+
export type GetDemoGameResponse = GetDemoGameResponses[keyof GetDemoGameResponses];
|
|
4945
|
+
export type GetDemoGameThumbnailData = {
|
|
4946
|
+
body?: never;
|
|
4947
|
+
path: {
|
|
4948
|
+
/**
|
|
4949
|
+
* Demo game slug
|
|
4950
|
+
*/
|
|
4951
|
+
slug: string;
|
|
4952
|
+
};
|
|
4953
|
+
query?: never;
|
|
4954
|
+
url: '/api/demo-games/{slug}/thumbnail';
|
|
4955
|
+
};
|
|
4956
|
+
export type GetDemoGameThumbnailErrors = {
|
|
4957
|
+
/**
|
|
4958
|
+
* Resource not found
|
|
4959
|
+
*/
|
|
4960
|
+
404: ProblemDetails;
|
|
4961
|
+
/**
|
|
4962
|
+
* Internal server error
|
|
4963
|
+
*/
|
|
4964
|
+
500: ProblemDetails;
|
|
4965
|
+
};
|
|
4966
|
+
export type GetDemoGameThumbnailError = GetDemoGameThumbnailErrors[keyof GetDemoGameThumbnailErrors];
|
|
4967
|
+
export type GetDemoGameThumbnailResponses = {
|
|
4968
|
+
/**
|
|
4969
|
+
* Successfully retrieved demo thumbnail
|
|
4970
|
+
*/
|
|
4971
|
+
200: Blob | File;
|
|
4972
|
+
};
|
|
4973
|
+
export type GetDemoGameThumbnailResponse = GetDemoGameThumbnailResponses[keyof GetDemoGameThumbnailResponses];
|
|
4974
|
+
export type CreateDemoGameSessionData = {
|
|
4975
|
+
body?: never;
|
|
4976
|
+
path: {
|
|
4977
|
+
/**
|
|
4978
|
+
* Demo game slug
|
|
4979
|
+
*/
|
|
4980
|
+
slug: string;
|
|
4981
|
+
};
|
|
4982
|
+
query?: never;
|
|
4983
|
+
url: '/api/demo-games/{slug}/sessions';
|
|
4984
|
+
};
|
|
4985
|
+
export type CreateDemoGameSessionErrors = {
|
|
4986
|
+
/**
|
|
4987
|
+
* Bad request - invalid input parameters
|
|
4988
|
+
*/
|
|
4989
|
+
400: ProblemDetails;
|
|
4990
|
+
/**
|
|
4991
|
+
* Resource not found
|
|
4992
|
+
*/
|
|
4993
|
+
404: ProblemDetails;
|
|
4994
|
+
/**
|
|
4995
|
+
* Internal server error
|
|
4996
|
+
*/
|
|
4997
|
+
500: ProblemDetails;
|
|
4998
|
+
};
|
|
4999
|
+
export type CreateDemoGameSessionError = CreateDemoGameSessionErrors[keyof CreateDemoGameSessionErrors];
|
|
5000
|
+
export type CreateDemoGameSessionResponses = {
|
|
5001
|
+
/**
|
|
5002
|
+
* Demo session created successfully
|
|
5003
|
+
*/
|
|
5004
|
+
201: DemoSessionResponse;
|
|
5005
|
+
};
|
|
5006
|
+
export type CreateDemoGameSessionResponse = CreateDemoGameSessionResponses[keyof CreateDemoGameSessionResponses];
|
|
5007
|
+
//# sourceMappingURL=types.gen.d.ts.map
|