@liveblocks/core 3.15.0-feeds2 → 3.15.0-rc1
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 +42 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -202
- package/dist/index.d.ts +13 -202
- package/dist/index.js +3 -192
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1203,7 +1203,7 @@ declare global {
|
|
|
1203
1203
|
[key: string]: unknown;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "
|
|
1206
|
+
type ExtendableTypes = "Presence" | "Storage" | "UserMeta" | "RoomEvent" | "ThreadMetadata" | "CommentMetadata" | "RoomInfo" | "GroupInfo" | "ActivitiesData";
|
|
1207
1207
|
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}`;
|
|
1208
1208
|
type GetOverride<K extends ExtendableTypes, B, Reason extends string = "does not match its requirements"> = GetOverrideOrErrorValue<K, B, MakeErrorString<K, Reason>>;
|
|
1209
1209
|
type GetOverrideOrErrorValue<K extends ExtendableTypes, B, ErrorType> = unknown extends Liveblocks[K] ? B : Liveblocks[K] extends B ? Liveblocks[K] : ErrorType;
|
|
@@ -1213,8 +1213,6 @@ type DU = GetOverrideOrErrorValue<"UserMeta", BaseUserMeta, Record<"id" | "info"
|
|
|
1213
1213
|
type DE = GetOverride<"RoomEvent", Json, "is not a valid JSON value">;
|
|
1214
1214
|
type DTM = GetOverride<"ThreadMetadata", BaseMetadata>;
|
|
1215
1215
|
type DCM = GetOverride<"CommentMetadata", BaseMetadata>;
|
|
1216
|
-
type DSM = GetOverride<"FeedMetadata", Json, "is not a valid JSON value">;
|
|
1217
|
-
type DMD = GetOverride<"FeedMessageData", Json, "is not a valid JSON value">;
|
|
1218
1216
|
type DRI = GetOverride<"RoomInfo", BaseRoomInfo>;
|
|
1219
1217
|
type DGI = GetOverride<"GroupInfo", BaseGroupInfo>;
|
|
1220
1218
|
type DAD = GetOverrideOrErrorValue<"ActivitiesData", BaseActivitiesData, {
|
|
@@ -2116,7 +2114,7 @@ type InternalSyncStatus = SyncStatus | "has-local-changes";
|
|
|
2116
2114
|
* of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
|
|
2117
2115
|
* will probably happen if you do.
|
|
2118
2116
|
*/
|
|
2119
|
-
type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata
|
|
2117
|
+
type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extends BaseMetadata> = {
|
|
2120
2118
|
readonly currentUserId: Signal<string | undefined>;
|
|
2121
2119
|
readonly mentionSuggestionsCache: Map<string, MentionData[]>;
|
|
2122
2120
|
readonly resolveMentionSuggestions: ClientOptions<U>["resolveMentionSuggestions"];
|
|
@@ -2125,7 +2123,7 @@ type PrivateClientApi<U extends BaseUserMeta, TM extends BaseMetadata, CM extend
|
|
|
2125
2123
|
readonly groupsInfoStore: BatchStore<DGI | undefined, string>;
|
|
2126
2124
|
readonly getRoomIds: () => string[];
|
|
2127
2125
|
readonly httpClient: LiveblocksHttpApi<TM, CM>;
|
|
2128
|
-
as<TM2 extends BaseMetadata, CM2 extends BaseMetadata
|
|
2126
|
+
as<TM2 extends BaseMetadata, CM2 extends BaseMetadata>(): Client<U, TM2, CM2>;
|
|
2129
2127
|
createSyncSource(): SyncSource;
|
|
2130
2128
|
emitError(context: LiveblocksErrorContext, cause?: Error): void;
|
|
2131
2129
|
ai: Ai;
|
|
@@ -2278,23 +2276,23 @@ type NotificationsApi<TM extends BaseMetadata, CM extends BaseMetadata> = {
|
|
|
2278
2276
|
* narrower.
|
|
2279
2277
|
*/
|
|
2280
2278
|
type OpaqueClient = Client<BaseUserMeta>;
|
|
2281
|
-
type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM
|
|
2279
|
+
type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM extends BaseMetadata = DCM> = {
|
|
2282
2280
|
/**
|
|
2283
2281
|
* Gets a room. Returns null if {@link Client.enter} has not been called previously.
|
|
2284
2282
|
*
|
|
2285
2283
|
* @param roomId The id of the room
|
|
2286
2284
|
*/
|
|
2287
|
-
getRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM
|
|
2285
|
+
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;
|
|
2288
2286
|
/**
|
|
2289
2287
|
* Enter a room.
|
|
2290
2288
|
* @param roomId The id of the room
|
|
2291
2289
|
* @param options Optional. You can provide initializers for the Presence or Storage when entering the Room.
|
|
2292
2290
|
* @returns The room and a leave function. Call the returned leave() function when you no longer need the room.
|
|
2293
2291
|
*/
|
|
2294
|
-
enterRoom<P extends JsonObject = DP, S extends LsonObject = DS, E extends Json = DE, TM2 extends BaseMetadata = TM, CM2 extends BaseMetadata = CM
|
|
2292
|
+
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, [
|
|
2295
2293
|
options: EnterOptions<NoInfr<P>, NoInfr<S>>
|
|
2296
2294
|
]>): {
|
|
2297
|
-
room: Room<P, S, U, E, TM2, CM2
|
|
2295
|
+
room: Room<P, S, U, E, TM2, CM2>;
|
|
2298
2296
|
leave: () => void;
|
|
2299
2297
|
};
|
|
2300
2298
|
/**
|
|
@@ -2360,7 +2358,7 @@ type Client<U extends BaseUserMeta = DU, TM extends BaseMetadata = DTM, CM exten
|
|
|
2360
2358
|
* of Liveblocks, NEVER USE ANY OF THESE DIRECTLY, because bad things
|
|
2361
2359
|
* will probably happen if you do.
|
|
2362
2360
|
*/
|
|
2363
|
-
readonly [kInternal]: PrivateClientApi<U, TM, CM
|
|
2361
|
+
readonly [kInternal]: PrivateClientApi<U, TM, CM>;
|
|
2364
2362
|
/**
|
|
2365
2363
|
* Returns the current global sync status of the Liveblocks client. If any
|
|
2366
2364
|
* part of Liveblocks has any local pending changes that haven't been
|
|
@@ -2586,14 +2584,6 @@ declare const ClientMsgCode: Readonly<{
|
|
|
2586
2584
|
UPDATE_STORAGE: 201;
|
|
2587
2585
|
FETCH_YDOC: 300;
|
|
2588
2586
|
UPDATE_YDOC: 301;
|
|
2589
|
-
FETCH_FEEDS: 510;
|
|
2590
|
-
FETCH_FEED_MESSAGES: 511;
|
|
2591
|
-
ADD_FEED: 512;
|
|
2592
|
-
UPDATE_FEED: 513;
|
|
2593
|
-
DELETE_FEED: 514;
|
|
2594
|
-
ADD_FEED_MESSAGE: 515;
|
|
2595
|
-
UPDATE_FEED_MESSAGE: 516;
|
|
2596
|
-
DELETE_FEED_MESSAGE: 517;
|
|
2597
2587
|
}>;
|
|
2598
2588
|
declare namespace ClientMsgCode {
|
|
2599
2589
|
type UPDATE_PRESENCE = typeof ClientMsgCode.UPDATE_PRESENCE;
|
|
@@ -2602,19 +2592,11 @@ declare namespace ClientMsgCode {
|
|
|
2602
2592
|
type UPDATE_STORAGE = typeof ClientMsgCode.UPDATE_STORAGE;
|
|
2603
2593
|
type FETCH_YDOC = typeof ClientMsgCode.FETCH_YDOC;
|
|
2604
2594
|
type UPDATE_YDOC = typeof ClientMsgCode.UPDATE_YDOC;
|
|
2605
|
-
type FETCH_FEEDS = typeof ClientMsgCode.FETCH_FEEDS;
|
|
2606
|
-
type FETCH_FEED_MESSAGES = typeof ClientMsgCode.FETCH_FEED_MESSAGES;
|
|
2607
|
-
type ADD_FEED = typeof ClientMsgCode.ADD_FEED;
|
|
2608
|
-
type UPDATE_FEED = typeof ClientMsgCode.UPDATE_FEED;
|
|
2609
|
-
type DELETE_FEED = typeof ClientMsgCode.DELETE_FEED;
|
|
2610
|
-
type ADD_FEED_MESSAGE = typeof ClientMsgCode.ADD_FEED_MESSAGE;
|
|
2611
|
-
type UPDATE_FEED_MESSAGE = typeof ClientMsgCode.UPDATE_FEED_MESSAGE;
|
|
2612
|
-
type DELETE_FEED_MESSAGE = typeof ClientMsgCode.DELETE_FEED_MESSAGE;
|
|
2613
2595
|
}
|
|
2614
2596
|
/**
|
|
2615
2597
|
* Messages that can be sent from the client to the server.
|
|
2616
2598
|
*/
|
|
2617
|
-
type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg
|
|
2599
|
+
type ClientMsg<P extends JsonObject, E extends Json> = BroadcastEventClientMsg<E> | UpdatePresenceClientMsg<P> | UpdateStorageClientMsg | FetchStorageClientMsg | FetchYDocClientMsg | UpdateYDocClientMsg;
|
|
2618
2600
|
type BroadcastEventClientMsg<E extends Json> = {
|
|
2619
2601
|
type: ClientMsgCode.BROADCAST_EVENT;
|
|
2620
2602
|
event: E;
|
|
@@ -2664,66 +2646,6 @@ type UpdateYDocClientMsg = {
|
|
|
2664
2646
|
readonly guid?: string;
|
|
2665
2647
|
readonly v2?: boolean;
|
|
2666
2648
|
};
|
|
2667
|
-
type FetchFeedsClientMsg = {
|
|
2668
|
-
readonly type: ClientMsgCode.FETCH_FEEDS;
|
|
2669
|
-
readonly requestId: string;
|
|
2670
|
-
readonly cursor?: string;
|
|
2671
|
-
readonly since?: number;
|
|
2672
|
-
readonly limit?: number;
|
|
2673
|
-
readonly metadata?: Record<string, Json>;
|
|
2674
|
-
};
|
|
2675
|
-
type FetchFeedMessagesClientMsg = {
|
|
2676
|
-
readonly type: ClientMsgCode.FETCH_FEED_MESSAGES;
|
|
2677
|
-
readonly requestId: string;
|
|
2678
|
-
readonly feedId: string;
|
|
2679
|
-
readonly cursor?: string;
|
|
2680
|
-
readonly since?: number;
|
|
2681
|
-
readonly limit?: number;
|
|
2682
|
-
};
|
|
2683
|
-
type AddFeedClientMsg = {
|
|
2684
|
-
readonly type: ClientMsgCode.ADD_FEED;
|
|
2685
|
-
readonly feedId: string;
|
|
2686
|
-
readonly metadata?: JsonObject;
|
|
2687
|
-
readonly timestamp?: number;
|
|
2688
|
-
};
|
|
2689
|
-
type UpdateFeedClientMsg = {
|
|
2690
|
-
readonly type: ClientMsgCode.UPDATE_FEED;
|
|
2691
|
-
readonly feedId: string;
|
|
2692
|
-
readonly metadata: JsonObject;
|
|
2693
|
-
};
|
|
2694
|
-
type DeleteFeedClientMsg = {
|
|
2695
|
-
readonly type: ClientMsgCode.DELETE_FEED;
|
|
2696
|
-
readonly feedId: string;
|
|
2697
|
-
};
|
|
2698
|
-
type AddFeedMessageClientMsg = {
|
|
2699
|
-
readonly type: ClientMsgCode.ADD_FEED_MESSAGE;
|
|
2700
|
-
readonly feedId: string;
|
|
2701
|
-
readonly data: JsonObject;
|
|
2702
|
-
readonly id?: string;
|
|
2703
|
-
readonly timestamp?: number;
|
|
2704
|
-
};
|
|
2705
|
-
type UpdateFeedMessageClientMsg = {
|
|
2706
|
-
readonly type: ClientMsgCode.UPDATE_FEED_MESSAGE;
|
|
2707
|
-
readonly feedId: string;
|
|
2708
|
-
readonly messageId: string;
|
|
2709
|
-
readonly data: JsonObject;
|
|
2710
|
-
};
|
|
2711
|
-
type DeleteFeedMessageClientMsg = {
|
|
2712
|
-
readonly type: ClientMsgCode.DELETE_FEED_MESSAGE;
|
|
2713
|
-
readonly feedId: string;
|
|
2714
|
-
readonly messageId: string;
|
|
2715
|
-
};
|
|
2716
|
-
|
|
2717
|
-
type Feed<FM extends Json = Json> = {
|
|
2718
|
-
feedId: string;
|
|
2719
|
-
metadata: FM;
|
|
2720
|
-
timestamp: number;
|
|
2721
|
-
};
|
|
2722
|
-
type FeedMessage<FMD extends Json = Json> = {
|
|
2723
|
-
id: string;
|
|
2724
|
-
timestamp: number;
|
|
2725
|
-
data: FMD;
|
|
2726
|
-
};
|
|
2727
2649
|
|
|
2728
2650
|
type ServerMsgCode = (typeof ServerMsgCode)[keyof typeof ServerMsgCode];
|
|
2729
2651
|
declare const ServerMsgCode: Readonly<{
|
|
@@ -2747,14 +2669,6 @@ declare const ServerMsgCode: Readonly<{
|
|
|
2747
2669
|
COMMENT_REACTION_ADDED: 405;
|
|
2748
2670
|
COMMENT_REACTION_REMOVED: 406;
|
|
2749
2671
|
COMMENT_METADATA_UPDATED: 409;
|
|
2750
|
-
FEEDS_LIST: 500;
|
|
2751
|
-
FEEDS_ADDED: 501;
|
|
2752
|
-
FEEDS_UPDATED: 502;
|
|
2753
|
-
FEEDS_DELETED: 503;
|
|
2754
|
-
FEED_MESSAGES_LIST: 504;
|
|
2755
|
-
FEED_MESSAGES_ADDED: 505;
|
|
2756
|
-
FEED_MESSAGES_UPDATED: 506;
|
|
2757
|
-
FEED_MESSAGES_DELETED: 507;
|
|
2758
2672
|
REJECT_STORAGE_OP: 299;
|
|
2759
2673
|
}>;
|
|
2760
2674
|
declare namespace ServerMsgCode {
|
|
@@ -2777,21 +2691,13 @@ declare namespace ServerMsgCode {
|
|
|
2777
2691
|
type COMMENT_DELETED = typeof ServerMsgCode.COMMENT_DELETED;
|
|
2778
2692
|
type COMMENT_REACTION_ADDED = typeof ServerMsgCode.COMMENT_REACTION_ADDED;
|
|
2779
2693
|
type COMMENT_REACTION_REMOVED = typeof ServerMsgCode.COMMENT_REACTION_REMOVED;
|
|
2780
|
-
type FEEDS_LIST = typeof ServerMsgCode.FEEDS_LIST;
|
|
2781
|
-
type FEEDS_ADDED = typeof ServerMsgCode.FEEDS_ADDED;
|
|
2782
|
-
type FEEDS_UPDATED = typeof ServerMsgCode.FEEDS_UPDATED;
|
|
2783
|
-
type FEEDS_DELETED = typeof ServerMsgCode.FEEDS_DELETED;
|
|
2784
|
-
type FEED_MESSAGES_LIST = typeof ServerMsgCode.FEED_MESSAGES_LIST;
|
|
2785
|
-
type FEED_MESSAGES_ADDED = typeof ServerMsgCode.FEED_MESSAGES_ADDED;
|
|
2786
|
-
type FEED_MESSAGES_UPDATED = typeof ServerMsgCode.FEED_MESSAGES_UPDATED;
|
|
2787
|
-
type FEED_MESSAGES_DELETED = typeof ServerMsgCode.FEED_MESSAGES_DELETED;
|
|
2788
2694
|
type COMMENT_METADATA_UPDATED = typeof ServerMsgCode.COMMENT_METADATA_UPDATED;
|
|
2789
2695
|
type REJECT_STORAGE_OP = typeof ServerMsgCode.REJECT_STORAGE_OP;
|
|
2790
2696
|
}
|
|
2791
2697
|
/**
|
|
2792
2698
|
* Messages that can be sent from the server to the client.
|
|
2793
2699
|
*/
|
|
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
|
|
2700
|
+
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;
|
|
2795
2701
|
type CommentsEventServerMsg = ThreadCreatedEvent | ThreadDeletedEvent | ThreadMetadataUpdatedEvent | ThreadUpdatedEvent | CommentCreatedEvent | CommentEditedEvent | CommentDeletedEvent | CommentReactionAdded | CommentReactionRemoved | CommentMetadataUpdatedEvent;
|
|
2796
2702
|
type ThreadCreatedEvent = {
|
|
2797
2703
|
type: ServerMsgCode.THREAD_CREATED;
|
|
@@ -3022,47 +2928,6 @@ type RejectedStorageOpServerMsg = {
|
|
|
3022
2928
|
readonly opIds: string[];
|
|
3023
2929
|
readonly reason: string;
|
|
3024
2930
|
};
|
|
3025
|
-
type FeedsEventServerMsg<FM extends Json = Json, FMD extends Json = Json> = FeedsListServerMsg<FM> | FeedsAddedServerMsg<FM> | FeedsUpdatedServerMsg<FM> | FeedsDeletedServerMsg<FM> | FeedMessagesListServerMsg<FMD> | FeedMessagesAddedServerMsg<FMD> | FeedMessagesUpdatedServerMsg<FMD> | FeedMessagesDeletedServerMsg<FMD>;
|
|
3026
|
-
type FeedsListServerMsg<FM extends Json = Json> = {
|
|
3027
|
-
readonly type: ServerMsgCode.FEEDS_LIST;
|
|
3028
|
-
readonly requestId: string;
|
|
3029
|
-
readonly feeds: Feed<FM>[];
|
|
3030
|
-
readonly nextCursor?: string;
|
|
3031
|
-
};
|
|
3032
|
-
type FeedsAddedServerMsg<FM extends Json = Json> = {
|
|
3033
|
-
readonly type: ServerMsgCode.FEEDS_ADDED;
|
|
3034
|
-
readonly feeds: Feed<FM>[];
|
|
3035
|
-
};
|
|
3036
|
-
type FeedsUpdatedServerMsg<FM extends Json = Json> = {
|
|
3037
|
-
readonly type: ServerMsgCode.FEEDS_UPDATED;
|
|
3038
|
-
readonly feeds: Feed<FM>[];
|
|
3039
|
-
};
|
|
3040
|
-
type FeedsDeletedServerMsg<FM extends Json = Json> = {
|
|
3041
|
-
readonly type: ServerMsgCode.FEEDS_DELETED;
|
|
3042
|
-
readonly feeds: Feed<FM>[];
|
|
3043
|
-
};
|
|
3044
|
-
type FeedMessagesListServerMsg<FMD extends Json = Json> = {
|
|
3045
|
-
readonly type: ServerMsgCode.FEED_MESSAGES_LIST;
|
|
3046
|
-
readonly requestId: string;
|
|
3047
|
-
readonly feedId: string;
|
|
3048
|
-
readonly messages: FeedMessage<FMD>[];
|
|
3049
|
-
readonly nextCursor?: string;
|
|
3050
|
-
};
|
|
3051
|
-
type FeedMessagesAddedServerMsg<FMD extends Json = Json> = {
|
|
3052
|
-
readonly type: ServerMsgCode.FEED_MESSAGES_ADDED;
|
|
3053
|
-
readonly feedId: string;
|
|
3054
|
-
readonly messages: FeedMessage<FMD>[];
|
|
3055
|
-
};
|
|
3056
|
-
type FeedMessagesUpdatedServerMsg<FMD extends Json = Json> = {
|
|
3057
|
-
readonly type: ServerMsgCode.FEED_MESSAGES_UPDATED;
|
|
3058
|
-
readonly feedId: string;
|
|
3059
|
-
readonly messages: FeedMessage<FMD>[];
|
|
3060
|
-
};
|
|
3061
|
-
type FeedMessagesDeletedServerMsg<FMD extends Json = Json> = {
|
|
3062
|
-
readonly type: ServerMsgCode.FEED_MESSAGES_DELETED;
|
|
3063
|
-
readonly feedId: string;
|
|
3064
|
-
readonly messages: FeedMessage<FMD>[];
|
|
3065
|
-
};
|
|
3066
2931
|
|
|
3067
2932
|
type HistoryVersion = {
|
|
3068
2933
|
type: "historyVersion";
|
|
@@ -3397,8 +3262,8 @@ type GetSubscriptionSettingsOptions = {
|
|
|
3397
3262
|
* this type is different from `Room`-without-type-arguments. That represents
|
|
3398
3263
|
* a Room instance using globally augmented types only, which is narrower.
|
|
3399
3264
|
*/
|
|
3400
|
-
type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata
|
|
3401
|
-
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
|
|
3265
|
+
type OpaqueRoom = Room<JsonObject, LsonObject, BaseUserMeta, Json, BaseMetadata>;
|
|
3266
|
+
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> = {
|
|
3402
3267
|
/**
|
|
3403
3268
|
* @private
|
|
3404
3269
|
*
|
|
@@ -3471,59 +3336,6 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
3471
3336
|
* Sends a request for the current document from liveblocks server
|
|
3472
3337
|
*/
|
|
3473
3338
|
fetchYDoc(stateVector: string, guid?: string, isV2?: boolean): void;
|
|
3474
|
-
/**
|
|
3475
|
-
* Fetches feeds for the room.
|
|
3476
|
-
*/
|
|
3477
|
-
fetchFeeds(options?: {
|
|
3478
|
-
cursor?: string;
|
|
3479
|
-
since?: number;
|
|
3480
|
-
limit?: number;
|
|
3481
|
-
metadata?: Record<string, Json>;
|
|
3482
|
-
}): Promise<{
|
|
3483
|
-
feeds: Feed<SM>[];
|
|
3484
|
-
nextCursor?: string;
|
|
3485
|
-
}>;
|
|
3486
|
-
/**
|
|
3487
|
-
* Fetches messages for a specific feed.
|
|
3488
|
-
*/
|
|
3489
|
-
fetchFeedMessages(feedId: string, options?: {
|
|
3490
|
-
cursor?: string;
|
|
3491
|
-
since?: number;
|
|
3492
|
-
limit?: number;
|
|
3493
|
-
}): Promise<{
|
|
3494
|
-
messages: FeedMessage<MD>[];
|
|
3495
|
-
nextCursor?: string;
|
|
3496
|
-
}>;
|
|
3497
|
-
/**
|
|
3498
|
-
* Adds a new feed to the room via WebSocket.
|
|
3499
|
-
*/
|
|
3500
|
-
addFeed(feedId: string, options?: {
|
|
3501
|
-
metadata?: JsonObject;
|
|
3502
|
-
timestamp?: number;
|
|
3503
|
-
}): void;
|
|
3504
|
-
/**
|
|
3505
|
-
* Updates metadata for an existing feed via WebSocket.
|
|
3506
|
-
*/
|
|
3507
|
-
updateFeed(feedId: string, metadata: JsonObject): void;
|
|
3508
|
-
/**
|
|
3509
|
-
* Deletes a feed via WebSocket.
|
|
3510
|
-
*/
|
|
3511
|
-
deleteFeed(feedId: string): void;
|
|
3512
|
-
/**
|
|
3513
|
-
* Adds a new message to a feed via WebSocket.
|
|
3514
|
-
*/
|
|
3515
|
-
addFeedMessage(feedId: string, data: JsonObject, options?: {
|
|
3516
|
-
id?: string;
|
|
3517
|
-
timestamp?: number;
|
|
3518
|
-
}): void;
|
|
3519
|
-
/**
|
|
3520
|
-
* Updates an existing feed message via WebSocket.
|
|
3521
|
-
*/
|
|
3522
|
-
updateFeedMessage(feedId: string, messageId: string, data: JsonObject): void;
|
|
3523
|
-
/**
|
|
3524
|
-
* Deletes a feed message via WebSocket.
|
|
3525
|
-
*/
|
|
3526
|
-
deleteFeedMessage(feedId: string, messageId: string): void;
|
|
3527
3339
|
/**
|
|
3528
3340
|
* Broadcasts an event to other users in the room. Event broadcasted to the room can be listened with {@link Room.subscribe}("event").
|
|
3529
3341
|
* @param {any} event the event to broadcast. Should be serializable to JSON
|
|
@@ -3582,7 +3394,6 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
3582
3394
|
readonly storageStatus: Observable<StorageStatus>;
|
|
3583
3395
|
readonly ydoc: Observable<YDocUpdateServerMsg | UpdateYDocClientMsg>;
|
|
3584
3396
|
readonly comments: Observable<CommentsEventServerMsg>;
|
|
3585
|
-
readonly feeds: Observable<FeedsEventServerMsg<SM, MD>>;
|
|
3586
3397
|
/**
|
|
3587
3398
|
* Called right before the room is destroyed. The event cannot be used to
|
|
3588
3399
|
* prevent the room from being destroyed, only to be informed that this is
|
|
@@ -5510,4 +5321,4 @@ type EnsureJson<T> = T extends Json ? T : T extends Array<infer I> ? (EnsureJson
|
|
|
5510
5321
|
[K in keyof T as EnsureJson<T[K]> extends never ? never : K]: EnsureJson<T[K]>;
|
|
5511
5322
|
};
|
|
5512
5323
|
|
|
5513
|
-
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
|
|
5324
|
+
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 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 };
|