@4players/odin-common 9.0.2 → 9.0.4
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/cjs/mod.js +1 -1
- package/esm/mod.js +1 -1
- package/package.json +2 -2
- package/rpc/commands.d.ts +34 -167
- package/rpc/notifications.d.ts +116 -1542
- package/schema/channels.d.ts +1 -1
- package/schema/media.d.ts +9 -97
- package/schema/message.d.ts +2 -8
- package/schema/peer.d.ts +16 -202
- package/schema/room.d.ts +176 -1552
- package/schema/serialization.d.ts +3 -3
- package/schema/token.d.ts +17 -44
- package/schema/webrtc.d.ts +10 -33
- package/utility/log.d.ts +7 -3
package/schema/channels.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export declare class ChannelSet {
|
|
|
8
8
|
remove(channel: number): void;
|
|
9
9
|
[Symbol.iterator](): Iterator<number>;
|
|
10
10
|
}
|
|
11
|
-
export declare const ChannelSetSchema: z.
|
|
11
|
+
export declare const ChannelSetSchema: z.ZodPipe<z.ZodBigInt, z.ZodTransform<ChannelSet, bigint>>;
|
package/schema/media.d.ts
CHANGED
|
@@ -5,15 +5,7 @@ export declare const MediaAudioPropertiesSchema: z.ZodObject<{
|
|
|
5
5
|
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
6
6
|
uid: z.ZodOptional<z.ZodString>;
|
|
7
7
|
customType: z.ZodOptional<z.ZodString>;
|
|
8
|
-
},
|
|
9
|
-
uid?: string | undefined;
|
|
10
|
-
kind?: "audio" | undefined;
|
|
11
|
-
customType?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
uid?: string | undefined;
|
|
14
|
-
kind?: "audio" | undefined;
|
|
15
|
-
customType?: string | undefined;
|
|
16
|
-
}>;
|
|
8
|
+
}, z.core.$strip>;
|
|
17
9
|
export type MediaAudioProperties = z.infer<typeof MediaAudioPropertiesSchema>;
|
|
18
10
|
export declare const MediaVideoPropertiesSchema: z.ZodObject<{
|
|
19
11
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
@@ -21,113 +13,33 @@ export declare const MediaVideoPropertiesSchema: z.ZodObject<{
|
|
|
21
13
|
uid: z.ZodOptional<z.ZodString>;
|
|
22
14
|
customType: z.ZodOptional<z.ZodString>;
|
|
23
15
|
id: z.ZodOptional<z.ZodString>;
|
|
24
|
-
},
|
|
25
|
-
id?: string | undefined;
|
|
26
|
-
codec?: string | undefined;
|
|
27
|
-
uid?: string | undefined;
|
|
28
|
-
kind?: "video" | undefined;
|
|
29
|
-
customType?: string | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
id?: string | undefined;
|
|
32
|
-
codec?: string | undefined;
|
|
33
|
-
uid?: string | undefined;
|
|
34
|
-
kind?: "video" | undefined;
|
|
35
|
-
customType?: string | undefined;
|
|
36
|
-
}>;
|
|
16
|
+
}, z.core.$strip>;
|
|
37
17
|
export type MediaVideoProperties = z.infer<typeof MediaVideoPropertiesSchema>;
|
|
38
|
-
export declare const MediaPropertiesSchema: z.ZodUnion<[z.ZodObject<{
|
|
18
|
+
export declare const MediaPropertiesSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
39
19
|
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
40
20
|
uid: z.ZodOptional<z.ZodString>;
|
|
41
21
|
customType: z.ZodOptional<z.ZodString>;
|
|
42
|
-
},
|
|
43
|
-
uid?: string | undefined;
|
|
44
|
-
kind?: "audio" | undefined;
|
|
45
|
-
customType?: string | undefined;
|
|
46
|
-
}, {
|
|
47
|
-
uid?: string | undefined;
|
|
48
|
-
kind?: "audio" | undefined;
|
|
49
|
-
customType?: string | undefined;
|
|
50
|
-
}>, z.ZodObject<{
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
23
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
52
24
|
codec: z.ZodOptional<z.ZodString>;
|
|
53
25
|
uid: z.ZodOptional<z.ZodString>;
|
|
54
26
|
customType: z.ZodOptional<z.ZodString>;
|
|
55
27
|
id: z.ZodOptional<z.ZodString>;
|
|
56
|
-
},
|
|
57
|
-
id?: string | undefined;
|
|
58
|
-
codec?: string | undefined;
|
|
59
|
-
uid?: string | undefined;
|
|
60
|
-
kind?: "video" | undefined;
|
|
61
|
-
customType?: string | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
id?: string | undefined;
|
|
64
|
-
codec?: string | undefined;
|
|
65
|
-
uid?: string | undefined;
|
|
66
|
-
kind?: "video" | undefined;
|
|
67
|
-
customType?: string | undefined;
|
|
68
|
-
}>]>;
|
|
28
|
+
}, z.core.$strip>]>;
|
|
69
29
|
export type MediaProperties = z.infer<typeof MediaPropertiesSchema>;
|
|
70
30
|
export declare const MediaSchema: z.ZodObject<{
|
|
71
31
|
id: z.ZodNumber;
|
|
72
|
-
properties: z.ZodUnion<[z.ZodObject<{
|
|
32
|
+
properties: z.ZodUnion<readonly [z.ZodObject<{
|
|
73
33
|
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
74
34
|
uid: z.ZodOptional<z.ZodString>;
|
|
75
35
|
customType: z.ZodOptional<z.ZodString>;
|
|
76
|
-
},
|
|
77
|
-
uid?: string | undefined;
|
|
78
|
-
kind?: "audio" | undefined;
|
|
79
|
-
customType?: string | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
uid?: string | undefined;
|
|
82
|
-
kind?: "audio" | undefined;
|
|
83
|
-
customType?: string | undefined;
|
|
84
|
-
}>, z.ZodObject<{
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
37
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
86
38
|
codec: z.ZodOptional<z.ZodString>;
|
|
87
39
|
uid: z.ZodOptional<z.ZodString>;
|
|
88
40
|
customType: z.ZodOptional<z.ZodString>;
|
|
89
41
|
id: z.ZodOptional<z.ZodString>;
|
|
90
|
-
},
|
|
91
|
-
id?: string | undefined;
|
|
92
|
-
codec?: string | undefined;
|
|
93
|
-
uid?: string | undefined;
|
|
94
|
-
kind?: "video" | undefined;
|
|
95
|
-
customType?: string | undefined;
|
|
96
|
-
}, {
|
|
97
|
-
id?: string | undefined;
|
|
98
|
-
codec?: string | undefined;
|
|
99
|
-
uid?: string | undefined;
|
|
100
|
-
kind?: "video" | undefined;
|
|
101
|
-
customType?: string | undefined;
|
|
102
|
-
}>]>;
|
|
42
|
+
}, z.core.$strip>]>;
|
|
103
43
|
paused: z.ZodBoolean;
|
|
104
|
-
},
|
|
105
|
-
id: number;
|
|
106
|
-
paused: boolean;
|
|
107
|
-
properties: {
|
|
108
|
-
uid?: string | undefined;
|
|
109
|
-
kind?: "audio" | undefined;
|
|
110
|
-
customType?: string | undefined;
|
|
111
|
-
} | {
|
|
112
|
-
id?: string | undefined;
|
|
113
|
-
codec?: string | undefined;
|
|
114
|
-
uid?: string | undefined;
|
|
115
|
-
kind?: "video" | undefined;
|
|
116
|
-
customType?: string | undefined;
|
|
117
|
-
};
|
|
118
|
-
}, {
|
|
119
|
-
id: number;
|
|
120
|
-
paused: boolean;
|
|
121
|
-
properties: {
|
|
122
|
-
uid?: string | undefined;
|
|
123
|
-
kind?: "audio" | undefined;
|
|
124
|
-
customType?: string | undefined;
|
|
125
|
-
} | {
|
|
126
|
-
id?: string | undefined;
|
|
127
|
-
codec?: string | undefined;
|
|
128
|
-
uid?: string | undefined;
|
|
129
|
-
kind?: "video" | undefined;
|
|
130
|
-
customType?: string | undefined;
|
|
131
|
-
};
|
|
132
|
-
}>;
|
|
44
|
+
}, z.core.$strip>;
|
|
133
45
|
export type Media = z.infer<typeof MediaSchema>;
|
package/schema/message.d.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const MessageReceivedSchema: z.ZodObject<{
|
|
3
3
|
sender_peer_id: z.ZodNumber;
|
|
4
|
-
message: z.
|
|
5
|
-
},
|
|
6
|
-
message: Uint8Array;
|
|
7
|
-
sender_peer_id: number;
|
|
8
|
-
}, {
|
|
9
|
-
message: Uint8Array;
|
|
10
|
-
sender_peer_id: number;
|
|
11
|
-
}>;
|
|
4
|
+
message: z.ZodCustom<Uint8Array, Uint8Array>;
|
|
5
|
+
}, z.core.$strip>;
|
|
12
6
|
export type MessageReceived = z.infer<typeof MessageReceivedSchema>;
|
package/schema/peer.d.ts
CHANGED
|
@@ -1,240 +1,54 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
export declare const PeerIdSchema: z.ZodNumber;
|
|
3
3
|
export type PeerId = z.infer<typeof PeerIdSchema>;
|
|
4
|
-
export declare const PeerPositionSchema: z.ZodUnion<[z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
|
|
4
|
+
export declare const PeerPositionSchema: z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>]>;
|
|
5
5
|
export type PeerPosition = z.infer<typeof PeerPositionSchema>;
|
|
6
6
|
export declare const PeerSchema: z.ZodObject<{
|
|
7
7
|
id: z.ZodNumber;
|
|
8
8
|
user_id: z.ZodString;
|
|
9
|
-
user_data: z.
|
|
9
|
+
user_data: z.ZodCustom<Uint8Array, Uint8Array>;
|
|
10
10
|
medias: z.ZodArray<z.ZodObject<{
|
|
11
11
|
id: z.ZodNumber;
|
|
12
|
-
properties: z.ZodUnion<[z.ZodObject<{
|
|
12
|
+
properties: z.ZodUnion<readonly [z.ZodObject<{
|
|
13
13
|
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
14
14
|
uid: z.ZodOptional<z.ZodString>;
|
|
15
15
|
customType: z.ZodOptional<z.ZodString>;
|
|
16
|
-
},
|
|
17
|
-
uid?: string | undefined;
|
|
18
|
-
kind?: "audio" | undefined;
|
|
19
|
-
customType?: string | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
uid?: string | undefined;
|
|
22
|
-
kind?: "audio" | undefined;
|
|
23
|
-
customType?: string | undefined;
|
|
24
|
-
}>, z.ZodObject<{
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
17
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
26
18
|
codec: z.ZodOptional<z.ZodString>;
|
|
27
19
|
uid: z.ZodOptional<z.ZodString>;
|
|
28
20
|
customType: z.ZodOptional<z.ZodString>;
|
|
29
21
|
id: z.ZodOptional<z.ZodString>;
|
|
30
|
-
},
|
|
31
|
-
id?: string | undefined;
|
|
32
|
-
codec?: string | undefined;
|
|
33
|
-
uid?: string | undefined;
|
|
34
|
-
kind?: "video" | undefined;
|
|
35
|
-
customType?: string | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
id?: string | undefined;
|
|
38
|
-
codec?: string | undefined;
|
|
39
|
-
uid?: string | undefined;
|
|
40
|
-
kind?: "video" | undefined;
|
|
41
|
-
customType?: string | undefined;
|
|
42
|
-
}>]>;
|
|
22
|
+
}, z.core.$strip>]>;
|
|
43
23
|
paused: z.ZodBoolean;
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
paused: boolean;
|
|
47
|
-
properties: {
|
|
48
|
-
uid?: string | undefined;
|
|
49
|
-
kind?: "audio" | undefined;
|
|
50
|
-
customType?: string | undefined;
|
|
51
|
-
} | {
|
|
52
|
-
id?: string | undefined;
|
|
53
|
-
codec?: string | undefined;
|
|
54
|
-
uid?: string | undefined;
|
|
55
|
-
kind?: "video" | undefined;
|
|
56
|
-
customType?: string | undefined;
|
|
57
|
-
};
|
|
58
|
-
}, {
|
|
59
|
-
id: number;
|
|
60
|
-
paused: boolean;
|
|
61
|
-
properties: {
|
|
62
|
-
uid?: string | undefined;
|
|
63
|
-
kind?: "audio" | undefined;
|
|
64
|
-
customType?: string | undefined;
|
|
65
|
-
} | {
|
|
66
|
-
id?: string | undefined;
|
|
67
|
-
codec?: string | undefined;
|
|
68
|
-
uid?: string | undefined;
|
|
69
|
-
kind?: "video" | undefined;
|
|
70
|
-
customType?: string | undefined;
|
|
71
|
-
};
|
|
72
|
-
}>, "many">;
|
|
73
|
-
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
id: number;
|
|
75
|
-
user_id: string;
|
|
76
|
-
user_data: Uint8Array;
|
|
77
|
-
medias: {
|
|
78
|
-
id: number;
|
|
79
|
-
paused: boolean;
|
|
80
|
-
properties: {
|
|
81
|
-
uid?: string | undefined;
|
|
82
|
-
kind?: "audio" | undefined;
|
|
83
|
-
customType?: string | undefined;
|
|
84
|
-
} | {
|
|
85
|
-
id?: string | undefined;
|
|
86
|
-
codec?: string | undefined;
|
|
87
|
-
uid?: string | undefined;
|
|
88
|
-
kind?: "video" | undefined;
|
|
89
|
-
customType?: string | undefined;
|
|
90
|
-
};
|
|
91
|
-
}[];
|
|
92
|
-
}, {
|
|
93
|
-
id: number;
|
|
94
|
-
user_id: string;
|
|
95
|
-
user_data: Uint8Array;
|
|
96
|
-
medias: {
|
|
97
|
-
id: number;
|
|
98
|
-
paused: boolean;
|
|
99
|
-
properties: {
|
|
100
|
-
uid?: string | undefined;
|
|
101
|
-
kind?: "audio" | undefined;
|
|
102
|
-
customType?: string | undefined;
|
|
103
|
-
} | {
|
|
104
|
-
id?: string | undefined;
|
|
105
|
-
codec?: string | undefined;
|
|
106
|
-
uid?: string | undefined;
|
|
107
|
-
kind?: "video" | undefined;
|
|
108
|
-
customType?: string | undefined;
|
|
109
|
-
};
|
|
110
|
-
}[];
|
|
111
|
-
}>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
112
26
|
export type Peer = z.infer<typeof PeerSchema>;
|
|
113
|
-
export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<
|
|
27
|
+
export declare const PeerUpdateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
114
28
|
kind: z.ZodLiteral<"UserDataChanged">;
|
|
115
29
|
peer_id: z.ZodNumber;
|
|
116
|
-
user_data: z.
|
|
117
|
-
},
|
|
118
|
-
kind: "UserDataChanged";
|
|
119
|
-
user_data: Uint8Array;
|
|
120
|
-
peer_id: number;
|
|
121
|
-
}, {
|
|
122
|
-
kind: "UserDataChanged";
|
|
123
|
-
user_data: Uint8Array;
|
|
124
|
-
peer_id: number;
|
|
125
|
-
}>, z.ZodObject<{
|
|
30
|
+
user_data: z.ZodCustom<Uint8Array, Uint8Array>;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
126
32
|
kind: z.ZodLiteral<"MediaStarted">;
|
|
127
33
|
peer_id: z.ZodNumber;
|
|
128
34
|
media: z.ZodObject<{
|
|
129
35
|
id: z.ZodNumber;
|
|
130
|
-
properties: z.ZodUnion<[z.ZodObject<{
|
|
36
|
+
properties: z.ZodUnion<readonly [z.ZodObject<{
|
|
131
37
|
kind: z.ZodOptional<z.ZodLiteral<"audio">>;
|
|
132
38
|
uid: z.ZodOptional<z.ZodString>;
|
|
133
39
|
customType: z.ZodOptional<z.ZodString>;
|
|
134
|
-
},
|
|
135
|
-
uid?: string | undefined;
|
|
136
|
-
kind?: "audio" | undefined;
|
|
137
|
-
customType?: string | undefined;
|
|
138
|
-
}, {
|
|
139
|
-
uid?: string | undefined;
|
|
140
|
-
kind?: "audio" | undefined;
|
|
141
|
-
customType?: string | undefined;
|
|
142
|
-
}>, z.ZodObject<{
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
41
|
kind: z.ZodOptional<z.ZodLiteral<"video">>;
|
|
144
42
|
codec: z.ZodOptional<z.ZodString>;
|
|
145
43
|
uid: z.ZodOptional<z.ZodString>;
|
|
146
44
|
customType: z.ZodOptional<z.ZodString>;
|
|
147
45
|
id: z.ZodOptional<z.ZodString>;
|
|
148
|
-
},
|
|
149
|
-
id?: string | undefined;
|
|
150
|
-
codec?: string | undefined;
|
|
151
|
-
uid?: string | undefined;
|
|
152
|
-
kind?: "video" | undefined;
|
|
153
|
-
customType?: string | undefined;
|
|
154
|
-
}, {
|
|
155
|
-
id?: string | undefined;
|
|
156
|
-
codec?: string | undefined;
|
|
157
|
-
uid?: string | undefined;
|
|
158
|
-
kind?: "video" | undefined;
|
|
159
|
-
customType?: string | undefined;
|
|
160
|
-
}>]>;
|
|
46
|
+
}, z.core.$strip>]>;
|
|
161
47
|
paused: z.ZodBoolean;
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
paused: boolean;
|
|
165
|
-
properties: {
|
|
166
|
-
uid?: string | undefined;
|
|
167
|
-
kind?: "audio" | undefined;
|
|
168
|
-
customType?: string | undefined;
|
|
169
|
-
} | {
|
|
170
|
-
id?: string | undefined;
|
|
171
|
-
codec?: string | undefined;
|
|
172
|
-
uid?: string | undefined;
|
|
173
|
-
kind?: "video" | undefined;
|
|
174
|
-
customType?: string | undefined;
|
|
175
|
-
};
|
|
176
|
-
}, {
|
|
177
|
-
id: number;
|
|
178
|
-
paused: boolean;
|
|
179
|
-
properties: {
|
|
180
|
-
uid?: string | undefined;
|
|
181
|
-
kind?: "audio" | undefined;
|
|
182
|
-
customType?: string | undefined;
|
|
183
|
-
} | {
|
|
184
|
-
id?: string | undefined;
|
|
185
|
-
codec?: string | undefined;
|
|
186
|
-
uid?: string | undefined;
|
|
187
|
-
kind?: "video" | undefined;
|
|
188
|
-
customType?: string | undefined;
|
|
189
|
-
};
|
|
190
|
-
}>;
|
|
191
|
-
}, "strip", z.ZodTypeAny, {
|
|
192
|
-
media: {
|
|
193
|
-
id: number;
|
|
194
|
-
paused: boolean;
|
|
195
|
-
properties: {
|
|
196
|
-
uid?: string | undefined;
|
|
197
|
-
kind?: "audio" | undefined;
|
|
198
|
-
customType?: string | undefined;
|
|
199
|
-
} | {
|
|
200
|
-
id?: string | undefined;
|
|
201
|
-
codec?: string | undefined;
|
|
202
|
-
uid?: string | undefined;
|
|
203
|
-
kind?: "video" | undefined;
|
|
204
|
-
customType?: string | undefined;
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
kind: "MediaStarted";
|
|
208
|
-
peer_id: number;
|
|
209
|
-
}, {
|
|
210
|
-
media: {
|
|
211
|
-
id: number;
|
|
212
|
-
paused: boolean;
|
|
213
|
-
properties: {
|
|
214
|
-
uid?: string | undefined;
|
|
215
|
-
kind?: "audio" | undefined;
|
|
216
|
-
customType?: string | undefined;
|
|
217
|
-
} | {
|
|
218
|
-
id?: string | undefined;
|
|
219
|
-
codec?: string | undefined;
|
|
220
|
-
uid?: string | undefined;
|
|
221
|
-
kind?: "video" | undefined;
|
|
222
|
-
customType?: string | undefined;
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
kind: "MediaStarted";
|
|
226
|
-
peer_id: number;
|
|
227
|
-
}>, z.ZodObject<{
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
228
50
|
kind: z.ZodLiteral<"MediaStopped">;
|
|
229
51
|
peer_id: z.ZodNumber;
|
|
230
52
|
media_id: z.ZodNumber;
|
|
231
|
-
},
|
|
232
|
-
kind: "MediaStopped";
|
|
233
|
-
peer_id: number;
|
|
234
|
-
media_id: number;
|
|
235
|
-
}, {
|
|
236
|
-
kind: "MediaStopped";
|
|
237
|
-
peer_id: number;
|
|
238
|
-
media_id: number;
|
|
239
|
-
}>]>;
|
|
53
|
+
}, z.core.$strip>], "kind">;
|
|
240
54
|
export type PeerUpdate = z.infer<typeof PeerUpdateSchema>;
|