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