@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
package/dist/sdk.gen.js
ADDED
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { client } from './client.gen.js';
|
|
3
|
+
/**
|
|
4
|
+
* Health check endpoint
|
|
5
|
+
*
|
|
6
|
+
* Returns a simple health check message
|
|
7
|
+
*/
|
|
8
|
+
export const healthCheck = (options) => (options?.client ?? client).get({
|
|
9
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
10
|
+
url: '/',
|
|
11
|
+
...options
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Get backend version metadata
|
|
15
|
+
*
|
|
16
|
+
* Returns backend revision metadata and the UI SDK version expected by the backend runtime.
|
|
17
|
+
*/
|
|
18
|
+
export const getApiVersion = (options) => (options?.client ?? client).get({
|
|
19
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
20
|
+
url: '/api/version',
|
|
21
|
+
...options
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* List user's games
|
|
25
|
+
*
|
|
26
|
+
* Retrieve a list of all games owned by the authenticated user
|
|
27
|
+
*/
|
|
28
|
+
export const listGames = (options) => (options?.client ?? client).get({
|
|
29
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
30
|
+
url: '/api/games',
|
|
31
|
+
...options
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Create a new game
|
|
35
|
+
*
|
|
36
|
+
* Create a new game definition
|
|
37
|
+
*/
|
|
38
|
+
export const createGame = (options) => (options.client ?? client).post({
|
|
39
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
40
|
+
url: '/api/games',
|
|
41
|
+
...options,
|
|
42
|
+
headers: {
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
...options.headers
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Extract a structured game spec
|
|
49
|
+
*
|
|
50
|
+
* Extract a normalized structured game spec from pasted rule text.
|
|
51
|
+
*/
|
|
52
|
+
export const extractGameSpec = (options) => (options.client ?? client).post({
|
|
53
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
54
|
+
url: '/api/games/extract-spec',
|
|
55
|
+
...options,
|
|
56
|
+
headers: {
|
|
57
|
+
'Content-Type': 'application/json',
|
|
58
|
+
...options.headers
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Delete game
|
|
63
|
+
*
|
|
64
|
+
* Delete a game definition permanently
|
|
65
|
+
*/
|
|
66
|
+
export const deleteGame = (options) => (options.client ?? client).delete({
|
|
67
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
68
|
+
url: '/api/games/{gameId}',
|
|
69
|
+
...options
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* Get game by ID
|
|
73
|
+
*
|
|
74
|
+
* Retrieve a specific game definition by its ID
|
|
75
|
+
*/
|
|
76
|
+
export const getGame = (options) => (options.client ?? client).get({
|
|
77
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
78
|
+
url: '/api/games/{gameId}',
|
|
79
|
+
...options
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* Update game
|
|
83
|
+
*
|
|
84
|
+
* Update an existing game definition
|
|
85
|
+
*/
|
|
86
|
+
export const updateGame = (options) => (options.client ?? client).put({
|
|
87
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
88
|
+
url: '/api/games/{gameId}',
|
|
89
|
+
...options,
|
|
90
|
+
headers: {
|
|
91
|
+
'Content-Type': 'application/json',
|
|
92
|
+
...options.headers
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
/**
|
|
96
|
+
* Get game by slug
|
|
97
|
+
*
|
|
98
|
+
* Retrieve a specific game definition by its slug
|
|
99
|
+
*/
|
|
100
|
+
export const getGameBySlug = (options) => (options.client ?? client).get({
|
|
101
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
102
|
+
url: '/api/games/slug/{slug}',
|
|
103
|
+
...options
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Query rulebook text by title
|
|
107
|
+
*
|
|
108
|
+
* Search ranked rulebook candidates for the provided title, try up to the top 3 matches, and return extracted text from the first valid PDF found.
|
|
109
|
+
*/
|
|
110
|
+
export const queryWorkshopRulebook = (options) => (options.client ?? client).get({
|
|
111
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
112
|
+
url: '/api/workshop/query',
|
|
113
|
+
...options
|
|
114
|
+
});
|
|
115
|
+
/**
|
|
116
|
+
* Find manifests for game
|
|
117
|
+
*
|
|
118
|
+
* Retrieve a list of manifest versions for a game, ordered by version descending (newest first)
|
|
119
|
+
*/
|
|
120
|
+
export const findManifests = (options) => (options.client ?? client).get({
|
|
121
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
122
|
+
url: '/api/games/{gameId}/manifests',
|
|
123
|
+
...options
|
|
124
|
+
});
|
|
125
|
+
/**
|
|
126
|
+
* Save game manifest
|
|
127
|
+
*
|
|
128
|
+
* Create a new versioned manifest for a game. Each save creates a new version with automatic version numbering.
|
|
129
|
+
*/
|
|
130
|
+
export const saveManifest = (options) => (options.client ?? client).post({
|
|
131
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
132
|
+
url: '/api/games/{gameId}/manifests',
|
|
133
|
+
...options,
|
|
134
|
+
headers: {
|
|
135
|
+
'Content-Type': 'application/json',
|
|
136
|
+
...options.headers
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
/**
|
|
140
|
+
* Get manifest by ID
|
|
141
|
+
*
|
|
142
|
+
* Retrieve a specific manifest version by its ID with full board manifest details
|
|
143
|
+
*/
|
|
144
|
+
export const getManifest = (options) => (options.client ?? client).get({
|
|
145
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
146
|
+
url: '/api/manifests/{manifestId}',
|
|
147
|
+
...options
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* Get latest compiled result for a game
|
|
151
|
+
*
|
|
152
|
+
* Return the most recent compiled result for the specified game.
|
|
153
|
+
*/
|
|
154
|
+
export const getLatestCompiledResult = (options) => (options.client ?? client).get({
|
|
155
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
156
|
+
url: '/api/games/{gameId}/compiled-results/latest',
|
|
157
|
+
...options
|
|
158
|
+
});
|
|
159
|
+
/**
|
|
160
|
+
* List compiled results for a game
|
|
161
|
+
*
|
|
162
|
+
* Retrieve a list of compiled results for a game, ordered by creation date descending (newest first). Includes both successful and failed compilations.
|
|
163
|
+
*/
|
|
164
|
+
export const listCompiledResults = (options) => (options.client ?? client).get({
|
|
165
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
166
|
+
url: '/api/games/{gameId}/compiled-results',
|
|
167
|
+
...options
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* Queue a compile job for an authoring state
|
|
171
|
+
*
|
|
172
|
+
* Queue an asynchronous compile for a specific authoring state. Poll `/api/jobs/{jobId}` and fetch the final compiled result by ID when the job completes.
|
|
173
|
+
*/
|
|
174
|
+
export const queueCompiledResultJob = (options) => (options.client ?? client).post({
|
|
175
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
176
|
+
url: '/api/games/{gameId}/compiled-results',
|
|
177
|
+
...options,
|
|
178
|
+
headers: {
|
|
179
|
+
'Content-Type': 'application/json',
|
|
180
|
+
...options.headers
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
/**
|
|
184
|
+
* Ensure a private dev compile exists
|
|
185
|
+
*
|
|
186
|
+
* Reuse or create a session-scoped dev compilation for the provided workspace fingerprint without advancing the canonical authored head.
|
|
187
|
+
*/
|
|
188
|
+
export const ensureDevCompile = (options) => (options.client ?? client).post({
|
|
189
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
190
|
+
url: '/api/games/{gameId}/dev-compiles/ensure',
|
|
191
|
+
...options,
|
|
192
|
+
headers: {
|
|
193
|
+
'Content-Type': 'application/json',
|
|
194
|
+
...options.headers
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Get compiled result by ID
|
|
199
|
+
*
|
|
200
|
+
* Fetch a specific compiled result for a game, including failed results and diagnostics.
|
|
201
|
+
*/
|
|
202
|
+
export const getCompiledResult = (options) => (options.client ?? client).get({
|
|
203
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
204
|
+
url: '/api/games/{gameId}/compiled-results/{compiledResultId}',
|
|
205
|
+
...options
|
|
206
|
+
});
|
|
207
|
+
/**
|
|
208
|
+
* Download authored game source files
|
|
209
|
+
*
|
|
210
|
+
* Download the authored source files for the current authoring head as a ZIP archive.
|
|
211
|
+
*/
|
|
212
|
+
export const downloadGameSources = (options) => (options.client ?? client).get({
|
|
213
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
214
|
+
url: '/api/games/{gameId}/download',
|
|
215
|
+
...options
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* Get authored game source files
|
|
219
|
+
*
|
|
220
|
+
* Retrieve authored source files as JSON for the selected authoring state. If no authoring state is provided, the current authoring head is used.
|
|
221
|
+
*/
|
|
222
|
+
export const getGameSources = (options) => (options.client ?? client).get({
|
|
223
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
224
|
+
url: '/api/games/{gameId}/sources',
|
|
225
|
+
...options
|
|
226
|
+
});
|
|
227
|
+
/**
|
|
228
|
+
* Create a source revision for a game
|
|
229
|
+
*
|
|
230
|
+
* Create a new authored source revision from a hash-addressed change set. The request must be based on the current head revision for the game.
|
|
231
|
+
*/
|
|
232
|
+
export const createSourceRevision = (options) => (options.client ?? client).post({
|
|
233
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
234
|
+
url: '/api/games/{gameId}/source-revisions',
|
|
235
|
+
...options,
|
|
236
|
+
headers: {
|
|
237
|
+
'Content-Type': 'application/json',
|
|
238
|
+
...options.headers
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
/**
|
|
242
|
+
* Create direct-upload targets for source blobs
|
|
243
|
+
*
|
|
244
|
+
* Create a direct-upload session for one or more source blobs referenced by a forthcoming source revision.
|
|
245
|
+
*/
|
|
246
|
+
export const createSourceBlobUploadSession = (options) => (options.client ?? client).post({
|
|
247
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
248
|
+
url: '/api/games/{gameId}/source-blobs/upload-sessions',
|
|
249
|
+
...options,
|
|
250
|
+
headers: {
|
|
251
|
+
'Content-Type': 'application/json',
|
|
252
|
+
...options.headers
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
/**
|
|
256
|
+
* Get current authoring head for a game
|
|
257
|
+
*
|
|
258
|
+
* Retrieve the current remote authoring head for the specified game.
|
|
259
|
+
*/
|
|
260
|
+
export const getAuthoringHead = (options) => (options.client ?? client).get({
|
|
261
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
262
|
+
url: '/api/games/{gameId}/authoring/head',
|
|
263
|
+
...options
|
|
264
|
+
});
|
|
265
|
+
/**
|
|
266
|
+
* Advance the authoring head for a game
|
|
267
|
+
*
|
|
268
|
+
* Create a new immutable authoring state and make it the current authoring head for the specified game.
|
|
269
|
+
*/
|
|
270
|
+
export const createAuthoringState = (options) => (options.client ?? client).post({
|
|
271
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
272
|
+
url: '/api/games/{gameId}/authoring/states',
|
|
273
|
+
...options,
|
|
274
|
+
headers: {
|
|
275
|
+
'Content-Type': 'application/json',
|
|
276
|
+
...options.headers
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
/**
|
|
280
|
+
* Get game scripts
|
|
281
|
+
*
|
|
282
|
+
* Retrieve all compiled app and UI scripts for a specific manifest
|
|
283
|
+
*/
|
|
284
|
+
export const getGameScripts = (options) => (options.client ?? client).get({
|
|
285
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
286
|
+
url: '/api/games/{gameId}/scripts',
|
|
287
|
+
...options
|
|
288
|
+
});
|
|
289
|
+
/**
|
|
290
|
+
* Get active job for a game
|
|
291
|
+
*
|
|
292
|
+
* Returns the currently active (PENDING or RUNNING) job for a game, if any. Jobs older than 15 minutes are considered stale and ignored.
|
|
293
|
+
*/
|
|
294
|
+
export const getActiveJob = (options) => (options.client ?? client).get({
|
|
295
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
296
|
+
url: '/api/games/{gameId}/jobs/active',
|
|
297
|
+
...options
|
|
298
|
+
});
|
|
299
|
+
/**
|
|
300
|
+
* Get job details
|
|
301
|
+
*
|
|
302
|
+
* Fetch details for a specific async job, including ordered user-facing tasks.
|
|
303
|
+
*/
|
|
304
|
+
export const getJob = (options) => (options.client ?? client).get({
|
|
305
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
306
|
+
url: '/api/jobs/{jobId}',
|
|
307
|
+
...options
|
|
308
|
+
});
|
|
309
|
+
/**
|
|
310
|
+
* Subscribe to job details (SSE)
|
|
311
|
+
*
|
|
312
|
+
* Server-Sent Events stream for curated job snapshots. Every connection starts with a `job.snapshot` event.
|
|
313
|
+
*/
|
|
314
|
+
export const subscribeToJobEvents = (options) => (options.client ?? client).sse.get({
|
|
315
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
316
|
+
url: '/api/jobs/{jobId}/events',
|
|
317
|
+
...options
|
|
318
|
+
});
|
|
319
|
+
/**
|
|
320
|
+
* Create a game build run
|
|
321
|
+
*
|
|
322
|
+
* Create a new game draft build job from a structured game spec.
|
|
323
|
+
*/
|
|
324
|
+
export const createGameRun = (options) => (options.client ?? client).post({
|
|
325
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
326
|
+
url: '/api/runs',
|
|
327
|
+
...options,
|
|
328
|
+
headers: {
|
|
329
|
+
'Content-Type': 'application/json',
|
|
330
|
+
...options.headers
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
/**
|
|
334
|
+
* Cancel a game build run
|
|
335
|
+
*
|
|
336
|
+
* Request cancellation of an active game draft build job.
|
|
337
|
+
*/
|
|
338
|
+
export const cancelGameRun = (options) => (options.client ?? client).post({
|
|
339
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
340
|
+
url: '/api/runs/{jobId}/cancel',
|
|
341
|
+
...options
|
|
342
|
+
});
|
|
343
|
+
/**
|
|
344
|
+
* List game rules for a game
|
|
345
|
+
*
|
|
346
|
+
* Retrieve a list of rule versions for a game, ordered by version descending (newest first)
|
|
347
|
+
*/
|
|
348
|
+
export const listGameRules = (options) => (options.client ?? client).get({
|
|
349
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
350
|
+
url: '/api/games/{gameId}/rules',
|
|
351
|
+
...options
|
|
352
|
+
});
|
|
353
|
+
/**
|
|
354
|
+
* Create a new game rule
|
|
355
|
+
*
|
|
356
|
+
* Create a new versioned rule for a game. Each save creates a new version with automatic version numbering.
|
|
357
|
+
*/
|
|
358
|
+
export const createGameRule = (options) => (options.client ?? client).post({
|
|
359
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
360
|
+
url: '/api/games/{gameId}/rules',
|
|
361
|
+
...options,
|
|
362
|
+
headers: {
|
|
363
|
+
'Content-Type': 'application/json',
|
|
364
|
+
...options.headers
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
/**
|
|
368
|
+
* Get the latest game rule
|
|
369
|
+
*
|
|
370
|
+
* Retrieve the most recent rule version for a game with full details including the complete rule text
|
|
371
|
+
*/
|
|
372
|
+
export const getLatestGameRule = (options) => (options.client ?? client).get({
|
|
373
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
374
|
+
url: '/api/games/{gameId}/rules/latest',
|
|
375
|
+
...options
|
|
376
|
+
});
|
|
377
|
+
/**
|
|
378
|
+
* Get game rule by ID
|
|
379
|
+
*
|
|
380
|
+
* Retrieve a specific game rule version by its ID with full details
|
|
381
|
+
*/
|
|
382
|
+
export const getGameRule = (options) => (options.client ?? client).get({
|
|
383
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
384
|
+
url: '/api/rules/{ruleId}',
|
|
385
|
+
...options
|
|
386
|
+
});
|
|
387
|
+
/**
|
|
388
|
+
* Create a new game session
|
|
389
|
+
*
|
|
390
|
+
* Create a new game session in lobby phase with initial seat configuration
|
|
391
|
+
*/
|
|
392
|
+
export const createSession = (options) => (options.client ?? client).post({
|
|
393
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
394
|
+
url: '/api/games/{gameId}/sessions',
|
|
395
|
+
...options,
|
|
396
|
+
headers: {
|
|
397
|
+
'Content-Type': 'application/json',
|
|
398
|
+
...options.headers
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
/**
|
|
402
|
+
* Create a session from a reducer snapshot
|
|
403
|
+
*
|
|
404
|
+
* Create an auto-assigned gameplay session from a reducer-native snapshot produced by the CLI scenario harness.
|
|
405
|
+
*/
|
|
406
|
+
export const createSessionFromReducerSnapshot = (options) => (options.client ?? client).post({
|
|
407
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
408
|
+
url: '/api/games/{gameId}/sessions/from-reducer-snapshot',
|
|
409
|
+
...options,
|
|
410
|
+
headers: {
|
|
411
|
+
'Content-Type': 'application/json',
|
|
412
|
+
...options.headers
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
/**
|
|
416
|
+
* Get session by short code
|
|
417
|
+
*
|
|
418
|
+
* Look up and hydrate a session using its memorable short code.
|
|
419
|
+
*/
|
|
420
|
+
export const getSessionByShortCode = (options) => (options.client ?? client).get({
|
|
421
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
422
|
+
url: '/api/sessions/code/{shortCode}',
|
|
423
|
+
...options
|
|
424
|
+
});
|
|
425
|
+
/**
|
|
426
|
+
* Get a session snapshot
|
|
427
|
+
*
|
|
428
|
+
* Return the canonical selected-perspective session snapshot for first render or explicit resync.
|
|
429
|
+
*/
|
|
430
|
+
export const getSessionSnapshot = (options) => (options.client ?? client).get({
|
|
431
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
432
|
+
url: '/api/sessions/{sessionId}/snapshot',
|
|
433
|
+
...options
|
|
434
|
+
});
|
|
435
|
+
/**
|
|
436
|
+
* Subscribe to selected-perspective session events (SSE)
|
|
437
|
+
*
|
|
438
|
+
* Server-Sent Events stream for one selected host perspective. Every connection starts with a `session.snapshot` event.
|
|
439
|
+
*/
|
|
440
|
+
export const subscribeToSessionEvents = (options) => (options.client ?? client).sse.get({
|
|
441
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
442
|
+
url: '/api/sessions/{sessionId}/events',
|
|
443
|
+
...options
|
|
444
|
+
});
|
|
445
|
+
/**
|
|
446
|
+
* Release a session events stream slot
|
|
447
|
+
*
|
|
448
|
+
* Best-effort disconnect signal used by browser tabs during unload and reconnect transitions so stale event stream slots are released promptly.
|
|
449
|
+
*/
|
|
450
|
+
export const disconnectSessionEvents = (options) => (options.client ?? client).post({
|
|
451
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
452
|
+
url: '/api/sessions/{sessionId}/events/disconnect',
|
|
453
|
+
...options
|
|
454
|
+
});
|
|
455
|
+
/**
|
|
456
|
+
* Subscribe to game logs (SSE)
|
|
457
|
+
*
|
|
458
|
+
* Server-Sent Events stream for real-time game engine console logs (stdout/stderr). Supports log replay via lastLogId query parameter for reconnection.
|
|
459
|
+
*/
|
|
460
|
+
export const subscribeToGameLogs = (options) => (options.client ?? client).sse.get({
|
|
461
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
462
|
+
url: '/api/sessions/{sessionId}/logs',
|
|
463
|
+
...options
|
|
464
|
+
});
|
|
465
|
+
/**
|
|
466
|
+
* Start the game
|
|
467
|
+
*
|
|
468
|
+
* Transition session from lobby to gameplay phase (host only)
|
|
469
|
+
*/
|
|
470
|
+
export const startGame = (options) => (options.client ?? client).post({
|
|
471
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
472
|
+
url: '/api/sessions/{sessionId}/start',
|
|
473
|
+
...options
|
|
474
|
+
});
|
|
475
|
+
/**
|
|
476
|
+
* List current actions for a selected player
|
|
477
|
+
*
|
|
478
|
+
* Returns the current server-authored descriptors and action-set revision for the selected player.
|
|
479
|
+
*/
|
|
480
|
+
export const listPlayerActions = (options) => (options.client ?? client).get({
|
|
481
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
482
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions',
|
|
483
|
+
...options
|
|
484
|
+
});
|
|
485
|
+
/**
|
|
486
|
+
* Describe one current action
|
|
487
|
+
*
|
|
488
|
+
* Returns the full current descriptor and action-set revision for one selected-player interaction.
|
|
489
|
+
*/
|
|
490
|
+
export const describePlayerAction = (options) => (options.client ?? client).get({
|
|
491
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
492
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}',
|
|
493
|
+
...options
|
|
494
|
+
});
|
|
495
|
+
/**
|
|
496
|
+
* Describe the current valid target/domain values for one action input
|
|
497
|
+
*
|
|
498
|
+
* Returns the current server-authored input domain for a selected-player action input.
|
|
499
|
+
*/
|
|
500
|
+
export const getPlayerActionTargets = (options) => (options.client ?? client).get({
|
|
501
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
502
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/targets/{inputKey}',
|
|
503
|
+
...options
|
|
504
|
+
});
|
|
505
|
+
/**
|
|
506
|
+
* Validate collector-shaped action inputs
|
|
507
|
+
*
|
|
508
|
+
* Validates one selected-player action using collector-shaped inputs. Path fields are authoritative; clients do not send a GameInput envelope.
|
|
509
|
+
*/
|
|
510
|
+
export const validatePlayerAction = (options) => (options.client ?? client).post({
|
|
511
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
512
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/validate',
|
|
513
|
+
...options,
|
|
514
|
+
headers: {
|
|
515
|
+
'Content-Type': 'application/json',
|
|
516
|
+
...options.headers
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
/**
|
|
520
|
+
* Submit collector-shaped action inputs
|
|
521
|
+
*
|
|
522
|
+
* Submits one selected-player action using collector-shaped inputs. Path fields are authoritative; clients do not send a GameInput envelope.
|
|
523
|
+
*/
|
|
524
|
+
export const submitPlayerAction = (options) => (options.client ?? client).post({
|
|
525
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
526
|
+
url: '/api/sessions/{sessionId}/players/{playerId}/actions/{interactionId}/submit',
|
|
527
|
+
...options,
|
|
528
|
+
headers: {
|
|
529
|
+
'Content-Type': 'application/json',
|
|
530
|
+
...options.headers
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
/**
|
|
534
|
+
* Add a seat to the lobby
|
|
535
|
+
*
|
|
536
|
+
* Add a new seat to the lobby (host only, up to maxPlayers)
|
|
537
|
+
*/
|
|
538
|
+
export const addSeat = (options) => (options.client ?? client).post({
|
|
539
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
540
|
+
url: '/api/sessions/{sessionId}/seats',
|
|
541
|
+
...options
|
|
542
|
+
});
|
|
543
|
+
/**
|
|
544
|
+
* Remove a seat from the lobby
|
|
545
|
+
*
|
|
546
|
+
* Remove a seat from the lobby (host only, down to minPlayers)
|
|
547
|
+
*/
|
|
548
|
+
export const removeSeat = (options) => (options.client ?? client).delete({
|
|
549
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
550
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}',
|
|
551
|
+
...options
|
|
552
|
+
});
|
|
553
|
+
/**
|
|
554
|
+
* Update seat settings
|
|
555
|
+
*
|
|
556
|
+
* Update seat display name and/or player color. User must be assigned to the seat.
|
|
557
|
+
*/
|
|
558
|
+
export const updateSeat = (options) => (options.client ?? client).patch({
|
|
559
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
560
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}',
|
|
561
|
+
...options,
|
|
562
|
+
headers: {
|
|
563
|
+
'Content-Type': 'application/json',
|
|
564
|
+
...options.headers
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
/**
|
|
568
|
+
* Assign a seat to current user
|
|
569
|
+
*
|
|
570
|
+
* Assign the current authenticated user to a specific seat
|
|
571
|
+
*/
|
|
572
|
+
export const assignSeat = (options) => (options.client ?? client).post({
|
|
573
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
574
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}/assign',
|
|
575
|
+
...options
|
|
576
|
+
});
|
|
577
|
+
/**
|
|
578
|
+
* Restore game state from history
|
|
579
|
+
*
|
|
580
|
+
* Restore the game to a previous state from history (host only)
|
|
581
|
+
*/
|
|
582
|
+
export const restoreHistory = (options) => (options.client ?? client).post({
|
|
583
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
584
|
+
url: '/api/sessions/{sessionId}/history/restore',
|
|
585
|
+
...options,
|
|
586
|
+
headers: {
|
|
587
|
+
'Content-Type': 'application/json',
|
|
588
|
+
...options.headers
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
/**
|
|
592
|
+
* Unassign a seat
|
|
593
|
+
*
|
|
594
|
+
* Unassign the current user from a specific seat
|
|
595
|
+
*/
|
|
596
|
+
export const unassignSeat = (options) => (options.client ?? client).post({
|
|
597
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
598
|
+
url: '/api/sessions/{sessionId}/seats/{playerId}/unassign',
|
|
599
|
+
...options
|
|
600
|
+
});
|
|
601
|
+
/**
|
|
602
|
+
* Fetch UI bundle
|
|
603
|
+
*
|
|
604
|
+
* Fetch and return the HTML content of a UI bundle from Supabase storage based on the last compiled UI result
|
|
605
|
+
*/
|
|
606
|
+
export const fetchUiBundle = (options) => (options?.client ?? client).get({
|
|
607
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
608
|
+
url: '/api/ui-bundles/fetch',
|
|
609
|
+
...options
|
|
610
|
+
});
|
|
611
|
+
/**
|
|
612
|
+
* List demo games
|
|
613
|
+
*
|
|
614
|
+
* List bundled demo games that can be opened without a normal user account.
|
|
615
|
+
*/
|
|
616
|
+
export const listDemoGames = (options) => (options?.client ?? client).get({ url: '/api/demo-games', ...options });
|
|
617
|
+
/**
|
|
618
|
+
* Get demo game
|
|
619
|
+
*
|
|
620
|
+
* Return registration and playability metadata for a bundled demo game.
|
|
621
|
+
*/
|
|
622
|
+
export const getDemoGame = (options) => (options.client ?? client).get({ url: '/api/demo-games/{slug}', ...options });
|
|
623
|
+
/**
|
|
624
|
+
* Get demo game thumbnail
|
|
625
|
+
*
|
|
626
|
+
* Return the static thumbnail image for an active bundled demo game.
|
|
627
|
+
*/
|
|
628
|
+
export const getDemoGameThumbnail = (options) => (options.client ?? client).get({ url: '/api/demo-games/{slug}/thumbnail', ...options });
|
|
629
|
+
/**
|
|
630
|
+
* Create demo session
|
|
631
|
+
*
|
|
632
|
+
* Create a fresh guest-play session for a bundled demo game.
|
|
633
|
+
*/
|
|
634
|
+
export const createDemoGameSession = (options) => (options.client ?? client).post({ url: '/api/demo-games/{slug}/sessions', ...options });
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SourceBlobUploadDescriptor, SourceChangeOperation } from "./types.gen.js";
|
|
2
|
+
export type SourceContentChangeOperation = {
|
|
3
|
+
kind: "upsert";
|
|
4
|
+
path: string;
|
|
5
|
+
content: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: "delete";
|
|
8
|
+
path: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function materializeSourceChangeOperations(changes: Iterable<SourceContentChangeOperation>): Promise<{
|
|
11
|
+
blobs: SourceBlobUploadDescriptor[];
|
|
12
|
+
changes: SourceChangeOperation[];
|
|
13
|
+
}>;
|
|
14
|
+
export type SourceBlobUploadInput = SourceBlobUploadDescriptor & {
|
|
15
|
+
content: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function mapUpsertBlobContentsByContentHash(localChanges: readonly SourceContentChangeOperation[], materializedChanges: readonly SourceChangeOperation[]): Map<string, SourceBlobUploadInput>;
|
|
18
|
+
export declare class SourceBlobSessionRequestError extends Error {
|
|
19
|
+
readonly apiError: unknown;
|
|
20
|
+
readonly response: Response | undefined;
|
|
21
|
+
constructor(message: string, apiError: unknown, response: Response | undefined);
|
|
22
|
+
}
|
|
23
|
+
export declare function uploadGameSourceBlobs(options: {
|
|
24
|
+
gameId: string;
|
|
25
|
+
blobs: SourceBlobUploadInput[];
|
|
26
|
+
}): Promise<void>;
|
|
27
|
+
//# sourceMappingURL=source-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-revisions.d.ts","sourceRoot":"","sources":["../src/source-revisions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0BAA0B,EAE1B,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,4BAA4B,GACpC;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAmCN,wBAAsB,iCAAiC,CACrD,OAAO,EAAE,QAAQ,CAAC,4BAA4B,CAAC,GAC9C,OAAO,CAAC;IACT,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAClC,CAAC,CA6BD;AAED,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,kCAAkC,CAChD,YAAY,EAAE,SAAS,4BAA4B,EAAE,EACrD,mBAAmB,EAAE,SAAS,qBAAqB,EAAE,GACpD,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAqBpC;AAoDD,qBAAa,6BAA8B,SAAQ,KAAK;IACtD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;gBAGtC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE,QAAQ,GAAG,SAAS;CAOjC;AA8BD,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CAoEhB"}
|