@liveblocks/core 3.16.0-flow2 → 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.cjs +1072 -880
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +258 -116
- package/dist/index.d.ts +258 -116
- package/dist/index.js +985 -793
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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,52 +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
|
-
/**
|
|
637
|
-
* Recursively converts all nested plain objects to LiveObjects and all nested
|
|
638
|
-
* arrays to LiveLists. Expects a plain object at the top level.
|
|
639
|
-
*/
|
|
640
|
-
declare function deepLiveifyObject(obj: JsonObject, config?: SyncConfig): LiveObject<LsonObject>;
|
|
641
|
-
declare function legacy_patchLiveObjectKey<O extends LsonObject, K extends keyof O, V extends Json>(liveObject: LiveObject<O>, key: K, prev?: V, next?: V): void;
|
|
642
|
-
declare function legacy_patchImmutableObject<TState extends JsonObject>(state: TState, updates: StorageUpdate[]): TState;
|
|
643
|
-
|
|
644
599
|
type CrdtType = (typeof CrdtType)[keyof typeof CrdtType];
|
|
645
600
|
declare const CrdtType: Readonly<{
|
|
646
601
|
OBJECT: 0;
|
|
@@ -730,23 +685,6 @@ type CompactRegisterNode = readonly [
|
|
|
730
685
|
declare function compactNodesToNodeStream(compactNodes: CompactNode[]): NodeStream;
|
|
731
686
|
declare function nodeStreamToCompactNodes(nodes: NodeStream): Iterable<CompactNode>;
|
|
732
687
|
|
|
733
|
-
/**
|
|
734
|
-
* Extracts only the explicitly-named string keys of a type, filtering out
|
|
735
|
-
* any index signature (e.g. `[key: string]: ...`).
|
|
736
|
-
*/
|
|
737
|
-
type KnownKeys<T> = keyof {
|
|
738
|
-
[K in keyof T as {} extends Record<K, 1> ? never : K]: true;
|
|
739
|
-
} & string;
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* Optional keys of O whose non-undefined type is plain Json (not a
|
|
743
|
-
* LiveStructure). These are the only keys eligible for setLocal().
|
|
744
|
-
* Uses KnownKeys to only consider explicitly-named keys, not index signatures.
|
|
745
|
-
* Checks optionality inline to avoid index signature pollution of OptionalKeys.
|
|
746
|
-
*/
|
|
747
|
-
type OptionalJsonKeys<O> = {
|
|
748
|
-
[K in KnownKeys<O>]: undefined extends O[K] ? Exclude<O[K], undefined> extends Json ? K : never : never;
|
|
749
|
-
}[KnownKeys<O>];
|
|
750
688
|
type LiveObjectUpdateDelta<O extends {
|
|
751
689
|
[key: string]: unknown;
|
|
752
690
|
}> = {
|
|
@@ -781,8 +719,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
781
719
|
/** @private Do not use this API directly */
|
|
782
720
|
static _fromItems<O extends LsonObject>(nodes: NodeStream, pool: ManagedPool): LiveObject<O>;
|
|
783
721
|
constructor(obj?: O);
|
|
784
|
-
/** @private */
|
|
785
|
-
keys(): Set<string>;
|
|
786
722
|
/**
|
|
787
723
|
* Transform the LiveObject into a javascript object
|
|
788
724
|
*/
|
|
@@ -793,17 +729,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
793
729
|
* @param value The value of the property to add
|
|
794
730
|
*/
|
|
795
731
|
set<TKey extends keyof O>(key: TKey, value: O[TKey]): void;
|
|
796
|
-
/**
|
|
797
|
-
* @experimental
|
|
798
|
-
*
|
|
799
|
-
* Sets a local-only property that is not synchronized over the wire.
|
|
800
|
-
* The value will be visible via get(), toObject(), and toImmutable() on
|
|
801
|
-
* this client only. Other clients and the server will see `undefined`
|
|
802
|
-
* for this key.
|
|
803
|
-
*
|
|
804
|
-
* Caveat: this method will not add changes to the undo/redo stack.
|
|
805
|
-
*/
|
|
806
|
-
setLocal<TKey extends OptionalJsonKeys<O>>(key: TKey, value: Extract<Exclude<O[TKey], undefined>, Json>): void;
|
|
807
732
|
/**
|
|
808
733
|
* Returns a specified property from the LiveObject.
|
|
809
734
|
* @param key The key of the property to get
|
|
@@ -819,12 +744,6 @@ declare class LiveObject<O extends LsonObject> extends AbstractCrdt {
|
|
|
819
744
|
* @param patch The object used to overrides properties
|
|
820
745
|
*/
|
|
821
746
|
update(patch: Partial<O>): void;
|
|
822
|
-
/**
|
|
823
|
-
* Reconciles a LiveObject tree to match the given JSON object and sync
|
|
824
|
-
* config. Only mutates keys that actually changed. Recursively reconciles
|
|
825
|
-
* the entire Live tree below it.
|
|
826
|
-
*/
|
|
827
|
-
reconcile(jsonObj: JsonObject, config?: SyncConfig): void;
|
|
828
747
|
toImmutable(): ToImmutable<O>;
|
|
829
748
|
clone(): LiveObject<O>;
|
|
830
749
|
}
|
|
@@ -990,12 +909,6 @@ declare function createManagedPool(roomId: string, options: CreateManagedPoolOpt
|
|
|
990
909
|
declare abstract class AbstractCrdt {
|
|
991
910
|
#private;
|
|
992
911
|
get roomId(): string | null;
|
|
993
|
-
/**
|
|
994
|
-
* @private
|
|
995
|
-
* Returns true if the cached immutable snapshot exists and is
|
|
996
|
-
* reference-equal to the given value. Does not trigger a recompute.
|
|
997
|
-
*/
|
|
998
|
-
immutableIs(value: unknown): boolean;
|
|
999
912
|
/**
|
|
1000
913
|
* Return an immutable snapshot of this Live node and its children.
|
|
1001
914
|
*/
|
|
@@ -1291,7 +1204,7 @@ declare global {
|
|
|
1291
1204
|
[key: string]: unknown;
|
|
1292
1205
|
}
|
|
1293
1206
|
}
|
|
1294
|
-
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";
|
|
1295
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}`;
|
|
1296
1209
|
type GetOverride<K extends ExtendableTypes, B, Reason extends string = "does not match its requirements"> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
|
|
1297
1210
|
type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
|
|
@@ -1301,6 +1214,8 @@ type DU = GetOverrideOrErrorValue<"UserMeta", BaseUserMeta, Record<"id" | "info"
|
|
|
1301
1214
|
type DE = GetOverride<"RoomEvent", Json, "is not a valid JSON value">;
|
|
1302
1215
|
type DTM = GetOverride<"ThreadMetadata", BaseMetadata>;
|
|
1303
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">;
|
|
1304
1219
|
type DRI = GetOverride<"RoomInfo", BaseRoomInfo>;
|
|
1305
1220
|
type DGI = GetOverride<"GroupInfo", BaseGroupInfo>;
|
|
1306
1221
|
type DAD = GetOverrideOrErrorValue<"ActivitiesData", BaseActivitiesData, {
|
|
@@ -1689,20 +1604,12 @@ declare enum TextEditorType {
|
|
|
1689
1604
|
}
|
|
1690
1605
|
type BadgeLocation = "top-right" | "bottom-right" | "bottom-left" | "top-left";
|
|
1691
1606
|
|
|
1692
|
-
|
|
1693
|
-
* Extracts the optional keys (whose values are allowed to be `undefined`).
|
|
1694
|
-
*/
|
|
1695
|
-
type OptionalKeys<T> = Extract<{
|
|
1607
|
+
type OptionalKeys<T> = {
|
|
1696
1608
|
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1697
|
-
}[keyof T]
|
|
1609
|
+
}[keyof T];
|
|
1698
1610
|
type MakeOptionalFieldsNullable<T> = {
|
|
1699
1611
|
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1700
1612
|
};
|
|
1701
|
-
/**
|
|
1702
|
-
* Like Partial<T>, but also allows `null` for optional fields. Useful for
|
|
1703
|
-
* representing patches where `null` means "remove this field" and `undefined`
|
|
1704
|
-
* means "leave this field unchanged".
|
|
1705
|
-
*/
|
|
1706
1613
|
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1707
1614
|
|
|
1708
1615
|
interface RoomHttpApi<TM extends BaseMetadata, CM extends BaseMetadata> {
|
|
@@ -2066,6 +1973,13 @@ type RoomConnectionErrorContext = {
|
|
|
2066
1973
|
type LargeMessageErrorContext = {
|
|
2067
1974
|
type: "LARGE_MESSAGE_ERROR";
|
|
2068
1975
|
};
|
|
1976
|
+
type FeedRequestErrorContext = {
|
|
1977
|
+
type: "FEED_REQUEST_ERROR";
|
|
1978
|
+
roomId: string;
|
|
1979
|
+
requestId: string;
|
|
1980
|
+
code: string;
|
|
1981
|
+
reason?: string;
|
|
1982
|
+
};
|
|
2069
1983
|
type CommentsOrNotificationsErrorContext = {
|
|
2070
1984
|
type: "CREATE_THREAD_ERROR";
|
|
2071
1985
|
roomId: string;
|
|
@@ -2126,7 +2040,7 @@ type CommentsOrNotificationsErrorContext = {
|
|
|
2126
2040
|
} | {
|
|
2127
2041
|
type: "UPDATE_NOTIFICATION_SETTINGS_ERROR";
|
|
2128
2042
|
};
|
|
2129
|
-
type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext | AiConnectionErrorContext | LargeMessageErrorContext>;
|
|
2043
|
+
type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext | AiConnectionErrorContext | LargeMessageErrorContext | FeedRequestErrorContext>;
|
|
2130
2044
|
declare class LiveblocksError extends Error {
|
|
2131
2045
|
readonly context: LiveblocksErrorContext;
|
|
2132
2046
|
constructor(message: string, context: LiveblocksErrorContext, cause?: Error);
|
|
@@ -2209,7 +2123,7 @@ type InternalSyncStatus = SyncStatus | "has-local-changes";
|
|
|
2209
2123
|
* of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
|
|
2210
2124
|
* will probably happen if you do.
|
|
2211
2125
|
*/
|
|
2212
|
-
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> = {
|
|
2213
2127
|
readonly currentUserId: Signal<string | undefined>;
|
|
2214
2128
|
readonly mentionSuggestionsCache: Map<string, MentionData[]>;
|
|
2215
2129
|
readonly resolveMentionSuggestions: ClientOptions<U>["resolveMentionSuggestions"];
|
|
@@ -2218,7 +2132,7 @@ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extend
|
|
|
2218
2132
|
readonly groupsInfoStore: BatchStore<DGI | undefined, string>;
|
|
2219
2133
|
readonly getRoomIds: () => string[];
|
|
2220
2134
|
readonly httpClient: LiveblocksHttpApi<TM, CM>;
|
|
2221
|
-
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>;
|
|
2222
2136
|
createSyncSource(): SyncSource;
|
|
2223
2137
|
emitError(context: LiveblocksErrorContext, cause?: Error): void;
|
|
2224
2138
|
ai: Ai;
|
|
@@ -2371,23 +2285,23 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
|
|
|
2371
2285
|
* narrower.
|
|
2372
2286
|
*/
|
|
2373
2287
|
type OpaqueClient = Client<BaseUserMeta>;
|
|
2374
|
-
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> = {
|
|
2375
2289
|
/**
|
|
2376
2290
|
* Gets a room. Returns null if {@link Client.enter} has not been called previously.
|
|
2377
2291
|
*
|
|
2378
2292
|
* @param roomId The id of the room
|
|
2379
2293
|
*/
|
|
2380
|
-
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;
|
|
2381
2295
|
/**
|
|
2382
2296
|
* Enter a room.
|
|
2383
2297
|
* @param roomId The id of the room
|
|
2384
2298
|
* @param options Optional. You can provide initializers for the Presence or Storage when entering the Room.
|
|
2385
2299
|
* @returns The room and a leave function. Call the returned leave() function when you no longer need the room.
|
|
2386
2300
|
*/
|
|
2387
|
-
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, [
|
|
2388
2302
|
options: EnterOptions<NoInfr<P>, NoInfr<S>>
|
|
2389
2303
|
]>): {
|
|
2390
|
-
room: Room<P, S, U, E, TM2, CM2>;
|
|
2304
|
+
room: Room<P, S, U, E, TM2, CM2, FM2, FMD2>;
|
|
2391
2305
|
leave: () => void;
|
|
2392
2306
|
};
|
|
2393
2307
|
/**
|
|
@@ -2453,7 +2367,7 @@ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM exten
|
|
|
2453
2367
|
* of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
|
|
2454
2368
|
* will probably happen if you do.
|
|
2455
2369
|
*/
|
|
2456
|
-
readonly [kInternal]: PrivateClientApi<U, TM, CM>;
|
|
2370
|
+
readonly [kInternal]: PrivateClientApi<U, TM, CM, FM, FMD>;
|
|
2457
2371
|
/**
|
|
2458
2372
|
* Returns the current global sync status of the Liveblocks client. If any
|
|
2459
2373
|
* part of Liveblocks has any local pending changes that haven't been
|
|
@@ -2678,6 +2592,14 @@ declare const ClientMsgCode: Readonly<{
|
|
|
2678
2592
|
UPDATE_STORAGE: 201;
|
|
2679
2593
|
FETCH_YDOC: 300;
|
|
2680
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;
|
|
2681
2603
|
}>;
|
|
2682
2604
|
declare namespace ClientMsgCode {
|
|
2683
2605
|
type UPDATE_PRESENCE = typeof ClientMsgCode.UPDATE_PRESENCE;
|
|
@@ -2686,11 +2608,19 @@ declare namespace ClientMsgCode {
|
|
|
2686
2608
|
type UPDATE_STORAGE = typeof ClientMsgCode.UPDATE_STORAGE;
|
|
2687
2609
|
type FETCH_YDOC = typeof ClientMsgCode.FETCH_YDOC;
|
|
2688
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;
|
|
2689
2619
|
}
|
|
2690
2620
|
/**
|
|
2691
2621
|
* Messages that can be sent from the client to the server.
|
|
2692
2622
|
*/
|
|
2693
|
-
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;
|
|
2694
2624
|
type BroadcastEventClientMsg<E extends Json> = {
|
|
2695
2625
|
type: ClientMsgCode.BROADCAST_EVENT;
|
|
2696
2626
|
event: E;
|
|
@@ -2740,6 +2670,81 @@ type UpdateYDocClientMsg = {
|
|
|
2740
2670
|
readonly guid?: string;
|
|
2741
2671
|
readonly v2?: boolean;
|
|
2742
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
|
+
};
|
|
2743
2748
|
|
|
2744
2749
|
type ServerMsgCode = (typeof ServerMsgCode)[keyof typeof ServerMsgCode];
|
|
2745
2750
|
declare const ServerMsgCode: Readonly<{
|
|
@@ -2763,6 +2768,15 @@ declare const ServerMsgCode: Readonly<{
|
|
|
2763
2768
|
COMMENT_REACTION_ADDED: 405;
|
|
2764
2769
|
COMMENT_REACTION_REMOVED: 406;
|
|
2765
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;
|
|
2766
2780
|
REJECT_STORAGE_OP: 299;
|
|
2767
2781
|
}>;
|
|
2768
2782
|
declare namespace ServerMsgCode {
|
|
@@ -2785,13 +2799,22 @@ declare namespace ServerMsgCode {
|
|
|
2785
2799
|
type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
|
|
2786
2800
|
type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
|
|
2787
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;
|
|
2788
2811
|
type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
|
|
2789
2812
|
type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
|
|
2790
2813
|
}
|
|
2791
2814
|
/**
|
|
2792
2815
|
* Messages that can be sent from the server to the client.
|
|
2793
2816
|
*/
|
|
2794
|
-
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;
|
|
2795
2818
|
type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
|
|
2796
2819
|
type ThreadCreatedEvent = {
|
|
2797
2820
|
type: ServerMsgCode.THREAD_CREATED;
|
|
@@ -3022,6 +3045,66 @@ type RejectedStorageOpServerMsg = {
|
|
|
3022
3045
|
readonly opIds: string[];
|
|
3023
3046
|
readonly reason: string;
|
|
3024
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
|
+
};
|
|
3025
3108
|
|
|
3026
3109
|
type HistoryVersion = {
|
|
3027
3110
|
type: "historyVersion";
|
|
@@ -3183,9 +3266,6 @@ interface History {
|
|
|
3183
3266
|
* // room.getPresence() equals { cursor: { x: 0, y: 0 } }
|
|
3184
3267
|
*/
|
|
3185
3268
|
resume: () => void;
|
|
3186
|
-
readonly [kInternal]: {
|
|
3187
|
-
withoutHistory: <T>(fn: () => T) => T;
|
|
3188
|
-
};
|
|
3189
3269
|
}
|
|
3190
3270
|
type HistoryEvent = {
|
|
3191
3271
|
canUndo: boolean;
|
|
@@ -3359,8 +3439,8 @@ type GetSubscriptionSettingsOptions = {
|
|
|
3359
3439
|
* this type is different from `Room`-without-type-arguments. That represents
|
|
3360
3440
|
* a Room instance using globally augmented types only, which is narrower.
|
|
3361
3441
|
*/
|
|
3362
|
-
type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata>;
|
|
3363
|
-
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> = {
|
|
3364
3444
|
/**
|
|
3365
3445
|
* @private
|
|
3366
3446
|
*
|
|
@@ -3433,6 +3513,63 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
3433
3513
|
* Sends a request for the current document from liveblocks server
|
|
3434
3514
|
*/
|
|
3435
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>;
|
|
3436
3573
|
/**
|
|
3437
3574
|
* Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
|
|
3438
3575
|
* @param {any} event the event to broadcast. Should be serializable to JSON
|
|
@@ -3491,6 +3628,7 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
3491
3628
|
readonly storageStatus: Observable<StorageStatus>;
|
|
3492
3629
|
readonly ydoc: Observable<YDocUpdateServerMsg | UpdateYDocClientMsg>;
|
|
3493
3630
|
readonly comments: Observable<CommentsEventServerMsg>;
|
|
3631
|
+
readonly feeds: Observable<FeedsEventServerMsg<FM, FMD>>;
|
|
3494
3632
|
/**
|
|
3495
3633
|
* Called right before the room is destroyed. The event cannot be used to
|
|
3496
3634
|
* prevent the room from being destroyed, only to be informed that this is
|
|
@@ -4726,6 +4864,10 @@ ChildStorageNode[]>;
|
|
|
4726
4864
|
declare function isLiveNode(value: unknown): value is LiveNode;
|
|
4727
4865
|
declare function cloneLson<L extends Lson | undefined>(value: L): L;
|
|
4728
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
|
+
|
|
4729
4871
|
/**
|
|
4730
4872
|
* Like `new AbortController()`, but where the result can be unpacked
|
|
4731
4873
|
* safely, i.e. `const { signal, abort } = makeAbortController()`.
|
|
@@ -5415,4 +5557,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5415
5557
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5416
5558
|
};
|
|
5417
5559
|
|
|
5418
|
-
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
|
|
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 };
|