@liveblocks/client 0.16.15 → 0.17.0-test1

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.
Files changed (10) hide show
  1. package/index.d.ts +26 -7
  2. package/index.js +1230 -830
  3. package/index.mjs +1030 -782
  4. package/internal.d.ts +271 -251
  5. package/internal.js +314 -168
  6. package/internal.mjs +265 -130
  7. package/package.json +15 -10
  8. package/shared.d.ts +973 -628
  9. package/shared.js +2568 -1331
  10. package/shared.mjs +1989 -1210
package/internal.d.ts CHANGED
@@ -1,45 +1,101 @@
1
- import { d as JsonObject, J as Json, g as Resolve, e as Lson, A as AbstractCrdt, f as LsonObject, L as LiveObject, S as StorageUpdate } from './shared';
2
- export { g as Resolve, h as RoomInitializers, i as isJsonArray, j as isJsonObject, k as isJsonScalar } from './shared';
1
+ import {
2
+ d as JsonObject,
3
+ J as Json,
4
+ h as Op,
5
+ I as IdTuple,
6
+ i as SerializedCrdt,
7
+ f as Lson,
8
+ g as LsonObject,
9
+ c as LiveObject,
10
+ S as StorageUpdate,
11
+ } from "./shared.js";
12
+ export {
13
+ G as CrdtType,
14
+ j as CreateChildOp,
15
+ k as CreateListOp,
16
+ l as CreateMapOp,
17
+ m as CreateObjectOp,
18
+ n as CreateOp,
19
+ o as CreateRegisterOp,
20
+ p as CreateRootObjectOp,
21
+ D as DeleteCrdtOp,
22
+ q as DeleteObjectKeyOp,
23
+ I as IdTuple,
24
+ r as LiveNode,
25
+ N as NodeMap,
26
+ h as Op,
27
+ K as OpCode,
28
+ s as ParentToChildNodeMap,
29
+ t as Resolve,
30
+ u as RoomInitializers,
31
+ v as SerializedChild,
32
+ i as SerializedCrdt,
33
+ w as SerializedList,
34
+ x as SerializedMap,
35
+ y as SerializedObject,
36
+ z as SerializedRegister,
37
+ A as SerializedRootObject,
38
+ E as SetParentKeyOp,
39
+ F as UpdateObjectOp,
40
+ W as WebsocketCloseCodes,
41
+ V as isChildCrdt,
42
+ M as isJsonArray,
43
+ Q as isJsonObject,
44
+ T as isJsonScalar,
45
+ X as isRootCrdt,
46
+ } from "./shared.js";
3
47
 
4
- declare type IdTuple<T> = [id: string, value: T];
5
- /**
6
- * Lookup table for nodes (= SerializedCrdt values) by their IDs.
7
- */
8
- declare type NodeMap = Map<string, // Node ID
9
- SerializedCrdt>;
10
- /**
11
- * Reverse lookup table for all child nodes (= list of SerializedCrdt values)
12
- * by their parent node's IDs.
13
- */
14
- declare type ParentToChildNodeMap = Map<string, // Parent's node ID
15
- IdTuple<SerializedChild>[]>;
48
+ declare enum ClientMsgCode {
49
+ UPDATE_PRESENCE = 100,
50
+ BROADCAST_EVENT = 103,
51
+ FETCH_STORAGE = 200,
52
+ UPDATE_STORAGE = 201,
53
+ }
16
54
  /**
17
- * Messages that can be sent from the server to the client.
55
+ * Messages that can be sent from the client to the server.
18
56
  */
19
- declare type ServerMsg<TPresence extends JsonObject> = UpdatePresenceServerMsg<TPresence> | UserJoinServerMsg | UserLeftServerMsg | BroadcastedEventServerMsg | RoomStateServerMsg | InitialDocumentStateServerMsg | UpdateStorageServerMsg;
57
+ declare type ClientMsg<TPresence extends JsonObject> =
58
+ | BroadcastEventClientMsg
59
+ | UpdatePresenceClientMsg<TPresence>
60
+ | UpdateStorageClientMsg
61
+ | FetchStorageClientMsg;
62
+ declare type BroadcastEventClientMsg = {
63
+ type: ClientMsgCode.BROADCAST_EVENT;
64
+ event: Json;
65
+ };
66
+ declare type UpdatePresenceClientMsg<TPresence extends JsonObject> = {
67
+ type: ClientMsgCode.UPDATE_PRESENCE;
68
+ data: TPresence;
69
+ targetActor?: number;
70
+ };
71
+ declare type UpdateStorageClientMsg = {
72
+ type: ClientMsgCode.UPDATE_STORAGE;
73
+ ops: Op[];
74
+ };
75
+ declare type FetchStorageClientMsg = {
76
+ type: ClientMsgCode.FETCH_STORAGE;
77
+ };
78
+
20
79
  declare enum ServerMsgCode {
21
- UPDATE_PRESENCE = 100,
22
- USER_JOINED = 101,
23
- USER_LEFT = 102,
24
- BROADCASTED_EVENT = 103,
25
- ROOM_STATE = 104,
26
- INITIAL_STORAGE_STATE = 200,
27
- UPDATE_STORAGE = 201
80
+ UPDATE_PRESENCE = 100,
81
+ USER_JOINED = 101,
82
+ USER_LEFT = 102,
83
+ BROADCASTED_EVENT = 103,
84
+ ROOM_STATE = 104,
85
+ INITIAL_STORAGE_STATE = 200,
86
+ UPDATE_STORAGE = 201,
28
87
  }
29
88
  /**
30
- * Sent by the WebSocket server to a single client in response to the client
31
- * joining the Room, to provide the initial state of the Room. The payload
32
- * includes a list of all other Users that already are in the Room.
89
+ * Messages that can be sent from the server to the client.
33
90
  */
34
- declare type RoomStateServerMsg = {
35
- type: ServerMsgCode.ROOM_STATE;
36
- users: {
37
- [actor: number]: {
38
- id?: string;
39
- info?: Json;
40
- };
41
- };
42
- };
91
+ declare type ServerMsg<TPresence extends JsonObject> =
92
+ | UpdatePresenceServerMsg<TPresence>
93
+ | UserJoinServerMsg
94
+ | UserLeftServerMsg
95
+ | BroadcastedEventServerMsg
96
+ | RoomStateServerMsg
97
+ | InitialDocumentStateServerMsg
98
+ | UpdateStorageServerMsg;
43
99
  /**
44
100
  * Sent by the WebSocket server and broadcasted to all clients to announce that
45
101
  * a User updated their presence. For example, when a user moves their cursor.
@@ -52,65 +108,79 @@ declare type RoomStateServerMsg = {
52
108
  * so all other existing clients can ignore this broadcasted message.
53
109
  */
54
110
  declare type UpdatePresenceServerMsg<TPresence extends JsonObject> = {
55
- type: ServerMsgCode.UPDATE_PRESENCE;
56
- /**
57
- * The User whose Presence has changed.
58
- */
59
- actor: number;
60
- /**
61
- * The partial or full Presence of a User. If the `targetActor` field is set,
62
- * this will be the full Presence, otherwise it only contain the fields that
63
- * have changed since the last broadcast.
64
- */
65
- data: TPresence;
66
- /**
67
- * If this message was sent in response to a newly joined user, this field
68
- * indicates which client this message is for. Other existing clients may
69
- * ignore this message if this message isn't targeted for them.
70
- */
71
- targetActor?: number;
111
+ type: ServerMsgCode.UPDATE_PRESENCE;
112
+ /**
113
+ * The User whose Presence has changed.
114
+ */
115
+ actor: number;
116
+ /**
117
+ * The partial or full Presence of a User. If the `targetActor` field is set,
118
+ * this will be the full Presence, otherwise it only contain the fields that
119
+ * have changed since the last broadcast.
120
+ */
121
+ data: TPresence;
122
+ /**
123
+ * If this message was sent in response to a newly joined user, this field
124
+ * indicates which client this message is for. Other existing clients may
125
+ * ignore this message if this message isn't targeted for them.
126
+ */
127
+ targetActor?: number;
72
128
  };
73
129
  /**
74
130
  * Sent by the WebSocket server and broadcasted to all clients to announce that
75
131
  * a new User has joined the Room.
76
132
  */
77
133
  declare type UserJoinServerMsg = {
78
- type: ServerMsgCode.USER_JOINED;
79
- actor: number;
80
- /**
81
- * The id of the User that has been set in the authentication endpoint.
82
- * Useful to get additional information about the connected user.
83
- */
84
- id?: string;
85
- /**
86
- * Additional user information that has been set in the authentication
87
- * endpoint.
88
- */
89
- info?: Json;
134
+ type: ServerMsgCode.USER_JOINED;
135
+ actor: number;
136
+ /**
137
+ * The id of the User that has been set in the authentication endpoint.
138
+ * Useful to get additional information about the connected user.
139
+ */
140
+ id?: string;
141
+ /**
142
+ * Additional user information that has been set in the authentication
143
+ * endpoint.
144
+ */
145
+ info?: Json;
90
146
  };
91
147
  /**
92
148
  * Sent by the WebSocket server and broadcasted to all clients to announce that
93
149
  * a new User has left the Room.
94
150
  */
95
151
  declare type UserLeftServerMsg = {
96
- type: ServerMsgCode.USER_LEFT;
97
- actor: number;
152
+ type: ServerMsgCode.USER_LEFT;
153
+ actor: number;
98
154
  };
99
155
  /**
100
156
  * Sent by the WebSocket server and broadcasted to all clients to announce that
101
157
  * a User broadcasted an Event to everyone in the Room.
102
158
  */
103
159
  declare type BroadcastedEventServerMsg = {
104
- type: ServerMsgCode.BROADCASTED_EVENT;
105
- /**
106
- * The User who broadcasted the Event.
107
- */
108
- actor: number;
109
- /**
110
- * The arbitrary payload of the Event. This can be any JSON value. Clients
111
- * will have to manually verify/decode this event.
112
- */
113
- event: Json;
160
+ type: ServerMsgCode.BROADCASTED_EVENT;
161
+ /**
162
+ * The User who broadcasted the Event.
163
+ */
164
+ actor: number;
165
+ /**
166
+ * The arbitrary payload of the Event. This can be any JSON value. Clients
167
+ * will have to manually verify/decode this event.
168
+ */
169
+ event: Json;
170
+ };
171
+ /**
172
+ * Sent by the WebSocket server to a single client in response to the client
173
+ * joining the Room, to provide the initial state of the Room. The payload
174
+ * includes a list of all other Users that already are in the Room.
175
+ */
176
+ declare type RoomStateServerMsg = {
177
+ type: ServerMsgCode.ROOM_STATE;
178
+ users: {
179
+ [actor: number]: {
180
+ id?: string;
181
+ info?: Json;
182
+ };
183
+ };
114
184
  };
115
185
  /**
116
186
  * Sent by the WebSocket server to a single client in response to the client
@@ -118,8 +188,8 @@ declare type BroadcastedEventServerMsg = {
118
188
  * payload includes the entire Storage document.
119
189
  */
120
190
  declare type InitialDocumentStateServerMsg = {
121
- type: ServerMsgCode.INITIAL_STORAGE_STATE;
122
- items: IdTuple<SerializedCrdt>[];
191
+ type: ServerMsgCode.INITIAL_STORAGE_STATE;
192
+ items: IdTuple<SerializedCrdt>[];
123
193
  };
124
194
  /**
125
195
  * Sent by the WebSocket server and broadcasted to all clients to announce that
@@ -129,162 +199,79 @@ declare type InitialDocumentStateServerMsg = {
129
199
  * mutations to make to the initially loaded document).
130
200
  */
131
201
  declare type UpdateStorageServerMsg = {
132
- type: ServerMsgCode.UPDATE_STORAGE;
133
- ops: Op[];
202
+ type: ServerMsgCode.UPDATE_STORAGE;
203
+ ops: Op[];
134
204
  };
205
+
135
206
  /**
136
- * Messages that can be sent from the client to the server.
207
+ * Helper function that can be used to implement exhaustive switch statements
208
+ * with TypeScript. Example usage:
209
+ *
210
+ * type Fruit = "🍎" | "🍌";
211
+ *
212
+ * switch (fruit) {
213
+ * case "🍎":
214
+ * case "🍌":
215
+ * return doSomething();
216
+ *
217
+ * default:
218
+ * return assertNever(fruit, "Unknown fruit");
219
+ * }
220
+ *
221
+ * If now the Fruit union is extended (i.e. add "🍒"), TypeScript will catch
222
+ * this *statically*, rather than at runtime, and force you to handle the
223
+ * 🍒 case.
137
224
  */
138
- declare type ClientMsg<TPresence extends JsonObject> = BroadcastEventClientMsg | UpdatePresenceClientMsg<TPresence> | UpdateStorageClientMsg | FetchStorageClientMsg;
139
- declare enum ClientMsgCode {
140
- UPDATE_PRESENCE = 100,
141
- BROADCAST_EVENT = 103,
142
- FETCH_STORAGE = 200,
143
- UPDATE_STORAGE = 201
144
- }
145
- declare type BroadcastEventClientMsg = {
146
- type: ClientMsgCode.BROADCAST_EVENT;
147
- event: Json;
148
- };
149
- declare type UpdatePresenceClientMsg<TPresence extends JsonObject> = {
150
- type: ClientMsgCode.UPDATE_PRESENCE;
151
- data: TPresence;
152
- targetActor?: number;
153
- };
154
- declare type UpdateStorageClientMsg = {
155
- type: ClientMsgCode.UPDATE_STORAGE;
156
- ops: Op[];
157
- };
158
- declare type FetchStorageClientMsg = {
159
- type: ClientMsgCode.FETCH_STORAGE;
160
- };
161
- declare enum CrdtType {
162
- OBJECT = 0,
163
- LIST = 1,
164
- MAP = 2,
165
- REGISTER = 3
166
- }
167
- declare type SerializedRootObject = {
168
- type: CrdtType.OBJECT;
169
- data: JsonObject;
170
- parentId?: never;
171
- parentKey?: never;
172
- };
173
- declare type SerializedObject = {
174
- type: CrdtType.OBJECT;
175
- parentId: string;
176
- parentKey: string;
177
- data: JsonObject;
178
- };
179
- declare type SerializedList = {
180
- type: CrdtType.LIST;
181
- parentId: string;
182
- parentKey: string;
183
- };
184
- declare type SerializedMap = {
185
- type: CrdtType.MAP;
186
- parentId: string;
187
- parentKey: string;
188
- };
189
- declare type SerializedRegister = {
190
- type: CrdtType.REGISTER;
191
- parentId: string;
192
- parentKey: string;
193
- data: Json;
194
- };
195
- declare type SerializedCrdt = SerializedRootObject | SerializedChild;
196
- declare type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
197
- declare function isRootCrdt(crdt: SerializedCrdt): crdt is SerializedRootObject;
198
- declare function isChildCrdt(crdt: SerializedCrdt): crdt is SerializedChild;
199
- declare enum OpCode {
200
- INIT = 0,
201
- SET_PARENT_KEY = 1,
202
- CREATE_LIST = 2,
203
- UPDATE_OBJECT = 3,
204
- CREATE_OBJECT = 4,
205
- DELETE_CRDT = 5,
206
- DELETE_OBJECT_KEY = 6,
207
- CREATE_MAP = 7,
208
- CREATE_REGISTER = 8
209
- }
225
+ declare function assertNever(_value: never, errmsg: string): never;
210
226
  /**
211
- * These operations are the payload for {@link UpdateStorageServerMsg} messages
212
- * only.
227
+ * Asserts that a given value is non-nullable. This is similar to TypeScript's
228
+ * `!` operator, but will throw an error at runtime (dev-mode only) indicating
229
+ * an incorrect assumption.
230
+ *
231
+ * Instead of:
232
+ *
233
+ * foo!.bar
234
+ *
235
+ * Use:
236
+ *
237
+ * nn(foo).bar
238
+ *
213
239
  */
214
- declare type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
215
- declare type CreateOp = CreateRootObjectOp | CreateChildOp;
216
- declare type CreateChildOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
217
- declare type UpdateObjectOp = {
218
- opId?: string;
219
- id: string;
220
- type: OpCode.UPDATE_OBJECT;
221
- data: Partial<JsonObject>;
222
- };
223
- declare type CreateObjectOp = {
224
- opId?: string;
225
- id: string;
226
- intent?: "set";
227
- type: OpCode.CREATE_OBJECT;
228
- parentId: string;
229
- parentKey: string;
230
- data: JsonObject;
231
- };
232
- declare type CreateRootObjectOp = Resolve<Omit<CreateObjectOp, "parentId" | "parentKey"> & {
233
- parentId?: never;
234
- parentKey?: never;
235
- }>;
236
- declare type CreateListOp = {
237
- opId?: string;
238
- id: string;
239
- intent?: "set";
240
- type: OpCode.CREATE_LIST;
241
- parentId: string;
242
- parentKey: string;
243
- };
244
- declare type CreateMapOp = {
245
- opId?: string;
246
- id: string;
247
- intent?: "set";
248
- type: OpCode.CREATE_MAP;
249
- parentId: string;
250
- parentKey: string;
251
- };
252
- declare type CreateRegisterOp = {
253
- opId?: string;
254
- id: string;
255
- intent?: "set";
256
- type: OpCode.CREATE_REGISTER;
257
- parentId: string;
258
- parentKey: string;
259
- data: Json;
260
- };
261
- declare type DeleteCrdtOp = {
262
- opId?: string;
263
- id: string;
264
- type: OpCode.DELETE_CRDT;
265
- };
266
- declare type SetParentKeyOp = {
267
- opId?: string;
268
- id: string;
269
- type: OpCode.SET_PARENT_KEY;
270
- parentKey: string;
240
+ declare function nn<T>(value: T, errmsg?: string): NonNullable<T>;
241
+
242
+ declare const SCOPES: readonly [
243
+ "websocket:presence",
244
+ "websocket:storage",
245
+ "room:read",
246
+ "room:write",
247
+ "rooms:read",
248
+ "rooms:write"
249
+ ];
250
+ declare type Scope = typeof SCOPES[number];
251
+ declare type AppOnlyAuthToken = {
252
+ appId: string;
253
+ roomId?: never;
254
+ scopes: string[];
271
255
  };
272
- declare type DeleteObjectKeyOp = {
273
- opId?: string;
274
- id: string;
275
- type: OpCode.DELETE_OBJECT_KEY;
276
- key: string;
256
+ declare type RoomAuthToken = {
257
+ appId: string;
258
+ roomId: string;
259
+ scopes: string[];
260
+ actor: number;
261
+ maxConnectionsPerRoom?: number;
262
+ id?: string;
263
+ info?: Json;
277
264
  };
278
- declare enum WebsocketCloseCodes {
279
- CLOSE_ABNORMAL = 1006,
280
- INVALID_MESSAGE_FORMAT = 4000,
281
- NOT_ALLOWED = 4001,
282
- MAX_NUMBER_OF_MESSAGES_PER_SECONDS = 4002,
283
- MAX_NUMBER_OF_CONCURRENT_CONNECTIONS = 4003,
284
- MAX_NUMBER_OF_MESSAGES_PER_DAY_PER_APP = 4004,
285
- MAX_NUMBER_OF_CONCURRENT_CONNECTIONS_PER_ROOM = 4005,
286
- CLOSE_WITHOUT_RETRY = 4999
265
+ declare type AuthToken = AppOnlyAuthToken | RoomAuthToken;
266
+ interface JwtMetadata extends JsonObject {
267
+ iat: number;
268
+ exp: number;
287
269
  }
270
+ declare function isScope(value: unknown): value is Scope;
271
+ declare function isAppOnlyAuthToken(data: JsonObject): data is AppOnlyAuthToken;
272
+ declare function isRoomAuthToken(data: JsonObject): data is RoomAuthToken;
273
+ declare function isAuthToken(data: JsonObject): data is AuthToken;
274
+ declare function parseAuthToken(token: string): AuthToken & JwtMetadata;
288
275
 
289
276
  /**
290
277
  * Tools to help with the controlled deprecation of public APIs.
@@ -301,7 +288,11 @@ declare function deprecate(message: string, key?: string): void;
301
288
  * console if the first argument is truthy. Only in dev mode, and
302
289
  * only once per message/key. In production, this is a no-op.
303
290
  */
304
- declare function deprecateIf(condition: unknown, message: string, key?: string): void;
291
+ declare function deprecateIf(
292
+ condition: unknown,
293
+ message: string,
294
+ key?: string
295
+ ): void;
305
296
  /**
306
297
  * Throws a deprecation error in the dev console.
307
298
  *
@@ -317,33 +308,23 @@ declare function throwUsageError(message: string): void;
317
308
  */
318
309
  declare function errorIf(condition: unknown, message: string): void;
319
310
 
320
- declare function lsonToJson(value: Lson | AbstractCrdt): Json;
321
- declare function patchLiveObjectKey<O extends LsonObject>(liveObject: LiveObject<O>, key: keyof O, prev: unknown, next: unknown): void;
322
- declare function patchImmutableObject<T>(state: T, updates: StorageUpdate[]): T;
311
+ declare function lsonToJson(value: Lson): Json;
312
+ declare function patchLiveObjectKey<
313
+ O extends LsonObject,
314
+ K extends keyof O,
315
+ V extends Lson
316
+ >(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
317
+ declare function patchImmutableObject<S extends JsonObject>(
318
+ state: S,
319
+ updates: StorageUpdate[]
320
+ ): S;
323
321
 
324
322
  declare function makePosition(before?: string, after?: string): string;
325
323
  declare function comparePosition(posA: string, posB: string): number;
326
324
 
327
- /**
328
- * Helper function that can be used to implement exhaustive switch statements
329
- * with TypeScript. Example usage:
330
- *
331
- * type Fruit = "🍎" | "🍌";
332
- *
333
- * switch (fruit) {
334
- * case "🍎":
335
- * case "🍌":
336
- * return doSomething();
337
- *
338
- * default:
339
- * return assertNever(fruit, "Unknown fruit");
340
- * }
341
- *
342
- * If now the Fruit union is extended (i.e. add "🍒"), TypeScript will catch
343
- * this *statically*, rather than at runtime, and force you to handle the
344
- * 🍒 case.
345
- */
346
- declare function assertNever(_value: never, errmsg: string): never;
325
+ declare function isPlainObject(blob: unknown): blob is {
326
+ [key: string]: unknown;
327
+ };
347
328
  /**
348
329
  * Alternative to JSON.parse() that will not throw in production. If the passed
349
330
  * string cannot be parsed, this will return `undefined`.
@@ -354,4 +335,43 @@ declare function tryParseJson(rawMessage: string): Json | undefined;
354
335
  */
355
336
  declare function b64decode(b64value: string): string;
356
337
 
357
- export { BroadcastEventClientMsg, ClientMsg, ClientMsgCode, CrdtType, CreateChildOp, CreateListOp, CreateMapOp, CreateObjectOp, CreateRegisterOp, CreateRootObjectOp, DeleteCrdtOp, DeleteObjectKeyOp, FetchStorageClientMsg, IdTuple, InitialDocumentStateServerMsg, NodeMap, Op, OpCode, ParentToChildNodeMap, RoomStateServerMsg, SerializedChild, SerializedCrdt, SerializedList, SerializedMap, SerializedObject, SerializedRegister, SerializedRootObject, ServerMsg, ServerMsgCode, SetParentKeyOp, UpdateObjectOp, UpdatePresenceClientMsg, UpdateStorageClientMsg, UserJoinServerMsg, WebsocketCloseCodes, assertNever, b64decode, comparePosition, deprecate, deprecateIf, errorIf, isChildCrdt, isRootCrdt, lsonToJson, makePosition, patchImmutableObject, patchLiveObjectKey, throwUsageError, tryParseJson };
338
+ export {
339
+ AppOnlyAuthToken,
340
+ AuthToken,
341
+ BroadcastEventClientMsg,
342
+ BroadcastedEventServerMsg,
343
+ ClientMsg,
344
+ ClientMsgCode,
345
+ FetchStorageClientMsg,
346
+ InitialDocumentStateServerMsg,
347
+ RoomAuthToken,
348
+ RoomStateServerMsg,
349
+ Scope,
350
+ ServerMsg,
351
+ ServerMsgCode,
352
+ UpdatePresenceClientMsg,
353
+ UpdatePresenceServerMsg,
354
+ UpdateStorageClientMsg,
355
+ UpdateStorageServerMsg,
356
+ UserJoinServerMsg,
357
+ UserLeftServerMsg,
358
+ assertNever,
359
+ b64decode,
360
+ comparePosition,
361
+ deprecate,
362
+ deprecateIf,
363
+ errorIf,
364
+ isAppOnlyAuthToken,
365
+ isAuthToken,
366
+ isPlainObject,
367
+ isRoomAuthToken,
368
+ isScope,
369
+ lsonToJson,
370
+ makePosition,
371
+ nn,
372
+ parseAuthToken,
373
+ patchImmutableObject,
374
+ patchLiveObjectKey,
375
+ throwUsageError,
376
+ tryParseJson,
377
+ };