@darco2903/altv-web-api 1.6.0 → 2.0.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.
@@ -0,0 +1,1623 @@
1
+ import { z } from "zod";
2
+ declare const _default: {
3
+ create: {
4
+ description: "Create a room owned by the logged in user";
5
+ method: "POST";
6
+ body: z.ZodObject<{
7
+ name: z.ZodNullable<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ name: string | null;
10
+ }, {
11
+ name: string | null;
12
+ }>;
13
+ path: "/room";
14
+ responses: {
15
+ 500: z.ZodObject<{
16
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
17
+ error: z.ZodType<string, z.ZodTypeDef, string>;
18
+ name: z.ZodLiteral<"APIError">;
19
+ }, "strip", z.ZodTypeAny, {
20
+ code: "INTERNAL_SERVER_ERROR";
21
+ error: string;
22
+ name: "APIError";
23
+ }, {
24
+ code: "INTERNAL_SERVER_ERROR";
25
+ error: string;
26
+ name: "APIError";
27
+ }>;
28
+ 409: z.ZodObject<{
29
+ code: z.ZodType<"TOO_MANY_ROOMS", z.ZodTypeDef, "TOO_MANY_ROOMS">;
30
+ error: z.ZodType<"You can't own more rooms", z.ZodTypeDef, "You can't own more rooms">;
31
+ name: z.ZodLiteral<"APIError">;
32
+ }, "strip", z.ZodTypeAny, {
33
+ code: "TOO_MANY_ROOMS";
34
+ error: "You can't own more rooms";
35
+ name: "APIError";
36
+ }, {
37
+ code: "TOO_MANY_ROOMS";
38
+ error: "You can't own more rooms";
39
+ name: "APIError";
40
+ }>;
41
+ 401: z.ZodObject<{
42
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
43
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
44
+ name: z.ZodLiteral<"APIError">;
45
+ }, "strip", z.ZodTypeAny, {
46
+ code: "UNAUTHORIZED";
47
+ error: "Unauthorized";
48
+ name: "APIError";
49
+ }, {
50
+ code: "UNAUTHORIZED";
51
+ error: "Unauthorized";
52
+ name: "APIError";
53
+ }>;
54
+ 403: z.ZodObject<{
55
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
56
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
57
+ name: z.ZodLiteral<"APIError">;
58
+ }, "strip", z.ZodTypeAny, {
59
+ code: "FORBIDDEN";
60
+ error: "Forbidden";
61
+ name: "APIError";
62
+ }, {
63
+ code: "FORBIDDEN";
64
+ error: "Forbidden";
65
+ name: "APIError";
66
+ }>;
67
+ 200: z.ZodObject<{
68
+ roomId: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ roomId: string;
71
+ }, {
72
+ roomId: string;
73
+ }>;
74
+ 400: z.ZodObject<{
75
+ name: z.ZodLiteral<"ZodError">;
76
+ issues: z.ZodArray<z.ZodObject<{
77
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
78
+ message: z.ZodOptional<z.ZodString>;
79
+ code: z.ZodNativeEnum<{
80
+ invalid_type: "invalid_type";
81
+ invalid_literal: "invalid_literal";
82
+ custom: "custom";
83
+ invalid_union: "invalid_union";
84
+ invalid_union_discriminator: "invalid_union_discriminator";
85
+ invalid_enum_value: "invalid_enum_value";
86
+ unrecognized_keys: "unrecognized_keys";
87
+ invalid_arguments: "invalid_arguments";
88
+ invalid_return_type: "invalid_return_type";
89
+ invalid_date: "invalid_date";
90
+ invalid_string: "invalid_string";
91
+ too_small: "too_small";
92
+ too_big: "too_big";
93
+ invalid_intersection_types: "invalid_intersection_types";
94
+ not_multiple_of: "not_multiple_of";
95
+ not_finite: "not_finite";
96
+ }>;
97
+ }, "strip", z.ZodAny, z.objectOutputType<{
98
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
99
+ message: z.ZodOptional<z.ZodString>;
100
+ code: z.ZodNativeEnum<{
101
+ invalid_type: "invalid_type";
102
+ invalid_literal: "invalid_literal";
103
+ custom: "custom";
104
+ invalid_union: "invalid_union";
105
+ invalid_union_discriminator: "invalid_union_discriminator";
106
+ invalid_enum_value: "invalid_enum_value";
107
+ unrecognized_keys: "unrecognized_keys";
108
+ invalid_arguments: "invalid_arguments";
109
+ invalid_return_type: "invalid_return_type";
110
+ invalid_date: "invalid_date";
111
+ invalid_string: "invalid_string";
112
+ too_small: "too_small";
113
+ too_big: "too_big";
114
+ invalid_intersection_types: "invalid_intersection_types";
115
+ not_multiple_of: "not_multiple_of";
116
+ not_finite: "not_finite";
117
+ }>;
118
+ }, z.ZodAny, "strip">, z.objectInputType<{
119
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
120
+ message: z.ZodOptional<z.ZodString>;
121
+ code: z.ZodNativeEnum<{
122
+ invalid_type: "invalid_type";
123
+ invalid_literal: "invalid_literal";
124
+ custom: "custom";
125
+ invalid_union: "invalid_union";
126
+ invalid_union_discriminator: "invalid_union_discriminator";
127
+ invalid_enum_value: "invalid_enum_value";
128
+ unrecognized_keys: "unrecognized_keys";
129
+ invalid_arguments: "invalid_arguments";
130
+ invalid_return_type: "invalid_return_type";
131
+ invalid_date: "invalid_date";
132
+ invalid_string: "invalid_string";
133
+ too_small: "too_small";
134
+ too_big: "too_big";
135
+ invalid_intersection_types: "invalid_intersection_types";
136
+ not_multiple_of: "not_multiple_of";
137
+ not_finite: "not_finite";
138
+ }>;
139
+ }, z.ZodAny, "strip">>, "many">;
140
+ }, "strip", z.ZodTypeAny, {
141
+ name: "ZodError";
142
+ issues: z.objectOutputType<{
143
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
144
+ message: z.ZodOptional<z.ZodString>;
145
+ code: z.ZodNativeEnum<{
146
+ invalid_type: "invalid_type";
147
+ invalid_literal: "invalid_literal";
148
+ custom: "custom";
149
+ invalid_union: "invalid_union";
150
+ invalid_union_discriminator: "invalid_union_discriminator";
151
+ invalid_enum_value: "invalid_enum_value";
152
+ unrecognized_keys: "unrecognized_keys";
153
+ invalid_arguments: "invalid_arguments";
154
+ invalid_return_type: "invalid_return_type";
155
+ invalid_date: "invalid_date";
156
+ invalid_string: "invalid_string";
157
+ too_small: "too_small";
158
+ too_big: "too_big";
159
+ invalid_intersection_types: "invalid_intersection_types";
160
+ not_multiple_of: "not_multiple_of";
161
+ not_finite: "not_finite";
162
+ }>;
163
+ }, z.ZodAny, "strip">[];
164
+ }, {
165
+ name: "ZodError";
166
+ issues: z.objectInputType<{
167
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
168
+ message: z.ZodOptional<z.ZodString>;
169
+ code: z.ZodNativeEnum<{
170
+ invalid_type: "invalid_type";
171
+ invalid_literal: "invalid_literal";
172
+ custom: "custom";
173
+ invalid_union: "invalid_union";
174
+ invalid_union_discriminator: "invalid_union_discriminator";
175
+ invalid_enum_value: "invalid_enum_value";
176
+ unrecognized_keys: "unrecognized_keys";
177
+ invalid_arguments: "invalid_arguments";
178
+ invalid_return_type: "invalid_return_type";
179
+ invalid_date: "invalid_date";
180
+ invalid_string: "invalid_string";
181
+ too_small: "too_small";
182
+ too_big: "too_big";
183
+ invalid_intersection_types: "invalid_intersection_types";
184
+ not_multiple_of: "not_multiple_of";
185
+ not_finite: "not_finite";
186
+ }>;
187
+ }, z.ZodAny, "strip">[];
188
+ }>;
189
+ };
190
+ };
191
+ list: {
192
+ description: "Rooms owned by the logged in user";
193
+ method: "GET";
194
+ path: "/room";
195
+ responses: {
196
+ 500: z.ZodObject<{
197
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
198
+ error: z.ZodType<string, z.ZodTypeDef, string>;
199
+ name: z.ZodLiteral<"APIError">;
200
+ }, "strip", z.ZodTypeAny, {
201
+ code: "INTERNAL_SERVER_ERROR";
202
+ error: string;
203
+ name: "APIError";
204
+ }, {
205
+ code: "INTERNAL_SERVER_ERROR";
206
+ error: string;
207
+ name: "APIError";
208
+ }>;
209
+ 401: z.ZodObject<{
210
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
211
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
212
+ name: z.ZodLiteral<"APIError">;
213
+ }, "strip", z.ZodTypeAny, {
214
+ code: "UNAUTHORIZED";
215
+ error: "Unauthorized";
216
+ name: "APIError";
217
+ }, {
218
+ code: "UNAUTHORIZED";
219
+ error: "Unauthorized";
220
+ name: "APIError";
221
+ }>;
222
+ 403: z.ZodObject<{
223
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
224
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
225
+ name: z.ZodLiteral<"APIError">;
226
+ }, "strip", z.ZodTypeAny, {
227
+ code: "FORBIDDEN";
228
+ error: "Forbidden";
229
+ name: "APIError";
230
+ }, {
231
+ code: "FORBIDDEN";
232
+ error: "Forbidden";
233
+ name: "APIError";
234
+ }>;
235
+ 200: z.ZodObject<{
236
+ rooms: z.ZodArray<z.ZodObject<{
237
+ roomId: z.ZodString;
238
+ name: z.ZodNullable<z.ZodString>;
239
+ track: z.ZodNullable<z.ZodObject<{
240
+ videoId: z.ZodString;
241
+ title: z.ZodString;
242
+ duration: z.ZodNumber;
243
+ }, "strip", z.ZodTypeAny, {
244
+ videoId: string;
245
+ title: string;
246
+ duration: number;
247
+ }, {
248
+ videoId: string;
249
+ title: string;
250
+ duration: number;
251
+ }>>;
252
+ paused: z.ZodBoolean;
253
+ }, "strip", z.ZodTypeAny, {
254
+ name: string | null;
255
+ roomId: string;
256
+ track: {
257
+ videoId: string;
258
+ title: string;
259
+ duration: number;
260
+ } | null;
261
+ paused: boolean;
262
+ }, {
263
+ name: string | null;
264
+ roomId: string;
265
+ track: {
266
+ videoId: string;
267
+ title: string;
268
+ duration: number;
269
+ } | null;
270
+ paused: boolean;
271
+ }>, "many">;
272
+ }, "strip", z.ZodTypeAny, {
273
+ rooms: {
274
+ name: string | null;
275
+ roomId: string;
276
+ track: {
277
+ videoId: string;
278
+ title: string;
279
+ duration: number;
280
+ } | null;
281
+ paused: boolean;
282
+ }[];
283
+ }, {
284
+ rooms: {
285
+ name: string | null;
286
+ roomId: string;
287
+ track: {
288
+ videoId: string;
289
+ title: string;
290
+ duration: number;
291
+ } | null;
292
+ paused: boolean;
293
+ }[];
294
+ }>;
295
+ };
296
+ };
297
+ get: {
298
+ description: "Get the state of a room";
299
+ method: "GET";
300
+ path: "/room/:roomId";
301
+ responses: {
302
+ 500: z.ZodObject<{
303
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
304
+ error: z.ZodType<string, z.ZodTypeDef, string>;
305
+ name: z.ZodLiteral<"APIError">;
306
+ }, "strip", z.ZodTypeAny, {
307
+ code: "INTERNAL_SERVER_ERROR";
308
+ error: string;
309
+ name: "APIError";
310
+ }, {
311
+ code: "INTERNAL_SERVER_ERROR";
312
+ error: string;
313
+ name: "APIError";
314
+ }>;
315
+ 404: z.ZodObject<{
316
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
317
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
318
+ name: z.ZodLiteral<"APIError">;
319
+ }, "strip", z.ZodTypeAny, {
320
+ code: "ROOM_NOT_FOUND";
321
+ error: "The requested room was not found";
322
+ name: "APIError";
323
+ }, {
324
+ code: "ROOM_NOT_FOUND";
325
+ error: "The requested room was not found";
326
+ name: "APIError";
327
+ }>;
328
+ 200: z.ZodObject<{
329
+ roomId: z.ZodString;
330
+ name: z.ZodNullable<z.ZodString>;
331
+ ownerId: z.ZodString;
332
+ track: z.ZodNullable<z.ZodObject<{
333
+ videoId: z.ZodString;
334
+ title: z.ZodString;
335
+ duration: z.ZodNumber;
336
+ }, "strip", z.ZodTypeAny, {
337
+ videoId: string;
338
+ title: string;
339
+ duration: number;
340
+ }, {
341
+ videoId: string;
342
+ title: string;
343
+ duration: number;
344
+ }>>;
345
+ url: z.ZodNullable<z.ZodString>;
346
+ paused: z.ZodBoolean;
347
+ startTime: z.ZodNumber;
348
+ currentTime: z.ZodNumber;
349
+ scene: z.ZodObject<{
350
+ speakers: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodString;
352
+ x: z.ZodNumber;
353
+ y: z.ZodNumber;
354
+ z: z.ZodNumber;
355
+ yaw: z.ZodNumber;
356
+ pitch: z.ZodNumber;
357
+ directional: z.ZodBoolean;
358
+ }, "strip", z.ZodTypeAny, {
359
+ id: string;
360
+ x: number;
361
+ y: number;
362
+ z: number;
363
+ yaw: number;
364
+ pitch: number;
365
+ directional: boolean;
366
+ }, {
367
+ id: string;
368
+ x: number;
369
+ y: number;
370
+ z: number;
371
+ yaw: number;
372
+ pitch: number;
373
+ directional: boolean;
374
+ }>, "many">;
375
+ cars: z.ZodArray<z.ZodObject<{
376
+ id: z.ZodString;
377
+ x: z.ZodNumber;
378
+ z: z.ZodNumber;
379
+ yaw: z.ZodNumber;
380
+ doors: z.ZodArray<z.ZodBoolean, "many">;
381
+ windows: z.ZodArray<z.ZodBoolean, "many">;
382
+ radio: z.ZodBoolean;
383
+ }, "strip", z.ZodTypeAny, {
384
+ id: string;
385
+ x: number;
386
+ z: number;
387
+ yaw: number;
388
+ doors: boolean[];
389
+ windows: boolean[];
390
+ radio: boolean;
391
+ }, {
392
+ id: string;
393
+ x: number;
394
+ z: number;
395
+ yaw: number;
396
+ doors: boolean[];
397
+ windows: boolean[];
398
+ radio: boolean;
399
+ }>, "many">;
400
+ }, "strip", z.ZodTypeAny, {
401
+ speakers: {
402
+ id: string;
403
+ x: number;
404
+ y: number;
405
+ z: number;
406
+ yaw: number;
407
+ pitch: number;
408
+ directional: boolean;
409
+ }[];
410
+ cars: {
411
+ id: string;
412
+ x: number;
413
+ z: number;
414
+ yaw: number;
415
+ doors: boolean[];
416
+ windows: boolean[];
417
+ radio: boolean;
418
+ }[];
419
+ }, {
420
+ speakers: {
421
+ id: string;
422
+ x: number;
423
+ y: number;
424
+ z: number;
425
+ yaw: number;
426
+ pitch: number;
427
+ directional: boolean;
428
+ }[];
429
+ cars: {
430
+ id: string;
431
+ x: number;
432
+ z: number;
433
+ yaw: number;
434
+ doors: boolean[];
435
+ windows: boolean[];
436
+ radio: boolean;
437
+ }[];
438
+ }>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ name: string | null;
441
+ roomId: string;
442
+ ownerId: string;
443
+ track: {
444
+ videoId: string;
445
+ title: string;
446
+ duration: number;
447
+ } | null;
448
+ url: string | null;
449
+ paused: boolean;
450
+ startTime: number;
451
+ currentTime: number;
452
+ scene: {
453
+ speakers: {
454
+ id: string;
455
+ x: number;
456
+ y: number;
457
+ z: number;
458
+ yaw: number;
459
+ pitch: number;
460
+ directional: boolean;
461
+ }[];
462
+ cars: {
463
+ id: string;
464
+ x: number;
465
+ z: number;
466
+ yaw: number;
467
+ doors: boolean[];
468
+ windows: boolean[];
469
+ radio: boolean;
470
+ }[];
471
+ };
472
+ }, {
473
+ name: string | null;
474
+ roomId: string;
475
+ ownerId: string;
476
+ track: {
477
+ videoId: string;
478
+ title: string;
479
+ duration: number;
480
+ } | null;
481
+ url: string | null;
482
+ paused: boolean;
483
+ startTime: number;
484
+ currentTime: number;
485
+ scene: {
486
+ speakers: {
487
+ id: string;
488
+ x: number;
489
+ y: number;
490
+ z: number;
491
+ yaw: number;
492
+ pitch: number;
493
+ directional: boolean;
494
+ }[];
495
+ cars: {
496
+ id: string;
497
+ x: number;
498
+ z: number;
499
+ yaw: number;
500
+ doors: boolean[];
501
+ windows: boolean[];
502
+ radio: boolean;
503
+ }[];
504
+ };
505
+ }>;
506
+ };
507
+ };
508
+ rename: {
509
+ description: "Rename a room, owner only, listeners get the name through the roomName socket event";
510
+ method: "PATCH";
511
+ body: z.ZodObject<{
512
+ name: z.ZodNullable<z.ZodString>;
513
+ }, "strip", z.ZodTypeAny, {
514
+ name: string | null;
515
+ }, {
516
+ name: string | null;
517
+ }>;
518
+ path: "/room/:roomId";
519
+ responses: {
520
+ 500: z.ZodObject<{
521
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
522
+ error: z.ZodType<string, z.ZodTypeDef, string>;
523
+ name: z.ZodLiteral<"APIError">;
524
+ }, "strip", z.ZodTypeAny, {
525
+ code: "INTERNAL_SERVER_ERROR";
526
+ error: string;
527
+ name: "APIError";
528
+ }, {
529
+ code: "INTERNAL_SERVER_ERROR";
530
+ error: string;
531
+ name: "APIError";
532
+ }>;
533
+ 404: z.ZodObject<{
534
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
535
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
536
+ name: z.ZodLiteral<"APIError">;
537
+ }, "strip", z.ZodTypeAny, {
538
+ code: "ROOM_NOT_FOUND";
539
+ error: "The requested room was not found";
540
+ name: "APIError";
541
+ }, {
542
+ code: "ROOM_NOT_FOUND";
543
+ error: "The requested room was not found";
544
+ name: "APIError";
545
+ }>;
546
+ 401: z.ZodObject<{
547
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
548
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
549
+ name: z.ZodLiteral<"APIError">;
550
+ }, "strip", z.ZodTypeAny, {
551
+ code: "UNAUTHORIZED";
552
+ error: "Unauthorized";
553
+ name: "APIError";
554
+ }, {
555
+ code: "UNAUTHORIZED";
556
+ error: "Unauthorized";
557
+ name: "APIError";
558
+ }>;
559
+ 403: z.ZodObject<{
560
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
561
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
562
+ name: z.ZodLiteral<"APIError">;
563
+ }, "strip", z.ZodTypeAny, {
564
+ code: "FORBIDDEN";
565
+ error: "Forbidden";
566
+ name: "APIError";
567
+ }, {
568
+ code: "FORBIDDEN";
569
+ error: "Forbidden";
570
+ name: "APIError";
571
+ }>;
572
+ 200: typeof import("@ts-rest/core").ContractNoBody;
573
+ 400: z.ZodObject<{
574
+ name: z.ZodLiteral<"ZodError">;
575
+ issues: z.ZodArray<z.ZodObject<{
576
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
577
+ message: z.ZodOptional<z.ZodString>;
578
+ code: z.ZodNativeEnum<{
579
+ invalid_type: "invalid_type";
580
+ invalid_literal: "invalid_literal";
581
+ custom: "custom";
582
+ invalid_union: "invalid_union";
583
+ invalid_union_discriminator: "invalid_union_discriminator";
584
+ invalid_enum_value: "invalid_enum_value";
585
+ unrecognized_keys: "unrecognized_keys";
586
+ invalid_arguments: "invalid_arguments";
587
+ invalid_return_type: "invalid_return_type";
588
+ invalid_date: "invalid_date";
589
+ invalid_string: "invalid_string";
590
+ too_small: "too_small";
591
+ too_big: "too_big";
592
+ invalid_intersection_types: "invalid_intersection_types";
593
+ not_multiple_of: "not_multiple_of";
594
+ not_finite: "not_finite";
595
+ }>;
596
+ }, "strip", z.ZodAny, z.objectOutputType<{
597
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
598
+ message: z.ZodOptional<z.ZodString>;
599
+ code: z.ZodNativeEnum<{
600
+ invalid_type: "invalid_type";
601
+ invalid_literal: "invalid_literal";
602
+ custom: "custom";
603
+ invalid_union: "invalid_union";
604
+ invalid_union_discriminator: "invalid_union_discriminator";
605
+ invalid_enum_value: "invalid_enum_value";
606
+ unrecognized_keys: "unrecognized_keys";
607
+ invalid_arguments: "invalid_arguments";
608
+ invalid_return_type: "invalid_return_type";
609
+ invalid_date: "invalid_date";
610
+ invalid_string: "invalid_string";
611
+ too_small: "too_small";
612
+ too_big: "too_big";
613
+ invalid_intersection_types: "invalid_intersection_types";
614
+ not_multiple_of: "not_multiple_of";
615
+ not_finite: "not_finite";
616
+ }>;
617
+ }, z.ZodAny, "strip">, z.objectInputType<{
618
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
619
+ message: z.ZodOptional<z.ZodString>;
620
+ code: z.ZodNativeEnum<{
621
+ invalid_type: "invalid_type";
622
+ invalid_literal: "invalid_literal";
623
+ custom: "custom";
624
+ invalid_union: "invalid_union";
625
+ invalid_union_discriminator: "invalid_union_discriminator";
626
+ invalid_enum_value: "invalid_enum_value";
627
+ unrecognized_keys: "unrecognized_keys";
628
+ invalid_arguments: "invalid_arguments";
629
+ invalid_return_type: "invalid_return_type";
630
+ invalid_date: "invalid_date";
631
+ invalid_string: "invalid_string";
632
+ too_small: "too_small";
633
+ too_big: "too_big";
634
+ invalid_intersection_types: "invalid_intersection_types";
635
+ not_multiple_of: "not_multiple_of";
636
+ not_finite: "not_finite";
637
+ }>;
638
+ }, z.ZodAny, "strip">>, "many">;
639
+ }, "strip", z.ZodTypeAny, {
640
+ name: "ZodError";
641
+ issues: z.objectOutputType<{
642
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
643
+ message: z.ZodOptional<z.ZodString>;
644
+ code: z.ZodNativeEnum<{
645
+ invalid_type: "invalid_type";
646
+ invalid_literal: "invalid_literal";
647
+ custom: "custom";
648
+ invalid_union: "invalid_union";
649
+ invalid_union_discriminator: "invalid_union_discriminator";
650
+ invalid_enum_value: "invalid_enum_value";
651
+ unrecognized_keys: "unrecognized_keys";
652
+ invalid_arguments: "invalid_arguments";
653
+ invalid_return_type: "invalid_return_type";
654
+ invalid_date: "invalid_date";
655
+ invalid_string: "invalid_string";
656
+ too_small: "too_small";
657
+ too_big: "too_big";
658
+ invalid_intersection_types: "invalid_intersection_types";
659
+ not_multiple_of: "not_multiple_of";
660
+ not_finite: "not_finite";
661
+ }>;
662
+ }, z.ZodAny, "strip">[];
663
+ }, {
664
+ name: "ZodError";
665
+ issues: z.objectInputType<{
666
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
667
+ message: z.ZodOptional<z.ZodString>;
668
+ code: z.ZodNativeEnum<{
669
+ invalid_type: "invalid_type";
670
+ invalid_literal: "invalid_literal";
671
+ custom: "custom";
672
+ invalid_union: "invalid_union";
673
+ invalid_union_discriminator: "invalid_union_discriminator";
674
+ invalid_enum_value: "invalid_enum_value";
675
+ unrecognized_keys: "unrecognized_keys";
676
+ invalid_arguments: "invalid_arguments";
677
+ invalid_return_type: "invalid_return_type";
678
+ invalid_date: "invalid_date";
679
+ invalid_string: "invalid_string";
680
+ too_small: "too_small";
681
+ too_big: "too_big";
682
+ invalid_intersection_types: "invalid_intersection_types";
683
+ not_multiple_of: "not_multiple_of";
684
+ not_finite: "not_finite";
685
+ }>;
686
+ }, z.ZodAny, "strip">[];
687
+ }>;
688
+ };
689
+ };
690
+ delete: {
691
+ description: "Delete a room, owner only";
692
+ method: "DELETE";
693
+ body: z.ZodUndefined;
694
+ path: "/room/:roomId";
695
+ responses: {
696
+ 500: z.ZodObject<{
697
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
698
+ error: z.ZodType<string, z.ZodTypeDef, string>;
699
+ name: z.ZodLiteral<"APIError">;
700
+ }, "strip", z.ZodTypeAny, {
701
+ code: "INTERNAL_SERVER_ERROR";
702
+ error: string;
703
+ name: "APIError";
704
+ }, {
705
+ code: "INTERNAL_SERVER_ERROR";
706
+ error: string;
707
+ name: "APIError";
708
+ }>;
709
+ 404: z.ZodObject<{
710
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
711
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
712
+ name: z.ZodLiteral<"APIError">;
713
+ }, "strip", z.ZodTypeAny, {
714
+ code: "ROOM_NOT_FOUND";
715
+ error: "The requested room was not found";
716
+ name: "APIError";
717
+ }, {
718
+ code: "ROOM_NOT_FOUND";
719
+ error: "The requested room was not found";
720
+ name: "APIError";
721
+ }>;
722
+ 401: z.ZodObject<{
723
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
724
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
725
+ name: z.ZodLiteral<"APIError">;
726
+ }, "strip", z.ZodTypeAny, {
727
+ code: "UNAUTHORIZED";
728
+ error: "Unauthorized";
729
+ name: "APIError";
730
+ }, {
731
+ code: "UNAUTHORIZED";
732
+ error: "Unauthorized";
733
+ name: "APIError";
734
+ }>;
735
+ 403: z.ZodObject<{
736
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
737
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
738
+ name: z.ZodLiteral<"APIError">;
739
+ }, "strip", z.ZodTypeAny, {
740
+ code: "FORBIDDEN";
741
+ error: "Forbidden";
742
+ name: "APIError";
743
+ }, {
744
+ code: "FORBIDDEN";
745
+ error: "Forbidden";
746
+ name: "APIError";
747
+ }>;
748
+ 200: typeof import("@ts-rest/core").ContractNoBody;
749
+ };
750
+ };
751
+ track: {
752
+ description: "Play a YouTube video in a room, listeners switch through the roomTrack socket event. Resolves once it plays, a cache miss downloads the whole video first";
753
+ method: "POST";
754
+ body: z.ZodObject<{
755
+ videoId: z.ZodString;
756
+ }, "strip", z.ZodTypeAny, {
757
+ videoId: string;
758
+ }, {
759
+ videoId: string;
760
+ }>;
761
+ path: "/room/:roomId/track";
762
+ responses: {
763
+ 500: z.ZodObject<{
764
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
765
+ error: z.ZodType<string, z.ZodTypeDef, string>;
766
+ name: z.ZodLiteral<"APIError">;
767
+ }, "strip", z.ZodTypeAny, {
768
+ code: "INTERNAL_SERVER_ERROR";
769
+ error: string;
770
+ name: "APIError";
771
+ }, {
772
+ code: "INTERNAL_SERVER_ERROR";
773
+ error: string;
774
+ name: "APIError";
775
+ }>;
776
+ 404: z.ZodObject<{
777
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
778
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
779
+ name: z.ZodLiteral<"APIError">;
780
+ }, "strip", z.ZodTypeAny, {
781
+ code: "ROOM_NOT_FOUND";
782
+ error: "The requested room was not found";
783
+ name: "APIError";
784
+ }, {
785
+ code: "ROOM_NOT_FOUND";
786
+ error: "The requested room was not found";
787
+ name: "APIError";
788
+ }>;
789
+ 401: z.ZodObject<{
790
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
791
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
792
+ name: z.ZodLiteral<"APIError">;
793
+ }, "strip", z.ZodTypeAny, {
794
+ code: "UNAUTHORIZED";
795
+ error: "Unauthorized";
796
+ name: "APIError";
797
+ }, {
798
+ code: "UNAUTHORIZED";
799
+ error: "Unauthorized";
800
+ name: "APIError";
801
+ }>;
802
+ 403: z.ZodObject<{
803
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
804
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
805
+ name: z.ZodLiteral<"APIError">;
806
+ }, "strip", z.ZodTypeAny, {
807
+ code: "FORBIDDEN";
808
+ error: "Forbidden";
809
+ name: "APIError";
810
+ }, {
811
+ code: "FORBIDDEN";
812
+ error: "Forbidden";
813
+ name: "APIError";
814
+ }>;
815
+ 200: typeof import("@ts-rest/core").ContractNoBody;
816
+ 400: z.ZodUnion<[z.ZodObject<{
817
+ name: z.ZodLiteral<"ZodError">;
818
+ issues: z.ZodArray<z.ZodObject<{
819
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
820
+ message: z.ZodOptional<z.ZodString>;
821
+ code: z.ZodNativeEnum<{
822
+ invalid_type: "invalid_type";
823
+ invalid_literal: "invalid_literal";
824
+ custom: "custom";
825
+ invalid_union: "invalid_union";
826
+ invalid_union_discriminator: "invalid_union_discriminator";
827
+ invalid_enum_value: "invalid_enum_value";
828
+ unrecognized_keys: "unrecognized_keys";
829
+ invalid_arguments: "invalid_arguments";
830
+ invalid_return_type: "invalid_return_type";
831
+ invalid_date: "invalid_date";
832
+ invalid_string: "invalid_string";
833
+ too_small: "too_small";
834
+ too_big: "too_big";
835
+ invalid_intersection_types: "invalid_intersection_types";
836
+ not_multiple_of: "not_multiple_of";
837
+ not_finite: "not_finite";
838
+ }>;
839
+ }, "strip", z.ZodAny, z.objectOutputType<{
840
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
841
+ message: z.ZodOptional<z.ZodString>;
842
+ code: z.ZodNativeEnum<{
843
+ invalid_type: "invalid_type";
844
+ invalid_literal: "invalid_literal";
845
+ custom: "custom";
846
+ invalid_union: "invalid_union";
847
+ invalid_union_discriminator: "invalid_union_discriminator";
848
+ invalid_enum_value: "invalid_enum_value";
849
+ unrecognized_keys: "unrecognized_keys";
850
+ invalid_arguments: "invalid_arguments";
851
+ invalid_return_type: "invalid_return_type";
852
+ invalid_date: "invalid_date";
853
+ invalid_string: "invalid_string";
854
+ too_small: "too_small";
855
+ too_big: "too_big";
856
+ invalid_intersection_types: "invalid_intersection_types";
857
+ not_multiple_of: "not_multiple_of";
858
+ not_finite: "not_finite";
859
+ }>;
860
+ }, z.ZodAny, "strip">, z.objectInputType<{
861
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
862
+ message: z.ZodOptional<z.ZodString>;
863
+ code: z.ZodNativeEnum<{
864
+ invalid_type: "invalid_type";
865
+ invalid_literal: "invalid_literal";
866
+ custom: "custom";
867
+ invalid_union: "invalid_union";
868
+ invalid_union_discriminator: "invalid_union_discriminator";
869
+ invalid_enum_value: "invalid_enum_value";
870
+ unrecognized_keys: "unrecognized_keys";
871
+ invalid_arguments: "invalid_arguments";
872
+ invalid_return_type: "invalid_return_type";
873
+ invalid_date: "invalid_date";
874
+ invalid_string: "invalid_string";
875
+ too_small: "too_small";
876
+ too_big: "too_big";
877
+ invalid_intersection_types: "invalid_intersection_types";
878
+ not_multiple_of: "not_multiple_of";
879
+ not_finite: "not_finite";
880
+ }>;
881
+ }, z.ZodAny, "strip">>, "many">;
882
+ }, "strip", z.ZodTypeAny, {
883
+ name: "ZodError";
884
+ issues: z.objectOutputType<{
885
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
886
+ message: z.ZodOptional<z.ZodString>;
887
+ code: z.ZodNativeEnum<{
888
+ invalid_type: "invalid_type";
889
+ invalid_literal: "invalid_literal";
890
+ custom: "custom";
891
+ invalid_union: "invalid_union";
892
+ invalid_union_discriminator: "invalid_union_discriminator";
893
+ invalid_enum_value: "invalid_enum_value";
894
+ unrecognized_keys: "unrecognized_keys";
895
+ invalid_arguments: "invalid_arguments";
896
+ invalid_return_type: "invalid_return_type";
897
+ invalid_date: "invalid_date";
898
+ invalid_string: "invalid_string";
899
+ too_small: "too_small";
900
+ too_big: "too_big";
901
+ invalid_intersection_types: "invalid_intersection_types";
902
+ not_multiple_of: "not_multiple_of";
903
+ not_finite: "not_finite";
904
+ }>;
905
+ }, z.ZodAny, "strip">[];
906
+ }, {
907
+ name: "ZodError";
908
+ issues: z.objectInputType<{
909
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
910
+ message: z.ZodOptional<z.ZodString>;
911
+ code: z.ZodNativeEnum<{
912
+ invalid_type: "invalid_type";
913
+ invalid_literal: "invalid_literal";
914
+ custom: "custom";
915
+ invalid_union: "invalid_union";
916
+ invalid_union_discriminator: "invalid_union_discriminator";
917
+ invalid_enum_value: "invalid_enum_value";
918
+ unrecognized_keys: "unrecognized_keys";
919
+ invalid_arguments: "invalid_arguments";
920
+ invalid_return_type: "invalid_return_type";
921
+ invalid_date: "invalid_date";
922
+ invalid_string: "invalid_string";
923
+ too_small: "too_small";
924
+ too_big: "too_big";
925
+ invalid_intersection_types: "invalid_intersection_types";
926
+ not_multiple_of: "not_multiple_of";
927
+ not_finite: "not_finite";
928
+ }>;
929
+ }, z.ZodAny, "strip">[];
930
+ }>, z.ZodObject<{
931
+ code: z.ZodType<"INVALID_VIDEO_ID", z.ZodTypeDef, "INVALID_VIDEO_ID">;
932
+ error: z.ZodType<"The provided video ID is invalid", z.ZodTypeDef, "The provided video ID is invalid">;
933
+ name: z.ZodLiteral<"APIError">;
934
+ }, "strip", z.ZodTypeAny, {
935
+ code: "INVALID_VIDEO_ID";
936
+ error: "The provided video ID is invalid";
937
+ name: "APIError";
938
+ }, {
939
+ code: "INVALID_VIDEO_ID";
940
+ error: "The provided video ID is invalid";
941
+ name: "APIError";
942
+ }>]>;
943
+ };
944
+ };
945
+ play: {
946
+ description: "Play the track of a room, from its position. A room without a stream starts a new one";
947
+ method: "POST";
948
+ body: z.ZodUndefined;
949
+ path: "/room/:roomId/play";
950
+ responses: {
951
+ 500: z.ZodObject<{
952
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
953
+ error: z.ZodType<string, z.ZodTypeDef, string>;
954
+ name: z.ZodLiteral<"APIError">;
955
+ }, "strip", z.ZodTypeAny, {
956
+ code: "INTERNAL_SERVER_ERROR";
957
+ error: string;
958
+ name: "APIError";
959
+ }, {
960
+ code: "INTERNAL_SERVER_ERROR";
961
+ error: string;
962
+ name: "APIError";
963
+ }>;
964
+ 404: z.ZodObject<{
965
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
966
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
967
+ name: z.ZodLiteral<"APIError">;
968
+ }, "strip", z.ZodTypeAny, {
969
+ code: "ROOM_NOT_FOUND";
970
+ error: "The requested room was not found";
971
+ name: "APIError";
972
+ }, {
973
+ code: "ROOM_NOT_FOUND";
974
+ error: "The requested room was not found";
975
+ name: "APIError";
976
+ }>;
977
+ 401: z.ZodObject<{
978
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
979
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
980
+ name: z.ZodLiteral<"APIError">;
981
+ }, "strip", z.ZodTypeAny, {
982
+ code: "UNAUTHORIZED";
983
+ error: "Unauthorized";
984
+ name: "APIError";
985
+ }, {
986
+ code: "UNAUTHORIZED";
987
+ error: "Unauthorized";
988
+ name: "APIError";
989
+ }>;
990
+ 403: z.ZodObject<{
991
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
992
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
993
+ name: z.ZodLiteral<"APIError">;
994
+ }, "strip", z.ZodTypeAny, {
995
+ code: "FORBIDDEN";
996
+ error: "Forbidden";
997
+ name: "APIError";
998
+ }, {
999
+ code: "FORBIDDEN";
1000
+ error: "Forbidden";
1001
+ name: "APIError";
1002
+ }>;
1003
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1004
+ 400: z.ZodUnion<[z.ZodObject<{
1005
+ code: z.ZodType<"NO_TRACK", z.ZodTypeDef, "NO_TRACK">;
1006
+ error: z.ZodType<"The room has no track", z.ZodTypeDef, "The room has no track">;
1007
+ name: z.ZodLiteral<"APIError">;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ code: "NO_TRACK";
1010
+ error: "The room has no track";
1011
+ name: "APIError";
1012
+ }, {
1013
+ code: "NO_TRACK";
1014
+ error: "The room has no track";
1015
+ name: "APIError";
1016
+ }>, z.ZodObject<{
1017
+ code: z.ZodType<"INVALID_VIDEO_ID", z.ZodTypeDef, "INVALID_VIDEO_ID">;
1018
+ error: z.ZodType<"The provided video ID is invalid", z.ZodTypeDef, "The provided video ID is invalid">;
1019
+ name: z.ZodLiteral<"APIError">;
1020
+ }, "strip", z.ZodTypeAny, {
1021
+ code: "INVALID_VIDEO_ID";
1022
+ error: "The provided video ID is invalid";
1023
+ name: "APIError";
1024
+ }, {
1025
+ code: "INVALID_VIDEO_ID";
1026
+ error: "The provided video ID is invalid";
1027
+ name: "APIError";
1028
+ }>]>;
1029
+ };
1030
+ };
1031
+ pause: {
1032
+ description: "Pause a room";
1033
+ method: "POST";
1034
+ body: z.ZodUndefined;
1035
+ path: "/room/:roomId/pause";
1036
+ responses: {
1037
+ 500: z.ZodObject<{
1038
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1039
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1040
+ name: z.ZodLiteral<"APIError">;
1041
+ }, "strip", z.ZodTypeAny, {
1042
+ code: "INTERNAL_SERVER_ERROR";
1043
+ error: string;
1044
+ name: "APIError";
1045
+ }, {
1046
+ code: "INTERNAL_SERVER_ERROR";
1047
+ error: string;
1048
+ name: "APIError";
1049
+ }>;
1050
+ 404: z.ZodObject<{
1051
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1052
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1053
+ name: z.ZodLiteral<"APIError">;
1054
+ }, "strip", z.ZodTypeAny, {
1055
+ code: "ROOM_NOT_FOUND";
1056
+ error: "The requested room was not found";
1057
+ name: "APIError";
1058
+ }, {
1059
+ code: "ROOM_NOT_FOUND";
1060
+ error: "The requested room was not found";
1061
+ name: "APIError";
1062
+ }>;
1063
+ 401: z.ZodObject<{
1064
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1065
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1066
+ name: z.ZodLiteral<"APIError">;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ code: "UNAUTHORIZED";
1069
+ error: "Unauthorized";
1070
+ name: "APIError";
1071
+ }, {
1072
+ code: "UNAUTHORIZED";
1073
+ error: "Unauthorized";
1074
+ name: "APIError";
1075
+ }>;
1076
+ 403: z.ZodObject<{
1077
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1078
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1079
+ name: z.ZodLiteral<"APIError">;
1080
+ }, "strip", z.ZodTypeAny, {
1081
+ code: "FORBIDDEN";
1082
+ error: "Forbidden";
1083
+ name: "APIError";
1084
+ }, {
1085
+ code: "FORBIDDEN";
1086
+ error: "Forbidden";
1087
+ name: "APIError";
1088
+ }>;
1089
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1090
+ };
1091
+ };
1092
+ seek: {
1093
+ query: z.ZodObject<{
1094
+ time: z.ZodNumber;
1095
+ }, "strip", z.ZodTypeAny, {
1096
+ time: number;
1097
+ }, {
1098
+ time: number;
1099
+ }>;
1100
+ description: "Seek the track of a room";
1101
+ method: "POST";
1102
+ body: z.ZodUndefined;
1103
+ path: "/room/:roomId/seek";
1104
+ responses: {
1105
+ 500: z.ZodObject<{
1106
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1107
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1108
+ name: z.ZodLiteral<"APIError">;
1109
+ }, "strip", z.ZodTypeAny, {
1110
+ code: "INTERNAL_SERVER_ERROR";
1111
+ error: string;
1112
+ name: "APIError";
1113
+ }, {
1114
+ code: "INTERNAL_SERVER_ERROR";
1115
+ error: string;
1116
+ name: "APIError";
1117
+ }>;
1118
+ 404: z.ZodObject<{
1119
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1120
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1121
+ name: z.ZodLiteral<"APIError">;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ code: "ROOM_NOT_FOUND";
1124
+ error: "The requested room was not found";
1125
+ name: "APIError";
1126
+ }, {
1127
+ code: "ROOM_NOT_FOUND";
1128
+ error: "The requested room was not found";
1129
+ name: "APIError";
1130
+ }>;
1131
+ 401: z.ZodObject<{
1132
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1133
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1134
+ name: z.ZodLiteral<"APIError">;
1135
+ }, "strip", z.ZodTypeAny, {
1136
+ code: "UNAUTHORIZED";
1137
+ error: "Unauthorized";
1138
+ name: "APIError";
1139
+ }, {
1140
+ code: "UNAUTHORIZED";
1141
+ error: "Unauthorized";
1142
+ name: "APIError";
1143
+ }>;
1144
+ 403: z.ZodObject<{
1145
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1146
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1147
+ name: z.ZodLiteral<"APIError">;
1148
+ }, "strip", z.ZodTypeAny, {
1149
+ code: "FORBIDDEN";
1150
+ error: "Forbidden";
1151
+ name: "APIError";
1152
+ }, {
1153
+ code: "FORBIDDEN";
1154
+ error: "Forbidden";
1155
+ name: "APIError";
1156
+ }>;
1157
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1158
+ 400: z.ZodUnion<[z.ZodObject<{
1159
+ name: z.ZodLiteral<"ZodError">;
1160
+ issues: z.ZodArray<z.ZodObject<{
1161
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1162
+ message: z.ZodOptional<z.ZodString>;
1163
+ code: z.ZodNativeEnum<{
1164
+ invalid_type: "invalid_type";
1165
+ invalid_literal: "invalid_literal";
1166
+ custom: "custom";
1167
+ invalid_union: "invalid_union";
1168
+ invalid_union_discriminator: "invalid_union_discriminator";
1169
+ invalid_enum_value: "invalid_enum_value";
1170
+ unrecognized_keys: "unrecognized_keys";
1171
+ invalid_arguments: "invalid_arguments";
1172
+ invalid_return_type: "invalid_return_type";
1173
+ invalid_date: "invalid_date";
1174
+ invalid_string: "invalid_string";
1175
+ too_small: "too_small";
1176
+ too_big: "too_big";
1177
+ invalid_intersection_types: "invalid_intersection_types";
1178
+ not_multiple_of: "not_multiple_of";
1179
+ not_finite: "not_finite";
1180
+ }>;
1181
+ }, "strip", z.ZodAny, z.objectOutputType<{
1182
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1183
+ message: z.ZodOptional<z.ZodString>;
1184
+ code: z.ZodNativeEnum<{
1185
+ invalid_type: "invalid_type";
1186
+ invalid_literal: "invalid_literal";
1187
+ custom: "custom";
1188
+ invalid_union: "invalid_union";
1189
+ invalid_union_discriminator: "invalid_union_discriminator";
1190
+ invalid_enum_value: "invalid_enum_value";
1191
+ unrecognized_keys: "unrecognized_keys";
1192
+ invalid_arguments: "invalid_arguments";
1193
+ invalid_return_type: "invalid_return_type";
1194
+ invalid_date: "invalid_date";
1195
+ invalid_string: "invalid_string";
1196
+ too_small: "too_small";
1197
+ too_big: "too_big";
1198
+ invalid_intersection_types: "invalid_intersection_types";
1199
+ not_multiple_of: "not_multiple_of";
1200
+ not_finite: "not_finite";
1201
+ }>;
1202
+ }, z.ZodAny, "strip">, z.objectInputType<{
1203
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1204
+ message: z.ZodOptional<z.ZodString>;
1205
+ code: z.ZodNativeEnum<{
1206
+ invalid_type: "invalid_type";
1207
+ invalid_literal: "invalid_literal";
1208
+ custom: "custom";
1209
+ invalid_union: "invalid_union";
1210
+ invalid_union_discriminator: "invalid_union_discriminator";
1211
+ invalid_enum_value: "invalid_enum_value";
1212
+ unrecognized_keys: "unrecognized_keys";
1213
+ invalid_arguments: "invalid_arguments";
1214
+ invalid_return_type: "invalid_return_type";
1215
+ invalid_date: "invalid_date";
1216
+ invalid_string: "invalid_string";
1217
+ too_small: "too_small";
1218
+ too_big: "too_big";
1219
+ invalid_intersection_types: "invalid_intersection_types";
1220
+ not_multiple_of: "not_multiple_of";
1221
+ not_finite: "not_finite";
1222
+ }>;
1223
+ }, z.ZodAny, "strip">>, "many">;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ name: "ZodError";
1226
+ issues: z.objectOutputType<{
1227
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1228
+ message: z.ZodOptional<z.ZodString>;
1229
+ code: z.ZodNativeEnum<{
1230
+ invalid_type: "invalid_type";
1231
+ invalid_literal: "invalid_literal";
1232
+ custom: "custom";
1233
+ invalid_union: "invalid_union";
1234
+ invalid_union_discriminator: "invalid_union_discriminator";
1235
+ invalid_enum_value: "invalid_enum_value";
1236
+ unrecognized_keys: "unrecognized_keys";
1237
+ invalid_arguments: "invalid_arguments";
1238
+ invalid_return_type: "invalid_return_type";
1239
+ invalid_date: "invalid_date";
1240
+ invalid_string: "invalid_string";
1241
+ too_small: "too_small";
1242
+ too_big: "too_big";
1243
+ invalid_intersection_types: "invalid_intersection_types";
1244
+ not_multiple_of: "not_multiple_of";
1245
+ not_finite: "not_finite";
1246
+ }>;
1247
+ }, z.ZodAny, "strip">[];
1248
+ }, {
1249
+ name: "ZodError";
1250
+ issues: z.objectInputType<{
1251
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1252
+ message: z.ZodOptional<z.ZodString>;
1253
+ code: z.ZodNativeEnum<{
1254
+ invalid_type: "invalid_type";
1255
+ invalid_literal: "invalid_literal";
1256
+ custom: "custom";
1257
+ invalid_union: "invalid_union";
1258
+ invalid_union_discriminator: "invalid_union_discriminator";
1259
+ invalid_enum_value: "invalid_enum_value";
1260
+ unrecognized_keys: "unrecognized_keys";
1261
+ invalid_arguments: "invalid_arguments";
1262
+ invalid_return_type: "invalid_return_type";
1263
+ invalid_date: "invalid_date";
1264
+ invalid_string: "invalid_string";
1265
+ too_small: "too_small";
1266
+ too_big: "too_big";
1267
+ invalid_intersection_types: "invalid_intersection_types";
1268
+ not_multiple_of: "not_multiple_of";
1269
+ not_finite: "not_finite";
1270
+ }>;
1271
+ }, z.ZodAny, "strip">[];
1272
+ }>, z.ZodObject<{
1273
+ code: z.ZodType<"NO_TRACK", z.ZodTypeDef, "NO_TRACK">;
1274
+ error: z.ZodType<"The room has no track", z.ZodTypeDef, "The room has no track">;
1275
+ name: z.ZodLiteral<"APIError">;
1276
+ }, "strip", z.ZodTypeAny, {
1277
+ code: "NO_TRACK";
1278
+ error: "The room has no track";
1279
+ name: "APIError";
1280
+ }, {
1281
+ code: "NO_TRACK";
1282
+ error: "The room has no track";
1283
+ name: "APIError";
1284
+ }>]>;
1285
+ };
1286
+ };
1287
+ scene: {
1288
+ description: "Change the scene of a room, listeners get the new scene through the roomScene socket event";
1289
+ method: "POST";
1290
+ body: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1291
+ type: z.ZodLiteral<"addSpeaker">;
1292
+ speaker: z.ZodObject<Omit<{
1293
+ id: z.ZodString;
1294
+ x: z.ZodNumber;
1295
+ y: z.ZodNumber;
1296
+ z: z.ZodNumber;
1297
+ yaw: z.ZodNumber;
1298
+ pitch: z.ZodNumber;
1299
+ directional: z.ZodBoolean;
1300
+ }, "id">, "strip", z.ZodTypeAny, {
1301
+ x: number;
1302
+ y: number;
1303
+ z: number;
1304
+ yaw: number;
1305
+ pitch: number;
1306
+ directional: boolean;
1307
+ }, {
1308
+ x: number;
1309
+ y: number;
1310
+ z: number;
1311
+ yaw: number;
1312
+ pitch: number;
1313
+ directional: boolean;
1314
+ }>;
1315
+ }, "strip", z.ZodTypeAny, {
1316
+ type: "addSpeaker";
1317
+ speaker: {
1318
+ x: number;
1319
+ y: number;
1320
+ z: number;
1321
+ yaw: number;
1322
+ pitch: number;
1323
+ directional: boolean;
1324
+ };
1325
+ }, {
1326
+ type: "addSpeaker";
1327
+ speaker: {
1328
+ x: number;
1329
+ y: number;
1330
+ z: number;
1331
+ yaw: number;
1332
+ pitch: number;
1333
+ directional: boolean;
1334
+ };
1335
+ }>, z.ZodObject<{
1336
+ type: z.ZodLiteral<"addCar">;
1337
+ car: z.ZodObject<Pick<{
1338
+ id: z.ZodString;
1339
+ x: z.ZodNumber;
1340
+ z: z.ZodNumber;
1341
+ yaw: z.ZodNumber;
1342
+ doors: z.ZodArray<z.ZodBoolean, "many">;
1343
+ windows: z.ZodArray<z.ZodBoolean, "many">;
1344
+ radio: z.ZodBoolean;
1345
+ }, "x" | "z" | "yaw">, "strip", z.ZodTypeAny, {
1346
+ x: number;
1347
+ z: number;
1348
+ yaw: number;
1349
+ }, {
1350
+ x: number;
1351
+ z: number;
1352
+ yaw: number;
1353
+ }>;
1354
+ }, "strip", z.ZodTypeAny, {
1355
+ type: "addCar";
1356
+ car: {
1357
+ x: number;
1358
+ z: number;
1359
+ yaw: number;
1360
+ };
1361
+ }, {
1362
+ type: "addCar";
1363
+ car: {
1364
+ x: number;
1365
+ z: number;
1366
+ yaw: number;
1367
+ };
1368
+ }>, z.ZodObject<{
1369
+ type: z.ZodLiteral<"remove">;
1370
+ id: z.ZodString;
1371
+ }, "strip", z.ZodTypeAny, {
1372
+ type: "remove";
1373
+ id: string;
1374
+ }, {
1375
+ type: "remove";
1376
+ id: string;
1377
+ }>, z.ZodObject<{
1378
+ type: z.ZodLiteral<"carDoor">;
1379
+ id: z.ZodString;
1380
+ index: z.ZodNumber;
1381
+ open: z.ZodBoolean;
1382
+ }, "strip", z.ZodTypeAny, {
1383
+ type: "carDoor";
1384
+ id: string;
1385
+ index: number;
1386
+ open: boolean;
1387
+ }, {
1388
+ type: "carDoor";
1389
+ id: string;
1390
+ index: number;
1391
+ open: boolean;
1392
+ }>, z.ZodObject<{
1393
+ type: z.ZodLiteral<"carWindow">;
1394
+ id: z.ZodString;
1395
+ index: z.ZodNumber;
1396
+ open: z.ZodBoolean;
1397
+ }, "strip", z.ZodTypeAny, {
1398
+ type: "carWindow";
1399
+ id: string;
1400
+ index: number;
1401
+ open: boolean;
1402
+ }, {
1403
+ type: "carWindow";
1404
+ id: string;
1405
+ index: number;
1406
+ open: boolean;
1407
+ }>, z.ZodObject<{
1408
+ type: z.ZodLiteral<"carRadio">;
1409
+ id: z.ZodString;
1410
+ on: z.ZodBoolean;
1411
+ }, "strip", z.ZodTypeAny, {
1412
+ type: "carRadio";
1413
+ id: string;
1414
+ on: boolean;
1415
+ }, {
1416
+ type: "carRadio";
1417
+ id: string;
1418
+ on: boolean;
1419
+ }>, z.ZodObject<{
1420
+ type: z.ZodLiteral<"reset">;
1421
+ }, "strip", z.ZodTypeAny, {
1422
+ type: "reset";
1423
+ }, {
1424
+ type: "reset";
1425
+ }>]>;
1426
+ path: "/room/:roomId/scene";
1427
+ responses: {
1428
+ 500: z.ZodObject<{
1429
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1430
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1431
+ name: z.ZodLiteral<"APIError">;
1432
+ }, "strip", z.ZodTypeAny, {
1433
+ code: "INTERNAL_SERVER_ERROR";
1434
+ error: string;
1435
+ name: "APIError";
1436
+ }, {
1437
+ code: "INTERNAL_SERVER_ERROR";
1438
+ error: string;
1439
+ name: "APIError";
1440
+ }>;
1441
+ 404: z.ZodObject<{
1442
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1443
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1444
+ name: z.ZodLiteral<"APIError">;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ code: "ROOM_NOT_FOUND";
1447
+ error: "The requested room was not found";
1448
+ name: "APIError";
1449
+ }, {
1450
+ code: "ROOM_NOT_FOUND";
1451
+ error: "The requested room was not found";
1452
+ name: "APIError";
1453
+ }>;
1454
+ 401: z.ZodObject<{
1455
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1456
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1457
+ name: z.ZodLiteral<"APIError">;
1458
+ }, "strip", z.ZodTypeAny, {
1459
+ code: "UNAUTHORIZED";
1460
+ error: "Unauthorized";
1461
+ name: "APIError";
1462
+ }, {
1463
+ code: "UNAUTHORIZED";
1464
+ error: "Unauthorized";
1465
+ name: "APIError";
1466
+ }>;
1467
+ 403: z.ZodObject<{
1468
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1469
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1470
+ name: z.ZodLiteral<"APIError">;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ code: "FORBIDDEN";
1473
+ error: "Forbidden";
1474
+ name: "APIError";
1475
+ }, {
1476
+ code: "FORBIDDEN";
1477
+ error: "Forbidden";
1478
+ name: "APIError";
1479
+ }>;
1480
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1481
+ 400: z.ZodUnion<[z.ZodObject<{
1482
+ name: z.ZodLiteral<"ZodError">;
1483
+ issues: z.ZodArray<z.ZodObject<{
1484
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1485
+ message: z.ZodOptional<z.ZodString>;
1486
+ code: z.ZodNativeEnum<{
1487
+ invalid_type: "invalid_type";
1488
+ invalid_literal: "invalid_literal";
1489
+ custom: "custom";
1490
+ invalid_union: "invalid_union";
1491
+ invalid_union_discriminator: "invalid_union_discriminator";
1492
+ invalid_enum_value: "invalid_enum_value";
1493
+ unrecognized_keys: "unrecognized_keys";
1494
+ invalid_arguments: "invalid_arguments";
1495
+ invalid_return_type: "invalid_return_type";
1496
+ invalid_date: "invalid_date";
1497
+ invalid_string: "invalid_string";
1498
+ too_small: "too_small";
1499
+ too_big: "too_big";
1500
+ invalid_intersection_types: "invalid_intersection_types";
1501
+ not_multiple_of: "not_multiple_of";
1502
+ not_finite: "not_finite";
1503
+ }>;
1504
+ }, "strip", z.ZodAny, z.objectOutputType<{
1505
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1506
+ message: z.ZodOptional<z.ZodString>;
1507
+ code: z.ZodNativeEnum<{
1508
+ invalid_type: "invalid_type";
1509
+ invalid_literal: "invalid_literal";
1510
+ custom: "custom";
1511
+ invalid_union: "invalid_union";
1512
+ invalid_union_discriminator: "invalid_union_discriminator";
1513
+ invalid_enum_value: "invalid_enum_value";
1514
+ unrecognized_keys: "unrecognized_keys";
1515
+ invalid_arguments: "invalid_arguments";
1516
+ invalid_return_type: "invalid_return_type";
1517
+ invalid_date: "invalid_date";
1518
+ invalid_string: "invalid_string";
1519
+ too_small: "too_small";
1520
+ too_big: "too_big";
1521
+ invalid_intersection_types: "invalid_intersection_types";
1522
+ not_multiple_of: "not_multiple_of";
1523
+ not_finite: "not_finite";
1524
+ }>;
1525
+ }, z.ZodAny, "strip">, z.objectInputType<{
1526
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1527
+ message: z.ZodOptional<z.ZodString>;
1528
+ code: z.ZodNativeEnum<{
1529
+ invalid_type: "invalid_type";
1530
+ invalid_literal: "invalid_literal";
1531
+ custom: "custom";
1532
+ invalid_union: "invalid_union";
1533
+ invalid_union_discriminator: "invalid_union_discriminator";
1534
+ invalid_enum_value: "invalid_enum_value";
1535
+ unrecognized_keys: "unrecognized_keys";
1536
+ invalid_arguments: "invalid_arguments";
1537
+ invalid_return_type: "invalid_return_type";
1538
+ invalid_date: "invalid_date";
1539
+ invalid_string: "invalid_string";
1540
+ too_small: "too_small";
1541
+ too_big: "too_big";
1542
+ invalid_intersection_types: "invalid_intersection_types";
1543
+ not_multiple_of: "not_multiple_of";
1544
+ not_finite: "not_finite";
1545
+ }>;
1546
+ }, z.ZodAny, "strip">>, "many">;
1547
+ }, "strip", z.ZodTypeAny, {
1548
+ name: "ZodError";
1549
+ issues: z.objectOutputType<{
1550
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1551
+ message: z.ZodOptional<z.ZodString>;
1552
+ code: z.ZodNativeEnum<{
1553
+ invalid_type: "invalid_type";
1554
+ invalid_literal: "invalid_literal";
1555
+ custom: "custom";
1556
+ invalid_union: "invalid_union";
1557
+ invalid_union_discriminator: "invalid_union_discriminator";
1558
+ invalid_enum_value: "invalid_enum_value";
1559
+ unrecognized_keys: "unrecognized_keys";
1560
+ invalid_arguments: "invalid_arguments";
1561
+ invalid_return_type: "invalid_return_type";
1562
+ invalid_date: "invalid_date";
1563
+ invalid_string: "invalid_string";
1564
+ too_small: "too_small";
1565
+ too_big: "too_big";
1566
+ invalid_intersection_types: "invalid_intersection_types";
1567
+ not_multiple_of: "not_multiple_of";
1568
+ not_finite: "not_finite";
1569
+ }>;
1570
+ }, z.ZodAny, "strip">[];
1571
+ }, {
1572
+ name: "ZodError";
1573
+ issues: z.objectInputType<{
1574
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1575
+ message: z.ZodOptional<z.ZodString>;
1576
+ code: z.ZodNativeEnum<{
1577
+ invalid_type: "invalid_type";
1578
+ invalid_literal: "invalid_literal";
1579
+ custom: "custom";
1580
+ invalid_union: "invalid_union";
1581
+ invalid_union_discriminator: "invalid_union_discriminator";
1582
+ invalid_enum_value: "invalid_enum_value";
1583
+ unrecognized_keys: "unrecognized_keys";
1584
+ invalid_arguments: "invalid_arguments";
1585
+ invalid_return_type: "invalid_return_type";
1586
+ invalid_date: "invalid_date";
1587
+ invalid_string: "invalid_string";
1588
+ too_small: "too_small";
1589
+ too_big: "too_big";
1590
+ invalid_intersection_types: "invalid_intersection_types";
1591
+ not_multiple_of: "not_multiple_of";
1592
+ not_finite: "not_finite";
1593
+ }>;
1594
+ }, z.ZodAny, "strip">[];
1595
+ }>, z.ZodObject<{
1596
+ code: z.ZodType<"SCENE_FULL", z.ZodTypeDef, "SCENE_FULL">;
1597
+ error: z.ZodType<"The scene can't have more of this object", z.ZodTypeDef, "The scene can't have more of this object">;
1598
+ name: z.ZodLiteral<"APIError">;
1599
+ }, "strip", z.ZodTypeAny, {
1600
+ code: "SCENE_FULL";
1601
+ error: "The scene can't have more of this object";
1602
+ name: "APIError";
1603
+ }, {
1604
+ code: "SCENE_FULL";
1605
+ error: "The scene can't have more of this object";
1606
+ name: "APIError";
1607
+ }>, z.ZodObject<{
1608
+ code: z.ZodType<"SCENE_OBJECT_NOT_FOUND", z.ZodTypeDef, "SCENE_OBJECT_NOT_FOUND">;
1609
+ error: z.ZodType<"The scene object was not found", z.ZodTypeDef, "The scene object was not found">;
1610
+ name: z.ZodLiteral<"APIError">;
1611
+ }, "strip", z.ZodTypeAny, {
1612
+ code: "SCENE_OBJECT_NOT_FOUND";
1613
+ error: "The scene object was not found";
1614
+ name: "APIError";
1615
+ }, {
1616
+ code: "SCENE_OBJECT_NOT_FOUND";
1617
+ error: "The scene object was not found";
1618
+ name: "APIError";
1619
+ }>]>;
1620
+ };
1621
+ };
1622
+ };
1623
+ export default _default;