@darco2903/altv-web-api 1.6.0 → 2.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/dist/client.d.ts +654 -163
- package/dist/contract/index.d.ts +1100 -297
- package/dist/contract/index.js +2 -0
- package/dist/contract/mediaStream.d.ts +1 -1398
- package/dist/contract/mediaStream.js +3 -116
- package/dist/contract/room.d.ts +2200 -0
- package/dist/contract/room.js +212 -0
- package/dist/socket/index.d.ts +1 -1
- package/dist/socket/index.js +1 -1
- package/dist/socket/room.d.ts +32 -0
- package/dist/socket/types.d.ts +3 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/room.d.ts +292 -0
- package/dist/types/room.js +42 -0
- package/dist/types/scene.d.ts +4 -4
- package/dist/types/scene.js +2 -2
- package/package.json +1 -1
- package/dist/socket/mediaStream.d.ts +0 -21
- /package/dist/socket/{mediaStream.js → room.js} +0 -0
package/dist/client.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ export declare function createClient(origin: string): {
|
|
|
85
85
|
};
|
|
86
86
|
headers: Headers;
|
|
87
87
|
} | {
|
|
88
|
-
status: 404 | 100 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
88
|
+
status: 404 | 100 | 409 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
89
89
|
body: unknown;
|
|
90
90
|
headers: Headers;
|
|
91
91
|
}>;
|
|
@@ -156,7 +156,7 @@ export declare function createClient(origin: string): {
|
|
|
156
156
|
};
|
|
157
157
|
headers: Headers;
|
|
158
158
|
} | {
|
|
159
|
-
status: 404 | 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
159
|
+
status: 404 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
160
160
|
body: unknown;
|
|
161
161
|
headers: Headers;
|
|
162
162
|
}>;
|
|
@@ -205,7 +205,7 @@ export declare function createClient(origin: string): {
|
|
|
205
205
|
};
|
|
206
206
|
headers: Headers;
|
|
207
207
|
} | {
|
|
208
|
-
status: 500 | 401 | 403 | 404 | 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
208
|
+
status: 500 | 401 | 403 | 404 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
209
209
|
body: unknown;
|
|
210
210
|
headers: Headers;
|
|
211
211
|
}>;
|
|
@@ -221,7 +221,7 @@ export declare function createClient(origin: string): {
|
|
|
221
221
|
};
|
|
222
222
|
headers: Headers;
|
|
223
223
|
} | {
|
|
224
|
-
status: 500 | 401 | 403 | 400 | 404 | 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
224
|
+
status: 500 | 401 | 403 | 400 | 404 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
225
225
|
body: unknown;
|
|
226
226
|
headers: Headers;
|
|
227
227
|
}>;
|
|
@@ -269,15 +269,58 @@ export declare function createClient(origin: string): {
|
|
|
269
269
|
};
|
|
270
270
|
headers: Headers;
|
|
271
271
|
} | {
|
|
272
|
-
status: 400 | 404 | 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
272
|
+
status: 400 | 404 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
273
273
|
body: unknown;
|
|
274
274
|
headers: Headers;
|
|
275
275
|
}>;
|
|
276
276
|
};
|
|
277
277
|
mediaStream: {
|
|
278
|
-
|
|
278
|
+
stream: (args: {
|
|
279
|
+
params: {
|
|
280
|
+
streamId: string;
|
|
281
|
+
};
|
|
282
|
+
cache?: RequestCache | undefined;
|
|
283
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
284
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
285
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
286
|
+
}) => Promise<{
|
|
287
|
+
status: 500;
|
|
279
288
|
body: {
|
|
280
|
-
|
|
289
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
290
|
+
error: string;
|
|
291
|
+
name: "APIError";
|
|
292
|
+
};
|
|
293
|
+
headers: Headers;
|
|
294
|
+
} | {
|
|
295
|
+
status: 200;
|
|
296
|
+
body: any;
|
|
297
|
+
headers: Headers;
|
|
298
|
+
} | {
|
|
299
|
+
status: 400;
|
|
300
|
+
body: {
|
|
301
|
+
code: "INVALID_VIDEO_ID";
|
|
302
|
+
error: "The provided video ID is invalid";
|
|
303
|
+
name: "APIError";
|
|
304
|
+
};
|
|
305
|
+
headers: Headers;
|
|
306
|
+
} | {
|
|
307
|
+
status: 404;
|
|
308
|
+
body: {
|
|
309
|
+
code: "STREAM_NOT_FOUND";
|
|
310
|
+
error: "The requested stream was not found";
|
|
311
|
+
name: "APIError";
|
|
312
|
+
};
|
|
313
|
+
headers: Headers;
|
|
314
|
+
} | {
|
|
315
|
+
status: 401 | 403 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
316
|
+
body: unknown;
|
|
317
|
+
headers: Headers;
|
|
318
|
+
}>;
|
|
319
|
+
};
|
|
320
|
+
room: {
|
|
321
|
+
create: (args: {
|
|
322
|
+
body: {
|
|
323
|
+
name: string | null;
|
|
281
324
|
};
|
|
282
325
|
cache?: RequestCache | undefined;
|
|
283
326
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -310,7 +353,7 @@ export declare function createClient(origin: string): {
|
|
|
310
353
|
} | {
|
|
311
354
|
status: 200;
|
|
312
355
|
body: {
|
|
313
|
-
|
|
356
|
+
roomId: string;
|
|
314
357
|
};
|
|
315
358
|
headers: Headers;
|
|
316
359
|
} | {
|
|
@@ -339,20 +382,73 @@ export declare function createClient(origin: string): {
|
|
|
339
382
|
not_finite: "not_finite";
|
|
340
383
|
}>;
|
|
341
384
|
}, import("zod").ZodAny, "strip">[];
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
385
|
+
};
|
|
386
|
+
headers: Headers;
|
|
387
|
+
} | {
|
|
388
|
+
status: 409;
|
|
389
|
+
body: {
|
|
390
|
+
code: "TOO_MANY_ROOMS";
|
|
391
|
+
error: "You can't own more rooms";
|
|
392
|
+
name: "APIError";
|
|
393
|
+
};
|
|
394
|
+
headers: Headers;
|
|
395
|
+
} | {
|
|
396
|
+
status: 404 | 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
397
|
+
body: unknown;
|
|
398
|
+
headers: Headers;
|
|
399
|
+
}>;
|
|
400
|
+
list: (args?: {
|
|
401
|
+
cache?: RequestCache | undefined;
|
|
402
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
403
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
404
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
405
|
+
} | undefined) => Promise<{
|
|
406
|
+
status: 500;
|
|
407
|
+
body: {
|
|
408
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
409
|
+
error: string;
|
|
410
|
+
name: "APIError";
|
|
411
|
+
};
|
|
412
|
+
headers: Headers;
|
|
413
|
+
} | {
|
|
414
|
+
status: 401;
|
|
415
|
+
body: {
|
|
416
|
+
code: "UNAUTHORIZED";
|
|
417
|
+
error: "Unauthorized";
|
|
418
|
+
name: "APIError";
|
|
419
|
+
};
|
|
420
|
+
headers: Headers;
|
|
421
|
+
} | {
|
|
422
|
+
status: 403;
|
|
423
|
+
body: {
|
|
424
|
+
code: "FORBIDDEN";
|
|
425
|
+
error: "Forbidden";
|
|
345
426
|
name: "APIError";
|
|
346
427
|
};
|
|
347
428
|
headers: Headers;
|
|
348
429
|
} | {
|
|
349
|
-
status:
|
|
430
|
+
status: 200;
|
|
431
|
+
body: {
|
|
432
|
+
rooms: {
|
|
433
|
+
name: string | null;
|
|
434
|
+
roomId: string;
|
|
435
|
+
track: {
|
|
436
|
+
videoId: string;
|
|
437
|
+
title: string;
|
|
438
|
+
duration: number;
|
|
439
|
+
} | null;
|
|
440
|
+
paused: boolean;
|
|
441
|
+
}[];
|
|
442
|
+
};
|
|
443
|
+
headers: Headers;
|
|
444
|
+
} | {
|
|
445
|
+
status: 400 | 404 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
350
446
|
body: unknown;
|
|
351
447
|
headers: Headers;
|
|
352
448
|
}>;
|
|
353
449
|
get: (args: {
|
|
354
450
|
params: {
|
|
355
|
-
|
|
451
|
+
roomId: string;
|
|
356
452
|
};
|
|
357
453
|
cache?: RequestCache | undefined;
|
|
358
454
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -369,13 +465,24 @@ export declare function createClient(origin: string): {
|
|
|
369
465
|
} | {
|
|
370
466
|
status: 200;
|
|
371
467
|
body: {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
468
|
+
name: string | null;
|
|
469
|
+
roomId: string;
|
|
470
|
+
ownerId: string;
|
|
471
|
+
track: {
|
|
472
|
+
videoId: string;
|
|
473
|
+
title: string;
|
|
474
|
+
duration: number;
|
|
475
|
+
} | null;
|
|
476
|
+
queue: {
|
|
477
|
+
videoId: string;
|
|
478
|
+
title: string;
|
|
479
|
+
duration: number;
|
|
480
|
+
id: string;
|
|
481
|
+
}[];
|
|
482
|
+
url: string | null;
|
|
483
|
+
paused: boolean;
|
|
375
484
|
startTime: number;
|
|
376
485
|
currentTime: number;
|
|
377
|
-
url: string;
|
|
378
|
-
paused: boolean;
|
|
379
486
|
scene: {
|
|
380
487
|
speakers: {
|
|
381
488
|
id: string;
|
|
@@ -399,45 +506,24 @@ export declare function createClient(origin: string): {
|
|
|
399
506
|
};
|
|
400
507
|
headers: Headers;
|
|
401
508
|
} | {
|
|
402
|
-
status:
|
|
509
|
+
status: 404;
|
|
403
510
|
body: {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
407
|
-
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
408
|
-
code: import("zod").ZodNativeEnum<{
|
|
409
|
-
invalid_type: "invalid_type";
|
|
410
|
-
invalid_literal: "invalid_literal";
|
|
411
|
-
custom: "custom";
|
|
412
|
-
invalid_union: "invalid_union";
|
|
413
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
414
|
-
invalid_enum_value: "invalid_enum_value";
|
|
415
|
-
unrecognized_keys: "unrecognized_keys";
|
|
416
|
-
invalid_arguments: "invalid_arguments";
|
|
417
|
-
invalid_return_type: "invalid_return_type";
|
|
418
|
-
invalid_date: "invalid_date";
|
|
419
|
-
invalid_string: "invalid_string";
|
|
420
|
-
too_small: "too_small";
|
|
421
|
-
too_big: "too_big";
|
|
422
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
423
|
-
not_multiple_of: "not_multiple_of";
|
|
424
|
-
not_finite: "not_finite";
|
|
425
|
-
}>;
|
|
426
|
-
}, import("zod").ZodAny, "strip">[];
|
|
427
|
-
} | {
|
|
428
|
-
code: "INVALID_STREAM_ID";
|
|
429
|
-
error: "The provided stream ID is invalid";
|
|
511
|
+
code: "ROOM_NOT_FOUND";
|
|
512
|
+
error: "The requested room was not found";
|
|
430
513
|
name: "APIError";
|
|
431
514
|
};
|
|
432
515
|
headers: Headers;
|
|
433
516
|
} | {
|
|
434
|
-
status: 401 | 403 |
|
|
517
|
+
status: 401 | 403 | 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
435
518
|
body: unknown;
|
|
436
519
|
headers: Headers;
|
|
437
520
|
}>;
|
|
438
|
-
|
|
521
|
+
rename: (args: {
|
|
439
522
|
params: {
|
|
440
|
-
|
|
523
|
+
roomId: string;
|
|
524
|
+
};
|
|
525
|
+
body: {
|
|
526
|
+
name: string | null;
|
|
441
527
|
};
|
|
442
528
|
cache?: RequestCache | undefined;
|
|
443
529
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -497,28 +583,24 @@ export declare function createClient(origin: string): {
|
|
|
497
583
|
not_finite: "not_finite";
|
|
498
584
|
}>;
|
|
499
585
|
}, import("zod").ZodAny, "strip">[];
|
|
500
|
-
} | {
|
|
501
|
-
code: "INVALID_STREAM_ID";
|
|
502
|
-
error: "The provided stream ID is invalid";
|
|
503
|
-
name: "APIError";
|
|
504
586
|
};
|
|
505
587
|
headers: Headers;
|
|
506
588
|
} | {
|
|
507
589
|
status: 404;
|
|
508
590
|
body: {
|
|
509
|
-
code: "
|
|
510
|
-
error: "The requested
|
|
591
|
+
code: "ROOM_NOT_FOUND";
|
|
592
|
+
error: "The requested room was not found";
|
|
511
593
|
name: "APIError";
|
|
512
594
|
};
|
|
513
595
|
headers: Headers;
|
|
514
596
|
} | {
|
|
515
|
-
status: 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
597
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
516
598
|
body: unknown;
|
|
517
599
|
headers: Headers;
|
|
518
600
|
}>;
|
|
519
|
-
|
|
601
|
+
delete: (args: {
|
|
520
602
|
params: {
|
|
521
|
-
|
|
603
|
+
roomId: string;
|
|
522
604
|
};
|
|
523
605
|
cache?: RequestCache | undefined;
|
|
524
606
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -552,57 +634,25 @@ export declare function createClient(origin: string): {
|
|
|
552
634
|
status: 200;
|
|
553
635
|
body: undefined;
|
|
554
636
|
headers: Headers;
|
|
555
|
-
} | {
|
|
556
|
-
status: 400;
|
|
557
|
-
body: {
|
|
558
|
-
name: "ZodError";
|
|
559
|
-
issues: import("zod").objectOutputType<{
|
|
560
|
-
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
561
|
-
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
562
|
-
code: import("zod").ZodNativeEnum<{
|
|
563
|
-
invalid_type: "invalid_type";
|
|
564
|
-
invalid_literal: "invalid_literal";
|
|
565
|
-
custom: "custom";
|
|
566
|
-
invalid_union: "invalid_union";
|
|
567
|
-
invalid_union_discriminator: "invalid_union_discriminator";
|
|
568
|
-
invalid_enum_value: "invalid_enum_value";
|
|
569
|
-
unrecognized_keys: "unrecognized_keys";
|
|
570
|
-
invalid_arguments: "invalid_arguments";
|
|
571
|
-
invalid_return_type: "invalid_return_type";
|
|
572
|
-
invalid_date: "invalid_date";
|
|
573
|
-
invalid_string: "invalid_string";
|
|
574
|
-
too_small: "too_small";
|
|
575
|
-
too_big: "too_big";
|
|
576
|
-
invalid_intersection_types: "invalid_intersection_types";
|
|
577
|
-
not_multiple_of: "not_multiple_of";
|
|
578
|
-
not_finite: "not_finite";
|
|
579
|
-
}>;
|
|
580
|
-
}, import("zod").ZodAny, "strip">[];
|
|
581
|
-
} | {
|
|
582
|
-
code: "INVALID_STREAM_ID";
|
|
583
|
-
error: "The provided stream ID is invalid";
|
|
584
|
-
name: "APIError";
|
|
585
|
-
};
|
|
586
|
-
headers: Headers;
|
|
587
637
|
} | {
|
|
588
638
|
status: 404;
|
|
589
639
|
body: {
|
|
590
|
-
code: "
|
|
591
|
-
error: "The requested
|
|
640
|
+
code: "ROOM_NOT_FOUND";
|
|
641
|
+
error: "The requested room was not found";
|
|
592
642
|
name: "APIError";
|
|
593
643
|
};
|
|
594
644
|
headers: Headers;
|
|
595
645
|
} | {
|
|
596
|
-
status: 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
646
|
+
status: 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
597
647
|
body: unknown;
|
|
598
648
|
headers: Headers;
|
|
599
649
|
}>;
|
|
600
|
-
|
|
650
|
+
track: (args: {
|
|
601
651
|
params: {
|
|
602
|
-
|
|
652
|
+
roomId: string;
|
|
603
653
|
};
|
|
604
|
-
|
|
605
|
-
|
|
654
|
+
body: {
|
|
655
|
+
videoId: string;
|
|
606
656
|
};
|
|
607
657
|
cache?: RequestCache | undefined;
|
|
608
658
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -639,6 +689,10 @@ export declare function createClient(origin: string): {
|
|
|
639
689
|
} | {
|
|
640
690
|
status: 400;
|
|
641
691
|
body: {
|
|
692
|
+
code: "INVALID_VIDEO_ID";
|
|
693
|
+
error: "The provided video ID is invalid";
|
|
694
|
+
name: "APIError";
|
|
695
|
+
} | {
|
|
642
696
|
name: "ZodError";
|
|
643
697
|
issues: import("zod").objectOutputType<{
|
|
644
698
|
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
@@ -662,65 +716,27 @@ export declare function createClient(origin: string): {
|
|
|
662
716
|
not_finite: "not_finite";
|
|
663
717
|
}>;
|
|
664
718
|
}, import("zod").ZodAny, "strip">[];
|
|
665
|
-
} | {
|
|
666
|
-
code: "INVALID_STREAM_ID";
|
|
667
|
-
error: "The provided stream ID is invalid";
|
|
668
|
-
name: "APIError";
|
|
669
719
|
};
|
|
670
720
|
headers: Headers;
|
|
671
721
|
} | {
|
|
672
722
|
status: 404;
|
|
673
723
|
body: {
|
|
674
|
-
code: "
|
|
675
|
-
error: "The requested
|
|
724
|
+
code: "ROOM_NOT_FOUND";
|
|
725
|
+
error: "The requested room was not found";
|
|
676
726
|
name: "APIError";
|
|
677
727
|
};
|
|
678
728
|
headers: Headers;
|
|
679
729
|
} | {
|
|
680
|
-
status: 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 |
|
|
730
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
681
731
|
body: unknown;
|
|
682
732
|
headers: Headers;
|
|
683
733
|
}>;
|
|
684
|
-
|
|
734
|
+
queueAdd: (args: {
|
|
685
735
|
params: {
|
|
686
|
-
|
|
736
|
+
roomId: string;
|
|
687
737
|
};
|
|
688
738
|
body: {
|
|
689
|
-
|
|
690
|
-
speaker: {
|
|
691
|
-
x: number;
|
|
692
|
-
y: number;
|
|
693
|
-
z: number;
|
|
694
|
-
yaw: number;
|
|
695
|
-
pitch: number;
|
|
696
|
-
directional: boolean;
|
|
697
|
-
};
|
|
698
|
-
} | {
|
|
699
|
-
type: "addCar";
|
|
700
|
-
car: {
|
|
701
|
-
x: number;
|
|
702
|
-
z: number;
|
|
703
|
-
yaw: number;
|
|
704
|
-
};
|
|
705
|
-
} | {
|
|
706
|
-
type: "remove";
|
|
707
|
-
id: string;
|
|
708
|
-
} | {
|
|
709
|
-
type: "carDoor";
|
|
710
|
-
id: string;
|
|
711
|
-
index: number;
|
|
712
|
-
open: boolean;
|
|
713
|
-
} | {
|
|
714
|
-
type: "carWindow";
|
|
715
|
-
id: string;
|
|
716
|
-
index: number;
|
|
717
|
-
open: boolean;
|
|
718
|
-
} | {
|
|
719
|
-
type: "carRadio";
|
|
720
|
-
id: string;
|
|
721
|
-
on: boolean;
|
|
722
|
-
} | {
|
|
723
|
-
type: "reset";
|
|
739
|
+
videoId: string;
|
|
724
740
|
};
|
|
725
741
|
cache?: RequestCache | undefined;
|
|
726
742
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -757,6 +773,10 @@ export declare function createClient(origin: string): {
|
|
|
757
773
|
} | {
|
|
758
774
|
status: 400;
|
|
759
775
|
body: {
|
|
776
|
+
code: "INVALID_VIDEO_ID";
|
|
777
|
+
error: "The provided video ID is invalid";
|
|
778
|
+
name: "APIError";
|
|
779
|
+
} | {
|
|
760
780
|
name: "ZodError";
|
|
761
781
|
issues: import("zod").objectOutputType<{
|
|
762
782
|
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
@@ -780,32 +800,33 @@ export declare function createClient(origin: string): {
|
|
|
780
800
|
not_finite: "not_finite";
|
|
781
801
|
}>;
|
|
782
802
|
}, import("zod").ZodAny, "strip">[];
|
|
783
|
-
} | {
|
|
784
|
-
code: "SCENE_FULL";
|
|
785
|
-
error: "The scene can't have more of this object";
|
|
786
|
-
name: "APIError";
|
|
787
|
-
} | {
|
|
788
|
-
code: "SCENE_OBJECT_NOT_FOUND";
|
|
789
|
-
error: "The scene object was not found";
|
|
790
|
-
name: "APIError";
|
|
791
803
|
};
|
|
792
804
|
headers: Headers;
|
|
793
805
|
} | {
|
|
794
806
|
status: 404;
|
|
795
807
|
body: {
|
|
796
|
-
code: "
|
|
797
|
-
error: "The requested
|
|
808
|
+
code: "ROOM_NOT_FOUND";
|
|
809
|
+
error: "The requested room was not found";
|
|
798
810
|
name: "APIError";
|
|
799
811
|
};
|
|
800
812
|
headers: Headers;
|
|
801
813
|
} | {
|
|
802
|
-
status:
|
|
814
|
+
status: 409;
|
|
815
|
+
body: {
|
|
816
|
+
code: "QUEUE_FULL";
|
|
817
|
+
error: "The queue of this room is full";
|
|
818
|
+
name: "APIError";
|
|
819
|
+
};
|
|
820
|
+
headers: Headers;
|
|
821
|
+
} | {
|
|
822
|
+
status: 100 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
803
823
|
body: unknown;
|
|
804
824
|
headers: Headers;
|
|
805
825
|
}>;
|
|
806
|
-
|
|
826
|
+
queueRemove: (args: {
|
|
807
827
|
params: {
|
|
808
|
-
|
|
828
|
+
roomId: string;
|
|
829
|
+
itemId: string;
|
|
809
830
|
};
|
|
810
831
|
cache?: RequestCache | undefined;
|
|
811
832
|
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
@@ -820,27 +841,497 @@ export declare function createClient(origin: string): {
|
|
|
820
841
|
};
|
|
821
842
|
headers: Headers;
|
|
822
843
|
} | {
|
|
823
|
-
status:
|
|
824
|
-
body:
|
|
844
|
+
status: 401;
|
|
845
|
+
body: {
|
|
846
|
+
code: "UNAUTHORIZED";
|
|
847
|
+
error: "Unauthorized";
|
|
848
|
+
name: "APIError";
|
|
849
|
+
};
|
|
825
850
|
headers: Headers;
|
|
826
851
|
} | {
|
|
827
|
-
status:
|
|
852
|
+
status: 403;
|
|
828
853
|
body: {
|
|
829
|
-
code: "
|
|
830
|
-
error: "
|
|
854
|
+
code: "FORBIDDEN";
|
|
855
|
+
error: "Forbidden";
|
|
831
856
|
name: "APIError";
|
|
832
857
|
};
|
|
833
858
|
headers: Headers;
|
|
834
859
|
} | {
|
|
835
|
-
status:
|
|
836
|
-
body:
|
|
837
|
-
|
|
838
|
-
|
|
860
|
+
status: 200;
|
|
861
|
+
body: undefined;
|
|
862
|
+
headers: Headers;
|
|
863
|
+
} | {
|
|
864
|
+
status: 404;
|
|
865
|
+
body: {
|
|
866
|
+
code: "ROOM_NOT_FOUND";
|
|
867
|
+
error: "The requested room was not found";
|
|
868
|
+
name: "APIError";
|
|
869
|
+
} | {
|
|
870
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
871
|
+
error: "The queue doesn't have this track";
|
|
872
|
+
name: "APIError";
|
|
873
|
+
};
|
|
874
|
+
headers: Headers;
|
|
875
|
+
} | {
|
|
876
|
+
status: 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
877
|
+
body: unknown;
|
|
878
|
+
headers: Headers;
|
|
879
|
+
}>;
|
|
880
|
+
queueMove: (args: {
|
|
881
|
+
params: {
|
|
882
|
+
roomId: string;
|
|
883
|
+
itemId: string;
|
|
884
|
+
};
|
|
885
|
+
body: {
|
|
886
|
+
index: number;
|
|
887
|
+
};
|
|
888
|
+
cache?: RequestCache | undefined;
|
|
889
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
890
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
891
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
892
|
+
}) => Promise<{
|
|
893
|
+
status: 500;
|
|
894
|
+
body: {
|
|
895
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
896
|
+
error: string;
|
|
897
|
+
name: "APIError";
|
|
898
|
+
};
|
|
899
|
+
headers: Headers;
|
|
900
|
+
} | {
|
|
901
|
+
status: 401;
|
|
902
|
+
body: {
|
|
903
|
+
code: "UNAUTHORIZED";
|
|
904
|
+
error: "Unauthorized";
|
|
905
|
+
name: "APIError";
|
|
906
|
+
};
|
|
907
|
+
headers: Headers;
|
|
908
|
+
} | {
|
|
909
|
+
status: 403;
|
|
910
|
+
body: {
|
|
911
|
+
code: "FORBIDDEN";
|
|
912
|
+
error: "Forbidden";
|
|
913
|
+
name: "APIError";
|
|
914
|
+
};
|
|
915
|
+
headers: Headers;
|
|
916
|
+
} | {
|
|
917
|
+
status: 200;
|
|
918
|
+
body: undefined;
|
|
919
|
+
headers: Headers;
|
|
920
|
+
} | {
|
|
921
|
+
status: 400;
|
|
922
|
+
body: {
|
|
923
|
+
name: "ZodError";
|
|
924
|
+
issues: import("zod").objectOutputType<{
|
|
925
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
926
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
927
|
+
code: import("zod").ZodNativeEnum<{
|
|
928
|
+
invalid_type: "invalid_type";
|
|
929
|
+
invalid_literal: "invalid_literal";
|
|
930
|
+
custom: "custom";
|
|
931
|
+
invalid_union: "invalid_union";
|
|
932
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
933
|
+
invalid_enum_value: "invalid_enum_value";
|
|
934
|
+
unrecognized_keys: "unrecognized_keys";
|
|
935
|
+
invalid_arguments: "invalid_arguments";
|
|
936
|
+
invalid_return_type: "invalid_return_type";
|
|
937
|
+
invalid_date: "invalid_date";
|
|
938
|
+
invalid_string: "invalid_string";
|
|
939
|
+
too_small: "too_small";
|
|
940
|
+
too_big: "too_big";
|
|
941
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
942
|
+
not_multiple_of: "not_multiple_of";
|
|
943
|
+
not_finite: "not_finite";
|
|
944
|
+
}>;
|
|
945
|
+
}, import("zod").ZodAny, "strip">[];
|
|
946
|
+
};
|
|
947
|
+
headers: Headers;
|
|
948
|
+
} | {
|
|
949
|
+
status: 404;
|
|
950
|
+
body: {
|
|
951
|
+
code: "ROOM_NOT_FOUND";
|
|
952
|
+
error: "The requested room was not found";
|
|
953
|
+
name: "APIError";
|
|
954
|
+
} | {
|
|
955
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
956
|
+
error: "The queue doesn't have this track";
|
|
957
|
+
name: "APIError";
|
|
958
|
+
};
|
|
959
|
+
headers: Headers;
|
|
960
|
+
} | {
|
|
961
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
962
|
+
body: unknown;
|
|
963
|
+
headers: Headers;
|
|
964
|
+
}>;
|
|
965
|
+
next: (args: {
|
|
966
|
+
params: {
|
|
967
|
+
roomId: string;
|
|
968
|
+
};
|
|
969
|
+
cache?: RequestCache | undefined;
|
|
970
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
971
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
972
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
973
|
+
}) => Promise<{
|
|
974
|
+
status: 500;
|
|
975
|
+
body: {
|
|
976
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
977
|
+
error: string;
|
|
978
|
+
name: "APIError";
|
|
979
|
+
};
|
|
980
|
+
headers: Headers;
|
|
981
|
+
} | {
|
|
982
|
+
status: 401;
|
|
983
|
+
body: {
|
|
984
|
+
code: "UNAUTHORIZED";
|
|
985
|
+
error: "Unauthorized";
|
|
986
|
+
name: "APIError";
|
|
987
|
+
};
|
|
988
|
+
headers: Headers;
|
|
989
|
+
} | {
|
|
990
|
+
status: 403;
|
|
991
|
+
body: {
|
|
992
|
+
code: "FORBIDDEN";
|
|
993
|
+
error: "Forbidden";
|
|
994
|
+
name: "APIError";
|
|
995
|
+
};
|
|
996
|
+
headers: Headers;
|
|
997
|
+
} | {
|
|
998
|
+
status: 200;
|
|
999
|
+
body: undefined;
|
|
1000
|
+
headers: Headers;
|
|
1001
|
+
} | {
|
|
1002
|
+
status: 400;
|
|
1003
|
+
body: {
|
|
1004
|
+
code: "QUEUE_EMPTY";
|
|
1005
|
+
error: "The queue of this room is empty";
|
|
1006
|
+
name: "APIError";
|
|
1007
|
+
};
|
|
1008
|
+
headers: Headers;
|
|
1009
|
+
} | {
|
|
1010
|
+
status: 404;
|
|
1011
|
+
body: {
|
|
1012
|
+
code: "ROOM_NOT_FOUND";
|
|
1013
|
+
error: "The requested room was not found";
|
|
1014
|
+
name: "APIError";
|
|
1015
|
+
};
|
|
1016
|
+
headers: Headers;
|
|
1017
|
+
} | {
|
|
1018
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
1019
|
+
body: unknown;
|
|
1020
|
+
headers: Headers;
|
|
1021
|
+
}>;
|
|
1022
|
+
play: (args: {
|
|
1023
|
+
params: {
|
|
1024
|
+
roomId: string;
|
|
1025
|
+
};
|
|
1026
|
+
cache?: RequestCache | undefined;
|
|
1027
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
1028
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
1029
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
1030
|
+
}) => Promise<{
|
|
1031
|
+
status: 500;
|
|
1032
|
+
body: {
|
|
1033
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1034
|
+
error: string;
|
|
1035
|
+
name: "APIError";
|
|
1036
|
+
};
|
|
1037
|
+
headers: Headers;
|
|
1038
|
+
} | {
|
|
1039
|
+
status: 401;
|
|
1040
|
+
body: {
|
|
1041
|
+
code: "UNAUTHORIZED";
|
|
1042
|
+
error: "Unauthorized";
|
|
1043
|
+
name: "APIError";
|
|
1044
|
+
};
|
|
1045
|
+
headers: Headers;
|
|
1046
|
+
} | {
|
|
1047
|
+
status: 403;
|
|
1048
|
+
body: {
|
|
1049
|
+
code: "FORBIDDEN";
|
|
1050
|
+
error: "Forbidden";
|
|
1051
|
+
name: "APIError";
|
|
1052
|
+
};
|
|
1053
|
+
headers: Headers;
|
|
1054
|
+
} | {
|
|
1055
|
+
status: 200;
|
|
1056
|
+
body: undefined;
|
|
1057
|
+
headers: Headers;
|
|
1058
|
+
} | {
|
|
1059
|
+
status: 400;
|
|
1060
|
+
body: {
|
|
1061
|
+
code: "INVALID_VIDEO_ID";
|
|
1062
|
+
error: "The provided video ID is invalid";
|
|
1063
|
+
name: "APIError";
|
|
1064
|
+
} | {
|
|
1065
|
+
code: "NO_TRACK";
|
|
1066
|
+
error: "The room has no track";
|
|
1067
|
+
name: "APIError";
|
|
1068
|
+
};
|
|
1069
|
+
headers: Headers;
|
|
1070
|
+
} | {
|
|
1071
|
+
status: 404;
|
|
1072
|
+
body: {
|
|
1073
|
+
code: "ROOM_NOT_FOUND";
|
|
1074
|
+
error: "The requested room was not found";
|
|
1075
|
+
name: "APIError";
|
|
1076
|
+
};
|
|
1077
|
+
headers: Headers;
|
|
1078
|
+
} | {
|
|
1079
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
1080
|
+
body: unknown;
|
|
1081
|
+
headers: Headers;
|
|
1082
|
+
}>;
|
|
1083
|
+
pause: (args: {
|
|
1084
|
+
params: {
|
|
1085
|
+
roomId: string;
|
|
1086
|
+
};
|
|
1087
|
+
cache?: RequestCache | undefined;
|
|
1088
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
1089
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
1090
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
1091
|
+
}) => Promise<{
|
|
1092
|
+
status: 500;
|
|
1093
|
+
body: {
|
|
1094
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1095
|
+
error: string;
|
|
1096
|
+
name: "APIError";
|
|
1097
|
+
};
|
|
1098
|
+
headers: Headers;
|
|
1099
|
+
} | {
|
|
1100
|
+
status: 401;
|
|
1101
|
+
body: {
|
|
1102
|
+
code: "UNAUTHORIZED";
|
|
1103
|
+
error: "Unauthorized";
|
|
1104
|
+
name: "APIError";
|
|
1105
|
+
};
|
|
1106
|
+
headers: Headers;
|
|
1107
|
+
} | {
|
|
1108
|
+
status: 403;
|
|
1109
|
+
body: {
|
|
1110
|
+
code: "FORBIDDEN";
|
|
1111
|
+
error: "Forbidden";
|
|
1112
|
+
name: "APIError";
|
|
1113
|
+
};
|
|
1114
|
+
headers: Headers;
|
|
1115
|
+
} | {
|
|
1116
|
+
status: 200;
|
|
1117
|
+
body: undefined;
|
|
1118
|
+
headers: Headers;
|
|
1119
|
+
} | {
|
|
1120
|
+
status: 404;
|
|
1121
|
+
body: {
|
|
1122
|
+
code: "ROOM_NOT_FOUND";
|
|
1123
|
+
error: "The requested room was not found";
|
|
1124
|
+
name: "APIError";
|
|
1125
|
+
};
|
|
1126
|
+
headers: Headers;
|
|
1127
|
+
} | {
|
|
1128
|
+
status: 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
1129
|
+
body: unknown;
|
|
1130
|
+
headers: Headers;
|
|
1131
|
+
}>;
|
|
1132
|
+
seek: (args: {
|
|
1133
|
+
params: {
|
|
1134
|
+
roomId: string;
|
|
1135
|
+
};
|
|
1136
|
+
query: {
|
|
1137
|
+
time: number;
|
|
1138
|
+
};
|
|
1139
|
+
cache?: RequestCache | undefined;
|
|
1140
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
1141
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
1142
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
1143
|
+
}) => Promise<{
|
|
1144
|
+
status: 500;
|
|
1145
|
+
body: {
|
|
1146
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1147
|
+
error: string;
|
|
1148
|
+
name: "APIError";
|
|
1149
|
+
};
|
|
1150
|
+
headers: Headers;
|
|
1151
|
+
} | {
|
|
1152
|
+
status: 401;
|
|
1153
|
+
body: {
|
|
1154
|
+
code: "UNAUTHORIZED";
|
|
1155
|
+
error: "Unauthorized";
|
|
1156
|
+
name: "APIError";
|
|
1157
|
+
};
|
|
1158
|
+
headers: Headers;
|
|
1159
|
+
} | {
|
|
1160
|
+
status: 403;
|
|
1161
|
+
body: {
|
|
1162
|
+
code: "FORBIDDEN";
|
|
1163
|
+
error: "Forbidden";
|
|
1164
|
+
name: "APIError";
|
|
1165
|
+
};
|
|
1166
|
+
headers: Headers;
|
|
1167
|
+
} | {
|
|
1168
|
+
status: 200;
|
|
1169
|
+
body: undefined;
|
|
1170
|
+
headers: Headers;
|
|
1171
|
+
} | {
|
|
1172
|
+
status: 400;
|
|
1173
|
+
body: {
|
|
1174
|
+
code: "NO_TRACK";
|
|
1175
|
+
error: "The room has no track";
|
|
1176
|
+
name: "APIError";
|
|
1177
|
+
} | {
|
|
1178
|
+
name: "ZodError";
|
|
1179
|
+
issues: import("zod").objectOutputType<{
|
|
1180
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
1181
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1182
|
+
code: import("zod").ZodNativeEnum<{
|
|
1183
|
+
invalid_type: "invalid_type";
|
|
1184
|
+
invalid_literal: "invalid_literal";
|
|
1185
|
+
custom: "custom";
|
|
1186
|
+
invalid_union: "invalid_union";
|
|
1187
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1188
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1189
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1190
|
+
invalid_arguments: "invalid_arguments";
|
|
1191
|
+
invalid_return_type: "invalid_return_type";
|
|
1192
|
+
invalid_date: "invalid_date";
|
|
1193
|
+
invalid_string: "invalid_string";
|
|
1194
|
+
too_small: "too_small";
|
|
1195
|
+
too_big: "too_big";
|
|
1196
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1197
|
+
not_multiple_of: "not_multiple_of";
|
|
1198
|
+
not_finite: "not_finite";
|
|
1199
|
+
}>;
|
|
1200
|
+
}, import("zod").ZodAny, "strip">[];
|
|
1201
|
+
};
|
|
1202
|
+
headers: Headers;
|
|
1203
|
+
} | {
|
|
1204
|
+
status: 404;
|
|
1205
|
+
body: {
|
|
1206
|
+
code: "ROOM_NOT_FOUND";
|
|
1207
|
+
error: "The requested room was not found";
|
|
1208
|
+
name: "APIError";
|
|
1209
|
+
};
|
|
1210
|
+
headers: Headers;
|
|
1211
|
+
} | {
|
|
1212
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
1213
|
+
body: unknown;
|
|
1214
|
+
headers: Headers;
|
|
1215
|
+
}>;
|
|
1216
|
+
scene: (args: {
|
|
1217
|
+
params: {
|
|
1218
|
+
roomId: string;
|
|
1219
|
+
};
|
|
1220
|
+
body: {
|
|
1221
|
+
type: "addSpeaker";
|
|
1222
|
+
speaker: {
|
|
1223
|
+
x: number;
|
|
1224
|
+
y: number;
|
|
1225
|
+
z: number;
|
|
1226
|
+
yaw: number;
|
|
1227
|
+
pitch: number;
|
|
1228
|
+
directional: boolean;
|
|
1229
|
+
};
|
|
1230
|
+
} | {
|
|
1231
|
+
type: "addCar";
|
|
1232
|
+
car: {
|
|
1233
|
+
x: number;
|
|
1234
|
+
z: number;
|
|
1235
|
+
yaw: number;
|
|
1236
|
+
};
|
|
1237
|
+
} | {
|
|
1238
|
+
type: "remove";
|
|
1239
|
+
id: string;
|
|
1240
|
+
} | {
|
|
1241
|
+
type: "carDoor";
|
|
1242
|
+
id: string;
|
|
1243
|
+
index: number;
|
|
1244
|
+
open: boolean;
|
|
1245
|
+
} | {
|
|
1246
|
+
type: "carWindow";
|
|
1247
|
+
id: string;
|
|
1248
|
+
index: number;
|
|
1249
|
+
open: boolean;
|
|
1250
|
+
} | {
|
|
1251
|
+
type: "carRadio";
|
|
1252
|
+
id: string;
|
|
1253
|
+
on: boolean;
|
|
1254
|
+
} | {
|
|
1255
|
+
type: "reset";
|
|
1256
|
+
};
|
|
1257
|
+
cache?: RequestCache | undefined;
|
|
1258
|
+
extraHeaders?: Record<string, string | undefined> | undefined;
|
|
1259
|
+
fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
|
|
1260
|
+
overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
|
|
1261
|
+
}) => Promise<{
|
|
1262
|
+
status: 500;
|
|
1263
|
+
body: {
|
|
1264
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1265
|
+
error: string;
|
|
1266
|
+
name: "APIError";
|
|
1267
|
+
};
|
|
1268
|
+
headers: Headers;
|
|
1269
|
+
} | {
|
|
1270
|
+
status: 401;
|
|
1271
|
+
body: {
|
|
1272
|
+
code: "UNAUTHORIZED";
|
|
1273
|
+
error: "Unauthorized";
|
|
1274
|
+
name: "APIError";
|
|
1275
|
+
};
|
|
1276
|
+
headers: Headers;
|
|
1277
|
+
} | {
|
|
1278
|
+
status: 403;
|
|
1279
|
+
body: {
|
|
1280
|
+
code: "FORBIDDEN";
|
|
1281
|
+
error: "Forbidden";
|
|
1282
|
+
name: "APIError";
|
|
1283
|
+
};
|
|
1284
|
+
headers: Headers;
|
|
1285
|
+
} | {
|
|
1286
|
+
status: 200;
|
|
1287
|
+
body: undefined;
|
|
1288
|
+
headers: Headers;
|
|
1289
|
+
} | {
|
|
1290
|
+
status: 400;
|
|
1291
|
+
body: {
|
|
1292
|
+
name: "ZodError";
|
|
1293
|
+
issues: import("zod").objectOutputType<{
|
|
1294
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
1295
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1296
|
+
code: import("zod").ZodNativeEnum<{
|
|
1297
|
+
invalid_type: "invalid_type";
|
|
1298
|
+
invalid_literal: "invalid_literal";
|
|
1299
|
+
custom: "custom";
|
|
1300
|
+
invalid_union: "invalid_union";
|
|
1301
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1302
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1303
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1304
|
+
invalid_arguments: "invalid_arguments";
|
|
1305
|
+
invalid_return_type: "invalid_return_type";
|
|
1306
|
+
invalid_date: "invalid_date";
|
|
1307
|
+
invalid_string: "invalid_string";
|
|
1308
|
+
too_small: "too_small";
|
|
1309
|
+
too_big: "too_big";
|
|
1310
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1311
|
+
not_multiple_of: "not_multiple_of";
|
|
1312
|
+
not_finite: "not_finite";
|
|
1313
|
+
}>;
|
|
1314
|
+
}, import("zod").ZodAny, "strip">[];
|
|
1315
|
+
} | {
|
|
1316
|
+
code: "SCENE_FULL";
|
|
1317
|
+
error: "The scene can't have more of this object";
|
|
1318
|
+
name: "APIError";
|
|
1319
|
+
} | {
|
|
1320
|
+
code: "SCENE_OBJECT_NOT_FOUND";
|
|
1321
|
+
error: "The scene object was not found";
|
|
1322
|
+
name: "APIError";
|
|
1323
|
+
};
|
|
1324
|
+
headers: Headers;
|
|
1325
|
+
} | {
|
|
1326
|
+
status: 404;
|
|
1327
|
+
body: {
|
|
1328
|
+
code: "ROOM_NOT_FOUND";
|
|
1329
|
+
error: "The requested room was not found";
|
|
839
1330
|
name: "APIError";
|
|
840
1331
|
};
|
|
841
1332
|
headers: Headers;
|
|
842
1333
|
} | {
|
|
843
|
-
status:
|
|
1334
|
+
status: 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
|
|
844
1335
|
body: unknown;
|
|
845
1336
|
headers: Headers;
|
|
846
1337
|
}>;
|