@liveblocks/core 1.10.0-beta1 → 1.10.0-beta3
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.mts +46 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.js +283 -147
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +223 -87
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1271,6 +1271,13 @@ declare type InboxNotificationThreadData = {
|
|
|
1271
1271
|
declare type InboxNotificationData = InboxNotificationThreadData;
|
|
1272
1272
|
declare type InboxNotificationDataPlain = DateToString<InboxNotificationData>;
|
|
1273
1273
|
|
|
1274
|
+
declare type InboxNotificationDeleteInfo = {
|
|
1275
|
+
type: "deletedInboxNotification";
|
|
1276
|
+
id: string;
|
|
1277
|
+
roomId: string;
|
|
1278
|
+
deletedAt: Date;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1274
1281
|
/**
|
|
1275
1282
|
* Represents a user connected in a room. Treated as immutable.
|
|
1276
1283
|
*/
|
|
@@ -1351,11 +1358,21 @@ declare type ThreadData<TThreadMetadata extends BaseMetadata = never> = {
|
|
|
1351
1358
|
comments: CommentData[];
|
|
1352
1359
|
metadata: [TThreadMetadata] extends [never] ? Record<string, never> : TThreadMetadata;
|
|
1353
1360
|
};
|
|
1361
|
+
interface ThreadDataWithDeleteInfo<TThreadMetadata extends BaseMetadata = never> extends ThreadData<TThreadMetadata> {
|
|
1362
|
+
deletedAt?: Date;
|
|
1363
|
+
}
|
|
1354
1364
|
declare type ThreadDataPlain<TThreadMetadata extends BaseMetadata = never> = Omit<DateToString<ThreadData<TThreadMetadata>>, "comments" | "metadata"> & {
|
|
1355
1365
|
comments: CommentDataPlain[];
|
|
1356
1366
|
metadata: [TThreadMetadata] extends [never] ? Record<string, never> : TThreadMetadata;
|
|
1357
1367
|
};
|
|
1358
1368
|
|
|
1369
|
+
declare type ThreadDeleteInfo = {
|
|
1370
|
+
type: "deletedThread";
|
|
1371
|
+
id: string;
|
|
1372
|
+
roomId: string;
|
|
1373
|
+
deletedAt: Date;
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1359
1376
|
declare type LegacyOthersEvent<TPresence extends JsonObject, TUserMeta extends BaseUserMeta> = {
|
|
1360
1377
|
type: "leave";
|
|
1361
1378
|
user: User<TPresence, TUserMeta>;
|
|
@@ -1636,6 +1653,7 @@ declare type GetThreadsOptions<TThreadMetadata extends BaseMetadata> = {
|
|
|
1636
1653
|
query?: {
|
|
1637
1654
|
metadata?: Partial<TThreadMetadata>;
|
|
1638
1655
|
};
|
|
1656
|
+
since?: Date;
|
|
1639
1657
|
};
|
|
1640
1658
|
declare type CommentsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
1641
1659
|
/**
|
|
@@ -1644,6 +1662,11 @@ declare type CommentsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
|
1644
1662
|
getThreads(options?: GetThreadsOptions<TThreadMetadata>): Promise<{
|
|
1645
1663
|
threads: ThreadData<TThreadMetadata>[];
|
|
1646
1664
|
inboxNotifications: InboxNotificationData[];
|
|
1665
|
+
deletedThreads: ThreadDeleteInfo[];
|
|
1666
|
+
deletedInboxNotifications: InboxNotificationDeleteInfo[];
|
|
1667
|
+
meta: {
|
|
1668
|
+
requestedAt: Date;
|
|
1669
|
+
};
|
|
1647
1670
|
}>;
|
|
1648
1671
|
/**
|
|
1649
1672
|
* @private
|
|
@@ -1929,6 +1952,9 @@ declare type PrivateRoomApi = {
|
|
|
1929
1952
|
explicitClose(event: IWebSocketCloseEvent): void;
|
|
1930
1953
|
rawSend(data: string): void;
|
|
1931
1954
|
};
|
|
1955
|
+
comments: {
|
|
1956
|
+
lastRequestedAt: Date | null;
|
|
1957
|
+
};
|
|
1932
1958
|
};
|
|
1933
1959
|
declare type HistoryOp<TPresence extends JsonObject> = Op | {
|
|
1934
1960
|
readonly type: "presence";
|
|
@@ -1994,6 +2020,11 @@ declare type Store<T> = {
|
|
|
1994
2020
|
subscribe: (callback: (state: T) => void) => () => void;
|
|
1995
2021
|
};
|
|
1996
2022
|
|
|
2023
|
+
declare type GetInboxNotificationsOptions = {
|
|
2024
|
+
limit?: number;
|
|
2025
|
+
since?: Date;
|
|
2026
|
+
};
|
|
2027
|
+
|
|
1997
2028
|
declare type OptimisticUpdate<TThreadMetadata extends BaseMetadata> = CreateThreadOptimisticUpdate<TThreadMetadata> | EditThreadMetadataOptimisticUpdate<TThreadMetadata> | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
|
|
1998
2029
|
declare type CreateThreadOptimisticUpdate<TThreadMetadata extends BaseMetadata> = {
|
|
1999
2030
|
type: "create-thread";
|
|
@@ -2072,7 +2103,7 @@ declare type CacheState<TThreadMetadata extends BaseMetadata> = {
|
|
|
2072
2103
|
/**
|
|
2073
2104
|
* Threads by ID.
|
|
2074
2105
|
*/
|
|
2075
|
-
threads: Record<string,
|
|
2106
|
+
threads: Record<string, ThreadDataWithDeleteInfo<TThreadMetadata>>;
|
|
2076
2107
|
/**
|
|
2077
2108
|
* Keep track of loading and error status of all the queries made by the client.
|
|
2078
2109
|
*/
|
|
@@ -2094,7 +2125,8 @@ declare type CacheState<TThreadMetadata extends BaseMetadata> = {
|
|
|
2094
2125
|
interface CacheStore<TThreadMetadata extends BaseMetadata> extends Store<CacheState<TThreadMetadata>> {
|
|
2095
2126
|
deleteThread(threadId: string): void;
|
|
2096
2127
|
updateThreadAndNotification(thread: ThreadData<TThreadMetadata>, inboxNotification?: InboxNotificationData): void;
|
|
2097
|
-
updateThreadsAndNotifications(threads: ThreadData<TThreadMetadata>[], inboxNotifications: InboxNotificationData[], queryKey?: string): void;
|
|
2128
|
+
updateThreadsAndNotifications(threads: ThreadData<TThreadMetadata>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[], queryKey?: string): void;
|
|
2129
|
+
updateRoomInboxNotificationSettings(roomId: string, settings: RoomNotificationSettings, queryKey: string): void;
|
|
2098
2130
|
pushOptimisticUpdate(optimisticUpdate: OptimisticUpdate<TThreadMetadata>): void;
|
|
2099
2131
|
setQueryState(queryKey: string, queryState: QueryState): void;
|
|
2100
2132
|
}
|
|
@@ -2107,6 +2139,10 @@ declare type RoomInfo = {
|
|
|
2107
2139
|
* The name of the room.
|
|
2108
2140
|
*/
|
|
2109
2141
|
name?: string;
|
|
2142
|
+
/**
|
|
2143
|
+
* The URL of the room.
|
|
2144
|
+
*/
|
|
2145
|
+
url?: string;
|
|
2110
2146
|
};
|
|
2111
2147
|
|
|
2112
2148
|
declare type ResolveMentionSuggestionsArgs = {
|
|
@@ -2155,14 +2191,20 @@ declare type PrivateClientApi<TUserMeta extends BaseUserMeta> = {
|
|
|
2155
2191
|
cacheStore: CacheStore<BaseMetadata>;
|
|
2156
2192
|
usersStore: BatchStore<TUserMeta["info"] | undefined, [string]>;
|
|
2157
2193
|
roomsInfoStore: BatchStore<RoomInfo | undefined, [string]>;
|
|
2194
|
+
getRoomIds: () => string[];
|
|
2158
2195
|
};
|
|
2159
2196
|
declare type InboxNotificationsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
2160
2197
|
/**
|
|
2161
2198
|
* @private
|
|
2162
2199
|
*/
|
|
2163
|
-
getInboxNotifications(): Promise<{
|
|
2200
|
+
getInboxNotifications(options?: GetInboxNotificationsOptions): Promise<{
|
|
2164
2201
|
inboxNotifications: InboxNotificationData[];
|
|
2165
2202
|
threads: ThreadData<TThreadMetadata>[];
|
|
2203
|
+
deletedThreads: ThreadDeleteInfo[];
|
|
2204
|
+
deletedInboxNotifications: InboxNotificationDeleteInfo[];
|
|
2205
|
+
meta: {
|
|
2206
|
+
requestedAt: Date;
|
|
2207
|
+
};
|
|
2166
2208
|
}>;
|
|
2167
2209
|
/**
|
|
2168
2210
|
* @private
|
|
@@ -2770,4 +2812,4 @@ declare type EnsureJson<T> = [
|
|
|
2770
2812
|
[K in keyof T]: EnsureJson<T[K]>;
|
|
2771
2813
|
};
|
|
2772
2814
|
|
|
2773
|
-
export { type AckOp, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type CacheState, type CacheStore, type Client, type ClientMsg, ClientMsgCode, 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 CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationThreadData, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, NotificationsApiError, type Op, OpCode, type OptionalPromise, type Others, type OthersEvent, type ParentToChildNodeMap, type PartialNullable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomInfo, type RoomInitializers, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, applyOptimisticUpdates, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createClient, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
|
|
2815
|
+
export { type AckOp, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type CacheState, type CacheStore, type Client, type ClientMsg, ClientMsgCode, 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 CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationThreadData, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, NotificationsApiError, type Op, OpCode, type OptionalPromise, type Others, type OthersEvent, type ParentToChildNodeMap, type PartialNullable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomInfo, type RoomInitializers, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, applyOptimisticUpdates, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createClient, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
|
package/dist/index.d.ts
CHANGED
|
@@ -1271,6 +1271,13 @@ declare type InboxNotificationThreadData = {
|
|
|
1271
1271
|
declare type InboxNotificationData = InboxNotificationThreadData;
|
|
1272
1272
|
declare type InboxNotificationDataPlain = DateToString<InboxNotificationData>;
|
|
1273
1273
|
|
|
1274
|
+
declare type InboxNotificationDeleteInfo = {
|
|
1275
|
+
type: "deletedInboxNotification";
|
|
1276
|
+
id: string;
|
|
1277
|
+
roomId: string;
|
|
1278
|
+
deletedAt: Date;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1274
1281
|
/**
|
|
1275
1282
|
* Represents a user connected in a room. Treated as immutable.
|
|
1276
1283
|
*/
|
|
@@ -1351,11 +1358,21 @@ declare type ThreadData<TThreadMetadata extends BaseMetadata = never> = {
|
|
|
1351
1358
|
comments: CommentData[];
|
|
1352
1359
|
metadata: [TThreadMetadata] extends [never] ? Record<string, never> : TThreadMetadata;
|
|
1353
1360
|
};
|
|
1361
|
+
interface ThreadDataWithDeleteInfo<TThreadMetadata extends BaseMetadata = never> extends ThreadData<TThreadMetadata> {
|
|
1362
|
+
deletedAt?: Date;
|
|
1363
|
+
}
|
|
1354
1364
|
declare type ThreadDataPlain<TThreadMetadata extends BaseMetadata = never> = Omit<DateToString<ThreadData<TThreadMetadata>>, "comments" | "metadata"> & {
|
|
1355
1365
|
comments: CommentDataPlain[];
|
|
1356
1366
|
metadata: [TThreadMetadata] extends [never] ? Record<string, never> : TThreadMetadata;
|
|
1357
1367
|
};
|
|
1358
1368
|
|
|
1369
|
+
declare type ThreadDeleteInfo = {
|
|
1370
|
+
type: "deletedThread";
|
|
1371
|
+
id: string;
|
|
1372
|
+
roomId: string;
|
|
1373
|
+
deletedAt: Date;
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1359
1376
|
declare type LegacyOthersEvent<TPresence extends JsonObject, TUserMeta extends BaseUserMeta> = {
|
|
1360
1377
|
type: "leave";
|
|
1361
1378
|
user: User<TPresence, TUserMeta>;
|
|
@@ -1636,6 +1653,7 @@ declare type GetThreadsOptions<TThreadMetadata extends BaseMetadata> = {
|
|
|
1636
1653
|
query?: {
|
|
1637
1654
|
metadata?: Partial<TThreadMetadata>;
|
|
1638
1655
|
};
|
|
1656
|
+
since?: Date;
|
|
1639
1657
|
};
|
|
1640
1658
|
declare type CommentsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
1641
1659
|
/**
|
|
@@ -1644,6 +1662,11 @@ declare type CommentsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
|
1644
1662
|
getThreads(options?: GetThreadsOptions<TThreadMetadata>): Promise<{
|
|
1645
1663
|
threads: ThreadData<TThreadMetadata>[];
|
|
1646
1664
|
inboxNotifications: InboxNotificationData[];
|
|
1665
|
+
deletedThreads: ThreadDeleteInfo[];
|
|
1666
|
+
deletedInboxNotifications: InboxNotificationDeleteInfo[];
|
|
1667
|
+
meta: {
|
|
1668
|
+
requestedAt: Date;
|
|
1669
|
+
};
|
|
1647
1670
|
}>;
|
|
1648
1671
|
/**
|
|
1649
1672
|
* @private
|
|
@@ -1929,6 +1952,9 @@ declare type PrivateRoomApi = {
|
|
|
1929
1952
|
explicitClose(event: IWebSocketCloseEvent): void;
|
|
1930
1953
|
rawSend(data: string): void;
|
|
1931
1954
|
};
|
|
1955
|
+
comments: {
|
|
1956
|
+
lastRequestedAt: Date | null;
|
|
1957
|
+
};
|
|
1932
1958
|
};
|
|
1933
1959
|
declare type HistoryOp<TPresence extends JsonObject> = Op | {
|
|
1934
1960
|
readonly type: "presence";
|
|
@@ -1994,6 +2020,11 @@ declare type Store<T> = {
|
|
|
1994
2020
|
subscribe: (callback: (state: T) => void) => () => void;
|
|
1995
2021
|
};
|
|
1996
2022
|
|
|
2023
|
+
declare type GetInboxNotificationsOptions = {
|
|
2024
|
+
limit?: number;
|
|
2025
|
+
since?: Date;
|
|
2026
|
+
};
|
|
2027
|
+
|
|
1997
2028
|
declare type OptimisticUpdate<TThreadMetadata extends BaseMetadata> = CreateThreadOptimisticUpdate<TThreadMetadata> | EditThreadMetadataOptimisticUpdate<TThreadMetadata> | CreateCommentOptimisticUpdate | EditCommentOptimisticUpdate | DeleteCommentOptimisticUpdate | AddReactionOptimisticUpdate | RemoveReactionOptimisticUpdate | MarkInboxNotificationAsReadOptimisticUpdate | MarkAllInboxNotificationsAsReadOptimisticUpdate | UpdateNotificationSettingsOptimisticUpdate;
|
|
1998
2029
|
declare type CreateThreadOptimisticUpdate<TThreadMetadata extends BaseMetadata> = {
|
|
1999
2030
|
type: "create-thread";
|
|
@@ -2072,7 +2103,7 @@ declare type CacheState<TThreadMetadata extends BaseMetadata> = {
|
|
|
2072
2103
|
/**
|
|
2073
2104
|
* Threads by ID.
|
|
2074
2105
|
*/
|
|
2075
|
-
threads: Record<string,
|
|
2106
|
+
threads: Record<string, ThreadDataWithDeleteInfo<TThreadMetadata>>;
|
|
2076
2107
|
/**
|
|
2077
2108
|
* Keep track of loading and error status of all the queries made by the client.
|
|
2078
2109
|
*/
|
|
@@ -2094,7 +2125,8 @@ declare type CacheState<TThreadMetadata extends BaseMetadata> = {
|
|
|
2094
2125
|
interface CacheStore<TThreadMetadata extends BaseMetadata> extends Store<CacheState<TThreadMetadata>> {
|
|
2095
2126
|
deleteThread(threadId: string): void;
|
|
2096
2127
|
updateThreadAndNotification(thread: ThreadData<TThreadMetadata>, inboxNotification?: InboxNotificationData): void;
|
|
2097
|
-
updateThreadsAndNotifications(threads: ThreadData<TThreadMetadata>[], inboxNotifications: InboxNotificationData[], queryKey?: string): void;
|
|
2128
|
+
updateThreadsAndNotifications(threads: ThreadData<TThreadMetadata>[], inboxNotifications: InboxNotificationData[], deletedThreads: ThreadDeleteInfo[], deletedInboxNotifications: InboxNotificationDeleteInfo[], queryKey?: string): void;
|
|
2129
|
+
updateRoomInboxNotificationSettings(roomId: string, settings: RoomNotificationSettings, queryKey: string): void;
|
|
2098
2130
|
pushOptimisticUpdate(optimisticUpdate: OptimisticUpdate<TThreadMetadata>): void;
|
|
2099
2131
|
setQueryState(queryKey: string, queryState: QueryState): void;
|
|
2100
2132
|
}
|
|
@@ -2107,6 +2139,10 @@ declare type RoomInfo = {
|
|
|
2107
2139
|
* The name of the room.
|
|
2108
2140
|
*/
|
|
2109
2141
|
name?: string;
|
|
2142
|
+
/**
|
|
2143
|
+
* The URL of the room.
|
|
2144
|
+
*/
|
|
2145
|
+
url?: string;
|
|
2110
2146
|
};
|
|
2111
2147
|
|
|
2112
2148
|
declare type ResolveMentionSuggestionsArgs = {
|
|
@@ -2155,14 +2191,20 @@ declare type PrivateClientApi<TUserMeta extends BaseUserMeta> = {
|
|
|
2155
2191
|
cacheStore: CacheStore<BaseMetadata>;
|
|
2156
2192
|
usersStore: BatchStore<TUserMeta["info"] | undefined, [string]>;
|
|
2157
2193
|
roomsInfoStore: BatchStore<RoomInfo | undefined, [string]>;
|
|
2194
|
+
getRoomIds: () => string[];
|
|
2158
2195
|
};
|
|
2159
2196
|
declare type InboxNotificationsApi<TThreadMetadata extends BaseMetadata = never> = {
|
|
2160
2197
|
/**
|
|
2161
2198
|
* @private
|
|
2162
2199
|
*/
|
|
2163
|
-
getInboxNotifications(): Promise<{
|
|
2200
|
+
getInboxNotifications(options?: GetInboxNotificationsOptions): Promise<{
|
|
2164
2201
|
inboxNotifications: InboxNotificationData[];
|
|
2165
2202
|
threads: ThreadData<TThreadMetadata>[];
|
|
2203
|
+
deletedThreads: ThreadDeleteInfo[];
|
|
2204
|
+
deletedInboxNotifications: InboxNotificationDeleteInfo[];
|
|
2205
|
+
meta: {
|
|
2206
|
+
requestedAt: Date;
|
|
2207
|
+
};
|
|
2166
2208
|
}>;
|
|
2167
2209
|
/**
|
|
2168
2210
|
* @private
|
|
@@ -2770,4 +2812,4 @@ declare type EnsureJson<T> = [
|
|
|
2770
2812
|
[K in keyof T]: EnsureJson<T[K]>;
|
|
2771
2813
|
};
|
|
2772
2814
|
|
|
2773
|
-
export { type AckOp, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type CacheState, type CacheStore, type Client, type ClientMsg, ClientMsgCode, 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 CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationThreadData, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, NotificationsApiError, type Op, OpCode, type OptionalPromise, type Others, type OthersEvent, type ParentToChildNodeMap, type PartialNullable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomInfo, type RoomInitializers, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, applyOptimisticUpdates, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createClient, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
|
|
2815
|
+
export { type AckOp, type BaseAuthResult, type BaseMetadata, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type CacheState, type CacheStore, type Client, type ClientMsg, ClientMsgCode, 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 CommentReaction, type CommentUserReaction, type CommentUserReactionPlain, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IdTuple, type Immutable, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationThreadData, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type LegacyConnectionStatus, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, type LostConnectionEvent, type Lson, type LsonObject, type NodeMap, NotificationsApiError, type Op, OpCode, type OptionalPromise, type Others, type OthersEvent, type ParentToChildNodeMap, type PartialNullable, type PlainLson, type PlainLsonFields, type PlainLsonList, type PlainLsonMap, type PlainLsonObject, type RejectedStorageOpServerMsg, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomInfo, type RoomInitializers, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, type Status, type StorageStatus, type StorageUpdate, type Store, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type ThreadData, type ThreadDataPlain, type ThreadDeleteInfo, type ToImmutable, type ToJson, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type User, type UserJoinServerMsg, type UserLeftServerMsg, WebsocketCloseCodes, type YDocUpdateServerMsg, ackOp, applyOptimisticUpdates, asPos, assert, assertNever, b64decode, cloneLson, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToThreadData, createClient, deprecate, deprecateIf, detectDupes, errorIf, freeze, getMentionedIdsFromCommentBody, isChildCrdt, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isPlainObject, isRootCrdt, kInternal, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, nn, patchLiveObjectKey, raise, shallow, stringify, stringifyCommentBody, throwUsageError, toPlainLson, tryParseJson, withTimeout };
|