@liveblocks/core 3.13.0-ack1 → 3.13.0-metadata2

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
@@ -1140,7 +1140,7 @@ declare global {
1140
1140
  [key: string]: unknown;
1141
1141
  }
1142
1142
  }
1143
- type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1143
+ type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1144
1144
  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}`;
1145
1145
  type GetOverride<K extends ExtendableTypes, B, Reason extends string = "does not match its requirements"> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
1146
1146
  type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
@@ -1148,7 +1148,8 @@ type DP = GetOverride<"Presence", JsonObject, "is not a valid JSON object">;
1148
1148
  type DS = GetOverride<"Storage", LsonObject, "is not a valid LSON value">;
1149
1149
  type DU = GetOverrideOrErrorValue<"UserMeta", BaseUserMeta, Record<"id" | "info", MakeErrorString<"UserMeta">>>;
1150
1150
  type DE = GetOverride<"RoomEvent", Json, "is not a valid JSON value">;
1151
- type DM = GetOverride<"ThreadMetadata", BaseMetadata>;
1151
+ type DTM = GetOverride<"ThreadMetadata", BaseMetadata>;
1152
+ type DCM = GetOverride<"CommentMetadata", BaseMetadata>;
1152
1153
  type DRI = GetOverride<"RoomInfo", BaseRoomInfo>;
1153
1154
  type DGI = GetOverride<"GroupInfo", BaseGroupInfo>;
1154
1155
  type DAD = GetOverrideOrErrorValue<"ActivitiesData", BaseActivitiesData, {
@@ -1213,7 +1214,7 @@ type CommentMixedAttachment = CommentAttachment | CommentLocalAttachment;
1213
1214
  /**
1214
1215
  * Represents a comment.
1215
1216
  */
1216
- type CommentData = {
1217
+ type CommentData<CM extends BaseMetadata = DCM> = {
1217
1218
  type: "comment";
1218
1219
  id: string;
1219
1220
  threadId: string;
@@ -1223,13 +1224,15 @@ type CommentData = {
1223
1224
  editedAt?: Date;
1224
1225
  reactions: CommentReaction[];
1225
1226
  attachments: CommentAttachment[];
1227
+ metadata: CM;
1226
1228
  } & Relax<{
1227
1229
  body: CommentBody;
1228
1230
  } | {
1229
1231
  deletedAt: Date;
1230
1232
  }>;
1231
- type CommentDataPlain = Omit<DateToString<CommentData>, "reactions" | "body"> & {
1233
+ type CommentDataPlain<CM extends BaseMetadata = DCM> = Omit<DateToString<CommentData<CM>>, "reactions" | "body" | "metadata"> & {
1232
1234
  reactions: DateToString<CommentReaction>[];
1235
+ metadata: CM;
1233
1236
  } & Relax<{
1234
1237
  body: CommentBody;
1235
1238
  } | {
@@ -1284,22 +1287,22 @@ type SearchCommentsResult = {
1284
1287
  /**
1285
1288
  * Represents a thread of comments.
1286
1289
  */
1287
- type ThreadData<M extends BaseMetadata = DM> = {
1290
+ type ThreadData<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
1288
1291
  type: "thread";
1289
1292
  id: string;
1290
1293
  roomId: string;
1291
1294
  createdAt: Date;
1292
1295
  updatedAt: Date;
1293
- comments: CommentData[];
1294
- metadata: M;
1296
+ comments: CommentData<CM>[];
1297
+ metadata: TM;
1295
1298
  resolved: boolean;
1296
1299
  };
1297
- interface ThreadDataWithDeleteInfo<M extends BaseMetadata = DM> extends ThreadData<M> {
1300
+ interface ThreadDataWithDeleteInfo<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> extends ThreadData<TM, CM> {
1298
1301
  deletedAt?: Date;
1299
1302
  }
1300
- type ThreadDataPlain<M extends BaseMetadata> = Omit<DateToString<ThreadData<M>>, "comments" | "metadata"> & {
1301
- comments: CommentDataPlain[];
1302
- metadata: M;
1303
+ type ThreadDataPlain<TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = Omit<DateToString<ThreadData<TM, CM>>, "comments" | "metadata"> & {
1304
+ comments: CommentDataPlain<CM>[];
1305
+ metadata: TM;
1303
1306
  };
1304
1307
  type ThreadDeleteInfo = {
1305
1308
  type: "deletedThread";
@@ -1537,17 +1540,17 @@ type MakeOptionalFieldsNullable<T> = {
1537
1540
  };
1538
1541
  type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
1539
1542
 
1540
- interface RoomHttpApi<M extends BaseMetadata> {
1543
+ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1541
1544
  getThreads(options: {
1542
1545
  roomId: string;
1543
1546
  cursor?: string;
1544
1547
  query?: {
1545
1548
  resolved?: boolean;
1546
1549
  subscribed?: boolean;
1547
- metadata?: Partial<QueryMetadata<M>>;
1550
+ metadata?: Partial<QueryMetadata<TM>>;
1548
1551
  };
1549
1552
  }): Promise<{
1550
- threads: ThreadData<M>[];
1553
+ threads: ThreadData<TM, CM>[];
1551
1554
  inboxNotifications: InboxNotificationData[];
1552
1555
  subscriptions: SubscriptionData[];
1553
1556
  requestedAt: Date;
@@ -1560,7 +1563,7 @@ interface RoomHttpApi<M extends BaseMetadata> {
1560
1563
  signal?: AbortSignal;
1561
1564
  }): Promise<{
1562
1565
  threads: {
1563
- updated: ThreadData<M>[];
1566
+ updated: ThreadData<TM, CM>[];
1564
1567
  deleted: ThreadDeleteInfo[];
1565
1568
  };
1566
1569
  inboxNotifications: {
@@ -1577,7 +1580,7 @@ interface RoomHttpApi<M extends BaseMetadata> {
1577
1580
  searchComments(options: {
1578
1581
  roomId: string;
1579
1582
  query: {
1580
- threadMetadata?: Partial<QueryMetadata<M>>;
1583
+ threadMetadata?: Partial<QueryMetadata<TM>>;
1581
1584
  threadResolved?: boolean;
1582
1585
  hasAttachments?: boolean;
1583
1586
  hasMentions?: boolean;
@@ -1588,19 +1591,20 @@ interface RoomHttpApi<M extends BaseMetadata> {
1588
1591
  }): Promise<{
1589
1592
  data: Array<SearchCommentsResult>;
1590
1593
  }>;
1591
- createThread({ roomId, metadata, body, commentId, threadId, attachmentIds, }: {
1594
+ createThread({ roomId, metadata, body, commentId, threadId, commentMetadata, attachmentIds, }: {
1592
1595
  roomId: string;
1593
1596
  threadId?: string;
1594
1597
  commentId?: string;
1595
- metadata: M | undefined;
1598
+ metadata: TM | undefined;
1599
+ commentMetadata: CM | undefined;
1596
1600
  body: CommentBody;
1597
1601
  attachmentIds?: string[];
1598
- }): Promise<ThreadData<M>>;
1602
+ }): Promise<ThreadData<TM, CM>>;
1599
1603
  getThread(options: {
1600
1604
  roomId: string;
1601
1605
  threadId: string;
1602
1606
  }): Promise<{
1603
- thread?: ThreadData<M>;
1607
+ thread?: ThreadData<TM, CM>;
1604
1608
  inboxNotification?: InboxNotificationData;
1605
1609
  subscription?: SubscriptionData;
1606
1610
  }>;
@@ -1610,23 +1614,31 @@ interface RoomHttpApi<M extends BaseMetadata> {
1610
1614
  }): Promise<void>;
1611
1615
  editThreadMetadata({ roomId, metadata, threadId, }: {
1612
1616
  roomId: string;
1613
- metadata: Patchable<M>;
1617
+ metadata: Patchable<TM>;
1614
1618
  threadId: string;
1615
- }): Promise<M>;
1616
- createComment({ roomId, threadId, commentId, body, attachmentIds, }: {
1619
+ }): Promise<TM>;
1620
+ editCommentMetadata({ roomId, threadId, commentId, metadata, }: {
1621
+ roomId: string;
1622
+ threadId: string;
1623
+ commentId: string;
1624
+ metadata: Patchable<CM>;
1625
+ }): Promise<CM>;
1626
+ createComment({ roomId, threadId, commentId, body, metadata, attachmentIds, }: {
1617
1627
  roomId: string;
1618
1628
  threadId: string;
1619
1629
  commentId?: string;
1620
1630
  body: CommentBody;
1631
+ metadata?: CM;
1621
1632
  attachmentIds?: string[];
1622
- }): Promise<CommentData>;
1623
- editComment({ roomId, threadId, commentId, body, attachmentIds, }: {
1633
+ }): Promise<CommentData<CM>>;
1634
+ editComment({ roomId, threadId, commentId, body, attachmentIds, metadata, }: {
1624
1635
  roomId: string;
1625
1636
  threadId: string;
1626
1637
  commentId: string;
1627
1638
  body: CommentBody;
1628
1639
  attachmentIds?: string[];
1629
- }): Promise<CommentData>;
1640
+ metadata?: Patchable<CM>;
1641
+ }): Promise<CommentData<CM>>;
1630
1642
  deleteComment({ roomId, threadId, commentId, }: {
1631
1643
  roomId: string;
1632
1644
  threadId: string;
@@ -1764,7 +1776,7 @@ interface RoomHttpApi<M extends BaseMetadata> {
1764
1776
  signal: AbortSignal;
1765
1777
  }): Promise<string>;
1766
1778
  }
1767
- interface NotificationHttpApi<M extends BaseMetadata> {
1779
+ interface NotificationHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1768
1780
  getInboxNotifications(options?: {
1769
1781
  cursor?: string;
1770
1782
  query?: {
@@ -1773,7 +1785,7 @@ interface NotificationHttpApi<M extends BaseMetadata> {
1773
1785
  };
1774
1786
  }): Promise<{
1775
1787
  inboxNotifications: InboxNotificationData[];
1776
- threads: ThreadData<M>[];
1788
+ threads: ThreadData<TM, CM>[];
1777
1789
  subscriptions: SubscriptionData[];
1778
1790
  nextCursor: string | null;
1779
1791
  requestedAt: Date;
@@ -1791,7 +1803,7 @@ interface NotificationHttpApi<M extends BaseMetadata> {
1791
1803
  deleted: InboxNotificationDeleteInfo[];
1792
1804
  };
1793
1805
  threads: {
1794
- updated: ThreadData<M>[];
1806
+ updated: ThreadData<TM, CM>[];
1795
1807
  deleted: ThreadDeleteInfo[];
1796
1808
  };
1797
1809
  subscriptions: {
@@ -1816,16 +1828,16 @@ interface NotificationHttpApi<M extends BaseMetadata> {
1816
1828
  }): Promise<NotificationSettingsPlain>;
1817
1829
  updateNotificationSettings(settings: PartialNotificationSettings): Promise<NotificationSettingsPlain>;
1818
1830
  }
1819
- interface LiveblocksHttpApi<M extends BaseMetadata> extends RoomHttpApi<M>, NotificationHttpApi<M> {
1831
+ interface LiveblocksHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> extends RoomHttpApi<TM, CM>, NotificationHttpApi<TM, CM> {
1820
1832
  getUrlMetadata(url: string): Promise<UrlMetadata>;
1821
1833
  getUserThreads_experimental(options?: {
1822
1834
  cursor?: string;
1823
1835
  query?: {
1824
1836
  resolved?: boolean;
1825
- metadata?: Partial<QueryMetadata<M>>;
1837
+ metadata?: Partial<QueryMetadata<TM>>;
1826
1838
  };
1827
1839
  }): Promise<{
1828
- threads: ThreadData<M>[];
1840
+ threads: ThreadData<TM, CM>[];
1829
1841
  inboxNotifications: InboxNotificationData[];
1830
1842
  subscriptions: SubscriptionData[];
1831
1843
  nextCursor: string | null;
@@ -1841,7 +1853,7 @@ interface LiveblocksHttpApi<M extends BaseMetadata> extends RoomHttpApi<M>, Noti
1841
1853
  deleted: InboxNotificationDeleteInfo[];
1842
1854
  };
1843
1855
  threads: {
1844
- updated: ThreadData<M>[];
1856
+ updated: ThreadData<TM, CM>[];
1845
1857
  deleted: ThreadDeleteInfo[];
1846
1858
  };
1847
1859
  subscriptions: {
@@ -1901,6 +1913,7 @@ type CommentsOrNotificationsErrorContext = {
1901
1913
  commentId: string;
1902
1914
  body: CommentBody;
1903
1915
  metadata: BaseMetadata;
1916
+ commentMetadata: BaseMetadata;
1904
1917
  } | {
1905
1918
  type: "DELETE_THREAD_ERROR";
1906
1919
  roomId: string;
@@ -1910,6 +1923,12 @@ type CommentsOrNotificationsErrorContext = {
1910
1923
  roomId: string;
1911
1924
  threadId: string;
1912
1925
  metadata: Patchable<BaseMetadata>;
1926
+ } | {
1927
+ type: "EDIT_COMMENT_METADATA_ERROR";
1928
+ roomId: string;
1929
+ threadId: string;
1930
+ commentId: string;
1931
+ metadata: Patchable<BaseMetadata>;
1913
1932
  } | {
1914
1933
  type: "MARK_THREAD_AS_RESOLVED_ERROR" | "MARK_THREAD_AS_UNRESOLVED_ERROR" | "SUBSCRIBE_TO_THREAD_ERROR" | "UNSUBSCRIBE_FROM_THREAD_ERROR";
1915
1934
  roomId: string;
@@ -1920,6 +1939,7 @@ type CommentsOrNotificationsErrorContext = {
1920
1939
  threadId: string;
1921
1940
  commentId: string;
1922
1941
  body: CommentBody;
1942
+ metadata: BaseMetadata;
1923
1943
  } | {
1924
1944
  type: "DELETE_COMMENT_ERROR";
1925
1945
  roomId: string;
@@ -1996,6 +2016,12 @@ type EnterOptions<P extends JsonObject = DP, S extends LsonObject = DS> = Resolv
1996
2016
  * the authentication endpoint or connect via WebSocket.
1997
2017
  */
1998
2018
  autoConnect?: boolean;
2019
+ /**
2020
+ * @private Preferred storage engine version to use when creating the
2021
+ * room. Only takes effect if the room doesn't exist yet. Version
2022
+ * 2 supports streaming and will become the default in the future.
2023
+ */
2024
+ engine?: 1 | 2;
1999
2025
  } & PartialUnless<P, {
2000
2026
  /**
2001
2027
  * The initial Presence to use and announce when you enter the Room. The
@@ -2024,7 +2050,7 @@ type InternalSyncStatus = SyncStatus | "has-local-changes";
2024
2050
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2025
2051
  * will probably happen if you do.
2026
2052
  */
2027
- type PrivateClientApi<U extends BaseUserMeta, M extends BaseMetadata> = {
2053
+ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata> = {
2028
2054
  readonly currentUserId: Signal<string | undefined>;
2029
2055
  readonly mentionSuggestionsCache: Map<string, MentionData[]>;
2030
2056
  readonly resolveMentionSuggestions: ClientOptions<U>["resolveMentionSuggestions"];
@@ -2032,13 +2058,13 @@ type PrivateClientApi<U extends BaseUserMeta, M extends BaseMetadata> = {
2032
2058
  readonly roomsInfoStore: BatchStore<DRI | undefined, string>;
2033
2059
  readonly groupsInfoStore: BatchStore<DGI | undefined, string>;
2034
2060
  readonly getRoomIds: () => string[];
2035
- readonly httpClient: LiveblocksHttpApi<M>;
2036
- as<M2 extends BaseMetadata>(): Client<U, M2>;
2061
+ readonly httpClient: LiveblocksHttpApi<TM, CM>;
2062
+ as<TM2 extends BaseMetadata, CM2 extends BaseMetadata>(): Client<U, TM2, CM2>;
2037
2063
  createSyncSource(): SyncSource;
2038
2064
  emitError(context: LiveblocksErrorContext, cause?: Error): void;
2039
2065
  ai: Ai;
2040
2066
  };
2041
- type NotificationsApi<M extends BaseMetadata> = {
2067
+ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2042
2068
  /**
2043
2069
  * Gets a page (or the initial page) for user inbox notifications and their
2044
2070
  * associated threads and thread subscriptions.
@@ -2065,7 +2091,7 @@ type NotificationsApi<M extends BaseMetadata> = {
2065
2091
  };
2066
2092
  }): Promise<{
2067
2093
  inboxNotifications: InboxNotificationData[];
2068
- threads: ThreadData<M>[];
2094
+ threads: ThreadData<TM, CM>[];
2069
2095
  subscriptions: SubscriptionData[];
2070
2096
  nextCursor: string | null;
2071
2097
  requestedAt: Date;
@@ -2106,7 +2132,7 @@ type NotificationsApi<M extends BaseMetadata> = {
2106
2132
  deleted: InboxNotificationDeleteInfo[];
2107
2133
  };
2108
2134
  threads: {
2109
- updated: ThreadData<M>[];
2135
+ updated: ThreadData<TM, CM>[];
2110
2136
  deleted: ThreadDeleteInfo[];
2111
2137
  };
2112
2138
  subscriptions: {
@@ -2186,23 +2212,23 @@ type NotificationsApi<M extends BaseMetadata> = {
2186
2212
  * narrower.
2187
2213
  */
2188
2214
  type OpaqueClient = Client<BaseUserMeta>;
2189
- type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
2215
+ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
2190
2216
  /**
2191
2217
  * Gets a room. Returns null if {@link Client.enter} has not been called previously.
2192
2218
  *
2193
2219
  * @param roomId The id of the room
2194
2220
  */
2195
- 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;
2221
+ 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;
2196
2222
  /**
2197
2223
  * Enter a room.
2198
2224
  * @param roomId The id of the room
2199
2225
  * @param options Optional. You can provide initializers for the Presence or Storage when entering the Room.
2200
2226
  * @returns The room and a leave function. Call the returned leave() function when you no longer need the room.
2201
2227
  */
2202
- enterRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, M2 extends BaseMetadata = M>(roomId: string, ...args: OptionalTupleUnless<P & S, [
2228
+ 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, [
2203
2229
  options: EnterOptions<NoInfr<P>, NoInfr<S>>
2204
2230
  ]>): {
2205
- room: Room<P, S, U, E, M2>;
2231
+ room: Room<P, S, U, E, TM2, CM2>;
2206
2232
  leave: () => void;
2207
2233
  };
2208
2234
  /**
@@ -2268,7 +2294,7 @@ type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
2268
2294
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2269
2295
  * will probably happen if you do.
2270
2296
  */
2271
- readonly [kInternal]: PrivateClientApi<U, M>;
2297
+ readonly [kInternal]: PrivateClientApi<U, TM, CM>;
2272
2298
  /**
2273
2299
  * Returns the current global sync status of the Liveblocks client. If any
2274
2300
  * part of Liveblocks has any local pending changes that haven't been
@@ -2292,7 +2318,7 @@ type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
2292
2318
  readonly error: Observable<LiveblocksError>;
2293
2319
  readonly syncStatus: Observable<void>;
2294
2320
  };
2295
- } & NotificationsApi<M>;
2321
+ } & NotificationsApi<TM, CM>;
2296
2322
  type AuthEndpoint = string | ((room?: string) => Promise<CustomAuthenticationResult>);
2297
2323
  /**
2298
2324
  * The authentication endpoint that is called to ensure that the current user has access to a room.
@@ -2486,9 +2512,8 @@ declare const ServerMsgCode: Readonly<{
2486
2512
  USER_LEFT: 102;
2487
2513
  BROADCASTED_EVENT: 103;
2488
2514
  ROOM_STATE: 104;
2489
- INITIAL_STORAGE_STATE: 200;
2515
+ STORAGE_STATE: 200;
2490
2516
  UPDATE_STORAGE: 201;
2491
- STORAGE_ACK: 202;
2492
2517
  UPDATE_YDOC: 300;
2493
2518
  THREAD_CREATED: 400;
2494
2519
  THREAD_DELETED: 407;
@@ -2499,6 +2524,7 @@ declare const ServerMsgCode: Readonly<{
2499
2524
  COMMENT_DELETED: 404;
2500
2525
  COMMENT_REACTION_ADDED: 405;
2501
2526
  COMMENT_REACTION_REMOVED: 406;
2527
+ COMMENT_METADATA_UPDATED: 409;
2502
2528
  REJECT_STORAGE_OP: 299;
2503
2529
  }>;
2504
2530
  declare namespace ServerMsgCode {
@@ -2507,9 +2533,8 @@ declare namespace ServerMsgCode {
2507
2533
  type USER_LEFT = typeof ServerMsgCode.USER_LEFT;
2508
2534
  type BROADCASTED_EVENT = typeof ServerMsgCode.BROADCASTED_EVENT;
2509
2535
  type ROOM_STATE = typeof ServerMsgCode.ROOM_STATE;
2510
- type INITIAL_STORAGE_STATE = typeof ServerMsgCode.INITIAL_STORAGE_STATE;
2536
+ type STORAGE_STATE = typeof ServerMsgCode.STORAGE_STATE;
2511
2537
  type UPDATE_STORAGE = typeof ServerMsgCode.UPDATE_STORAGE;
2512
- type STORAGE_ACK = typeof ServerMsgCode.STORAGE_ACK;
2513
2538
  type UPDATE_YDOC = typeof ServerMsgCode.UPDATE_YDOC;
2514
2539
  type THREAD_CREATED = typeof ServerMsgCode.THREAD_CREATED;
2515
2540
  type THREAD_DELETED = typeof ServerMsgCode.THREAD_DELETED;
@@ -2520,13 +2545,14 @@ declare namespace ServerMsgCode {
2520
2545
  type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
2521
2546
  type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
2522
2547
  type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
2548
+ type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
2523
2549
  type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
2524
2550
  }
2525
2551
  /**
2526
2552
  * Messages that can be sent from the server to the client.
2527
2553
  */
2528
- type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | InitialDocumentStateServerMsg | UpdateStorageServerMsg | StorageAckServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2529
- type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved;
2554
+ type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2555
+ type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
2530
2556
  type ThreadCreatedEvent = {
2531
2557
  type: ServerMsgCode.THREAD_CREATED;
2532
2558
  threadId: string;
@@ -2570,6 +2596,11 @@ type CommentReactionRemoved = {
2570
2596
  commentId: string;
2571
2597
  emoji: string;
2572
2598
  };
2599
+ type CommentMetadataUpdatedEvent = {
2600
+ type: ServerMsgCode.COMMENT_METADATA_UPDATED;
2601
+ threadId: string;
2602
+ commentId: string;
2603
+ };
2573
2604
  /**
2574
2605
  * Sent by the WebSocket server and broadcasted to all clients to announce that
2575
2606
  * a User updated their presence. For example, when a user moves their cursor.
@@ -2716,11 +2747,11 @@ type RoomStateServerMsg<U extends BaseUserMeta> = {
2716
2747
  };
2717
2748
  /**
2718
2749
  * Sent by the WebSocket server to a single client in response to the client
2719
- * joining the Room, to provide the initial Storage state of the Room. The
2720
- * payload includes the entire Storage document.
2750
+ * sending a FetchStorageClientMsg message, to provide the initial Storage
2751
+ * state of the Room. The payload includes the entire Storage document.
2721
2752
  */
2722
- type InitialDocumentStateServerMsg = {
2723
- readonly type: ServerMsgCode.INITIAL_STORAGE_STATE;
2753
+ type StorageStateServerMsg = {
2754
+ readonly type: ServerMsgCode.STORAGE_STATE;
2724
2755
  readonly items: IdTuple<SerializedCrdt>[];
2725
2756
  };
2726
2757
  /**
@@ -2734,14 +2765,6 @@ type UpdateStorageServerMsg = {
2734
2765
  readonly type: ServerMsgCode.UPDATE_STORAGE;
2735
2766
  readonly ops: Op[];
2736
2767
  };
2737
- /**
2738
- * Sent back to client that initiated a storage mutation, to acknowledge which
2739
- * mutations have been persisted.
2740
- */
2741
- type StorageAckServerMsg = {
2742
- readonly type: ServerMsgCode.STORAGE_ACK;
2743
- readonly opIds: string[];
2744
- };
2745
2768
  /**
2746
2769
  * Sent by the WebSocket server to the client to indicate that certain opIds
2747
2770
  * have been rejected, possibly due to lack of permissions or exceeding
@@ -3059,12 +3082,12 @@ type SubscribeFn<P extends JsonObject, _TStorage extends LsonObject, U extends B
3059
3082
  (type: "storage-status", listener: Callback<StorageStatus>): () => void;
3060
3083
  (type: "comments", listener: Callback<CommentsEventServerMsg>): () => void;
3061
3084
  };
3062
- type GetThreadsOptions<M extends BaseMetadata> = {
3085
+ type GetThreadsOptions<TM extends BaseMetadata> = {
3063
3086
  cursor?: string;
3064
3087
  query?: {
3065
3088
  resolved?: boolean;
3066
3089
  subscribed?: boolean;
3067
- metadata?: Partial<QueryMetadata<M>>;
3090
+ metadata?: Partial<QueryMetadata<TM>>;
3068
3091
  };
3069
3092
  };
3070
3093
  type GetThreadsSinceOptions = {
@@ -3087,7 +3110,7 @@ type GetSubscriptionSettingsOptions = {
3087
3110
  * a Room instance using globally augmented types only, which is narrower.
3088
3111
  */
3089
3112
  type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata>;
3090
- type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUserMeta = DU, E extends Json = DE, M extends BaseMetadata = DM> = {
3113
+ 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> = {
3091
3114
  /**
3092
3115
  * @private
3093
3116
  *
@@ -3301,8 +3324,8 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3301
3324
  * requestedAt
3302
3325
  * } = await room.getThreads({ query: { resolved: false }});
3303
3326
  */
3304
- getThreads(options?: GetThreadsOptions<M>): Promise<{
3305
- threads: ThreadData<M>[];
3327
+ getThreads(options?: GetThreadsOptions<TM>): Promise<{
3328
+ threads: ThreadData<TM, CM>[];
3306
3329
  inboxNotifications: InboxNotificationData[];
3307
3330
  subscriptions: SubscriptionData[];
3308
3331
  requestedAt: Date;
@@ -3319,7 +3342,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3319
3342
  */
3320
3343
  getThreadsSince(options: GetThreadsSinceOptions): Promise<{
3321
3344
  threads: {
3322
- updated: ThreadData<M>[];
3345
+ updated: ThreadData<TM, CM>[];
3323
3346
  deleted: ThreadDeleteInfo[];
3324
3347
  };
3325
3348
  inboxNotifications: {
@@ -3340,7 +3363,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3340
3363
  * const { thread, inboxNotification, subscription } = await room.getThread("th_xxx");
3341
3364
  */
3342
3365
  getThread(threadId: string): Promise<{
3343
- thread?: ThreadData<M>;
3366
+ thread?: ThreadData<TM, CM>;
3344
3367
  inboxNotification?: InboxNotificationData;
3345
3368
  subscription?: SubscriptionData;
3346
3369
  }>;
@@ -3358,10 +3381,11 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3358
3381
  createThread(options: {
3359
3382
  threadId?: string;
3360
3383
  commentId?: string;
3361
- metadata: M | undefined;
3384
+ metadata: TM | undefined;
3362
3385
  body: CommentBody;
3386
+ commentMetadata?: CM;
3363
3387
  attachmentIds?: string[];
3364
- }): Promise<ThreadData<M>>;
3388
+ }): Promise<ThreadData<TM, CM>>;
3365
3389
  /**
3366
3390
  * Deletes a thread.
3367
3391
  *
@@ -3377,9 +3401,21 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3377
3401
  * await room.editThreadMetadata({ threadId: "th_xxx", metadata: { x: 100, y: 100 } })
3378
3402
  */
3379
3403
  editThreadMetadata(options: {
3380
- metadata: Patchable<M>;
3404
+ metadata: Patchable<TM>;
3405
+ threadId: string;
3406
+ }): Promise<TM>;
3407
+ /**
3408
+ * Edits a comment's metadata.
3409
+ * To delete an existing metadata property, set its value to `null`.
3410
+ *
3411
+ * @example
3412
+ * await room.editCommentMetadata({ threadId: "th_xxx", commentId: "cm_xxx", metadata: { slackChannelId: "C024BE91L", slackMessageTs: "1700311782.001200" } })
3413
+ */
3414
+ editCommentMetadata(options: {
3381
3415
  threadId: string;
3382
- }): Promise<M>;
3416
+ commentId: string;
3417
+ metadata: Patchable<CM>;
3418
+ }): Promise<CM>;
3383
3419
  /**
3384
3420
  * Marks a thread as resolved.
3385
3421
  *
@@ -3424,8 +3460,9 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3424
3460
  threadId: string;
3425
3461
  commentId?: string;
3426
3462
  body: CommentBody;
3463
+ metadata?: CM;
3427
3464
  attachmentIds?: string[];
3428
- }): Promise<CommentData>;
3465
+ }): Promise<CommentData<CM>>;
3429
3466
  /**
3430
3467
  * Edits a comment.
3431
3468
  *
@@ -3443,8 +3480,9 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3443
3480
  threadId: string;
3444
3481
  commentId: string;
3445
3482
  body: CommentBody;
3483
+ metadata?: Patchable<CM>;
3446
3484
  attachmentIds?: string[];
3447
- }): Promise<CommentData>;
3485
+ }): Promise<CommentData<CM>>;
3448
3486
  /**
3449
3487
  * Deletes a comment.
3450
3488
  * If it is the last non-deleted comment, the thread also gets deleted.
@@ -4463,14 +4501,14 @@ declare const MENTION_CHARACTER = "@";
4463
4501
  * @param data The plain comment data object (usually returned by the API)
4464
4502
  * @returns The rich comment data object that can be used by the client.
4465
4503
  */
4466
- declare function convertToCommentData(data: CommentDataPlain): CommentData;
4504
+ declare function convertToCommentData<CM extends BaseMetadata>(data: CommentDataPlain<CM>): CommentData<CM>;
4467
4505
  /**
4468
4506
  * Converts a plain thread data object (usually returned by the API) to a thread data object that can be used by the client.
4469
4507
  * This is necessary because the plain data object stores dates as ISO strings, but the client expects them as Date objects.
4470
4508
  * @param data The plain thread data object (usually returned by the API)
4471
4509
  * @returns The rich thread data object that can be used by the client.
4472
4510
  */
4473
- declare function convertToThreadData<M extends BaseMetadata>(data: ThreadDataPlain<M>): ThreadData<M>;
4511
+ declare function convertToThreadData<TM extends BaseMetadata, CM extends BaseMetadata>(data: ThreadDataPlain<TM, CM>): ThreadData<TM, CM>;
4474
4512
  /**
4475
4513
  * Converts a plain comment reaction object (usually returned by the API) to a comment reaction object that can be used by the client.
4476
4514
  * This is necessary because the plain data object stores dates as ISO strings, but the client expects them as Date objects.
@@ -5186,4 +5224,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5186
5224
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5187
5225
  };
5188
5226
 
5189
- 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 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 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 StorageAckServerMsg, 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 };
5227
+ 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 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 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 StorageStateServerMsg, 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 };