@liveblocks/core 3.13.0-metadata1 → 3.13.0-vincent1

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.ts CHANGED
@@ -360,7 +360,7 @@ declare namespace OpCode {
360
360
  * These operations are the payload for {@link UpdateStorageServerMsg} messages
361
361
  * only.
362
362
  */
363
- type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp | AckOpV7 | AckOpV8;
363
+ type Op = CreateOp | UpdateObjectOp | DeleteCrdtOp | SetParentKeyOp | DeleteObjectKeyOp | AckOp;
364
364
  type CreateOp = CreateObjectOp | CreateRegisterOp | CreateMapOp | CreateListOp;
365
365
  type UpdateObjectOp = {
366
366
  readonly opId?: string;
@@ -411,15 +411,11 @@ type DeleteCrdtOp = {
411
411
  readonly id: string;
412
412
  readonly type: OpCode.DELETE_CRDT;
413
413
  };
414
- type AckOpV7 = {
414
+ type AckOp = {
415
415
  readonly type: OpCode.DELETE_CRDT;
416
416
  readonly id: "ACK";
417
417
  readonly opId: string;
418
418
  };
419
- type AckOpV8 = {
420
- readonly type: OpCode.ACK;
421
- readonly opId: string;
422
- };
423
419
  type SetParentKeyOp = {
424
420
  readonly opId?: string;
425
421
  readonly id: string;
@@ -596,6 +592,7 @@ declare namespace CrdtType {
596
592
  }
597
593
  type SerializedCrdt = SerializedRootObject | SerializedChild;
598
594
  type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister;
595
+ type NodeStream = Iterable<IdTuple<SerializedCrdt>>;
599
596
  type SerializedRootObject = {
600
597
  readonly type: CrdtType.OBJECT;
601
598
  readonly data: JsonObject;
@@ -624,6 +621,40 @@ type SerializedRegister = {
624
621
  readonly parentKey: string;
625
622
  readonly data: Json;
626
623
  };
624
+ type CompactNode = CompactRootNode | CompactChildNode;
625
+ type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode;
626
+ type CompactRootNode = readonly [
627
+ id: "root",
628
+ type: CrdtType.OBJECT,
629
+ data: JsonObject
630
+ ];
631
+ type CompactObjectNode = readonly [
632
+ id: string,
633
+ type: CrdtType.OBJECT,
634
+ parentId: string,
635
+ parentKey: string,
636
+ data: JsonObject
637
+ ];
638
+ type CompactListNode = readonly [
639
+ id: string,
640
+ type: CrdtType.LIST,
641
+ parentId: string,
642
+ parentKey: string
643
+ ];
644
+ type CompactMapNode = readonly [
645
+ id: string,
646
+ type: CrdtType.MAP,
647
+ parentId: string,
648
+ parentKey: string
649
+ ];
650
+ type CompactRegisterNode = readonly [
651
+ id: string,
652
+ type: CrdtType.REGISTER,
653
+ parentId: string,
654
+ parentKey: string,
655
+ data: Json
656
+ ];
657
+ declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
627
658
 
628
659
  type LiveObjectUpdateDelta<O extends {
629
660
  [key: string]: unknown;
@@ -657,7 +688,7 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
657
688
  */
658
689
  static detectLargeObjects: boolean;
659
690
  /** @private Do not use this API directly */
660
- static _fromItems<O extends LsonObject>(items: IdTuple<SerializedCrdt>[], pool: ManagedPool): LiveObject<O>;
691
+ static _fromItems<O extends LsonObject>(nodes: NodeStream, pool: ManagedPool): LiveObject<O>;
661
692
  constructor(obj?: O);
662
693
  /**
663
694
  * Transform the LiveObject into a javascript object
@@ -1144,7 +1175,7 @@ declare global {
1144
1175
  [key: string]: unknown;
1145
1176
  }
1146
1177
  }
1147
- type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1178
+ type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1148
1179
  type MakeErrorString<K extends ExtendableTypes, Reason extends string = "does not match its requirements"> = `The type you provided for '${K}' ${Reason}. To learn how to fix this, see https://liveblocks.io/docs/errors/${K}`;
1149
1180
  type GetOverride<K extends ExtendableTypes, B, Reason extends string = "does not match its requirements"> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
1150
1181
  type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
@@ -1152,8 +1183,7 @@ type DP = GetOverride<"Presence", JsonObject, "is not a valid JSON object">;
1152
1183
  type DS = GetOverride<"Storage", LsonObject, "is not a valid LSON value">;
1153
1184
  type DU = GetOverrideOrErrorValue<"UserMeta", BaseUserMeta, Record<"id" | "info", MakeErrorString<"UserMeta">>>;
1154
1185
  type DE = GetOverride<"RoomEvent", Json, "is not a valid JSON value">;
1155
- type DTM = GetOverride<"ThreadMetadata", BaseMetadata>;
1156
- type DCM = GetOverride<"CommentMetadata", BaseMetadata>;
1186
+ type DM = GetOverride<"ThreadMetadata", BaseMetadata>;
1157
1187
  type DRI = GetOverride<"RoomInfo", BaseRoomInfo>;
1158
1188
  type DGI = GetOverride<"GroupInfo", BaseGroupInfo>;
1159
1189
  type DAD = GetOverrideOrErrorValue<"ActivitiesData", BaseActivitiesData, {
@@ -1218,7 +1248,7 @@ type CommentMixedAttachment = CommentAttachment | CommentLocalAttachment;
1218
1248
  /**
1219
1249
  * Represents a comment.
1220
1250
  */
1221
- type CommentData<CM extends BaseMetadata = DCM> = {
1251
+ type CommentData = {
1222
1252
  type: "comment";
1223
1253
  id: string;
1224
1254
  threadId: string;
@@ -1228,15 +1258,13 @@ type CommentData<CM extends BaseMetadata = DCM> = {
1228
1258
  editedAt?: Date;
1229
1259
  reactions: CommentReaction[];
1230
1260
  attachments: CommentAttachment[];
1231
- metadata: CM;
1232
1261
  } & Relax<{
1233
1262
  body: CommentBody;
1234
1263
  } | {
1235
1264
  deletedAt: Date;
1236
1265
  }>;
1237
- type CommentDataPlain<CM extends BaseMetadata = DCM> = Omit<DateToString<CommentData<CM>>, "reactions" | "body" | "metadata"> & {
1266
+ type CommentDataPlain = Omit<DateToString<CommentData>, "reactions" | "body"> & {
1238
1267
  reactions: DateToString<CommentReaction>[];
1239
- metadata: CM;
1240
1268
  } & Relax<{
1241
1269
  body: CommentBody;
1242
1270
  } | {
@@ -1291,22 +1319,22 @@ type SearchCommentsResult = {
1291
1319
  /**
1292
1320
  * Represents a thread of comments.
1293
1321
  */
1294
- type ThreadData<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
1322
+ type ThreadData<M extends BaseMetadata = DM> = {
1295
1323
  type: "thread";
1296
1324
  id: string;
1297
1325
  roomId: string;
1298
1326
  createdAt: Date;
1299
1327
  updatedAt: Date;
1300
- comments: CommentData<CM>[];
1301
- metadata: TM;
1328
+ comments: CommentData[];
1329
+ metadata: M;
1302
1330
  resolved: boolean;
1303
1331
  };
1304
- interface ThreadDataWithDeleteInfo<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ThreadData<TM, CM> {
1332
+ interface ThreadDataWithDeleteInfo<M extends BaseMetadata = DM> extends ThreadData<M> {
1305
1333
  deletedAt?: Date;
1306
1334
  }
1307
- type ThreadDataPlain<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = Omit<DateToString<ThreadData<TM, CM>>, "comments" | "metadata"> & {
1308
- comments: CommentDataPlain<CM>[];
1309
- metadata: TM;
1335
+ type ThreadDataPlain<M extends BaseMetadata> = Omit<DateToString<ThreadData<M>>, "comments" | "metadata"> & {
1336
+ comments: CommentDataPlain[];
1337
+ metadata: M;
1310
1338
  };
1311
1339
  type ThreadDeleteInfo = {
1312
1340
  type: "deletedThread";
@@ -1544,17 +1572,17 @@ type MakeOptionalFieldsNullable<T> = {
1544
1572
  };
1545
1573
  type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
1546
1574
 
1547
- interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1575
+ interface RoomHttpApi<M extends BaseMetadata> {
1548
1576
  getThreads(options: {
1549
1577
  roomId: string;
1550
1578
  cursor?: string;
1551
1579
  query?: {
1552
1580
  resolved?: boolean;
1553
1581
  subscribed?: boolean;
1554
- metadata?: Partial<QueryMetadata<TM>>;
1582
+ metadata?: Partial<QueryMetadata<M>>;
1555
1583
  };
1556
1584
  }): Promise<{
1557
- threads: ThreadData<TM, CM>[];
1585
+ threads: ThreadData<M>[];
1558
1586
  inboxNotifications: InboxNotificationData[];
1559
1587
  subscriptions: SubscriptionData[];
1560
1588
  requestedAt: Date;
@@ -1567,7 +1595,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1567
1595
  signal?: AbortSignal;
1568
1596
  }): Promise<{
1569
1597
  threads: {
1570
- updated: ThreadData<TM, CM>[];
1598
+ updated: ThreadData<M>[];
1571
1599
  deleted: ThreadDeleteInfo[];
1572
1600
  };
1573
1601
  inboxNotifications: {
@@ -1584,7 +1612,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1584
1612
  searchComments(options: {
1585
1613
  roomId: string;
1586
1614
  query: {
1587
- threadMetadata?: Partial<QueryMetadata<TM>>;
1615
+ threadMetadata?: Partial<QueryMetadata<M>>;
1588
1616
  threadResolved?: boolean;
1589
1617
  hasAttachments?: boolean;
1590
1618
  hasMentions?: boolean;
@@ -1595,20 +1623,19 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1595
1623
  }): Promise<{
1596
1624
  data: Array<SearchCommentsResult>;
1597
1625
  }>;
1598
- createThread({ roomId, metadata, body, commentId, threadId, commentMetadata, attachmentIds, }: {
1626
+ createThread({ roomId, metadata, body, commentId, threadId, attachmentIds, }: {
1599
1627
  roomId: string;
1600
1628
  threadId?: string;
1601
1629
  commentId?: string;
1602
- metadata: TM | undefined;
1603
- commentMetadata: CM | undefined;
1630
+ metadata: M | undefined;
1604
1631
  body: CommentBody;
1605
1632
  attachmentIds?: string[];
1606
- }): Promise<ThreadData<TM, CM>>;
1633
+ }): Promise<ThreadData<M>>;
1607
1634
  getThread(options: {
1608
1635
  roomId: string;
1609
1636
  threadId: string;
1610
1637
  }): Promise<{
1611
- thread?: ThreadData<TM, CM>;
1638
+ thread?: ThreadData<M>;
1612
1639
  inboxNotification?: InboxNotificationData;
1613
1640
  subscription?: SubscriptionData;
1614
1641
  }>;
@@ -1618,31 +1645,23 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1618
1645
  }): Promise<void>;
1619
1646
  editThreadMetadata({ roomId, metadata, threadId, }: {
1620
1647
  roomId: string;
1621
- metadata: Patchable<TM>;
1648
+ metadata: Patchable<M>;
1622
1649
  threadId: string;
1623
- }): Promise<TM>;
1624
- editCommentMetadata({ roomId, threadId, commentId, metadata, }: {
1625
- roomId: string;
1626
- threadId: string;
1627
- commentId: string;
1628
- metadata: Patchable<CM>;
1629
- }): Promise<CM>;
1630
- createComment({ roomId, threadId, commentId, body, metadata, attachmentIds, }: {
1650
+ }): Promise<M>;
1651
+ createComment({ roomId, threadId, commentId, body, attachmentIds, }: {
1631
1652
  roomId: string;
1632
1653
  threadId: string;
1633
1654
  commentId?: string;
1634
1655
  body: CommentBody;
1635
- metadata?: CM;
1636
1656
  attachmentIds?: string[];
1637
- }): Promise<CommentData<CM>>;
1638
- editComment({ roomId, threadId, commentId, body, attachmentIds, metadata, }: {
1657
+ }): Promise<CommentData>;
1658
+ editComment({ roomId, threadId, commentId, body, attachmentIds, }: {
1639
1659
  roomId: string;
1640
1660
  threadId: string;
1641
1661
  commentId: string;
1642
1662
  body: CommentBody;
1643
1663
  attachmentIds?: string[];
1644
- metadata?: Patchable<CM>;
1645
- }): Promise<CommentData<CM>>;
1664
+ }): Promise<CommentData>;
1646
1665
  deleteComment({ roomId, threadId, commentId, }: {
1647
1666
  roomId: string;
1648
1667
  threadId: string;
@@ -1780,7 +1799,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1780
1799
  signal: AbortSignal;
1781
1800
  }): Promise<string>;
1782
1801
  }
1783
- interface NotificationHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1802
+ interface NotificationHttpApi<M extends BaseMetadata> {
1784
1803
  getInboxNotifications(options?: {
1785
1804
  cursor?: string;
1786
1805
  query?: {
@@ -1789,7 +1808,7 @@ interface NotificationHttpApi<TM extends BaseMetadata, CM extends BaseMetadata>
1789
1808
  };
1790
1809
  }): Promise<{
1791
1810
  inboxNotifications: InboxNotificationData[];
1792
- threads: ThreadData<TM, CM>[];
1811
+ threads: ThreadData<M>[];
1793
1812
  subscriptions: SubscriptionData[];
1794
1813
  nextCursor: string | null;
1795
1814
  requestedAt: Date;
@@ -1807,7 +1826,7 @@ interface NotificationHttpApi<TM extends BaseMetadata, CM extends BaseMetadata>
1807
1826
  deleted: InboxNotificationDeleteInfo[];
1808
1827
  };
1809
1828
  threads: {
1810
- updated: ThreadData<TM, CM>[];
1829
+ updated: ThreadData<M>[];
1811
1830
  deleted: ThreadDeleteInfo[];
1812
1831
  };
1813
1832
  subscriptions: {
@@ -1832,16 +1851,16 @@ interface NotificationHttpApi<TM extends BaseMetadata, CM extends BaseMetadata>
1832
1851
  }): Promise<NotificationSettingsPlain>;
1833
1852
  updateNotificationSettings(settings: PartialNotificationSettings): Promise<NotificationSettingsPlain>;
1834
1853
  }
1835
- interface LiveblocksHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> extends RoomHttpApi<TM, CM>, NotificationHttpApi<TM, CM> {
1854
+ interface LiveblocksHttpApi<M extends BaseMetadata> extends RoomHttpApi<M>, NotificationHttpApi<M> {
1836
1855
  getUrlMetadata(url: string): Promise<UrlMetadata>;
1837
1856
  getUserThreads_experimental(options?: {
1838
1857
  cursor?: string;
1839
1858
  query?: {
1840
1859
  resolved?: boolean;
1841
- metadata?: Partial<QueryMetadata<TM>>;
1860
+ metadata?: Partial<QueryMetadata<M>>;
1842
1861
  };
1843
1862
  }): Promise<{
1844
- threads: ThreadData<TM, CM>[];
1863
+ threads: ThreadData<M>[];
1845
1864
  inboxNotifications: InboxNotificationData[];
1846
1865
  subscriptions: SubscriptionData[];
1847
1866
  nextCursor: string | null;
@@ -1857,7 +1876,7 @@ interface LiveblocksHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> ex
1857
1876
  deleted: InboxNotificationDeleteInfo[];
1858
1877
  };
1859
1878
  threads: {
1860
- updated: ThreadData<TM, CM>[];
1879
+ updated: ThreadData<M>[];
1861
1880
  deleted: ThreadDeleteInfo[];
1862
1881
  };
1863
1882
  subscriptions: {
@@ -1917,7 +1936,6 @@ type CommentsOrNotificationsErrorContext = {
1917
1936
  commentId: string;
1918
1937
  body: CommentBody;
1919
1938
  metadata: BaseMetadata;
1920
- commentMetadata: BaseMetadata;
1921
1939
  } | {
1922
1940
  type: "DELETE_THREAD_ERROR";
1923
1941
  roomId: string;
@@ -1927,12 +1945,6 @@ type CommentsOrNotificationsErrorContext = {
1927
1945
  roomId: string;
1928
1946
  threadId: string;
1929
1947
  metadata: Patchable<BaseMetadata>;
1930
- } | {
1931
- type: "EDIT_COMMENT_METADATA_ERROR";
1932
- roomId: string;
1933
- threadId: string;
1934
- commentId: string;
1935
- metadata: Patchable<BaseMetadata>;
1936
1948
  } | {
1937
1949
  type: "MARK_THREAD_AS_RESOLVED_ERROR" | "MARK_THREAD_AS_UNRESOLVED_ERROR" | "SUBSCRIBE_TO_THREAD_ERROR" | "UNSUBSCRIBE_FROM_THREAD_ERROR";
1938
1950
  roomId: string;
@@ -1943,7 +1955,6 @@ type CommentsOrNotificationsErrorContext = {
1943
1955
  threadId: string;
1944
1956
  commentId: string;
1945
1957
  body: CommentBody;
1946
- metadata: BaseMetadata;
1947
1958
  } | {
1948
1959
  type: "DELETE_COMMENT_ERROR";
1949
1960
  roomId: string;
@@ -2020,6 +2031,12 @@ type EnterOptions<P extends JsonObject = DP, S extends LsonObject = DS> = Resolv
2020
2031
  * the authentication endpoint or connect via WebSocket.
2021
2032
  */
2022
2033
  autoConnect?: boolean;
2034
+ /**
2035
+ * @private Preferred storage engine version to use when creating the
2036
+ * room. Only takes effect if the room doesn't exist yet. Version
2037
+ * 2 supports streaming and will become the default in the future.
2038
+ */
2039
+ engine?: 1 | 2;
2023
2040
  } & PartialUnless<P, {
2024
2041
  /**
2025
2042
  * The initial Presence to use and announce when you enter the Room. The
@@ -2048,7 +2065,7 @@ type InternalSyncStatus = SyncStatus | "has-local-changes";
2048
2065
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2049
2066
  * will probably happen if you do.
2050
2067
  */
2051
- type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata> = {
2068
+ type PrivateClientApi<U extends BaseUserMeta, M extends BaseMetadata> = {
2052
2069
  readonly currentUserId: Signal<string | undefined>;
2053
2070
  readonly mentionSuggestionsCache: Map<string, MentionData[]>;
2054
2071
  readonly resolveMentionSuggestions: ClientOptions<U>["resolveMentionSuggestions"];
@@ -2056,13 +2073,13 @@ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extend
2056
2073
  readonly roomsInfoStore: BatchStore<DRI | undefined, string>;
2057
2074
  readonly groupsInfoStore: BatchStore<DGI | undefined, string>;
2058
2075
  readonly getRoomIds: () => string[];
2059
- readonly httpClient: LiveblocksHttpApi<TM, CM>;
2060
- as<TM2 extends BaseMetadata, CM2 extends BaseMetadata>(): Client<U, TM2, CM2>;
2076
+ readonly httpClient: LiveblocksHttpApi<M>;
2077
+ as<M2 extends BaseMetadata>(): Client<U, M2>;
2061
2078
  createSyncSource(): SyncSource;
2062
2079
  emitError(context: LiveblocksErrorContext, cause?: Error): void;
2063
2080
  ai: Ai;
2064
2081
  };
2065
- type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2082
+ type NotificationsApi<M extends BaseMetadata> = {
2066
2083
  /**
2067
2084
  * Gets a page (or the initial page) for user inbox notifications and their
2068
2085
  * associated threads and thread subscriptions.
@@ -2089,7 +2106,7 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2089
2106
  };
2090
2107
  }): Promise<{
2091
2108
  inboxNotifications: InboxNotificationData[];
2092
- threads: ThreadData<TM, CM>[];
2109
+ threads: ThreadData<M>[];
2093
2110
  subscriptions: SubscriptionData[];
2094
2111
  nextCursor: string | null;
2095
2112
  requestedAt: Date;
@@ -2130,7 +2147,7 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2130
2147
  deleted: InboxNotificationDeleteInfo[];
2131
2148
  };
2132
2149
  threads: {
2133
- updated: ThreadData<TM, CM>[];
2150
+ updated: ThreadData<M>[];
2134
2151
  deleted: ThreadDeleteInfo[];
2135
2152
  };
2136
2153
  subscriptions: {
@@ -2210,23 +2227,23 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2210
2227
  * narrower.
2211
2228
  */
2212
2229
  type OpaqueClient = Client<BaseUserMeta>;
2213
- type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
2230
+ type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
2214
2231
  /**
2215
2232
  * Gets a room. Returns null if {@link Client.enter} has not been called previously.
2216
2233
  *
2217
2234
  * @param roomId The id of the room
2218
2235
  */
2219
- getRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM>(roomId: string): Room<P, S, U, E, TM2, CM2> | null;
2236
+ getRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, M2 extends BaseMetadata = M>(roomId: string): Room<P, S, U, E, M2> | null;
2220
2237
  /**
2221
2238
  * Enter a room.
2222
2239
  * @param roomId The id of the room
2223
2240
  * @param options Optional. You can provide initializers for the Presence or Storage when entering the Room.
2224
2241
  * @returns The room and a leave function. Call the returned leave() function when you no longer need the room.
2225
2242
  */
2226
- enterRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM>(roomId: string, ...args: OptionalTupleUnless<P & S, [
2243
+ enterRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, M2 extends BaseMetadata = M>(roomId: string, ...args: OptionalTupleUnless<P & S, [
2227
2244
  options: EnterOptions<NoInfr<P>, NoInfr<S>>
2228
2245
  ]>): {
2229
- room: Room<P, S, U, E, TM2, CM2>;
2246
+ room: Room<P, S, U, E, M2>;
2230
2247
  leave: () => void;
2231
2248
  };
2232
2249
  /**
@@ -2292,7 +2309,7 @@ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM exten
2292
2309
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2293
2310
  * will probably happen if you do.
2294
2311
  */
2295
- readonly [kInternal]: PrivateClientApi<U, TM, CM>;
2312
+ readonly [kInternal]: PrivateClientApi<U, M>;
2296
2313
  /**
2297
2314
  * Returns the current global sync status of the Liveblocks client. If any
2298
2315
  * part of Liveblocks has any local pending changes that haven't been
@@ -2316,7 +2333,7 @@ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM exten
2316
2333
  readonly error: Observable<LiveblocksError>;
2317
2334
  readonly syncStatus: Observable<void>;
2318
2335
  };
2319
- } & NotificationsApi<TM, CM>;
2336
+ } & NotificationsApi<M>;
2320
2337
  type AuthEndpoint = string | ((room?: string) => Promise<CustomAuthenticationResult>);
2321
2338
  /**
2322
2339
  * The authentication endpoint that is called to ensure that the current user has access to a room.
@@ -2510,7 +2527,8 @@ declare const ServerMsgCode: Readonly<{
2510
2527
  USER_LEFT: 102;
2511
2528
  BROADCASTED_EVENT: 103;
2512
2529
  ROOM_STATE: 104;
2513
- INITIAL_STORAGE_STATE: 200;
2530
+ STORAGE_STATE_V7: 200;
2531
+ STORAGE_CHUNK: 210;
2514
2532
  UPDATE_STORAGE: 201;
2515
2533
  UPDATE_YDOC: 300;
2516
2534
  THREAD_CREATED: 400;
@@ -2522,7 +2540,6 @@ declare const ServerMsgCode: Readonly<{
2522
2540
  COMMENT_DELETED: 404;
2523
2541
  COMMENT_REACTION_ADDED: 405;
2524
2542
  COMMENT_REACTION_REMOVED: 406;
2525
- COMMENT_METADATA_UPDATED: 409;
2526
2543
  REJECT_STORAGE_OP: 299;
2527
2544
  }>;
2528
2545
  declare namespace ServerMsgCode {
@@ -2531,7 +2548,8 @@ declare namespace ServerMsgCode {
2531
2548
  type USER_LEFT = typeof ServerMsgCode.USER_LEFT;
2532
2549
  type BROADCASTED_EVENT = typeof ServerMsgCode.BROADCASTED_EVENT;
2533
2550
  type ROOM_STATE = typeof ServerMsgCode.ROOM_STATE;
2534
- type INITIAL_STORAGE_STATE = typeof ServerMsgCode.INITIAL_STORAGE_STATE;
2551
+ type STORAGE_STATE_V7 = typeof ServerMsgCode.STORAGE_STATE_V7;
2552
+ type STORAGE_CHUNK = typeof ServerMsgCode.STORAGE_CHUNK;
2535
2553
  type UPDATE_STORAGE = typeof ServerMsgCode.UPDATE_STORAGE;
2536
2554
  type UPDATE_YDOC = typeof ServerMsgCode.UPDATE_YDOC;
2537
2555
  type THREAD_CREATED = typeof ServerMsgCode.THREAD_CREATED;
@@ -2543,14 +2561,13 @@ declare namespace ServerMsgCode {
2543
2561
  type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
2544
2562
  type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
2545
2563
  type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
2546
- type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
2547
2564
  type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
2548
2565
  }
2549
2566
  /**
2550
2567
  * Messages that can be sent from the server to the client.
2551
2568
  */
2552
- type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2553
- type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
2569
+ type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2570
+ type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
2554
2571
  type ThreadCreatedEvent = {
2555
2572
  type: ServerMsgCode.THREAD_CREATED;
2556
2573
  threadId: string;
@@ -2594,11 +2611,6 @@ type CommentReactionRemoved = {
2594
2611
  commentId: string;
2595
2612
  emoji: string;
2596
2613
  };
2597
- type CommentMetadataUpdatedEvent = {
2598
- type: ServerMsgCode.COMMENT_METADATA_UPDATED;
2599
- threadId: string;
2600
- commentId: string;
2601
- };
2602
2614
  /**
2603
2615
  * Sent by the WebSocket server and broadcasted to all clients to announce that
2604
2616
  * a User updated their presence. For example, when a user moves their cursor.
@@ -2718,40 +2730,47 @@ type BroadcastedEventServerMsg<E extends Json> = {
2718
2730
  */
2719
2731
  type RoomStateServerMsg<U extends BaseUserMeta> = {
2720
2732
  readonly type: ServerMsgCode.ROOM_STATE;
2721
- /**
2722
- * Informs the client what their actor ID is going to be.
2723
- * @since v1.2 (WS API v7)
2724
- */
2733
+ /** Informs the client what their actor ID is going to be. */
2725
2734
  readonly actor: number;
2726
- /**
2727
- * Secure nonce for the current session.
2728
- * @since v1.2 (WS API v7)
2729
- */
2735
+ /** Secure nonce for the current session. */
2730
2736
  readonly nonce: string;
2731
- /**
2732
- * Informs the client what permissions the current User (self) has.
2733
- * @since v1.2 (WS API v7)
2734
- */
2737
+ /** Informs the client what permissions the current User (self) has. */
2735
2738
  readonly scopes: string[];
2736
2739
  readonly users: {
2737
2740
  readonly [otherActor: number]: U & {
2738
2741
  scopes: string[];
2739
2742
  };
2740
2743
  };
2741
- /**
2742
- * Metadata sent from the server to the client.
2743
- */
2744
+ /** Metadata sent from the server to the client. */
2744
2745
  readonly meta: JsonObject;
2745
2746
  };
2746
2747
  /**
2747
- * Sent by the WebSocket server to a single client in response to the client
2748
- * joining the Room, to provide the initial Storage state of the Room. The
2749
- * payload includes the entire Storage document.
2748
+ * No longer used as of WS API v8.
2750
2749
  */
2751
- type InitialDocumentStateServerMsg = {
2752
- readonly type: ServerMsgCode.INITIAL_STORAGE_STATE;
2750
+ type StorageStateServerMsg_V7 = {
2751
+ readonly type: ServerMsgCode.STORAGE_STATE_V7;
2753
2752
  readonly items: IdTuple<SerializedCrdt>[];
2754
2753
  };
2754
+ /**
2755
+ * Sent by the WebSocket server to a single client in response to the client
2756
+ * sending a FetchStorageClientMsg message, to provide the initial Storage
2757
+ * state of the Room.
2758
+ *
2759
+ * The server will respond with 0+ STORAGE_CHUNK messages with
2760
+ * done=false, followed by exactly one STORAGE_CHUNK message with
2761
+ * done=true.
2762
+ *
2763
+ * If the room is using the new storage engine that supports streaming, then
2764
+ * potentially multiple chunks might get sent.
2765
+ *
2766
+ * If the room is using the old storage engine, then all nodes will be sent in
2767
+ * a single/large chunk (non-streaming).
2768
+ */
2769
+ type StorageChunkServerMsg = {
2770
+ readonly type: ServerMsgCode.STORAGE_CHUNK;
2771
+ readonly done: boolean;
2772
+ readonly nodes: CompactNode[];
2773
+ };
2755
2774
  /**
2756
2775
  * Sent by the WebSocket server and broadcasted to all clients to announce that
2757
2776
  * a change occurred in the Storage document.
@@ -3080,12 +3099,12 @@ type SubscribeFn<P extends JsonObject, _TStorage extends LsonObject, U extends B
3080
3099
  (type: "storage-status", listener: Callback<StorageStatus>): () => void;
3081
3100
  (type: "comments", listener: Callback<CommentsEventServerMsg>): () => void;
3082
3101
  };
3083
- type GetThreadsOptions<TM extends BaseMetadata> = {
3102
+ type GetThreadsOptions<M extends BaseMetadata> = {
3084
3103
  cursor?: string;
3085
3104
  query?: {
3086
3105
  resolved?: boolean;
3087
3106
  subscribed?: boolean;
3088
- metadata?: Partial<QueryMetadata<TM>>;
3107
+ metadata?: Partial<QueryMetadata<M>>;
3089
3108
  };
3090
3109
  };
3091
3110
  type GetThreadsSinceOptions = {
@@ -3108,7 +3127,7 @@ type GetSubscriptionSettingsOptions = {
3108
3127
  * a Room instance using globally augmented types only, which is narrower.
3109
3128
  */
3110
3129
  type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata>;
3111
- type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUserMeta = DU, E extends Json = DE, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
3130
+ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUserMeta = DU, E extends Json = DE, M extends BaseMetadata = DM> = {
3112
3131
  /**
3113
3132
  * @private
3114
3133
  *
@@ -3322,8 +3341,8 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3322
3341
  * requestedAt
3323
3342
  * } = await room.getThreads({ query: { resolved: false }});
3324
3343
  */
3325
- getThreads(options?: GetThreadsOptions<TM>): Promise<{
3326
- threads: ThreadData<TM, CM>[];
3344
+ getThreads(options?: GetThreadsOptions<M>): Promise<{
3345
+ threads: ThreadData<M>[];
3327
3346
  inboxNotifications: InboxNotificationData[];
3328
3347
  subscriptions: SubscriptionData[];
3329
3348
  requestedAt: Date;
@@ -3340,7 +3359,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3340
3359
  */
3341
3360
  getThreadsSince(options: GetThreadsSinceOptions): Promise<{
3342
3361
  threads: {
3343
- updated: ThreadData<TM, CM>[];
3362
+ updated: ThreadData<M>[];
3344
3363
  deleted: ThreadDeleteInfo[];
3345
3364
  };
3346
3365
  inboxNotifications: {
@@ -3361,7 +3380,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3361
3380
  * const { thread, inboxNotification, subscription } = await room.getThread("th_xxx");
3362
3381
  */
3363
3382
  getThread(threadId: string): Promise<{
3364
- thread?: ThreadData<TM, CM>;
3383
+ thread?: ThreadData<M>;
3365
3384
  inboxNotification?: InboxNotificationData;
3366
3385
  subscription?: SubscriptionData;
3367
3386
  }>;
@@ -3379,11 +3398,10 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3379
3398
  createThread(options: {
3380
3399
  threadId?: string;
3381
3400
  commentId?: string;
3382
- metadata: TM | undefined;
3401
+ metadata: M | undefined;
3383
3402
  body: CommentBody;
3384
- commentMetadata?: CM;
3385
3403
  attachmentIds?: string[];
3386
- }): Promise<ThreadData<TM, CM>>;
3404
+ }): Promise<ThreadData<M>>;
3387
3405
  /**
3388
3406
  * Deletes a thread.
3389
3407
  *
@@ -3399,21 +3417,9 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3399
3417
  * await room.editThreadMetadata({ threadId: "th_xxx", metadata: { x: 100, y: 100 } })
3400
3418
  */
3401
3419
  editThreadMetadata(options: {
3402
- metadata: Patchable<TM>;
3420
+ metadata: Patchable<M>;
3403
3421
  threadId: string;
3404
- }): Promise<TM>;
3405
- /**
3406
- * Edits a comment's metadata.
3407
- * To delete an existing metadata property, set its value to `null`.
3408
- *
3409
- * @example
3410
- * await room.editCommentMetadata({ threadId: "th_xxx", commentId: "cm_xxx", metadata: { slackChannelId: "C024BE91L", slackMessageTs: "1700311782.001200" } })
3411
- */
3412
- editCommentMetadata(options: {
3413
- threadId: string;
3414
- commentId: string;
3415
- metadata: Patchable<CM>;
3416
- }): Promise<CM>;
3422
+ }): Promise<M>;
3417
3423
  /**
3418
3424
  * Marks a thread as resolved.
3419
3425
  *
@@ -3458,9 +3464,8 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3458
3464
  threadId: string;
3459
3465
  commentId?: string;
3460
3466
  body: CommentBody;
3461
- metadata?: CM;
3462
3467
  attachmentIds?: string[];
3463
- }): Promise<CommentData<CM>>;
3468
+ }): Promise<CommentData>;
3464
3469
  /**
3465
3470
  * Edits a comment.
3466
3471
  *
@@ -3478,9 +3483,8 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3478
3483
  threadId: string;
3479
3484
  commentId: string;
3480
3485
  body: CommentBody;
3481
- metadata?: Patchable<CM>;
3482
3486
  attachmentIds?: string[];
3483
- }): Promise<CommentData<CM>>;
3487
+ }): Promise<CommentData>;
3484
3488
  /**
3485
3489
  * Deletes a comment.
3486
3490
  * If it is the last non-deleted comment, the thread also gets deleted.
@@ -4499,14 +4503,14 @@ declare const MENTION_CHARACTER = "@";
4499
4503
  * @param data The plain comment data object (usually returned by the API)
4500
4504
  * @returns The rich comment data object that can be used by the client.
4501
4505
  */
4502
- declare function convertToCommentData<CM extends BaseMetadata>(data: CommentDataPlain<CM>): CommentData<CM>;
4506
+ declare function convertToCommentData(data: CommentDataPlain): CommentData;
4503
4507
  /**
4504
4508
  * Converts a plain thread data object (usually returned by the API) to a thread data object that can be used by the client.
4505
4509
  * This is necessary because the plain data object stores dates as ISO strings, but the client expects them as Date objects.
4506
4510
  * @param data The plain thread data object (usually returned by the API)
4507
4511
  * @returns The rich thread data object that can be used by the client.
4508
4512
  */
4509
- declare function convertToThreadData<TM extends BaseMetadata, CM extends BaseMetadata>(data: ThreadDataPlain<TM, CM>): ThreadData<TM, CM>;
4513
+ declare function convertToThreadData<M extends BaseMetadata>(data: ThreadDataPlain<M>): ThreadData<M>;
4510
4514
  /**
4511
4515
  * Converts a plain comment reaction object (usually returned by the API) to a comment reaction object that can be used by the client.
4512
4516
  * This is necessary because the plain data object stores dates as ISO strings, but the client expects them as Date objects.
@@ -5222,4 +5226,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5222
5226
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5223
5227
  };
5224
5228
 
5225
- export { type AckOpV7, type AckOpV8, 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 Client, type ClientMsg, ClientMsgCode, type ClientOptions, 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 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 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 FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LargeMessageStrategy, type LayerKey, 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 MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, 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, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
5229
+ export { type AckOp, 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 Client, type ClientMsg, ClientMsgCode, type ClientOptions, 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 DE, type DGI, type DM, type DP, type DRI, type DS, 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 FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, 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 LargeMessageStrategy, type LayerKey, 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 MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RejectedStorageOpServerMsg, type Relax, type RenderableToolResultResponse, type Resolve, type ResolveGroupsInfoArgs, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomStateServerMsg, type RoomSubscriptionSettings, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type ToolResultResponse, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, 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, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToGroupData, convertToInboxNotificationData, convertToSubscriptionData, convertToThreadData, convertToUserSubscriptionData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createManagedPool, createNotificationSettings, createThreadId, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getMentionsFromCommentBody, getSubscriptionKey, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isNumberOperator, isPlainObject, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };