@liveblocks/core 3.21.0-exp1 → 3.21.0-private1

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/dist/index.d.cts CHANGED
@@ -87,6 +87,15 @@ declare const Permission: {
87
87
  readonly CommentsWrite: "comments:write";
88
88
  readonly CommentsRead: "comments:read";
89
89
  readonly CommentsNone: "comments:none";
90
+ readonly CommentsPublicWrite: "comments:public:write";
91
+ readonly CommentsPublicRead: "comments:public:read";
92
+ readonly CommentsPublicNone: "comments:public:none";
93
+ readonly CommentsPrivateWrite: "comments:private:write";
94
+ readonly CommentsPrivateRead: "comments:private:read";
95
+ readonly CommentsPrivateNone: "comments:private:none";
96
+ readonly CommentsPersonalWrite: "comments:personal:write";
97
+ readonly CommentsPersonalRead: "comments:personal:read";
98
+ readonly CommentsPersonalNone: "comments:personal:none";
90
99
  /**
91
100
  * Feeds
92
101
  */
@@ -106,6 +115,9 @@ type PermissionMatrix = {
106
115
  room: AccessLevel;
107
116
  storage: AccessLevel;
108
117
  comments: AccessLevel;
118
+ "comments:public": AccessLevel;
119
+ "comments:private": AccessLevel;
120
+ "comments:personal": AccessLevel;
109
121
  feeds: AccessLevel;
110
122
  personal: AccessLevel;
111
123
  };
@@ -113,22 +125,9 @@ type PermissionResources = keyof PermissionMatrix;
113
125
  type RoomPermissions = Permission[];
114
126
  type RoomAccesses = Record<string, RoomPermissions>;
115
127
  type UpdateRoomAccesses = Record<string, RoomPermissions | null>;
116
- declare function permissionMatrixFromScopes(scopes: RoomPermissions): PermissionMatrix;
117
- declare function hasPermissionAccess(matrix: Partial<PermissionMatrix>, resource: PermissionResources, requiredAccess: RequiredAccessLevel): boolean;
118
128
  declare function normalizeRoomPermissions(permissions: string[] | readonly string[]): RoomPermissions;
119
129
  declare function normalizeRoomAccesses(accesses: RoomAccesses | undefined): RoomAccesses | undefined;
120
130
  declare function normalizeUpdateRoomAccesses(accesses: UpdateRoomAccesses | undefined): UpdateRoomAccesses | undefined;
121
- /**
122
- * Merges permission scopes from multiple sources, by priority: explicit user
123
- * accesses override group accesses, which override the room defaults. Groups
124
- * all share the same priority, so they are first merged together by taking
125
- * the highest access level per feature (and base).
126
- */
127
- declare function mergeRoomPermissionScopes({ defaultAccesses, groupsAccesses, userAccesses, }: {
128
- defaultAccesses: RoomPermissions;
129
- groupsAccesses: RoomPermissions[];
130
- userAccesses: RoomPermissions;
131
- }): RoomPermissions;
132
131
  /**
133
132
  * Validates a set of permissions:
134
133
  * - every scope must be a known permission scope,
@@ -140,6 +139,19 @@ declare function mergeRoomPermissionScopes({ defaultAccesses, groupsAccesses, us
140
139
  * Returns `true` when the set is valid, or an error message otherwise.
141
140
  */
142
141
  declare function validatePermissionsSet(scopes: readonly string[]): true | string;
142
+ declare function permissionMatrixFromScopes(scopes: RoomPermissions): PermissionMatrix;
143
+ declare function hasPermissionAccess(matrix: Partial<PermissionMatrix>, resource: PermissionResources, requiredAccess: RequiredAccessLevel): boolean;
144
+ /**
145
+ * Merges permission scopes from multiple sources, by priority: explicit user
146
+ * accesses override group accesses, which override the room defaults. Groups
147
+ * all share the same priority, so they are first merged together by taking
148
+ * the highest access level per feature (and base).
149
+ */
150
+ declare function mergeRoomPermissionScopes({ defaultAccesses, groupsAccesses, userAccesses, }: {
151
+ defaultAccesses: RoomPermissions;
152
+ groupsAccesses: RoomPermissions[];
153
+ userAccesses: RoomPermissions;
154
+ }): RoomPermissions;
143
155
 
144
156
  type CustomAuthenticationResult = Relax<{
145
157
  token: string;
@@ -411,8 +423,6 @@ declare const OpCode: Readonly<{
411
423
  DELETE_OBJECT_KEY: 6;
412
424
  CREATE_MAP: 7;
413
425
  CREATE_REGISTER: 8;
414
- CREATE_TEXT: 9;
415
- UPDATE_TEXT: 10;
416
426
  }>;
417
427
  declare namespace OpCode {
418
428
  type INIT = typeof OpCode.INIT;
@@ -424,48 +434,13 @@ declare namespace OpCode {
424
434
  type DELETE_OBJECT_KEY = typeof OpCode.DELETE_OBJECT_KEY;
425
435
  type CREATE_MAP = typeof OpCode.CREATE_MAP;
426
436
  type CREATE_REGISTER = typeof OpCode.CREATE_REGISTER;
427
- type CREATE_TEXT = typeof OpCode.CREATE_TEXT;
428
- type UPDATE_TEXT = typeof OpCode.UPDATE_TEXT;
429
437
  }
430
- type TextAttributes = JsonObject;
431
- /**
432
- * A single segment in a {@link LiveTextData} document.
433
- *
434
- * @example
435
- * ["Hello world"]
436
- * ["Hello ", { bold: true }]
437
- */
438
- type LiveTextSegment = readonly [text: string] | readonly [text: string, attributes: TextAttributes];
439
- /**
440
- * Serialized form of a {@link LiveText} document: an ordered list of text
441
- * segments with optional inline attributes.
442
- *
443
- * @example
444
- * [["Hello world"]]
445
- * [["Hello ", { bold: true }], ["world"]]
446
- */
447
- type LiveTextData = readonly LiveTextSegment[];
448
- type TextOperation = {
449
- type: "insert";
450
- index: number;
451
- text: string;
452
- attributes?: TextAttributes;
453
- } | {
454
- type: "delete";
455
- index: number;
456
- length: number;
457
- } | {
458
- type: "format";
459
- index: number;
460
- length: number;
461
- attributes: JsonObject;
462
- };
463
438
  /**
464
439
  * These operations are the payload for {@link UpdateStorageServerMsg} messages
465
440
  * only.
466
441
  */
467
- type Op = CreateOp | UpdateObjectOp | UpdateTextOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
468
- type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp | CreateTextOp;
442
+ type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp;
443
+ type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
469
444
  type UpdateObjectOp = {
470
445
  readonly opId?: string;
471
446
  readonly id: string;
@@ -510,26 +485,6 @@ type CreateRegisterOp = {
510
485
  readonly intent?: "set" | "push";
511
486
  readonly deletedId?: string;
512
487
  };
513
- type CreateTextOp = {
514
- readonly opId?: string;
515
- readonly id: string;
516
- readonly type: OpCode.CREATE_TEXT;
517
- readonly parentId: string;
518
- readonly parentKey: string;
519
- readonly data: LiveTextData;
520
- readonly version: number;
521
- readonly intent?: "set" | "push";
522
- readonly deletedId?: string;
523
- };
524
- type UpdateTextOp = {
525
- readonly opId?: string;
526
- readonly id: string;
527
- readonly type: OpCode.UPDATE_TEXT;
528
- readonly baseVersion: number;
529
- readonly version?: number;
530
- readonly ops: TextOperation[];
531
- readonly metadata?: JsonObject;
532
- };
533
488
  type DeleteCrdtOp = {
534
489
  readonly opId?: string;
535
490
  readonly id: string;
@@ -658,17 +613,15 @@ declare const CrdtType: Readonly<{
658
613
  LIST: 1;
659
614
  MAP: 2;
660
615
  REGISTER: 3;
661
- TEXT: 4;
662
616
  }>;
663
617
  declare namespace CrdtType {
664
618
  type OBJECT = typeof CrdtType.OBJECT;
665
619
  type LIST = typeof CrdtType.LIST;
666
620
  type MAP = typeof CrdtType.MAP;
667
621
  type REGISTER = typeof CrdtType.REGISTER;
668
- type TEXT = typeof CrdtType.TEXT;
669
622
  }
670
623
  type SerializedCrdt = SerializedRootObject | SerializedChild;
671
- type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedText;
624
+ type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
672
625
  type SerializedRootObject = {
673
626
  readonly type: CrdtType.OBJECT;
674
627
  readonly data: JsonObject;
@@ -697,21 +650,13 @@ type SerializedRegister = {
697
650
  readonly parentKey: string;
698
651
  readonly data: Json;
699
652
  };
700
- type SerializedText = {
701
- readonly type: CrdtType.TEXT;
702
- readonly parentId: string;
703
- readonly parentKey: string;
704
- readonly data: LiveTextData;
705
- readonly version: number;
706
- };
707
653
  type StorageNode = RootStorageNode | ChildStorageNode;
708
- type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | TextStorageNode;
654
+ type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode;
709
655
  type RootStorageNode = [id: "root", value: SerializedRootObject];
710
656
  type ObjectStorageNode = [id: string, value: SerializedObject];
711
657
  type ListStorageNode = [id: string, value: SerializedList];
712
658
  type MapStorageNode = [id: string, value: SerializedMap];
713
659
  type RegisterStorageNode = [id: string, value: SerializedRegister];
714
- type TextStorageNode = [id: string, value: SerializedText];
715
660
  type NodeMap = Map<string, SerializedCrdt>;
716
661
  type NodeStream = Iterable<StorageNode>;
717
662
  declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
@@ -719,9 +664,8 @@ declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode
719
664
  declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
720
665
  declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
721
666
  declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
722
- declare function isTextStorageNode(node: StorageNode): node is TextStorageNode;
723
667
  type CompactNode = CompactRootNode | CompactChildNode;
724
- type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactTextNode;
668
+ type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode;
725
669
  type CompactRootNode = readonly [id: "root", data: JsonObject];
726
670
  type CompactObjectNode = readonly [
727
671
  id: string,
@@ -749,14 +693,6 @@ type CompactRegisterNode = readonly [
749
693
  parentKey: string,
750
694
  data: Json
751
695
  ];
752
- type CompactTextNode = readonly [
753
- id: string,
754
- type: CrdtType.TEXT,
755
- parentId: string,
756
- parentKey: string,
757
- data: LiveTextData,
758
- version: number
759
- ];
760
696
  declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
761
697
  declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
762
698
 
@@ -922,244 +858,16 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
922
858
  clone(): LiveObject<O>;
923
859
  }
924
860
 
925
- /**
926
- * Use this symbol to brand an object property as internal.
927
- *
928
- * @example
929
- * Object.defineProperty(
930
- * {
931
- * public,
932
- * [kInternal]: {
933
- * private
934
- * },
935
- * },
936
- * kInternal,
937
- * {
938
- * enumerable: false,
939
- * }
940
- * );
941
- */
942
- declare const kInternal: unique symbol;
943
- declare const kStorageUpdateSource: unique symbol;
944
-
945
- /**
946
- * The position of the ops being transformed relative to the ops they are
947
- * transformed over, in the final (server-serialized) timeline:
948
- *
949
- * - "after": the transformed ops will be ordered after the `over` ops. Used
950
- * when rebasing a not-yet-accepted op over already-accepted ops. On
951
- * same-index insert ties, the transformed op shifts right (the earlier op
952
- * stays left), and conflicting format attributes are kept (they will
953
- * overwrite, since the op applies later).
954
- * - "before": the transformed ops were ordered before the `over` ops. Used
955
- * when applying an accepted remote op on top of locally-pending ops. On
956
- * same-index insert ties, the transformed op stays left, and conflicting
957
- * format attributes are dropped on overlapping ranges (the later `over` op
958
- * wins).
959
- */
960
- type TransformOrder = "before" | "after";
961
- /**
962
- * Transform `ops` over `over` (see {@link transformTextOperationsX}),
963
- * returning only the transformed `ops`.
964
- */
965
- declare function transformTextOperations(ops: readonly TextOperation[], over: readonly TextOperation[], order: TransformOrder): TextOperation[];
966
- declare function applyLiveTextOperations(data: LiveTextData, ops: readonly TextOperation[]): LiveTextData;
967
-
968
- type LiveTextAttributes = TextAttributes;
969
- type LiveTextAttributesPatch = JsonObject;
970
-
971
- type LiveTextChange = {
972
- /** Text was inserted at {@link LiveTextChange.index}. */
973
- readonly type: "insert";
974
- readonly index: number;
975
- readonly text: string;
976
- readonly attributes?: TextAttributes;
977
- } | {
978
- /** Text was deleted starting at {@link LiveTextChange.index}. */
979
- readonly type: "delete";
980
- readonly index: number;
981
- readonly length: number;
982
- readonly deletedText: string;
983
- } | {
984
- /** Inline attributes were updated on a range of text. */
985
- readonly type: "format";
986
- readonly index: number;
987
- readonly length: number;
988
- readonly attributes: LiveTextAttributesPatch;
989
- };
990
- /** Notification payload when a {@link LiveText} node changes. */
991
- type LiveTextUpdates = {
992
- type: "LiveText";
993
- node: LiveText;
994
- version: number;
995
- updates: LiveTextChange[];
996
- };
997
- /**
998
- * @private
999
- *
1000
- * Private methods on a LiveText node. As a user of Liveblocks, NEVER USE ANY
1001
- * OF THESE DIRECTLY, because bad things will probably happen if you do.
1002
- */
1003
- type PrivateLiveTextApi = {
1004
- /**
1005
- * Encode a local-document index into server-confirmed coordinates suitable
1006
- * for broadcasting to peers via presence or any other side channel. Pair
1007
- * the result with {@link LiveText.version} at the same instant when
1008
- * sending.
1009
- */
1010
- encodeIndex(localIndex: number): number;
1011
- /**
1012
- * Decode an `(index, fromVersion)` pair from a peer into an offset in this
1013
- * LiveText's current local document.
1014
- */
1015
- decodeIndex(index: number, fromVersion: number): number | null;
1016
- };
1017
-
1018
- /**
1019
- * LiveText is a collaborative rich-text primitive built on server-ordered
1020
- * operational transformation.
1021
- *
1022
- * Use it to store plain text with optional inline formatting attributes in
1023
- * Liveblocks Storage. Each document is a flat sequence of text segments; it
1024
- * cannot contain child Storage structures.
1025
- *
1026
- * Outbound model (one-in-flight): at most one UpdateTextOp per node is
1027
- * awaiting server acknowledgement at any time. Local edits made while an op
1028
- * is in flight are queued and sent (composed into a single op) once the ack
1029
- * arrives. This guarantees every wire op is expressed against server-state
1030
- * coordinates, so the server can transform it over exactly the (foreign)
1031
- * ops the client hadn't seen — never over the client's own pending ops.
1032
- *
1033
- * Inbound model: accepted remote ops are transformed over the local pending
1034
- * ops before being applied ("before" order: the accepted op wins ties), and
1035
- * the pending ops are re-expressed over the remote op in turn ("after"
1036
- * order), keeping them in server coordinates at all times.
1037
- *
1038
- * @example
1039
- * const text = new LiveText("Hello");
1040
- * text.insert(5, " world");
1041
- * text.format(0, 5, { bold: true });
1042
- *
1043
- * // [["Hello", { bold: true }], [" world"]]
1044
- * text.toJSON();
1045
- *
1046
- * @example
1047
- * // Use in Storage
1048
- * declare global {
1049
- * interface Liveblocks {
1050
- * Storage: { document: LiveText };
1051
- * }
1052
- * }
1053
- *
1054
- * const { root } = await room.getStorage();
1055
- * root.get("document").replace(0, root.get("document").length, "Updated");
1056
- */
1057
- declare class LiveText extends AbstractCrdt {
1058
- #private;
1059
- /**
1060
- * @private
1061
- *
1062
- * Private methods and variables used in the core internals, but as a user
1063
- * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
1064
- * will probably happen if you do.
1065
- */
1066
- readonly [kInternal]: PrivateLiveTextApi;
1067
- /**
1068
- * Creates a new LiveText document.
1069
- *
1070
- * @param textOrData Initial plain text, or an array of `[text]` /
1071
- * `[text, attributes]` segments. Defaults to an empty document.
1072
- *
1073
- * @example
1074
- * new LiveText();
1075
- * new LiveText("Hello world");
1076
- * new LiveText([["Hello ", { bold: true }], ["world"]]);
1077
- */
1078
- constructor(textOrData?: string | LiveTextData, version?: number);
1079
- get version(): number;
1080
- get length(): number;
1081
- /**
1082
- * Inserts text at the given index.
1083
- *
1084
- * @param index Character index at which to insert. Values outside the
1085
- * document range are clipped.
1086
- * @param text Text to insert.
1087
- * @param attributes Optional inline attributes for the inserted text.
1088
- *
1089
- * @example
1090
- * const text = new LiveText("Hello");
1091
- * text.insert(5, " world");
1092
- * text.insert(0, "Say: ", { italic: true });
1093
- */
1094
- insert(index: number, text: string, attributes?: TextAttributes): void;
1095
- /**
1096
- * Deletes `length` characters starting at `index`.
1097
- *
1098
- * @example
1099
- * const text = new LiveText("Hello world");
1100
- * text.delete(5, 6); // "Hello"
1101
- */
1102
- delete(index: number, length: number): void;
1103
- /**
1104
- * Replaces a range of text with new text.
1105
- *
1106
- * @example
1107
- * const text = new LiveText("Hello world");
1108
- * text.replace(0, 5, "Hi"); // "Hi world"
1109
- */
1110
- replace(index: number, length: number, text: string, attributes?: TextAttributes): void;
1111
- /**
1112
- * Applies or removes inline attributes on a range of text.
1113
- *
1114
- * Set an attribute to `null` to remove it from the range.
1115
- *
1116
- * @example
1117
- * const text = new LiveText("Hello world");
1118
- * text.format(0, 5, { bold: true });
1119
- * text.format(0, 5, { bold: null });
1120
- */
1121
- format(index: number, length: number, attributes: LiveTextAttributesPatch): void;
1122
- /** Returns the plain text content without attributes. Equivalent to joining the text from each segment in {@link LiveText.toJSON}. */
1123
- toString(): string;
1124
- /**
1125
- * Returns a JSON-compatible snapshot of the document as a {@link LiveTextData}
1126
- * array.
1127
- *
1128
- * @example
1129
- * new LiveText([["Hello ", { bold: true }], ["world"]]).toJSON();
1130
- * // [["Hello ", { bold: true }], ["world"]]
1131
- */
1132
- toJSON(): LiveTextData;
1133
- clone(): LiveText;
1134
- }
1135
-
1136
861
  type StorageCallback = (updates: StorageUpdate[]) => void;
1137
862
  type LiveMapUpdate = LiveMapUpdates<string, Lson>;
1138
863
  type LiveObjectUpdate = LiveObjectUpdates<LsonObject>;
1139
864
  type LiveListUpdate = LiveListUpdates<Lson>;
1140
- type LiveTextUpdate = LiveTextUpdates;
1141
- type StorageUpdateSource = {
1142
- origin: "remote";
1143
- } | {
1144
- origin: "local";
1145
- via: "mutation";
1146
- } | {
1147
- origin: "local";
1148
- via: "history";
1149
- action: "undo" | "redo";
1150
- };
1151
865
  /**
1152
866
  * The payload of notifications sent (in-client) when LiveStructures change.
1153
867
  * Messages of this kind are not originating from the network, but are 100%
1154
868
  * in-client.
1155
- *
1156
- * Updates delivered through `room.subscribe` may carry
1157
- * `[kStorageUpdateSource]` to distinguish where a mutation came from.
1158
- * Undo/redo replays use `via: "history"` with `action: "undo" | "redo"`.
1159
869
  */
1160
- type StorageUpdate = (LiveMapUpdate | LiveObjectUpdate | LiveListUpdate | LiveTextUpdate) & {
1161
- [kStorageUpdateSource]?: StorageUpdateSource;
1162
- };
870
+ type StorageUpdate = LiveMapUpdate | LiveObjectUpdate | LiveListUpdate;
1163
871
 
1164
872
  /**
1165
873
  * Read-only query surface over {@link UnacknowledgedOps}, handed to CRDTs so
@@ -1185,16 +893,6 @@ interface ReadonlyUnacknowledgedOps {
1185
893
  isPossiblyStored(opId: string): boolean;
1186
894
  }
1187
895
 
1188
- type DispatchOptions = {
1189
- /**
1190
- * Whether this dispatch should clear the redo stack. Defaults to true when
1191
- * any forward ops are included (a fresh local mutation), false otherwise.
1192
- * LiveText uses this to dispatch queued ops after an acknowledgement
1193
- * (which should not clear redo), and to register fresh local edits that
1194
- * don't carry wire ops yet (which should).
1195
- */
1196
- clearRedoStack?: boolean;
1197
- };
1198
896
  /**
1199
897
  * The managed pool is a namespace registry (i.e. a context) that "owns" all
1200
898
  * the individual live nodes, ensuring each one has a unique ID, and holding on
@@ -1214,7 +912,7 @@ interface ManagedPool {
1214
912
  * - Add reverse operations to the undo/redo stack
1215
913
  * - Notify room subscribers with updates (in-client, no networking)
1216
914
  */
1217
- dispatch: (ops: ClientWireOp[], reverseOps: Op[], storageUpdates: Map<string, StorageUpdate>, options?: DispatchOptions) => void;
915
+ dispatch: (ops: ClientWireOp[], reverseOps: Op[], storageUpdates: Map<string, StorageUpdate>) => void;
1218
916
  /**
1219
917
  * Ensures storage can be written to else throws an error.
1220
918
  * This is used to prevent writing to storage when the user does not have
@@ -1239,7 +937,7 @@ type CreateManagedPoolOptions = {
1239
937
  /**
1240
938
  * Will get invoked when any Live structure calls .dispatch() on the pool.
1241
939
  */
1242
- onDispatch?: (ops: ClientWireOp[], reverse: Op[], storageUpdates: Map<string, StorageUpdate>, options?: DispatchOptions) => void;
940
+ onDispatch?: (ops: ClientWireOp[], reverse: Op[], storageUpdates: Map<string, StorageUpdate>) => void;
1243
941
  /**
1244
942
  * Will get invoked when any Live structure calls .assertStorageIsWritable()
1245
943
  * on the pool. Defaults to true when not provided. Return false if you want
@@ -1419,7 +1117,7 @@ declare class LiveRegister<TValue extends Json> extends AbstractCrdt {
1419
1117
  clone(): TValue;
1420
1118
  }
1421
1119
 
1422
- type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson> | LiveText;
1120
+ type LiveStructure = LiveObject<LsonObject> | LiveList<Lson> | LiveMap<string, Lson>;
1423
1121
  /**
1424
1122
  * Think of Lson as a sibling of the Json data tree, except that the nested
1425
1123
  * data structure can contain a mix of Json values and LiveStructure instances.
@@ -1455,7 +1153,7 @@ type ToJson<L extends Lson | LsonObject> = L extends LiveList<infer I extends Ls
1455
1153
  readonly [K in keyof O]: ToJson<Exclude<O[K], undefined>> | (undefined extends O[K] ? undefined : never);
1456
1154
  } : L extends LiveMap<infer KS extends string, infer V extends Lson> ? Lson extends V ? ReadonlyJsonObject : {
1457
1155
  readonly [K in KS]: ToJson<V>;
1458
- } : L extends LiveText ? LiveTextData : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
1156
+ } : L extends LsonObject ? string extends keyof L ? ReadonlyJsonObject : {
1459
1157
  readonly [K in keyof L]: ToJson<Exclude<L[K], undefined>> | (undefined extends L[K] ? undefined : never);
1460
1158
  } : L extends Json ? L : never;
1461
1159
 
@@ -1709,6 +1407,7 @@ type SearchCommentsResult = {
1709
1407
  commentId: string;
1710
1408
  content: string;
1711
1409
  };
1410
+ type ThreadVisibility = "public" | "private";
1712
1411
  /**
1713
1412
  * Represents a thread of comments.
1714
1413
  */
@@ -1721,6 +1420,7 @@ type ThreadData<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> =
1721
1420
  comments: CommentData<CM>[];
1722
1421
  metadata: TM;
1723
1422
  resolved: boolean;
1423
+ visibility: ThreadVisibility;
1724
1424
  };
1725
1425
  interface ThreadDataWithDeleteInfo<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ThreadData<TM, CM> {
1726
1426
  deletedAt?: Date;
@@ -1983,6 +1683,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1983
1683
  cursor?: string;
1984
1684
  query?: {
1985
1685
  resolved?: boolean;
1686
+ visibility?: ThreadVisibility;
1986
1687
  subscribed?: boolean;
1987
1688
  metadata?: Partial<QueryMetadata<TM>>;
1988
1689
  };
@@ -2032,6 +1733,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
2032
1733
  roomId: string;
2033
1734
  threadId?: string;
2034
1735
  commentId?: string;
1736
+ visibility?: ThreadVisibility;
2035
1737
  metadata: TM | undefined;
2036
1738
  commentMetadata: CM | undefined;
2037
1739
  body: CommentBody;
@@ -2254,6 +1956,7 @@ interface LiveblocksHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> ex
2254
1956
  cursor?: string;
2255
1957
  query?: {
2256
1958
  resolved?: boolean;
1959
+ visibility?: ThreadVisibility;
2257
1960
  metadata?: Partial<QueryMetadata<TM>>;
2258
1961
  };
2259
1962
  }): Promise<{
@@ -2287,6 +1990,25 @@ interface LiveblocksHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> ex
2287
1990
  getGroup(groupId: string): Promise<GroupData | undefined>;
2288
1991
  }
2289
1992
 
1993
+ /**
1994
+ * Use this symbol to brand an object property as internal.
1995
+ *
1996
+ * @example
1997
+ * Object.defineProperty(
1998
+ * {
1999
+ * public,
2000
+ * [kInternal]: {
2001
+ * private
2002
+ * },
2003
+ * },
2004
+ * kInternal,
2005
+ * {
2006
+ * enumerable: false,
2007
+ * }
2008
+ * );
2009
+ */
2010
+ declare const kInternal: unique symbol;
2011
+
2290
2012
  /**
2291
2013
  * Back-port of TypeScript 5.4's built-in NoInfer utility type.
2292
2014
  * See https://stackoverflow.com/a/56688073/148872
@@ -2404,6 +2126,7 @@ type CommentsOrNotificationsErrorContext = {
2404
2126
  threadId: string;
2405
2127
  commentId: string;
2406
2128
  body: CommentBody;
2129
+ visibility: ThreadVisibility;
2407
2130
  metadata: BaseMetadata;
2408
2131
  commentMetadata: BaseMetadata;
2409
2132
  } | {
@@ -3842,6 +3565,7 @@ type GetThreadsOptions<TM extends BaseMetadata> = {
3842
3565
  cursor?: string;
3843
3566
  query?: {
3844
3567
  resolved?: boolean;
3568
+ visibility?: ThreadVisibility;
3845
3569
  subscribed?: boolean;
3846
3570
  metadata?: Partial<QueryMetadata<TM>>;
3847
3571
  };
@@ -4200,6 +3924,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
4200
3924
  createThread(options: {
4201
3925
  threadId?: string;
4202
3926
  commentId?: string;
3927
+ visibility?: ThreadVisibility;
4203
3928
  metadata: TM | undefined;
4204
3929
  body: CommentBody;
4205
3930
  commentMetadata?: CM;
@@ -4417,14 +4142,7 @@ interface SyncSource {
4417
4142
  */
4418
4143
  type PrivateRoomApi = {
4419
4144
  presenceBuffer: Json | undefined;
4420
- undoStack: readonly {
4421
- readonly id: number;
4422
- readonly frames: readonly Readonly<Stackframe<JsonObject>>[];
4423
- }[];
4424
- redoStack: readonly {
4425
- readonly id: number;
4426
- readonly frames: readonly Readonly<Stackframe<JsonObject>>[];
4427
- }[];
4145
+ undoStack: readonly (readonly Readonly<Stackframe<JsonObject>>[])[];
4428
4146
  nodeCount: number;
4429
4147
  getYjsProvider(): IYjsProvider | undefined;
4430
4148
  setYjsProvider(provider: IYjsProvider | undefined): void;
@@ -4459,21 +4177,6 @@ type PrivateRoomApi = {
4459
4177
  incomingMessage(data: string): void;
4460
4178
  };
4461
4179
  attachmentUrlsStore: BatchStore<string, string>;
4462
- readonly history: Observable<{
4463
- action: "push";
4464
- id: number;
4465
- } | {
4466
- action: "undo";
4467
- id: number;
4468
- } | {
4469
- action: "redo";
4470
- id: number;
4471
- } | {
4472
- action: "clear";
4473
- } | {
4474
- action: "discard";
4475
- ids: number[];
4476
- }>;
4477
4180
  };
4478
4181
  type Stackframe<P extends JsonObject> = Op | PresenceStackframe<P>;
4479
4182
  type PresenceStackframe<P extends JsonObject> = {
@@ -5373,12 +5076,7 @@ type PlainLsonList = {
5373
5076
  liveblocksType: "LiveList";
5374
5077
  data: PlainLson[];
5375
5078
  };
5376
- type PlainLsonText = {
5377
- liveblocksType: "LiveText";
5378
- data: LiveTextData;
5379
- version?: number;
5380
- };
5381
- type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | PlainLsonText | Json;
5079
+ type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | Json;
5382
5080
 
5383
5081
  /**
5384
5082
  * Returns PlainLson for a given Json or LiveStructure, suitable for calling the storage init api
@@ -6093,4 +5791,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
6093
5791
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
6094
5792
  };
6095
5793
 
6096
- export { type AccessLevel, type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type CompactTextNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CreateTextOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DFM, type DFMD, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveText, type LiveTextAttributes, type LiveTextAttributesPatch, type LiveTextChange, type LiveTextData, type TextOperation as LiveTextOperation, type LiveTextSegment, type LiveTextUpdate, type LiveTextUpdates, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PermissionMatrix, type PermissionResources, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type PlainLsonText, type Poller, type PrivateClientApi, type PrivateLiveTextApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type ReadonlyJson, type ReadonlyJsonObject, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type RequiredAccessLevel, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomAccesses, type RoomEventMessage, type RoomPermissions, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type SerializedText, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StorageUpdateSource, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncConfig, type SyncMode, type SyncSource, type SyncStatus, type TextAttributes, TextEditorType, type TextOperation, type TextStorageNode, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateRoomAccesses, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateTextOp, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, applyLiveTextOperations, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isTextStorageNode, isUrl, kInternal, kStorageUpdateSource, keys, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, mergeRoomPermissionScopes, nanoid, nn, nodeStreamToCompactNodes, normalizeRoomAccesses, normalizeRoomPermissions, normalizeUpdateRoomAccesses, objectToQuery, patchNotificationSettings, permissionMatrixFromScopes, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, transformTextOperations, tryParseJson, url, urljoin, validatePermissionsSet, wait, warnOnce, warnOnceIf, withTimeout };
5794
+ export { type AccessLevel, type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DFM, type DFMD, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PermissionMatrix, type PermissionResources, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type ReadonlyJson, type ReadonlyJsonObject, type RegisterStorageNode, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type RequiredAccessLevel, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomAccesses, type RoomEventMessage, type RoomPermissions, type RoomStateServerMsg, type RoomSubscriptionSettings, type RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncConfig, type SyncMode, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ThreadVisibility, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateRoomAccesses, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type UrlMetadata, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserMentionData, type UserRoomSubscriptionSettings, type UserSubscriptionData, type UserSubscriptionDataPlain, WebsocketCloseCodes, type WithNavigation, type WithOptional, type WithRequired, type YDocUpdateServerMsg, type YjsSyncStatus, asPos, assert, assertNever, autoRetry, b64decode, batch, checkBounds, chunk, cloneLson, compactNodesToNodeStream, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, mergeRoomPermissionScopes, nanoid, nn, nodeStreamToCompactNodes, normalizeRoomAccesses, normalizeRoomPermissions, normalizeUpdateRoomAccesses, objectToQuery, patchNotificationSettings, permissionMatrixFromScopes, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, validatePermissionsSet, wait, warnOnce, warnOnceIf, withTimeout };