@liveblocks/core 3.16.0-flow3 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -127,7 +127,8 @@ declare enum Permission {
127
127
  Write = "room:write",
128
128
  PresenceWrite = "room:presence:write",
129
129
  CommentsWrite = "comments:write",
130
- CommentsRead = "comments:read"
130
+ CommentsRead = "comments:read",
131
+ FeedsWrite = "feeds:write"
131
132
  }
132
133
 
133
134
  type RenameDataField<T, TFieldName extends string> = T extends any ? {
@@ -595,47 +596,6 @@ type PlainLsonList = {
595
596
  };
596
597
  type PlainLson = PlainLsonObject | PlainLsonMap | PlainLsonList | Json;
597
598
 
598
- declare function lsonToJson(value: Lson): Json;
599
- /**
600
- * Per-key sync configuration for node/edge `data` properties.
601
- *
602
- * true
603
- * Sync this property to Liveblocks Storage. Arrays and objects in the value
604
- * will be stored as LiveLists and LiveObjects, enabling fine-grained
605
- * conflict-free merging. This is the default for all keys.
606
- *
607
- * false
608
- * Don't sync this property. It stays local to the current client. This
609
- * property will be `undefined` on other clients.
610
- *
611
- * "atomic"
612
- * Sync this property, but treat it as an indivisible value. The entire value
613
- * is replaced as a whole (last-writer-wins) instead of being recursively
614
- * converted to LiveObjects/LiveLists. Use this when clients always replace
615
- * the value entirely and never need concurrent sub-key merging.
616
- *
617
- * { ... }
618
- * A nested config object for recursively configuring sub-keys of an object.
619
- *
620
- * @example
621
- * ```ts
622
- * const sync: SyncConfig = {
623
- * label: true, // sync (default)
624
- * createdAt: false, // local-only
625
- * shape: "atomic", // replaced as a whole, no deep merge
626
- * nested: { // recursive config
627
- * deep: false,
628
- * },
629
- * };
630
- * ```
631
- */
632
- type SyncMode = boolean | "atomic" | SyncConfig;
633
- type SyncConfig = {
634
- [key: string]: SyncMode | undefined;
635
- };
636
- declare function legacy_patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
637
- declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
638
-
639
599
  type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
640
600
  declare const CrdtType: Readonly<{
641
601
  OBJECT: 0;
@@ -725,23 +685,6 @@ type CompactRegisterNode = readonly [
725
685
  declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
726
686
  declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
727
687
 
728
- /**
729
- * Extracts only the explicitly-named string keys of a type, filtering out
730
- * any index signature (e.g. `[key: string]: ...`).
731
- */
732
- type KnownKeys<T> = keyof {
733
- [K in keyof T as {} extends Record<K, 1> ? never : K]: true;
734
- } & string;
735
-
736
- /**
737
- * Optional keys of O whose non-undefined type is plain Json (not a
738
- * LiveStructure). These are the only keys eligible for setLocal().
739
- * Uses KnownKeys to only consider explicitly-named keys, not index signatures.
740
- * Checks optionality inline to avoid index signature pollution of OptionalKeys.
741
- */
742
- type OptionalJsonKeys<O> = {
743
- [K in KnownKeys<O>]: undefined extends O[K] ? Exclude<O[K], undefined> extends Json ? K : never : never;
744
- }[KnownKeys<O>];
745
688
  type LiveObjectUpdateDelta<O extends {
746
689
  [key: string]: unknown;
747
690
  }> = {
@@ -776,8 +719,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
776
719
  /** @private Do not use this API directly */
777
720
  static _fromItems<O extends LsonObject>(nodes: NodeStream, pool: ManagedPool): LiveObject<O>;
778
721
  constructor(obj?: O);
779
- /** @private */
780
- keys(): Set<string>;
781
722
  /**
782
723
  * Transform the LiveObject into a javascript object
783
724
  */
@@ -788,17 +729,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
788
729
  * @param value The value of the property to add
789
730
  */
790
731
  set<TKey extends keyof O>(key: TKey, value: O[TKey]): void;
791
- /**
792
- * @experimental
793
- *
794
- * Sets a local-only property that is not synchronized over the wire.
795
- * The value will be visible via get(), toObject(), and toImmutable() on
796
- * this client only. Other clients and the server will see `undefined`
797
- * for this key.
798
- *
799
- * Caveat: this method will not add changes to the undo/redo stack.
800
- */
801
- setLocal<TKey extends OptionalJsonKeys<O>>(key: TKey, value: Extract<Exclude<O[TKey], undefined>, Json>): void;
802
732
  /**
803
733
  * Returns a specified property from the LiveObject.
804
734
  * @param key The key of the property to get
@@ -814,22 +744,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
814
744
  * @param patch The object used to overrides properties
815
745
  */
816
746
  update(patch: Partial<O>): void;
817
- /**
818
- * Creates a new LiveObject from a plain JSON object, recursively converting
819
- * nested objects to LiveObjects and arrays to LiveLists. An optional
820
- * SyncConfig controls per-key behavior (local-only, atomic, or deep).
821
- *
822
- * @private
823
- */
824
- static from(obj: JsonObject, config?: SyncConfig): LiveObject<LsonObject>;
825
- /**
826
- * Reconciles a LiveObject tree to match the given JSON object and sync
827
- * config. Only mutates keys that actually changed. Recursively reconciles
828
- * the entire Live tree below it.
829
- *
830
- * @private
831
- */
832
- reconcile(jsonObj: JsonObject, config?: SyncConfig): void;
833
747
  toImmutable(): ToImmutable<O>;
834
748
  clone(): LiveObject<O>;
835
749
  }
@@ -995,12 +909,6 @@ declare function createManagedPool(roomId: string, options: CreateManagedPoolOpt
995
909
  declare abstract class AbstractCrdt {
996
910
  #private;
997
911
  get roomId(): string | null;
998
- /**
999
- * @private
1000
- * Returns true if the cached immutable snapshot exists and is
1001
- * reference-equal to the given value. Does not trigger a recompute.
1002
- */
1003
- immutableIs(value: unknown): boolean;
1004
912
  /**
1005
913
  * Return an immutable snapshot of this Live node and its children.
1006
914
  */
@@ -1296,7 +1204,7 @@ declare global {
1296
1204
  [key: string]: unknown;
1297
1205
  }
1298
1206
  }
1299
- type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1207
+ type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "FeedMetadata" | "FeedMessageData" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
1300
1208
  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}`;
1301
1209
  type GetOverride<K extends ExtendableTypes, B, Reason extends string = "does not match its requirements"> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
1302
1210
  type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
@@ -1306,6 +1214,8 @@ type DU = GetOverrideOrErrorValue<"UserMeta", BaseUserMeta, Record<"id" | "info"
1306
1214
  type DE = GetOverride<"RoomEvent", Json, "is not a valid JSON value">;
1307
1215
  type DTM = GetOverride<"ThreadMetadata", BaseMetadata>;
1308
1216
  type DCM = GetOverride<"CommentMetadata", BaseMetadata>;
1217
+ type DFM = GetOverride<"FeedMetadata", Json, "is not a valid JSON value">;
1218
+ type DFMD = GetOverride<"FeedMessageData", Json, "is not a valid JSON value">;
1309
1219
  type DRI = GetOverride<"RoomInfo", BaseRoomInfo>;
1310
1220
  type DGI = GetOverride<"GroupInfo", BaseGroupInfo>;
1311
1221
  type DAD = GetOverrideOrErrorValue<"ActivitiesData", BaseActivitiesData, {
@@ -1694,20 +1604,12 @@ declare enum TextEditorType {
1694
1604
  }
1695
1605
  type BadgeLocation = "top-right" | "bottom-right" | "bottom-left" | "top-left";
1696
1606
 
1697
- /**
1698
- * Extracts the optional keys (whose values are allowed to be `undefined`).
1699
- */
1700
- type OptionalKeys<T> = Extract<{
1607
+ type OptionalKeys<T> = {
1701
1608
  [K in keyof T]-?: undefined extends T[K] ? K : never;
1702
- }[keyof T], string>;
1609
+ }[keyof T];
1703
1610
  type MakeOptionalFieldsNullable<T> = {
1704
1611
  [K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
1705
1612
  };
1706
- /**
1707
- * Like Partial<T>, but also allows `null` for optional fields. Useful for
1708
- * representing patches where `null` means "remove this field" and `undefined`
1709
- * means "leave this field unchanged".
1710
- */
1711
1613
  type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
1712
1614
 
1713
1615
  interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
@@ -2071,6 +1973,13 @@ type RoomConnectionErrorContext = {
2071
1973
  type LargeMessageErrorContext = {
2072
1974
  type: "LARGE_MESSAGE_ERROR";
2073
1975
  };
1976
+ type FeedRequestErrorContext = {
1977
+ type: "FEED_REQUEST_ERROR";
1978
+ roomId: string;
1979
+ requestId: string;
1980
+ code: string;
1981
+ reason?: string;
1982
+ };
2074
1983
  type CommentsOrNotificationsErrorContext = {
2075
1984
  type: "CREATE_THREAD_ERROR";
2076
1985
  roomId: string;
@@ -2131,7 +2040,7 @@ type CommentsOrNotificationsErrorContext = {
2131
2040
  } | {
2132
2041
  type: "UPDATE_NOTIFICATION_SETTINGS_ERROR";
2133
2042
  };
2134
- type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext | AiConnectionErrorContext | LargeMessageErrorContext>;
2043
+ type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext | AiConnectionErrorContext | LargeMessageErrorContext | FeedRequestErrorContext>;
2135
2044
  declare class LiveblocksError extends Error {
2136
2045
  readonly context: LiveblocksErrorContext;
2137
2046
  constructor(message: string, context: LiveblocksErrorContext, cause?: Error);
@@ -2214,7 +2123,7 @@ type InternalSyncStatus = SyncStatus | "has-local-changes";
2214
2123
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2215
2124
  * will probably happen if you do.
2216
2125
  */
2217
- type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata> = {
2126
+ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata, FM extends Json = DFM, FMD extends Json = DFMD> = {
2218
2127
  readonly currentUserId: Signal<string | undefined>;
2219
2128
  readonly mentionSuggestionsCache: Map<string, MentionData[]>;
2220
2129
  readonly resolveMentionSuggestions: ClientOptions<U>["resolveMentionSuggestions"];
@@ -2223,7 +2132,7 @@ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extend
2223
2132
  readonly groupsInfoStore: BatchStore<DGI | undefined, string>;
2224
2133
  readonly getRoomIds: () => string[];
2225
2134
  readonly httpClient: LiveblocksHttpApi<TM, CM>;
2226
- as<TM2 extends BaseMetadata, CM2 extends BaseMetadata>(): Client<U, TM2, CM2>;
2135
+ as<TM2 extends BaseMetadata, CM2 extends BaseMetadata, FM2 extends Json = FM, FMD2 extends Json = FMD>(): Client<U, TM2, CM2, FM2, FMD2>;
2227
2136
  createSyncSource(): SyncSource;
2228
2137
  emitError(context: LiveblocksErrorContext, cause?: Error): void;
2229
2138
  ai: Ai;
@@ -2376,23 +2285,23 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
2376
2285
  * narrower.
2377
2286
  */
2378
2287
  type OpaqueClient = Client<BaseUserMeta>;
2379
- type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
2288
+ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM, FM extends Json = DFM, FMD extends Json = DFMD> = {
2380
2289
  /**
2381
2290
  * Gets a room. Returns null if {@link Client.enter} has not been called previously.
2382
2291
  *
2383
2292
  * @param roomId The id of the room
2384
2293
  */
2385
- 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;
2294
+ getRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM, FM2 extends Json = FM, FMD2 extends Json = FMD>(roomId: string): Room<P, S, U, E, TM2, CM2, FM2, FMD2> | null;
2386
2295
  /**
2387
2296
  * Enter a room.
2388
2297
  * @param roomId The id of the room
2389
2298
  * @param options Optional. You can provide initializers for the Presence or Storage when entering the Room.
2390
2299
  * @returns The room and a leave function. Call the returned leave() function when you no longer need the room.
2391
2300
  */
2392
- 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, [
2301
+ enterRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM, FM2 extends Json = FM, FMD2 extends Json = FMD>(roomId: string, ...args: OptionalTupleUnless<P & S, [
2393
2302
  options: EnterOptions<NoInfr<P>, NoInfr<S>>
2394
2303
  ]>): {
2395
- room: Room<P, S, U, E, TM2, CM2>;
2304
+ room: Room<P, S, U, E, TM2, CM2, FM2, FMD2>;
2396
2305
  leave: () => void;
2397
2306
  };
2398
2307
  /**
@@ -2458,7 +2367,7 @@ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM exten
2458
2367
  * of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
2459
2368
  * will probably happen if you do.
2460
2369
  */
2461
- readonly [kInternal]: PrivateClientApi<U, TM, CM>;
2370
+ readonly [kInternal]: PrivateClientApi<U, TM, CM, FM, FMD>;
2462
2371
  /**
2463
2372
  * Returns the current global sync status of the Liveblocks client. If any
2464
2373
  * part of Liveblocks has any local pending changes that haven't been
@@ -2683,6 +2592,14 @@ declare const ClientMsgCode: Readonly<{
2683
2592
  UPDATE_STORAGE: 201;
2684
2593
  FETCH_YDOC: 300;
2685
2594
  UPDATE_YDOC: 301;
2595
+ FETCH_FEEDS: 510;
2596
+ FETCH_FEED_MESSAGES: 511;
2597
+ ADD_FEED: 512;
2598
+ UPDATE_FEED: 513;
2599
+ DELETE_FEED: 514;
2600
+ ADD_FEED_MESSAGE: 515;
2601
+ UPDATE_FEED_MESSAGE: 516;
2602
+ DELETE_FEED_MESSAGE: 517;
2686
2603
  }>;
2687
2604
  declare namespace ClientMsgCode {
2688
2605
  type UPDATE_PRESENCE = typeof ClientMsgCode.UPDATE_PRESENCE;
@@ -2691,11 +2608,19 @@ declare namespace ClientMsgCode {
2691
2608
  type UPDATE_STORAGE = typeof ClientMsgCode.UPDATE_STORAGE;
2692
2609
  type FETCH_YDOC = typeof ClientMsgCode.FETCH_YDOC;
2693
2610
  type UPDATE_YDOC = typeof ClientMsgCode.UPDATE_YDOC;
2611
+ type FETCH_FEEDS = typeof ClientMsgCode.FETCH_FEEDS;
2612
+ type FETCH_FEED_MESSAGES = typeof ClientMsgCode.FETCH_FEED_MESSAGES;
2613
+ type ADD_FEED = typeof ClientMsgCode.ADD_FEED;
2614
+ type UPDATE_FEED = typeof ClientMsgCode.UPDATE_FEED;
2615
+ type DELETE_FEED = typeof ClientMsgCode.DELETE_FEED;
2616
+ type ADD_FEED_MESSAGE = typeof ClientMsgCode.ADD_FEED_MESSAGE;
2617
+ type UPDATE_FEED_MESSAGE = typeof ClientMsgCode.UPDATE_FEED_MESSAGE;
2618
+ type DELETE_FEED_MESSAGE = typeof ClientMsgCode.DELETE_FEED_MESSAGE;
2694
2619
  }
2695
2620
  /**
2696
2621
  * Messages that can be sent from the client to the server.
2697
2622
  */
2698
- type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg;
2623
+ type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg | FetchFeedsClientMsg | FetchFeedMessagesClientMsg | AddFeedClientMsg | UpdateFeedClientMsg | DeleteFeedClientMsg | AddFeedMessageClientMsg | UpdateFeedMessageClientMsg | DeleteFeedMessageClientMsg;
2699
2624
  type BroadcastEventClientMsg<E extends Json> = {
2700
2625
  type: ClientMsgCode.BROADCAST_EVENT;
2701
2626
  event: E;
@@ -2745,6 +2670,81 @@ type UpdateYDocClientMsg = {
2745
2670
  readonly guid?: string;
2746
2671
  readonly v2?: boolean;
2747
2672
  };
2673
+ /** Metadata filter for {@link FetchFeedsClientMsg}. Values are matched as strings. */
2674
+ type FeedFetchMetadataFilter = Record<string, string>;
2675
+ /** Metadata for {@link AddFeedClientMsg}. */
2676
+ type FeedCreateMetadata = Record<string, string | string[]>;
2677
+ /** Metadata for {@link UpdateFeedClientMsg}. Use `null` to remove a key. */
2678
+ type FeedUpdateMetadata = Record<string, string | string[] | null>;
2679
+ type FetchFeedsClientMsg = {
2680
+ readonly type: ClientMsgCode.FETCH_FEEDS;
2681
+ readonly requestId: string;
2682
+ readonly cursor?: string;
2683
+ readonly since?: number;
2684
+ readonly limit?: number;
2685
+ readonly metadata?: FeedFetchMetadataFilter;
2686
+ };
2687
+ type FetchFeedMessagesClientMsg = {
2688
+ readonly type: ClientMsgCode.FETCH_FEED_MESSAGES;
2689
+ readonly requestId: string;
2690
+ readonly feedId: string;
2691
+ readonly cursor?: string;
2692
+ readonly since?: number;
2693
+ readonly limit?: number;
2694
+ };
2695
+ type AddFeedClientMsg = {
2696
+ readonly type: ClientMsgCode.ADD_FEED;
2697
+ readonly requestId: string;
2698
+ readonly feedId: string;
2699
+ readonly metadata?: FeedCreateMetadata;
2700
+ readonly createdAt?: number;
2701
+ };
2702
+ type UpdateFeedClientMsg = {
2703
+ readonly type: ClientMsgCode.UPDATE_FEED;
2704
+ readonly requestId: string;
2705
+ readonly feedId: string;
2706
+ readonly metadata: FeedUpdateMetadata;
2707
+ };
2708
+ type DeleteFeedClientMsg = {
2709
+ readonly type: ClientMsgCode.DELETE_FEED;
2710
+ readonly requestId: string;
2711
+ readonly feedId: string;
2712
+ };
2713
+ type AddFeedMessageClientMsg = {
2714
+ readonly type: ClientMsgCode.ADD_FEED_MESSAGE;
2715
+ readonly requestId: string;
2716
+ readonly feedId: string;
2717
+ readonly data: JsonObject;
2718
+ readonly id?: string;
2719
+ readonly createdAt?: number;
2720
+ };
2721
+ type UpdateFeedMessageClientMsg = {
2722
+ readonly type: ClientMsgCode.UPDATE_FEED_MESSAGE;
2723
+ readonly requestId: string;
2724
+ readonly feedId: string;
2725
+ readonly messageId: string;
2726
+ readonly data: JsonObject;
2727
+ readonly updatedAt?: number;
2728
+ };
2729
+ type DeleteFeedMessageClientMsg = {
2730
+ readonly type: ClientMsgCode.DELETE_FEED_MESSAGE;
2731
+ readonly requestId: string;
2732
+ readonly feedId: string;
2733
+ readonly messageId: string;
2734
+ };
2735
+
2736
+ type Feed<FM extends Json = Json> = {
2737
+ feedId: string;
2738
+ metadata: FM;
2739
+ createdAt: number;
2740
+ updatedAt: number;
2741
+ };
2742
+ type FeedMessage<FMD extends Json = Json> = {
2743
+ id: string;
2744
+ createdAt: number;
2745
+ updatedAt: number;
2746
+ data: FMD;
2747
+ };
2748
2748
 
2749
2749
  type ServerMsgCode = (typeof ServerMsgCode)[keyof typeof ServerMsgCode];
2750
2750
  declare const ServerMsgCode: Readonly<{
@@ -2768,6 +2768,15 @@ declare const ServerMsgCode: Readonly<{
2768
2768
  COMMENT_REACTION_ADDED: 405;
2769
2769
  COMMENT_REACTION_REMOVED: 406;
2770
2770
  COMMENT_METADATA_UPDATED: 409;
2771
+ FEEDS_LIST: 500;
2772
+ FEEDS_ADDED: 501;
2773
+ FEEDS_UPDATED: 502;
2774
+ FEED_DELETED: 503;
2775
+ FEED_MESSAGES_LIST: 504;
2776
+ FEED_MESSAGES_ADDED: 505;
2777
+ FEED_MESSAGES_UPDATED: 506;
2778
+ FEED_MESSAGES_DELETED: 507;
2779
+ FEED_REQUEST_FAILED: 508;
2771
2780
  REJECT_STORAGE_OP: 299;
2772
2781
  }>;
2773
2782
  declare namespace ServerMsgCode {
@@ -2790,13 +2799,22 @@ declare namespace ServerMsgCode {
2790
2799
  type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
2791
2800
  type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
2792
2801
  type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
2802
+ type FEEDS_LIST = typeof ServerMsgCode.FEEDS_LIST;
2803
+ type FEEDS_ADDED = typeof ServerMsgCode.FEEDS_ADDED;
2804
+ type FEEDS_UPDATED = typeof ServerMsgCode.FEEDS_UPDATED;
2805
+ type FEED_DELETED = typeof ServerMsgCode.FEED_DELETED;
2806
+ type FEED_MESSAGES_LIST = typeof ServerMsgCode.FEED_MESSAGES_LIST;
2807
+ type FEED_MESSAGES_ADDED = typeof ServerMsgCode.FEED_MESSAGES_ADDED;
2808
+ type FEED_MESSAGES_UPDATED = typeof ServerMsgCode.FEED_MESSAGES_UPDATED;
2809
+ type FEED_MESSAGES_DELETED = typeof ServerMsgCode.FEED_MESSAGES_DELETED;
2810
+ type FEED_REQUEST_FAILED = typeof ServerMsgCode.FEED_REQUEST_FAILED;
2793
2811
  type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
2794
2812
  type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
2795
2813
  }
2796
2814
  /**
2797
2815
  * Messages that can be sent from the server to the client.
2798
2816
  */
2799
- type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | StorageEndServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg;
2817
+ type ServerMsg<P extends JsonObject, U extends BaseUserMeta, E extends Json> = UpdatePresenceServerMsg<P> | UserJoinServerMsg<U> | UserLeftServerMsg | BroadcastedEventServerMsg<E> | RoomStateServerMsg<U> | StorageStateServerMsg_V7 | StorageChunkServerMsg | StorageEndServerMsg | UpdateStorageServerMsg | YDocUpdateServerMsg | RejectedStorageOpServerMsg | CommentsEventServerMsg | FeedsEventServerMsg;
2800
2818
  type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
2801
2819
  type ThreadCreatedEvent = {
2802
2820
  type: ServerMsgCode.THREAD_CREATED;
@@ -3027,6 +3045,66 @@ type RejectedStorageOpServerMsg = {
3027
3045
  readonly opIds: string[];
3028
3046
  readonly reason: string;
3029
3047
  };
3048
+ type FeedsEventServerMsg<FM extends Json = Json, FMD extends Json = Json> = FeedsListServerMsg<FM> | FeedsAddedServerMsg<FM> | FeedsUpdatedServerMsg<FM> | FeedDeletedServerMsg | FeedMessagesListServerMsg<FMD> | FeedMessagesAddedServerMsg<FMD> | FeedMessagesUpdatedServerMsg<FMD> | FeedMessagesDeletedServerMsg | FeedRequestFailedServerMsg;
3049
+ /** Error codes for {@link FeedRequestFailedServerMsg}. */
3050
+ declare const FeedRequestErrorCode: {
3051
+ readonly INTERNAL: "INTERNAL";
3052
+ readonly FEED_ALREADY_EXISTS: "FEED_ALREADY_EXISTS";
3053
+ readonly FEED_NOT_FOUND: "FEED_NOT_FOUND";
3054
+ readonly FEED_MESSAGE_NOT_FOUND: "FEED_MESSAGE_NOT_FOUND";
3055
+ };
3056
+ /** String literals accepted in {@link FeedRequestFailedServerMsg}.code */
3057
+ type FeedRequestError = (typeof FeedRequestErrorCode)[keyof typeof FeedRequestErrorCode];
3058
+ /**
3059
+ * Sent to the client when a feed mutation referenced by `requestId` failed
3060
+ * (e.g. validation or permission error).
3061
+ */
3062
+ type FeedRequestFailedServerMsg = {
3063
+ readonly type: ServerMsgCode.FEED_REQUEST_FAILED;
3064
+ readonly requestId: string;
3065
+ readonly code: string;
3066
+ readonly reason?: string;
3067
+ };
3068
+ type FeedsListServerMsg<FM extends Json = Json> = {
3069
+ readonly type: ServerMsgCode.FEEDS_LIST;
3070
+ readonly requestId: string;
3071
+ readonly feeds: Feed<FM>[];
3072
+ readonly nextCursor?: string;
3073
+ };
3074
+ type FeedsAddedServerMsg<FM extends Json = Json> = {
3075
+ readonly type: ServerMsgCode.FEEDS_ADDED;
3076
+ readonly feeds: Feed<FM>[];
3077
+ };
3078
+ type FeedsUpdatedServerMsg<FM extends Json = Json> = {
3079
+ readonly type: ServerMsgCode.FEEDS_UPDATED;
3080
+ readonly feeds: Feed<FM>[];
3081
+ };
3082
+ type FeedDeletedServerMsg = {
3083
+ readonly type: ServerMsgCode.FEED_DELETED;
3084
+ readonly feedId: string;
3085
+ };
3086
+ type FeedMessagesListServerMsg<FMD extends Json = Json> = {
3087
+ readonly type: ServerMsgCode.FEED_MESSAGES_LIST;
3088
+ readonly requestId: string;
3089
+ readonly feedId: string;
3090
+ readonly messages: FeedMessage<FMD>[];
3091
+ readonly nextCursor?: string;
3092
+ };
3093
+ type FeedMessagesAddedServerMsg<FMD extends Json = Json> = {
3094
+ readonly type: ServerMsgCode.FEED_MESSAGES_ADDED;
3095
+ readonly feedId: string;
3096
+ readonly messages: FeedMessage<FMD>[];
3097
+ };
3098
+ type FeedMessagesUpdatedServerMsg<FMD extends Json = Json> = {
3099
+ readonly type: ServerMsgCode.FEED_MESSAGES_UPDATED;
3100
+ readonly feedId: string;
3101
+ readonly messages: FeedMessage<FMD>[];
3102
+ };
3103
+ type FeedMessagesDeletedServerMsg = {
3104
+ readonly type: ServerMsgCode.FEED_MESSAGES_DELETED;
3105
+ readonly feedId: string;
3106
+ readonly messageIds: readonly string[];
3107
+ };
3030
3108
 
3031
3109
  type HistoryVersion = {
3032
3110
  type: "historyVersion";
@@ -3188,9 +3266,6 @@ interface History {
3188
3266
  * // room.getPresence() equals { cursor: { x: 0, y: 0 } }
3189
3267
  */
3190
3268
  resume: () => void;
3191
- readonly [kInternal]: {
3192
- withoutHistory: <T>(fn: () => T) => T;
3193
- };
3194
3269
  }
3195
3270
  type HistoryEvent = {
3196
3271
  canUndo: boolean;
@@ -3364,8 +3439,8 @@ type GetSubscriptionSettingsOptions = {
3364
3439
  * this type is different from `Room`-without-type-arguments. That represents
3365
3440
  * a Room instance using globally augmented types only, which is narrower.
3366
3441
  */
3367
- type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata>;
3368
- 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> = {
3442
+ type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata, BaseMetadata, Json, Json>;
3443
+ 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, FM extends Json = DFM, FMD extends Json = DFMD> = {
3369
3444
  /**
3370
3445
  * @private
3371
3446
  *
@@ -3438,6 +3513,63 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3438
3513
  * Sends a request for the current document from liveblocks server
3439
3514
  */
3440
3515
  fetchYDoc(stateVector: string, guid?: string, isV2?: boolean): void;
3516
+ /**
3517
+ * Fetches feeds for the room.
3518
+ */
3519
+ fetchFeeds(options?: {
3520
+ cursor?: string;
3521
+ since?: number;
3522
+ limit?: number;
3523
+ metadata?: FeedFetchMetadataFilter;
3524
+ }): Promise<{
3525
+ feeds: Feed<FM>[];
3526
+ nextCursor?: string;
3527
+ }>;
3528
+ /**
3529
+ * Fetches messages for a specific feed.
3530
+ */
3531
+ fetchFeedMessages(feedId: string, options?: {
3532
+ cursor?: string;
3533
+ since?: number;
3534
+ limit?: number;
3535
+ }): Promise<{
3536
+ messages: FeedMessage<FMD>[];
3537
+ nextCursor?: string;
3538
+ }>;
3539
+ /**
3540
+ * Adds a new feed to the room via WebSocket.
3541
+ * Resolves when the server broadcasts the new feed, or rejects on
3542
+ * FEED_REQUEST_FAILED (508) or timeout.
3543
+ */
3544
+ addFeed(feedId: string, options?: {
3545
+ metadata?: FeedCreateMetadata;
3546
+ createdAt?: number;
3547
+ }): Promise<void>;
3548
+ /**
3549
+ * Updates metadata for an existing feed via WebSocket.
3550
+ */
3551
+ updateFeed(feedId: string, metadata: FeedUpdateMetadata): Promise<void>;
3552
+ /**
3553
+ * Deletes a feed via WebSocket.
3554
+ */
3555
+ deleteFeed(feedId: string): Promise<void>;
3556
+ /**
3557
+ * Adds a new message to a feed via WebSocket.
3558
+ */
3559
+ addFeedMessage(feedId: string, data: JsonObject, options?: {
3560
+ id?: string;
3561
+ createdAt?: number;
3562
+ }): Promise<void>;
3563
+ /**
3564
+ * Updates an existing feed message via WebSocket.
3565
+ */
3566
+ updateFeedMessage(feedId: string, messageId: string, data: JsonObject, options?: {
3567
+ updatedAt?: number;
3568
+ }): Promise<void>;
3569
+ /**
3570
+ * Deletes a feed message via WebSocket.
3571
+ */
3572
+ deleteFeedMessage(feedId: string, messageId: string): Promise<void>;
3441
3573
  /**
3442
3574
  * Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
3443
3575
  * @param {any} event the event to broadcast. Should be serializable to JSON
@@ -3496,6 +3628,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
3496
3628
  readonly storageStatus: Observable<StorageStatus>;
3497
3629
  readonly ydoc: Observable<YDocUpdateServerMsg | UpdateYDocClientMsg>;
3498
3630
  readonly comments: Observable<CommentsEventServerMsg>;
3631
+ readonly feeds: Observable<FeedsEventServerMsg<FM, FMD>>;
3499
3632
  /**
3500
3633
  * Called right before the room is destroyed. The event cannot be used to
3501
3634
  * prevent the room from being destroyed, only to be informed that this is
@@ -4731,6 +4864,10 @@ ChildStorageNode[]>;
4731
4864
  declare function isLiveNode(value: unknown): value is LiveNode;
4732
4865
  declare function cloneLson<L extends Lson | undefined>(value: L): L;
4733
4866
 
4867
+ declare function lsonToJson(value: Lson): Json;
4868
+ declare function patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
4869
+ declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
4870
+
4734
4871
  /**
4735
4872
  * Like `new AbortController()`, but where the result can be unpacked
4736
4873
  * safely, i.e. `const { signal, abort } = makeAbortController()`.
@@ -5420,4 +5557,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
5420
5557
  [K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
5421
5558
  };
5422
5559
 
5423
- export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type 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 HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, 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 RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type SyncConfig, type SyncMode, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type 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, compactNodesToNodeStream, 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, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, legacy_patchLiveObjectKey, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };
5560
+ export { type ActivityData, type AiAssistantContentPart, type AiAssistantMessage, type AiChat, type AiChatMessage, type AiChatsQuery, type AiKnowledgeRetrievalPart, type AiKnowledgeSource, type AiOpaqueToolDefinition, type AiOpaqueToolInvocationProps, type AiReasoningPart, type AiRetrievalPart, type AiSourcesPart, type AiTextPart, type AiToolDefinition, type AiToolExecuteCallback, type AiToolExecuteContext, type AiToolInvocationPart, type AiToolInvocationProps, type AiToolTypePack, type AiUrlSource, type AiUserMessage, type AiWebRetrievalPart, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type Awaitable, type BaseActivitiesData, type BaseAuthResult, type BaseGroupInfo, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type ChildStorageNode, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, type ClientWireOp, type CommentAttachment, type CommentBody, type CommentBodyBlockElement, type CommentBodyElement, type CommentBodyInlineElement, type CommentBodyLink, type CommentBodyLinkElementArgs, type CommentBodyMention, type CommentBodyMentionElementArgs, type CommentBodyParagraph, type CommentBodyParagraphElementArgs, type CommentBodyText, type CommentBodyTextElementArgs, type CommentData, type CommentDataPlain, type CommentLocalAttachment, type CommentMixedAttachment, type CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, type CommentsEventServerMsg, type CompactChildNode, type CompactListNode, type CompactMapNode, type CompactNode, type CompactObjectNode, type CompactRegisterNode, type CompactRootNode, type ContextualPromptContext, type ContextualPromptResponse, type CopilotId, CrdtType, type CreateListOp, type CreateManagedPoolOptions, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type Cursor, type CustomAuthenticationResult, type DAD, type DCM, type DE, type DFM, type DFMD, type DGI, type DP, type DRI, type DS, type DTM, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, Deque, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type Feed, type FeedCreateMetadata, type FeedDeletedServerMsg, type FeedFetchMetadataFilter, type FeedMessage, type FeedMessagesAddedServerMsg, type FeedMessagesDeletedServerMsg, type FeedMessagesListServerMsg, type FeedMessagesUpdatedServerMsg, type FeedRequestError, FeedRequestErrorCode, type FeedRequestFailedServerMsg, type FeedUpdateMetadata, type FeedsAddedServerMsg, type FeedsEventServerMsg, type FeedsListServerMsg, type FeedsUpdatedServerMsg, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type GroupData, type GroupDataPlain, type GroupMemberData, type GroupMentionData, type GroupScopes, type HasOpId, type History, type HistoryVersion, HttpError, type ISODateString, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IgnoredOp, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InferFromSchema, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, type LayerKey, type ListStorageNode, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MENTION_CHARACTER, type ManagedPool, type MapStorageNode, type MentionData, type MessageId, MutableSignal, type NoInfr, type NodeMap, type NodeStream, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, type NotificationSettings, type NotificationSettingsPlain, type ObjectStorageNode, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialNotificationSettings, type PartialUnless, type Patchable, Permission, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type Poller, type PrivateClientApi, type PrivateRoomApi, Promise_withResolvers, type QueryMetadata, type QueryParams, type RegisterStorageNode, 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 RootStorageNode, type SearchCommentsResult, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type ServerWireOp, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageChunkServerMsg, type StorageNode, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SubscriptionData, type SubscriptionDataPlain, type SubscriptionDeleteInfo, type SubscriptionDeleteInfoPlain, type SubscriptionKey, type 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, compactNodesToNodeStream, 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, isListStorageNode, isLiveNode, isMapStorageNode, isNotificationChannelEnabled, isNumberOperator, isObjectStorageNode, isPlainObject, isRegisterStorageNode, isRootStorageNode, isStartsWithOperator, isUrl, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeAbortController, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, nodeStreamToCompactNodes, objectToQuery, patchLiveObjectKey, patchNotificationSettings, raise, resolveMentionsInCommentBody, sanitizeUrl, shallow, shallow2, stableStringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, url, urljoin, wait, warnOnce, warnOnceIf, withTimeout };