@4players/odin-common 9.0.1 → 9.0.3

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