@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.
@@ -35,9 +35,11 @@ export declare namespace Backend {
35
35
  readonly roomId?: string;
36
36
  readonly userData?: Uint8Array;
37
37
  readonly position?: [number, number, number];
38
+ readonly cipher?: Cipher;
38
39
  readonly onEvent: OnEvent;
39
40
  }
40
41
  interface Room {
42
+ readonly token: string;
41
43
  request(method: string, properties: unknown): Promise<unknown>;
42
44
  link(media: Media): Promise<void>;
43
45
  unlink(media: Media): void;
@@ -102,4 +104,8 @@ export declare namespace Backend {
102
104
  transientSuppressor: boolean;
103
105
  gainController: boolean;
104
106
  }
107
+ type Cipher = {
108
+ type: 'OdinCrypto';
109
+ password: string;
110
+ };
105
111
  }
@@ -28,12 +28,12 @@ export declare const MainCommandsRpc: {
28
28
  token: z.ZodOptional<z.ZodString>;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  peer_id: number;
31
- stream_id?: number | undefined;
32
31
  token?: string | undefined;
32
+ stream_id?: number | undefined;
33
33
  }, {
34
34
  peer_id: number;
35
- stream_id?: number | undefined;
36
35
  token?: string | undefined;
36
+ stream_id?: number | undefined;
37
37
  }>;
38
38
  };
39
39
  WebRtcUpdate: {
@@ -114,12 +114,12 @@ export declare const RoomCommandsRpc: {
114
114
  uid: z.ZodOptional<z.ZodString>;
115
115
  customType: z.ZodOptional<z.ZodString>;
116
116
  }, "strip", z.ZodTypeAny, {
117
- kind?: "audio" | undefined;
118
117
  uid?: string | undefined;
118
+ kind?: "audio" | undefined;
119
119
  customType?: string | undefined;
120
120
  }, {
121
- kind?: "audio" | undefined;
122
121
  uid?: string | undefined;
122
+ kind?: "audio" | undefined;
123
123
  customType?: string | undefined;
124
124
  }>, z.ZodObject<{
125
125
  kind: z.ZodOptional<z.ZodLiteral<"video">>;
@@ -127,57 +127,39 @@ export declare const RoomCommandsRpc: {
127
127
  uid: z.ZodOptional<z.ZodString>;
128
128
  customType: z.ZodOptional<z.ZodString>;
129
129
  }, "strip", z.ZodTypeAny, {
130
- kind?: "video" | undefined;
131
- codec?: string | undefined;
132
130
  uid?: string | undefined;
133
- customType?: string | undefined;
134
- }, {
135
131
  kind?: "video" | undefined;
132
+ customType?: string | undefined;
136
133
  codec?: string | undefined;
134
+ }, {
137
135
  uid?: string | undefined;
136
+ kind?: "video" | undefined;
138
137
  customType?: string | undefined;
138
+ codec?: string | undefined;
139
139
  }>]>;
140
140
  }, "strip", z.ZodTypeAny, {
141
- properties: ({
142
- kind?: "audio" | undefined;
143
- uid?: string | undefined;
144
- customType?: string | undefined;
145
- } | {
146
- kind?: "video" | undefined;
147
- codec?: string | undefined;
141
+ properties: {
148
142
  uid?: string | undefined;
149
- customType?: string | undefined;
150
- }) & ({
151
143
  kind?: "audio" | undefined;
152
- uid?: string | undefined;
153
144
  customType?: string | undefined;
154
145
  } | {
155
- kind?: "video" | undefined;
156
- codec?: string | undefined;
157
146
  uid?: string | undefined;
147
+ kind?: "video" | undefined;
158
148
  customType?: string | undefined;
159
- } | undefined);
149
+ codec?: string | undefined;
150
+ };
160
151
  media_id: number;
161
152
  }, {
162
- properties: ({
163
- kind?: "audio" | undefined;
164
- uid?: string | undefined;
165
- customType?: string | undefined;
166
- } | {
167
- kind?: "video" | undefined;
168
- codec?: string | undefined;
153
+ properties: {
169
154
  uid?: string | undefined;
170
- customType?: string | undefined;
171
- }) & ({
172
155
  kind?: "audio" | undefined;
173
- uid?: string | undefined;
174
156
  customType?: string | undefined;
175
157
  } | {
176
- kind?: "video" | undefined;
177
- codec?: string | undefined;
178
158
  uid?: string | undefined;
159
+ kind?: "video" | undefined;
179
160
  customType?: string | undefined;
180
- } | undefined);
161
+ codec?: string | undefined;
162
+ };
181
163
  media_id: number;
182
164
  }>;
183
165
  response: z.ZodNull;