@liveblocks/core 3.23.0-file2 → 3.23.0-file4

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
@@ -217,6 +217,118 @@ type BaseUserMeta = {
217
217
  info?: IUserInfo;
218
218
  };
219
219
 
220
+ type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
221
+ declare const CrdtType: Readonly<{
222
+ OBJECT: 0;
223
+ LIST: 1;
224
+ MAP: 2;
225
+ REGISTER: 3;
226
+ FILE: 5;
227
+ }>;
228
+ declare namespace CrdtType {
229
+ type OBJECT = typeof CrdtType.OBJECT;
230
+ type LIST = typeof CrdtType.LIST;
231
+ type MAP = typeof CrdtType.MAP;
232
+ type REGISTER = typeof CrdtType.REGISTER;
233
+ type FILE = typeof CrdtType.FILE;
234
+ }
235
+ type SerializedCrdt = SerializedRootObject | SerializedChild;
236
+ type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedFile;
237
+ type LiveFileData = {
238
+ readonly id: string;
239
+ readonly name: string;
240
+ readonly size: number;
241
+ readonly mimeType: string;
242
+ };
243
+ type SerializedRootObject = {
244
+ readonly type: CrdtType.OBJECT;
245
+ readonly data: JsonObject;
246
+ readonly parentId?: never;
247
+ readonly parentKey?: never;
248
+ };
249
+ type SerializedObject = {
250
+ readonly type: CrdtType.OBJECT;
251
+ readonly parentId: string;
252
+ readonly parentKey: string;
253
+ readonly data: JsonObject;
254
+ };
255
+ type SerializedList = {
256
+ readonly type: CrdtType.LIST;
257
+ readonly parentId: string;
258
+ readonly parentKey: string;
259
+ };
260
+ type SerializedMap = {
261
+ readonly type: CrdtType.MAP;
262
+ readonly parentId: string;
263
+ readonly parentKey: string;
264
+ };
265
+ type SerializedRegister = {
266
+ readonly type: CrdtType.REGISTER;
267
+ readonly parentId: string;
268
+ readonly parentKey: string;
269
+ readonly data: Json;
270
+ };
271
+ type SerializedFile = {
272
+ readonly type: CrdtType.FILE;
273
+ readonly parentId: string;
274
+ readonly parentKey: string;
275
+ readonly data: LiveFileData;
276
+ };
277
+ type StorageNode = RootStorageNode | ChildStorageNode;
278
+ type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | FileStorageNode;
279
+ type RootStorageNode = [id: "root", value: SerializedRootObject];
280
+ type ObjectStorageNode = [id: string, value: SerializedObject];
281
+ type ListStorageNode = [id: string, value: SerializedList];
282
+ type MapStorageNode = [id: string, value: SerializedMap];
283
+ type RegisterStorageNode = [id: string, value: SerializedRegister];
284
+ type FileStorageNode = [id: string, value: SerializedFile];
285
+ type NodeMap = Map<string, SerializedCrdt>;
286
+ type NodeStream = Iterable<StorageNode>;
287
+ declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
288
+ declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode | ObjectStorageNode;
289
+ declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
290
+ declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
291
+ declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
292
+ declare function isFileStorageNode(node: StorageNode): node is FileStorageNode;
293
+ type CompactNode = CompactRootNode | CompactChildNode;
294
+ type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactFileNode;
295
+ type CompactRootNode = readonly [id: "root", data: JsonObject];
296
+ type CompactObjectNode = readonly [
297
+ id: string,
298
+ type: CrdtType.OBJECT,
299
+ parentId: string,
300
+ parentKey: string,
301
+ data: JsonObject
302
+ ];
303
+ type CompactListNode = readonly [
304
+ id: string,
305
+ type: CrdtType.LIST,
306
+ parentId: string,
307
+ parentKey: string
308
+ ];
309
+ type CompactMapNode = readonly [
310
+ id: string,
311
+ type: CrdtType.MAP,
312
+ parentId: string,
313
+ parentKey: string
314
+ ];
315
+ type CompactRegisterNode = readonly [
316
+ id: string,
317
+ type: CrdtType.REGISTER,
318
+ parentId: string,
319
+ parentKey: string,
320
+ data: Json
321
+ ];
322
+ type CompactFileNode = readonly [
323
+ id: string,
324
+ type: CrdtType.FILE,
325
+ parentId: string,
326
+ parentKey: string,
327
+ data: LiveFileData
328
+ ];
329
+ declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
330
+ declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
331
+
220
332
  declare const brand: unique symbol;
221
333
  type Brand<T, TBrand extends string> = T & {
222
334
  [brand]: TBrand;
@@ -625,112 +737,6 @@ declare class LiveMap<TKey extends string, TValue extends Lson> extends Abstract
625
737
  clone(): LiveMap<TKey, TValue>;
626
738
  }
627
739
 
628
- type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
629
- declare const CrdtType: Readonly<{
630
- OBJECT: 0;
631
- LIST: 1;
632
- MAP: 2;
633
- REGISTER: 3;
634
- FILE: 5;
635
- }>;
636
- declare namespace CrdtType {
637
- type OBJECT = typeof CrdtType.OBJECT;
638
- type LIST = typeof CrdtType.LIST;
639
- type MAP = typeof CrdtType.MAP;
640
- type REGISTER = typeof CrdtType.REGISTER;
641
- type FILE = typeof CrdtType.FILE;
642
- }
643
- type SerializedCrdt = SerializedRootObject | SerializedChild;
644
- type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedFile;
645
- type SerializedRootObject = {
646
- readonly type: CrdtType.OBJECT;
647
- readonly data: JsonObject;
648
- readonly parentId?: never;
649
- readonly parentKey?: never;
650
- };
651
- type SerializedObject = {
652
- readonly type: CrdtType.OBJECT;
653
- readonly parentId: string;
654
- readonly parentKey: string;
655
- readonly data: JsonObject;
656
- };
657
- type SerializedList = {
658
- readonly type: CrdtType.LIST;
659
- readonly parentId: string;
660
- readonly parentKey: string;
661
- };
662
- type SerializedMap = {
663
- readonly type: CrdtType.MAP;
664
- readonly parentId: string;
665
- readonly parentKey: string;
666
- };
667
- type SerializedRegister = {
668
- readonly type: CrdtType.REGISTER;
669
- readonly parentId: string;
670
- readonly parentKey: string;
671
- readonly data: Json;
672
- };
673
- type SerializedFile = {
674
- readonly type: CrdtType.FILE;
675
- readonly parentId: string;
676
- readonly parentKey: string;
677
- readonly data: LiveFileData;
678
- };
679
- type StorageNode = RootStorageNode | ChildStorageNode;
680
- type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | FileStorageNode;
681
- type RootStorageNode = [id: "root", value: SerializedRootObject];
682
- type ObjectStorageNode = [id: string, value: SerializedObject];
683
- type ListStorageNode = [id: string, value: SerializedList];
684
- type MapStorageNode = [id: string, value: SerializedMap];
685
- type RegisterStorageNode = [id: string, value: SerializedRegister];
686
- type FileStorageNode = [id: string, value: SerializedFile];
687
- type NodeMap = Map<string, SerializedCrdt>;
688
- type NodeStream = Iterable<StorageNode>;
689
- declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
690
- declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode | ObjectStorageNode;
691
- declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
692
- declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
693
- declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
694
- declare function isFileStorageNode(node: StorageNode): node is FileStorageNode;
695
- type CompactNode = CompactRootNode | CompactChildNode;
696
- type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactFileNode;
697
- type CompactRootNode = readonly [id: "root", data: JsonObject];
698
- type CompactObjectNode = readonly [
699
- id: string,
700
- type: CrdtType.OBJECT,
701
- parentId: string,
702
- parentKey: string,
703
- data: JsonObject
704
- ];
705
- type CompactListNode = readonly [
706
- id: string,
707
- type: CrdtType.LIST,
708
- parentId: string,
709
- parentKey: string
710
- ];
711
- type CompactMapNode = readonly [
712
- id: string,
713
- type: CrdtType.MAP,
714
- parentId: string,
715
- parentKey: string
716
- ];
717
- type CompactRegisterNode = readonly [
718
- id: string,
719
- type: CrdtType.REGISTER,
720
- parentId: string,
721
- parentKey: string,
722
- data: Json
723
- ];
724
- type CompactFileNode = readonly [
725
- id: string,
726
- type: CrdtType.FILE,
727
- parentId: string,
728
- parentKey: string,
729
- data: LiveFileData
730
- ];
731
- declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
732
- declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
733
-
734
740
  /**
735
741
  * Extracts only the explicitly-named string keys of a type, filtering out
736
742
  * any index signature (e.g. `[key: string]: ...`).
@@ -1063,12 +1069,6 @@ declare abstract class AbstractCrdt {
1063
1069
  abstract clone(): Lson;
1064
1070
  }
1065
1071
 
1066
- type LiveFileData = {
1067
- readonly id: string;
1068
- readonly name: string;
1069
- readonly size: number;
1070
- readonly mimeType: string;
1071
- };
1072
1072
  type LiveFileReference = LiveFile | LiveFileData | string;
1073
1073
  declare function getLiveFileId(file: LiveFileReference): string;
1074
1074
  /**
@@ -1184,6 +1184,7 @@ type BatchStore<O, I> = {
1184
1184
  setData: (entries: [I, O][]) => void;
1185
1185
  getItemState: (input: I) => AsyncResult<O> | undefined;
1186
1186
  getData: (input: I) => O | undefined;
1187
+ waitUntilItemCacheExpires: (input: I) => Promise<void> | undefined;
1187
1188
  invalidate: (inputs?: I[]) => void;
1188
1189
  };
1189
1190
 
@@ -1731,6 +1732,10 @@ type MakeOptionalFieldsNullable<T> = {
1731
1732
  */
1732
1733
  type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
1733
1734
 
1735
+ type FileUrlData = {
1736
+ readonly url: string;
1737
+ readonly expiresAt: number;
1738
+ };
1734
1739
  interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1735
1740
  getThreads(options: {
1736
1741
  roomId: string;
@@ -1906,7 +1911,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1906
1911
  file: File;
1907
1912
  signal?: AbortSignal;
1908
1913
  }): Promise<LiveFile>;
1909
- getOrCreateFileUrlsStore(roomId: string): BatchStore<string, string>;
1914
+ getOrCreateFileUrlsStore(roomId: string): BatchStore<FileUrlData, string>;
1910
1915
  createTextMention({ roomId, mentionId, mention, }: {
1911
1916
  roomId: string;
1912
1917
  mentionId: string;
@@ -4265,7 +4270,7 @@ type PrivateRoomApi = {
4265
4270
  incomingMessage(data: string): void;
4266
4271
  };
4267
4272
  attachmentUrlsStore: BatchStore<string, string>;
4268
- fileUrlsStore: BatchStore<string, string>;
4273
+ fileUrlsStore: BatchStore<FileUrlData, string>;
4269
4274
  };
4270
4275
  type Stackframe<P extends JsonObject> = Op | PresenceStackframe<P>;
4271
4276
  type PresenceStackframe<P extends JsonObject> = {
@@ -5885,4 +5890,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5885
5890
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5886
5891
  };
5887
5892
 
5888
- 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 CompactFileNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateFileOp, 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 FileStorageNode, 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, LiveFile, type LiveFileData, type LiveFileReference, 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 PlainLsonFile, 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 SerializedFile, 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 UploadFileOptions, 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, createStorageFileId, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getLiveFileId, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isFileStorageNode, 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 };
5893
+ 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 CompactFileNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateFileOp, 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 FileStorageNode, type FileUrlData, 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, LiveFile, type LiveFileData, type LiveFileReference, 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 PlainLsonFile, 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 SerializedFile, 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 UploadFileOptions, 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, createStorageFileId, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getLiveFileId, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isFileStorageNode, 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 };
package/dist/index.d.ts CHANGED
@@ -217,6 +217,118 @@ type BaseUserMeta = {
217
217
  info?: IUserInfo;
218
218
  };
219
219
 
220
+ type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
221
+ declare const CrdtType: Readonly<{
222
+ OBJECT: 0;
223
+ LIST: 1;
224
+ MAP: 2;
225
+ REGISTER: 3;
226
+ FILE: 5;
227
+ }>;
228
+ declare namespace CrdtType {
229
+ type OBJECT = typeof CrdtType.OBJECT;
230
+ type LIST = typeof CrdtType.LIST;
231
+ type MAP = typeof CrdtType.MAP;
232
+ type REGISTER = typeof CrdtType.REGISTER;
233
+ type FILE = typeof CrdtType.FILE;
234
+ }
235
+ type SerializedCrdt = SerializedRootObject | SerializedChild;
236
+ type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedFile;
237
+ type LiveFileData = {
238
+ readonly id: string;
239
+ readonly name: string;
240
+ readonly size: number;
241
+ readonly mimeType: string;
242
+ };
243
+ type SerializedRootObject = {
244
+ readonly type: CrdtType.OBJECT;
245
+ readonly data: JsonObject;
246
+ readonly parentId?: never;
247
+ readonly parentKey?: never;
248
+ };
249
+ type SerializedObject = {
250
+ readonly type: CrdtType.OBJECT;
251
+ readonly parentId: string;
252
+ readonly parentKey: string;
253
+ readonly data: JsonObject;
254
+ };
255
+ type SerializedList = {
256
+ readonly type: CrdtType.LIST;
257
+ readonly parentId: string;
258
+ readonly parentKey: string;
259
+ };
260
+ type SerializedMap = {
261
+ readonly type: CrdtType.MAP;
262
+ readonly parentId: string;
263
+ readonly parentKey: string;
264
+ };
265
+ type SerializedRegister = {
266
+ readonly type: CrdtType.REGISTER;
267
+ readonly parentId: string;
268
+ readonly parentKey: string;
269
+ readonly data: Json;
270
+ };
271
+ type SerializedFile = {
272
+ readonly type: CrdtType.FILE;
273
+ readonly parentId: string;
274
+ readonly parentKey: string;
275
+ readonly data: LiveFileData;
276
+ };
277
+ type StorageNode = RootStorageNode | ChildStorageNode;
278
+ type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | FileStorageNode;
279
+ type RootStorageNode = [id: "root", value: SerializedRootObject];
280
+ type ObjectStorageNode = [id: string, value: SerializedObject];
281
+ type ListStorageNode = [id: string, value: SerializedList];
282
+ type MapStorageNode = [id: string, value: SerializedMap];
283
+ type RegisterStorageNode = [id: string, value: SerializedRegister];
284
+ type FileStorageNode = [id: string, value: SerializedFile];
285
+ type NodeMap = Map<string, SerializedCrdt>;
286
+ type NodeStream = Iterable<StorageNode>;
287
+ declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
288
+ declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode | ObjectStorageNode;
289
+ declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
290
+ declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
291
+ declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
292
+ declare function isFileStorageNode(node: StorageNode): node is FileStorageNode;
293
+ type CompactNode = CompactRootNode | CompactChildNode;
294
+ type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactFileNode;
295
+ type CompactRootNode = readonly [id: "root", data: JsonObject];
296
+ type CompactObjectNode = readonly [
297
+ id: string,
298
+ type: CrdtType.OBJECT,
299
+ parentId: string,
300
+ parentKey: string,
301
+ data: JsonObject
302
+ ];
303
+ type CompactListNode = readonly [
304
+ id: string,
305
+ type: CrdtType.LIST,
306
+ parentId: string,
307
+ parentKey: string
308
+ ];
309
+ type CompactMapNode = readonly [
310
+ id: string,
311
+ type: CrdtType.MAP,
312
+ parentId: string,
313
+ parentKey: string
314
+ ];
315
+ type CompactRegisterNode = readonly [
316
+ id: string,
317
+ type: CrdtType.REGISTER,
318
+ parentId: string,
319
+ parentKey: string,
320
+ data: Json
321
+ ];
322
+ type CompactFileNode = readonly [
323
+ id: string,
324
+ type: CrdtType.FILE,
325
+ parentId: string,
326
+ parentKey: string,
327
+ data: LiveFileData
328
+ ];
329
+ declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
330
+ declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
331
+
220
332
  declare const brand: unique symbol;
221
333
  type Brand<T, TBrand extends string> = T & {
222
334
  [brand]: TBrand;
@@ -625,112 +737,6 @@ declare class LiveMap<TKey extends string, TValue extends Lson> extends Abstract
625
737
  clone(): LiveMap<TKey, TValue>;
626
738
  }
627
739
 
628
- type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
629
- declare const CrdtType: Readonly<{
630
- OBJECT: 0;
631
- LIST: 1;
632
- MAP: 2;
633
- REGISTER: 3;
634
- FILE: 5;
635
- }>;
636
- declare namespace CrdtType {
637
- type OBJECT = typeof CrdtType.OBJECT;
638
- type LIST = typeof CrdtType.LIST;
639
- type MAP = typeof CrdtType.MAP;
640
- type REGISTER = typeof CrdtType.REGISTER;
641
- type FILE = typeof CrdtType.FILE;
642
- }
643
- type SerializedCrdt = SerializedRootObject | SerializedChild;
644
- type SerializedChild = SerializedObject | SerializedList | SerializedMap | SerializedRegister | SerializedFile;
645
- type SerializedRootObject = {
646
- readonly type: CrdtType.OBJECT;
647
- readonly data: JsonObject;
648
- readonly parentId?: never;
649
- readonly parentKey?: never;
650
- };
651
- type SerializedObject = {
652
- readonly type: CrdtType.OBJECT;
653
- readonly parentId: string;
654
- readonly parentKey: string;
655
- readonly data: JsonObject;
656
- };
657
- type SerializedList = {
658
- readonly type: CrdtType.LIST;
659
- readonly parentId: string;
660
- readonly parentKey: string;
661
- };
662
- type SerializedMap = {
663
- readonly type: CrdtType.MAP;
664
- readonly parentId: string;
665
- readonly parentKey: string;
666
- };
667
- type SerializedRegister = {
668
- readonly type: CrdtType.REGISTER;
669
- readonly parentId: string;
670
- readonly parentKey: string;
671
- readonly data: Json;
672
- };
673
- type SerializedFile = {
674
- readonly type: CrdtType.FILE;
675
- readonly parentId: string;
676
- readonly parentKey: string;
677
- readonly data: LiveFileData;
678
- };
679
- type StorageNode = RootStorageNode | ChildStorageNode;
680
- type ChildStorageNode = ObjectStorageNode | ListStorageNode | MapStorageNode | RegisterStorageNode | FileStorageNode;
681
- type RootStorageNode = [id: "root", value: SerializedRootObject];
682
- type ObjectStorageNode = [id: string, value: SerializedObject];
683
- type ListStorageNode = [id: string, value: SerializedList];
684
- type MapStorageNode = [id: string, value: SerializedMap];
685
- type RegisterStorageNode = [id: string, value: SerializedRegister];
686
- type FileStorageNode = [id: string, value: SerializedFile];
687
- type NodeMap = Map<string, SerializedCrdt>;
688
- type NodeStream = Iterable<StorageNode>;
689
- declare function isRootStorageNode(node: StorageNode): node is RootStorageNode;
690
- declare function isObjectStorageNode(node: StorageNode): node is RootStorageNode | ObjectStorageNode;
691
- declare function isListStorageNode(node: StorageNode): node is ListStorageNode;
692
- declare function isMapStorageNode(node: StorageNode): node is MapStorageNode;
693
- declare function isRegisterStorageNode(node: StorageNode): node is RegisterStorageNode;
694
- declare function isFileStorageNode(node: StorageNode): node is FileStorageNode;
695
- type CompactNode = CompactRootNode | CompactChildNode;
696
- type CompactChildNode = CompactObjectNode | CompactListNode | CompactMapNode | CompactRegisterNode | CompactFileNode;
697
- type CompactRootNode = readonly [id: "root", data: JsonObject];
698
- type CompactObjectNode = readonly [
699
- id: string,
700
- type: CrdtType.OBJECT,
701
- parentId: string,
702
- parentKey: string,
703
- data: JsonObject
704
- ];
705
- type CompactListNode = readonly [
706
- id: string,
707
- type: CrdtType.LIST,
708
- parentId: string,
709
- parentKey: string
710
- ];
711
- type CompactMapNode = readonly [
712
- id: string,
713
- type: CrdtType.MAP,
714
- parentId: string,
715
- parentKey: string
716
- ];
717
- type CompactRegisterNode = readonly [
718
- id: string,
719
- type: CrdtType.REGISTER,
720
- parentId: string,
721
- parentKey: string,
722
- data: Json
723
- ];
724
- type CompactFileNode = readonly [
725
- id: string,
726
- type: CrdtType.FILE,
727
- parentId: string,
728
- parentKey: string,
729
- data: LiveFileData
730
- ];
731
- declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
732
- declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
733
-
734
740
  /**
735
741
  * Extracts only the explicitly-named string keys of a type, filtering out
736
742
  * any index signature (e.g. `[key: string]: ...`).
@@ -1063,12 +1069,6 @@ declare abstract class AbstractCrdt {
1063
1069
  abstract clone(): Lson;
1064
1070
  }
1065
1071
 
1066
- type LiveFileData = {
1067
- readonly id: string;
1068
- readonly name: string;
1069
- readonly size: number;
1070
- readonly mimeType: string;
1071
- };
1072
1072
  type LiveFileReference = LiveFile | LiveFileData | string;
1073
1073
  declare function getLiveFileId(file: LiveFileReference): string;
1074
1074
  /**
@@ -1184,6 +1184,7 @@ type BatchStore<O, I> = {
1184
1184
  setData: (entries: [I, O][]) => void;
1185
1185
  getItemState: (input: I) => AsyncResult<O> | undefined;
1186
1186
  getData: (input: I) => O | undefined;
1187
+ waitUntilItemCacheExpires: (input: I) => Promise<void> | undefined;
1187
1188
  invalidate: (inputs?: I[]) => void;
1188
1189
  };
1189
1190
 
@@ -1731,6 +1732,10 @@ type MakeOptionalFieldsNullable<T> = {
1731
1732
  */
1732
1733
  type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
1733
1734
 
1735
+ type FileUrlData = {
1736
+ readonly url: string;
1737
+ readonly expiresAt: number;
1738
+ };
1734
1739
  interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1735
1740
  getThreads(options: {
1736
1741
  roomId: string;
@@ -1906,7 +1911,7 @@ interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
1906
1911
  file: File;
1907
1912
  signal?: AbortSignal;
1908
1913
  }): Promise<LiveFile>;
1909
- getOrCreateFileUrlsStore(roomId: string): BatchStore<string, string>;
1914
+ getOrCreateFileUrlsStore(roomId: string): BatchStore<FileUrlData, string>;
1910
1915
  createTextMention({ roomId, mentionId, mention, }: {
1911
1916
  roomId: string;
1912
1917
  mentionId: string;
@@ -4265,7 +4270,7 @@ type PrivateRoomApi = {
4265
4270
  incomingMessage(data: string): void;
4266
4271
  };
4267
4272
  attachmentUrlsStore: BatchStore<string, string>;
4268
- fileUrlsStore: BatchStore<string, string>;
4273
+ fileUrlsStore: BatchStore<FileUrlData, string>;
4269
4274
  };
4270
4275
  type Stackframe<P extends JsonObject> = Op | PresenceStackframe<P>;
4271
4276
  type PresenceStackframe<P extends JsonObject> = {
@@ -5885,4 +5890,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5885
5890
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5886
5891
  };
5887
5892
 
5888
- 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 CompactFileNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateFileOp, 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 FileStorageNode, 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, LiveFile, type LiveFileData, type LiveFileReference, 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 PlainLsonFile, 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 SerializedFile, 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 UploadFileOptions, 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, createStorageFileId, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getLiveFileId, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isFileStorageNode, 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 };
5893
+ 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 CompactFileNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateFileOp, 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 FileStorageNode, type FileUrlData, 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, LiveFile, type LiveFileData, type LiveFileReference, 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 PlainLsonFile, 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 SerializedFile, 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 UploadFileOptions, 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, createStorageFileId, createThreadId, deepLiveify, defineAiTool, deprecate, deprecateIf, detectDupes, entries, errorIf, findLastIndex, freeze, generateUrl, getLiveFileId, getMentionsFromCommentBody, getSubscriptionKey, hasPermissionAccess, html, htmlSafe, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isFileStorageNode, 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 };