@4players/odin-common 2.0.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/plugin/api.d.ts +6 -0
- package/lib/rpc/commands.d.ts +16 -34
- package/lib/rpc/notifications.d.ts +237 -687
- package/lib/schema/media.d.ts +26 -44
- package/lib/schema/peer.d.ts +44 -116
- package/lib/schema/room.d.ts +182 -524
- package/lib/schema/token.d.ts +4 -4
- package/package.json +6 -6
package/lib/schema/media.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ export declare const MediaAudioPropertiesSchema: z.ZodObject<{
|
|
|
6
6
|
uid: z.ZodOptional<z.ZodString>;
|
|
7
7
|
customType: z.ZodOptional<z.ZodString>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
kind?: "audio" | undefined;
|
|
10
9
|
uid?: string | undefined;
|
|
10
|
+
kind?: "audio" | undefined;
|
|
11
11
|
customType?: string | undefined;
|
|
12
12
|
}, {
|
|
13
|
-
kind?: "audio" | undefined;
|
|
14
13
|
uid?: string | undefined;
|
|
14
|
+
kind?: "audio" | undefined;
|
|
15
15
|
customType?: string | undefined;
|
|
16
16
|
}>;
|
|
17
17
|
export type MediaAudioProperties = z.infer<typeof MediaAudioPropertiesSchema>;
|
|
@@ -21,15 +21,15 @@ export declare const MediaVideoPropertiesSchema: z.ZodObject<{
|
|
|
21
21
|
uid: z.ZodOptional<z.ZodString>;
|
|
22
22
|
customType: z.ZodOptional<z.ZodString>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
kind?: "video" | undefined;
|
|
25
|
-
codec?: string | undefined;
|
|
26
24
|
uid?: string | undefined;
|
|
27
|
-
customType?: string | undefined;
|
|
28
|
-
}, {
|
|
29
25
|
kind?: "video" | undefined;
|
|
26
|
+
customType?: string | undefined;
|
|
30
27
|
codec?: string | undefined;
|
|
28
|
+
}, {
|
|
31
29
|
uid?: string | undefined;
|
|
30
|
+
kind?: "video" | undefined;
|
|
32
31
|
customType?: string | undefined;
|
|
32
|
+
codec?: string | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export type MediaVideoProperties = z.infer<typeof MediaVideoPropertiesSchema>;
|
|
35
35
|
export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -37,12 +37,12 @@ export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
37
37
|
uid: z.ZodOptional<z.ZodString>;
|
|
38
38
|
customType: z.ZodOptional<z.ZodString>;
|
|
39
39
|
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
kind?: "audio" | undefined;
|
|
41
40
|
uid?: string | undefined;
|
|
41
|
+
kind?: "audio" | undefined;
|
|
42
42
|
customType?: string | undefined;
|
|
43
43
|
}, {
|
|
44
|
-
kind?: "audio" | undefined;
|
|
45
44
|
uid?: string | undefined;
|
|
45
|
+
kind?: "audio" | undefined;
|
|
46
46
|
customType?: string | undefined;
|
|
47
47
|
}>, z.ZodObject<{
|
|
48
48
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -50,15 +50,15 @@ export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
50
50
|
uid: z.ZodOptional<z.ZodString>;
|
|
51
51
|
customType: z.ZodOptional<z.ZodString>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
kind?: "video" | undefined;
|
|
54
|
-
codec?: string | undefined;
|
|
55
53
|
uid?: string | undefined;
|
|
56
|
-
customType?: string | undefined;
|
|
57
|
-
}, {
|
|
58
54
|
kind?: "video" | undefined;
|
|
55
|
+
customType?: string | undefined;
|
|
59
56
|
codec?: string | undefined;
|
|
57
|
+
}, {
|
|
60
58
|
uid?: string | undefined;
|
|
59
|
+
kind?: "video" | undefined;
|
|
61
60
|
customType?: string | undefined;
|
|
61
|
+
codec?: string | undefined;
|
|
62
62
|
}>]>;
|
|
63
63
|
export type MediaProperties = z.infer<typeof MediaPropertiesSchema>;
|
|
64
64
|
export declare const MediaSchema: z.ZodObject<{
|
|
@@ -68,12 +68,12 @@ export declare const MediaSchema: z.ZodObject<{
|
|
|
68
68
|
uid: z.ZodOptional<z.ZodString>;
|
|
69
69
|
customType: z.ZodOptional<z.ZodString>;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
kind?: "audio" | undefined;
|
|
72
71
|
uid?: string | undefined;
|
|
72
|
+
kind?: "audio" | undefined;
|
|
73
73
|
customType?: string | undefined;
|
|
74
74
|
}, {
|
|
75
|
-
kind?: "audio" | undefined;
|
|
76
75
|
uid?: string | undefined;
|
|
76
|
+
kind?: "audio" | undefined;
|
|
77
77
|
customType?: string | undefined;
|
|
78
78
|
}>, z.ZodObject<{
|
|
79
79
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -81,60 +81,42 @@ export declare const MediaSchema: z.ZodObject<{
|
|
|
81
81
|
uid: z.ZodOptional<z.ZodString>;
|
|
82
82
|
customType: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
kind?: "video" | undefined;
|
|
85
|
-
codec?: string | undefined;
|
|
86
84
|
uid?: string | undefined;
|
|
87
|
-
customType?: string | undefined;
|
|
88
|
-
}, {
|
|
89
85
|
kind?: "video" | undefined;
|
|
86
|
+
customType?: string | undefined;
|
|
90
87
|
codec?: string | undefined;
|
|
88
|
+
}, {
|
|
91
89
|
uid?: string | undefined;
|
|
90
|
+
kind?: "video" | undefined;
|
|
92
91
|
customType?: string | undefined;
|
|
92
|
+
codec?: string | undefined;
|
|
93
93
|
}>]>;
|
|
94
94
|
paused: z.ZodBoolean;
|
|
95
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
96
|
id: number;
|
|
97
|
-
properties:
|
|
98
|
-
kind?: "audio" | undefined;
|
|
97
|
+
properties: {
|
|
99
98
|
uid?: string | undefined;
|
|
100
|
-
customType?: string | undefined;
|
|
101
|
-
} | {
|
|
102
|
-
kind?: "video" | undefined;
|
|
103
|
-
codec?: string | undefined;
|
|
104
|
-
uid?: string | undefined;
|
|
105
|
-
customType?: string | undefined;
|
|
106
|
-
}) & ({
|
|
107
99
|
kind?: "audio" | undefined;
|
|
108
|
-
uid?: string | undefined;
|
|
109
100
|
customType?: string | undefined;
|
|
110
101
|
} | {
|
|
111
|
-
kind?: "video" | undefined;
|
|
112
|
-
codec?: string | undefined;
|
|
113
102
|
uid?: string | undefined;
|
|
103
|
+
kind?: "video" | undefined;
|
|
114
104
|
customType?: string | undefined;
|
|
115
|
-
|
|
105
|
+
codec?: string | undefined;
|
|
106
|
+
};
|
|
116
107
|
paused: boolean;
|
|
117
108
|
}, {
|
|
118
109
|
id: number;
|
|
119
|
-
properties:
|
|
120
|
-
kind?: "audio" | undefined;
|
|
110
|
+
properties: {
|
|
121
111
|
uid?: string | undefined;
|
|
122
|
-
customType?: string | undefined;
|
|
123
|
-
} | {
|
|
124
|
-
kind?: "video" | undefined;
|
|
125
|
-
codec?: string | undefined;
|
|
126
|
-
uid?: string | undefined;
|
|
127
|
-
customType?: string | undefined;
|
|
128
|
-
}) & ({
|
|
129
112
|
kind?: "audio" | undefined;
|
|
130
|
-
uid?: string | undefined;
|
|
131
113
|
customType?: string | undefined;
|
|
132
114
|
} | {
|
|
133
|
-
kind?: "video" | undefined;
|
|
134
|
-
codec?: string | undefined;
|
|
135
115
|
uid?: string | undefined;
|
|
116
|
+
kind?: "video" | undefined;
|
|
136
117
|
customType?: string | undefined;
|
|
137
|
-
|
|
118
|
+
codec?: string | undefined;
|
|
119
|
+
};
|
|
138
120
|
paused: boolean;
|
|
139
121
|
}>;
|
|
140
122
|
export type Media = z.infer<typeof MediaSchema>;
|
package/lib/schema/peer.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
14
14
|
uid: z.ZodOptional<z.ZodString>;
|
|
15
15
|
customType: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
kind?: "audio" | undefined;
|
|
18
17
|
uid?: string | undefined;
|
|
18
|
+
kind?: "audio" | undefined;
|
|
19
19
|
customType?: string | undefined;
|
|
20
20
|
}, {
|
|
21
|
-
kind?: "audio" | undefined;
|
|
22
21
|
uid?: string | undefined;
|
|
22
|
+
kind?: "audio" | undefined;
|
|
23
23
|
customType?: string | undefined;
|
|
24
24
|
}>, z.ZodObject<{
|
|
25
25
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -27,60 +27,42 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
27
27
|
uid: z.ZodOptional<z.ZodString>;
|
|
28
28
|
customType: z.ZodOptional<z.ZodString>;
|
|
29
29
|
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
kind?: "video" | undefined;
|
|
31
|
-
codec?: string | undefined;
|
|
32
30
|
uid?: string | undefined;
|
|
33
|
-
customType?: string | undefined;
|
|
34
|
-
}, {
|
|
35
31
|
kind?: "video" | undefined;
|
|
32
|
+
customType?: string | undefined;
|
|
36
33
|
codec?: string | undefined;
|
|
34
|
+
}, {
|
|
37
35
|
uid?: string | undefined;
|
|
36
|
+
kind?: "video" | undefined;
|
|
38
37
|
customType?: string | undefined;
|
|
38
|
+
codec?: string | undefined;
|
|
39
39
|
}>]>;
|
|
40
40
|
paused: z.ZodBoolean;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
42
|
id: number;
|
|
43
|
-
properties:
|
|
44
|
-
kind?: "audio" | undefined;
|
|
45
|
-
uid?: string | undefined;
|
|
46
|
-
customType?: string | undefined;
|
|
47
|
-
} | {
|
|
48
|
-
kind?: "video" | undefined;
|
|
49
|
-
codec?: string | undefined;
|
|
43
|
+
properties: {
|
|
50
44
|
uid?: string | undefined;
|
|
51
|
-
customType?: string | undefined;
|
|
52
|
-
}) & ({
|
|
53
45
|
kind?: "audio" | undefined;
|
|
54
|
-
uid?: string | undefined;
|
|
55
46
|
customType?: string | undefined;
|
|
56
47
|
} | {
|
|
57
|
-
kind?: "video" | undefined;
|
|
58
|
-
codec?: string | undefined;
|
|
59
48
|
uid?: string | undefined;
|
|
49
|
+
kind?: "video" | undefined;
|
|
60
50
|
customType?: string | undefined;
|
|
61
|
-
|
|
51
|
+
codec?: string | undefined;
|
|
52
|
+
};
|
|
62
53
|
paused: boolean;
|
|
63
54
|
}, {
|
|
64
55
|
id: number;
|
|
65
|
-
properties:
|
|
66
|
-
kind?: "audio" | undefined;
|
|
67
|
-
uid?: string | undefined;
|
|
68
|
-
customType?: string | undefined;
|
|
69
|
-
} | {
|
|
70
|
-
kind?: "video" | undefined;
|
|
71
|
-
codec?: string | undefined;
|
|
56
|
+
properties: {
|
|
72
57
|
uid?: string | undefined;
|
|
73
|
-
customType?: string | undefined;
|
|
74
|
-
}) & ({
|
|
75
58
|
kind?: "audio" | undefined;
|
|
76
|
-
uid?: string | undefined;
|
|
77
59
|
customType?: string | undefined;
|
|
78
60
|
} | {
|
|
79
|
-
kind?: "video" | undefined;
|
|
80
|
-
codec?: string | undefined;
|
|
81
61
|
uid?: string | undefined;
|
|
62
|
+
kind?: "video" | undefined;
|
|
82
63
|
customType?: string | undefined;
|
|
83
|
-
|
|
64
|
+
codec?: string | undefined;
|
|
65
|
+
};
|
|
84
66
|
paused: boolean;
|
|
85
67
|
}>, "many">;
|
|
86
68
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -89,25 +71,16 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
89
71
|
user_data: Uint8Array;
|
|
90
72
|
medias: {
|
|
91
73
|
id: number;
|
|
92
|
-
properties:
|
|
93
|
-
kind?: "audio" | undefined;
|
|
74
|
+
properties: {
|
|
94
75
|
uid?: string | undefined;
|
|
95
|
-
customType?: string | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
kind?: "video" | undefined;
|
|
98
|
-
codec?: string | undefined;
|
|
99
|
-
uid?: string | undefined;
|
|
100
|
-
customType?: string | undefined;
|
|
101
|
-
}) & ({
|
|
102
76
|
kind?: "audio" | undefined;
|
|
103
|
-
uid?: string | undefined;
|
|
104
77
|
customType?: string | undefined;
|
|
105
78
|
} | {
|
|
106
|
-
kind?: "video" | undefined;
|
|
107
|
-
codec?: string | undefined;
|
|
108
79
|
uid?: string | undefined;
|
|
80
|
+
kind?: "video" | undefined;
|
|
109
81
|
customType?: string | undefined;
|
|
110
|
-
|
|
82
|
+
codec?: string | undefined;
|
|
83
|
+
};
|
|
111
84
|
paused: boolean;
|
|
112
85
|
}[];
|
|
113
86
|
}, {
|
|
@@ -116,25 +89,16 @@ export declare const PeerSchema: z.ZodObject<{
|
|
|
116
89
|
user_data: Uint8Array;
|
|
117
90
|
medias: {
|
|
118
91
|
id: number;
|
|
119
|
-
properties:
|
|
120
|
-
kind?: "audio" | undefined;
|
|
92
|
+
properties: {
|
|
121
93
|
uid?: string | undefined;
|
|
122
|
-
customType?: string | undefined;
|
|
123
|
-
} | {
|
|
124
|
-
kind?: "video" | undefined;
|
|
125
|
-
codec?: string | undefined;
|
|
126
|
-
uid?: string | undefined;
|
|
127
|
-
customType?: string | undefined;
|
|
128
|
-
}) & ({
|
|
129
94
|
kind?: "audio" | undefined;
|
|
130
|
-
uid?: string | undefined;
|
|
131
95
|
customType?: string | undefined;
|
|
132
96
|
} | {
|
|
133
|
-
kind?: "video" | undefined;
|
|
134
|
-
codec?: string | undefined;
|
|
135
97
|
uid?: string | undefined;
|
|
98
|
+
kind?: "video" | undefined;
|
|
136
99
|
customType?: string | undefined;
|
|
137
|
-
|
|
100
|
+
codec?: string | undefined;
|
|
101
|
+
};
|
|
138
102
|
paused: boolean;
|
|
139
103
|
}[];
|
|
140
104
|
}>;
|
|
@@ -161,12 +125,12 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
161
125
|
uid: z.ZodOptional<z.ZodString>;
|
|
162
126
|
customType: z.ZodOptional<z.ZodString>;
|
|
163
127
|
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
kind?: "audio" | undefined;
|
|
165
128
|
uid?: string | undefined;
|
|
129
|
+
kind?: "audio" | undefined;
|
|
166
130
|
customType?: string | undefined;
|
|
167
131
|
}, {
|
|
168
|
-
kind?: "audio" | undefined;
|
|
169
132
|
uid?: string | undefined;
|
|
133
|
+
kind?: "audio" | undefined;
|
|
170
134
|
customType?: string | undefined;
|
|
171
135
|
}>, z.ZodObject<{
|
|
172
136
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -174,60 +138,42 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
174
138
|
uid: z.ZodOptional<z.ZodString>;
|
|
175
139
|
customType: z.ZodOptional<z.ZodString>;
|
|
176
140
|
}, "strip", z.ZodTypeAny, {
|
|
177
|
-
kind?: "video" | undefined;
|
|
178
|
-
codec?: string | undefined;
|
|
179
141
|
uid?: string | undefined;
|
|
180
|
-
customType?: string | undefined;
|
|
181
|
-
}, {
|
|
182
142
|
kind?: "video" | undefined;
|
|
143
|
+
customType?: string | undefined;
|
|
183
144
|
codec?: string | undefined;
|
|
145
|
+
}, {
|
|
184
146
|
uid?: string | undefined;
|
|
147
|
+
kind?: "video" | undefined;
|
|
185
148
|
customType?: string | undefined;
|
|
149
|
+
codec?: string | undefined;
|
|
186
150
|
}>]>;
|
|
187
151
|
paused: z.ZodBoolean;
|
|
188
152
|
}, "strip", z.ZodTypeAny, {
|
|
189
153
|
id: number;
|
|
190
|
-
properties:
|
|
191
|
-
kind?: "audio" | undefined;
|
|
192
|
-
uid?: string | undefined;
|
|
193
|
-
customType?: string | undefined;
|
|
194
|
-
} | {
|
|
195
|
-
kind?: "video" | undefined;
|
|
196
|
-
codec?: string | undefined;
|
|
154
|
+
properties: {
|
|
197
155
|
uid?: string | undefined;
|
|
198
|
-
customType?: string | undefined;
|
|
199
|
-
}) & ({
|
|
200
156
|
kind?: "audio" | undefined;
|
|
201
|
-
uid?: string | undefined;
|
|
202
157
|
customType?: string | undefined;
|
|
203
158
|
} | {
|
|
204
|
-
kind?: "video" | undefined;
|
|
205
|
-
codec?: string | undefined;
|
|
206
159
|
uid?: string | undefined;
|
|
160
|
+
kind?: "video" | undefined;
|
|
207
161
|
customType?: string | undefined;
|
|
208
|
-
|
|
162
|
+
codec?: string | undefined;
|
|
163
|
+
};
|
|
209
164
|
paused: boolean;
|
|
210
165
|
}, {
|
|
211
166
|
id: number;
|
|
212
|
-
properties:
|
|
213
|
-
kind?: "audio" | undefined;
|
|
214
|
-
uid?: string | undefined;
|
|
215
|
-
customType?: string | undefined;
|
|
216
|
-
} | {
|
|
217
|
-
kind?: "video" | undefined;
|
|
218
|
-
codec?: string | undefined;
|
|
167
|
+
properties: {
|
|
219
168
|
uid?: string | undefined;
|
|
220
|
-
customType?: string | undefined;
|
|
221
|
-
}) & ({
|
|
222
169
|
kind?: "audio" | undefined;
|
|
223
|
-
uid?: string | undefined;
|
|
224
170
|
customType?: string | undefined;
|
|
225
171
|
} | {
|
|
226
|
-
kind?: "video" | undefined;
|
|
227
|
-
codec?: string | undefined;
|
|
228
172
|
uid?: string | undefined;
|
|
173
|
+
kind?: "video" | undefined;
|
|
229
174
|
customType?: string | undefined;
|
|
230
|
-
|
|
175
|
+
codec?: string | undefined;
|
|
176
|
+
};
|
|
231
177
|
paused: boolean;
|
|
232
178
|
}>;
|
|
233
179
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -235,25 +181,16 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
235
181
|
peer_id: number;
|
|
236
182
|
media: {
|
|
237
183
|
id: number;
|
|
238
|
-
properties:
|
|
239
|
-
kind?: "audio" | undefined;
|
|
184
|
+
properties: {
|
|
240
185
|
uid?: string | undefined;
|
|
241
|
-
customType?: string | undefined;
|
|
242
|
-
} | {
|
|
243
|
-
kind?: "video" | undefined;
|
|
244
|
-
codec?: string | undefined;
|
|
245
|
-
uid?: string | undefined;
|
|
246
|
-
customType?: string | undefined;
|
|
247
|
-
}) & ({
|
|
248
186
|
kind?: "audio" | undefined;
|
|
249
|
-
uid?: string | undefined;
|
|
250
187
|
customType?: string | undefined;
|
|
251
188
|
} | {
|
|
252
|
-
kind?: "video" | undefined;
|
|
253
|
-
codec?: string | undefined;
|
|
254
189
|
uid?: string | undefined;
|
|
190
|
+
kind?: "video" | undefined;
|
|
255
191
|
customType?: string | undefined;
|
|
256
|
-
|
|
192
|
+
codec?: string | undefined;
|
|
193
|
+
};
|
|
257
194
|
paused: boolean;
|
|
258
195
|
};
|
|
259
196
|
}, {
|
|
@@ -261,25 +198,16 @@ export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObj
|
|
|
261
198
|
peer_id: number;
|
|
262
199
|
media: {
|
|
263
200
|
id: number;
|
|
264
|
-
properties:
|
|
265
|
-
kind?: "audio" | undefined;
|
|
201
|
+
properties: {
|
|
266
202
|
uid?: string | undefined;
|
|
267
|
-
customType?: string | undefined;
|
|
268
|
-
} | {
|
|
269
|
-
kind?: "video" | undefined;
|
|
270
|
-
codec?: string | undefined;
|
|
271
|
-
uid?: string | undefined;
|
|
272
|
-
customType?: string | undefined;
|
|
273
|
-
}) & ({
|
|
274
203
|
kind?: "audio" | undefined;
|
|
275
|
-
uid?: string | undefined;
|
|
276
204
|
customType?: string | undefined;
|
|
277
205
|
} | {
|
|
278
|
-
kind?: "video" | undefined;
|
|
279
|
-
codec?: string | undefined;
|
|
280
206
|
uid?: string | undefined;
|
|
207
|
+
kind?: "video" | undefined;
|
|
281
208
|
customType?: string | undefined;
|
|
282
|
-
|
|
209
|
+
codec?: string | undefined;
|
|
210
|
+
};
|
|
283
211
|
paused: boolean;
|
|
284
212
|
};
|
|
285
213
|
}>, z.ZodObject<{
|