@liveblocks/core 2.17.0-channels1 → 2.17.0-usrnotsettings1
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 +116 -49
- package/dist/index.d.ts +116 -49
- package/dist/index.js +309 -206
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -99
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -151,9 +151,11 @@ type Observable<T> = {
|
|
|
151
151
|
};
|
|
152
152
|
type EventSource<T> = Observable<T> & {
|
|
153
153
|
/**
|
|
154
|
-
* Notify all subscribers about the event.
|
|
154
|
+
* Notify all subscribers about the event. Will return `false` if there
|
|
155
|
+
* weren't any subscribers at the time the .notify() was called, or `true` if
|
|
156
|
+
* there was at least one subscriber.
|
|
155
157
|
*/
|
|
156
|
-
notify(event: T):
|
|
158
|
+
notify(event: T): boolean;
|
|
157
159
|
/**
|
|
158
160
|
* Returns the number of active subscribers.
|
|
159
161
|
*/
|
|
@@ -300,9 +302,6 @@ type LostConnectionEvent = "lost" | "restored" | "failed";
|
|
|
300
302
|
* any value (except null).
|
|
301
303
|
*/
|
|
302
304
|
type BaseAuthResult = NonNullable<Json>;
|
|
303
|
-
declare class LiveblocksError extends Error {
|
|
304
|
-
code: number;
|
|
305
|
-
}
|
|
306
305
|
type Delegates<T extends BaseAuthResult> = {
|
|
307
306
|
authenticate: () => Promise<T>;
|
|
308
307
|
createSocket: (authValue: T) => IWebSocketInstance;
|
|
@@ -1056,7 +1055,7 @@ type StringOperators<T> = T | {
|
|
|
1056
1055
|
* - `startsWith` (`^` in query string)
|
|
1057
1056
|
*/
|
|
1058
1057
|
type QueryMetadata<M extends BaseMetadata> = {
|
|
1059
|
-
[K in keyof M]: string extends M[K] ? StringOperators<M[K]> : M[K];
|
|
1058
|
+
[K in keyof M]: (string extends M[K] ? StringOperators<M[K]> : M[K]) | null;
|
|
1060
1059
|
};
|
|
1061
1060
|
|
|
1062
1061
|
declare global {
|
|
@@ -1522,6 +1521,84 @@ declare namespace DevToolsTreeNode {
|
|
|
1522
1521
|
export type { DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode, DevToolsTreeNode_JsonTreeNode as JsonTreeNode, DevToolsTreeNode_LiveTreeNode as LiveTreeNode, DevToolsTreeNode_LsonTreeNode as LsonTreeNode, DevToolsTreeNode_TreeNode as TreeNode, DevToolsTreeNode_UserTreeNode as UserTreeNode };
|
|
1523
1522
|
}
|
|
1524
1523
|
|
|
1524
|
+
type OptionalKeys<T> = {
|
|
1525
|
+
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1526
|
+
}[keyof T];
|
|
1527
|
+
type MakeOptionalFieldsNullable<T> = {
|
|
1528
|
+
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1529
|
+
};
|
|
1530
|
+
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1531
|
+
|
|
1532
|
+
type RoomConnectionErrorContext = {
|
|
1533
|
+
type: "ROOM_CONNECTION_ERROR";
|
|
1534
|
+
code: -1 | 4001 | 4005 | 4006 | (number & {});
|
|
1535
|
+
roomId: string;
|
|
1536
|
+
};
|
|
1537
|
+
type CommentsOrNotificationsErrorContext = {
|
|
1538
|
+
type: "CREATE_THREAD_ERROR";
|
|
1539
|
+
roomId: string;
|
|
1540
|
+
threadId: string;
|
|
1541
|
+
commentId: string;
|
|
1542
|
+
body: CommentBody;
|
|
1543
|
+
metadata: BaseMetadata;
|
|
1544
|
+
} | {
|
|
1545
|
+
type: "DELETE_THREAD_ERROR";
|
|
1546
|
+
roomId: string;
|
|
1547
|
+
threadId: string;
|
|
1548
|
+
} | {
|
|
1549
|
+
type: "EDIT_THREAD_METADATA_ERROR";
|
|
1550
|
+
roomId: string;
|
|
1551
|
+
threadId: string;
|
|
1552
|
+
metadata: Patchable<BaseMetadata>;
|
|
1553
|
+
} | {
|
|
1554
|
+
type: "MARK_THREAD_AS_RESOLVED_ERROR" | "MARK_THREAD_AS_UNRESOLVED_ERROR";
|
|
1555
|
+
roomId: string;
|
|
1556
|
+
threadId: string;
|
|
1557
|
+
} | {
|
|
1558
|
+
type: "CREATE_COMMENT_ERROR" | "EDIT_COMMENT_ERROR";
|
|
1559
|
+
roomId: string;
|
|
1560
|
+
threadId: string;
|
|
1561
|
+
commentId: string;
|
|
1562
|
+
body: CommentBody;
|
|
1563
|
+
} | {
|
|
1564
|
+
type: "DELETE_COMMENT_ERROR";
|
|
1565
|
+
roomId: string;
|
|
1566
|
+
threadId: string;
|
|
1567
|
+
commentId: string;
|
|
1568
|
+
} | {
|
|
1569
|
+
type: "ADD_REACTION_ERROR" | "REMOVE_REACTION_ERROR";
|
|
1570
|
+
roomId: string;
|
|
1571
|
+
threadId: string;
|
|
1572
|
+
commentId: string;
|
|
1573
|
+
emoji: string;
|
|
1574
|
+
} | {
|
|
1575
|
+
type: "MARK_INBOX_NOTIFICATION_AS_READ_ERROR";
|
|
1576
|
+
inboxNotificationId: string;
|
|
1577
|
+
roomId?: string;
|
|
1578
|
+
} | {
|
|
1579
|
+
type: "DELETE_INBOX_NOTIFICATION_ERROR";
|
|
1580
|
+
inboxNotificationId: string;
|
|
1581
|
+
} | {
|
|
1582
|
+
type: "MARK_ALL_INBOX_NOTIFICATIONS_AS_READ_ERROR" | "DELETE_ALL_INBOX_NOTIFICATIONS_ERROR";
|
|
1583
|
+
} | {
|
|
1584
|
+
type: "UPDATE_NOTIFICATION_SETTINGS_ERROR";
|
|
1585
|
+
roomId: string;
|
|
1586
|
+
};
|
|
1587
|
+
type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext>;
|
|
1588
|
+
declare class LiveblocksError extends Error {
|
|
1589
|
+
readonly context: LiveblocksErrorContext;
|
|
1590
|
+
constructor(message: string, context: LiveblocksErrorContext, cause?: Error);
|
|
1591
|
+
/** Convenience accessor for error.context.roomId (if available) */
|
|
1592
|
+
get roomId(): LiveblocksErrorContext["roomId"];
|
|
1593
|
+
/** @deprecated Prefer using `context.code` instead, to enable type narrowing */
|
|
1594
|
+
get code(): LiveblocksErrorContext["code"];
|
|
1595
|
+
/**
|
|
1596
|
+
* Creates a LiveblocksError from a generic error, by attaching Liveblocks
|
|
1597
|
+
* contextual information like room ID, thread ID, etc.
|
|
1598
|
+
*/
|
|
1599
|
+
static from(context: LiveblocksErrorContext, cause?: Error): LiveblocksError;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1525
1602
|
/**
|
|
1526
1603
|
* Represents a user connected in a room. Treated as immutable.
|
|
1527
1604
|
*/
|
|
@@ -1575,14 +1652,6 @@ declare enum TextEditorType {
|
|
|
1575
1652
|
TipTap = "tiptap"
|
|
1576
1653
|
}
|
|
1577
1654
|
|
|
1578
|
-
type OptionalKeys<T> = {
|
|
1579
|
-
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1580
|
-
}[keyof T];
|
|
1581
|
-
type MakeOptionalFieldsNullable<T> = {
|
|
1582
|
-
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1583
|
-
};
|
|
1584
|
-
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1585
|
-
|
|
1586
1655
|
type RoomThreadsNotificationSettings = "all" | "replies_and_mentions" | "none";
|
|
1587
1656
|
type RoomNotificationSettings = {
|
|
1588
1657
|
threads: RoomThreadsNotificationSettings;
|
|
@@ -1987,7 +2056,6 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
1987
2056
|
readonly self: Observable<User<P, U>>;
|
|
1988
2057
|
readonly myPresence: Observable<P>;
|
|
1989
2058
|
readonly others: Observable<OthersEvent<P, U>>;
|
|
1990
|
-
readonly error: Observable<LiveblocksError>;
|
|
1991
2059
|
/**
|
|
1992
2060
|
* @deprecated Renamed to `storageBatch`. The `storage` event source will
|
|
1993
2061
|
* soon be replaced by another/incompatible API.
|
|
@@ -2386,21 +2454,21 @@ type NotificationChannel = "email" | "slack" | "teams" | "webPush";
|
|
|
2386
2454
|
*/
|
|
2387
2455
|
type NotificationKind<K extends keyof DAD = keyof DAD> = "thread" | "textMention" | K;
|
|
2388
2456
|
/**
|
|
2389
|
-
* A channel
|
|
2457
|
+
* A notification channel settings is a set of notification kinds.
|
|
2390
2458
|
* One setting can have multiple kinds (+ augmentation)
|
|
2391
2459
|
*/
|
|
2392
|
-
type
|
|
2460
|
+
type NotificationChannelSettings = {
|
|
2393
2461
|
[K in NotificationKind]: boolean;
|
|
2394
2462
|
};
|
|
2395
2463
|
/**
|
|
2396
|
-
*
|
|
2397
|
-
* One channel for one
|
|
2464
|
+
* User notification settings are a set of notification channel setting.
|
|
2465
|
+
* One channel for one set of settings.
|
|
2398
2466
|
*/
|
|
2399
|
-
type
|
|
2400
|
-
[C in NotificationChannel]:
|
|
2467
|
+
type UserNotificationSettings = {
|
|
2468
|
+
[C in NotificationChannel]: NotificationChannelSettings;
|
|
2401
2469
|
};
|
|
2402
2470
|
/**
|
|
2403
|
-
* It creates a deep partial specific for `
|
|
2471
|
+
* It creates a deep partial specific for `UserNotificationSettings`
|
|
2404
2472
|
* to offer a nice DX when updating the settings (e.g not being forced to define every keys)
|
|
2405
2473
|
* and at the same the some preserver the augmentation for custom kinds (e.g `liveblocks.config.ts`).
|
|
2406
2474
|
*/
|
|
@@ -2412,16 +2480,16 @@ type DeepPartialWithAugmentation<T> = T extends object ? {
|
|
|
2412
2480
|
} : DeepPartialWithAugmentation<T[P]>;
|
|
2413
2481
|
} : T;
|
|
2414
2482
|
/**
|
|
2415
|
-
* Partial
|
|
2483
|
+
* Partial user notification settings
|
|
2416
2484
|
* with augmentation preserved gracefully
|
|
2417
2485
|
*/
|
|
2418
|
-
type
|
|
2486
|
+
type PartialUserNotificationSettings = DeepPartialWithAugmentation<UserNotificationSettings>;
|
|
2419
2487
|
/**
|
|
2420
2488
|
*
|
|
2421
|
-
* Utility to check if a channel
|
|
2489
|
+
* Utility to check if a notification channel settings
|
|
2422
2490
|
* is enabled for every notification kinds.
|
|
2423
2491
|
*/
|
|
2424
|
-
declare function
|
|
2492
|
+
declare function isNotificationChannelEnabled(settings: NotificationChannelSettings): boolean;
|
|
2425
2493
|
|
|
2426
2494
|
interface RoomHttpApi<M extends BaseMetadata> {
|
|
2427
2495
|
getThreads(options: {
|
|
@@ -2627,8 +2695,8 @@ interface NotificationHttpApi<M extends BaseMetadata> {
|
|
|
2627
2695
|
markInboxNotificationAsRead(inboxNotificationId: string): Promise<void>;
|
|
2628
2696
|
deleteAllInboxNotifications(): Promise<void>;
|
|
2629
2697
|
deleteInboxNotification(inboxNotificationId: string): Promise<void>;
|
|
2630
|
-
|
|
2631
|
-
|
|
2698
|
+
getUserNotificationSettings(): Promise<UserNotificationSettings>;
|
|
2699
|
+
updateUserNotificationSettings(settings: PartialUserNotificationSettings): Promise<UserNotificationSettings>;
|
|
2632
2700
|
}
|
|
2633
2701
|
interface LiveblocksHttpApi<M extends BaseMetadata> extends RoomHttpApi<M>, NotificationHttpApi<M> {
|
|
2634
2702
|
getUserThreads_experimental(options?: {
|
|
@@ -2822,6 +2890,7 @@ type PrivateClientApi<U extends BaseUserMeta, M extends BaseMetadata> = {
|
|
|
2822
2890
|
readonly httpClient: LiveblocksHttpApi<M>;
|
|
2823
2891
|
as<M2 extends BaseMetadata>(): Client<U, M2>;
|
|
2824
2892
|
createSyncSource(): SyncSource;
|
|
2893
|
+
emitError(context: LiveblocksErrorContext, cause?: Error): void;
|
|
2825
2894
|
};
|
|
2826
2895
|
type NotificationsApi<M extends BaseMetadata> = {
|
|
2827
2896
|
/**
|
|
@@ -2918,26 +2987,27 @@ type NotificationsApi<M extends BaseMetadata> = {
|
|
|
2918
2987
|
*/
|
|
2919
2988
|
deleteInboxNotification(inboxNotificationId: string): Promise<void>;
|
|
2920
2989
|
/**
|
|
2921
|
-
* Gets
|
|
2990
|
+
* Gets notifications settings for a user for a project.
|
|
2922
2991
|
*
|
|
2923
2992
|
* @example
|
|
2924
|
-
* const
|
|
2993
|
+
* const notificationSettings = await client.getNotificationSettings();
|
|
2925
2994
|
*/
|
|
2926
|
-
|
|
2995
|
+
getNotificationSettings(options?: {
|
|
2927
2996
|
signal?: AbortSignal;
|
|
2928
|
-
}): Promise<
|
|
2997
|
+
}): Promise<UserNotificationSettings>;
|
|
2929
2998
|
/**
|
|
2930
|
-
* Update
|
|
2999
|
+
* Update notifications settings for a user for a project.
|
|
2931
3000
|
*
|
|
2932
3001
|
* @example
|
|
2933
|
-
* await client.
|
|
3002
|
+
* await client.updateNotificationSettings({
|
|
2934
3003
|
* email: {
|
|
2935
3004
|
* thread: true,
|
|
2936
3005
|
* textMention: false,
|
|
3006
|
+
* $customKind1: true,
|
|
2937
3007
|
* }
|
|
2938
3008
|
* })
|
|
2939
3009
|
*/
|
|
2940
|
-
|
|
3010
|
+
updateNotificationSettings(settings: PartialUserNotificationSettings): Promise<UserNotificationSettings>;
|
|
2941
3011
|
};
|
|
2942
3012
|
/**
|
|
2943
3013
|
* @private Widest-possible Client type, matching _any_ Client instance. Note
|
|
@@ -3035,11 +3105,9 @@ type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
|
|
|
3035
3105
|
getSyncStatus(): SyncStatus;
|
|
3036
3106
|
/**
|
|
3037
3107
|
* All possible client events, subscribable from a single place.
|
|
3038
|
-
*
|
|
3039
|
-
* @private These event sources are private for now, but will become public
|
|
3040
|
-
* once they're stable.
|
|
3041
3108
|
*/
|
|
3042
3109
|
readonly events: {
|
|
3110
|
+
readonly error: Observable<LiveblocksError>;
|
|
3043
3111
|
readonly syncStatus: Observable<void>;
|
|
3044
3112
|
};
|
|
3045
3113
|
} & NotificationsApi<M>;
|
|
@@ -3310,10 +3378,14 @@ declare function assert(condition: boolean, errmsg: string): asserts condition;
|
|
|
3310
3378
|
declare function nn<T>(value: T, errmsg?: string): NonNullable<T>;
|
|
3311
3379
|
|
|
3312
3380
|
declare class HttpError extends Error {
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3381
|
+
response: Response;
|
|
3382
|
+
details?: JsonObject;
|
|
3383
|
+
private constructor();
|
|
3384
|
+
static fromResponse(response: Response): Promise<HttpError>;
|
|
3385
|
+
/**
|
|
3386
|
+
* Convenience accessor for response.status.
|
|
3387
|
+
*/
|
|
3388
|
+
get status(): number;
|
|
3317
3389
|
}
|
|
3318
3390
|
/**
|
|
3319
3391
|
* Wraps a promise factory. Will create promises until one succeeds. If
|
|
@@ -3453,7 +3525,7 @@ declare const nanoid: (t?: number) => string;
|
|
|
3453
3525
|
* // resolved:true AND metadata["status"]:open AND metadata["priority"]:3 AND metadata["org"]^"liveblocks:"
|
|
3454
3526
|
* ```
|
|
3455
3527
|
*/
|
|
3456
|
-
type SimpleFilterValue = string | number | boolean;
|
|
3528
|
+
type SimpleFilterValue = string | number | boolean | null;
|
|
3457
3529
|
type OperatorFilterValue = {
|
|
3458
3530
|
startsWith: string;
|
|
3459
3531
|
};
|
|
@@ -3700,11 +3772,6 @@ declare class SortedList<T> {
|
|
|
3700
3772
|
* nested objects are ordered.
|
|
3701
3773
|
*/
|
|
3702
3774
|
declare function stringify(value: unknown): string;
|
|
3703
|
-
/**
|
|
3704
|
-
* Like JSON.stringify(), but returns the same value no matter how keys in any
|
|
3705
|
-
* nested objects are ordered.
|
|
3706
|
-
*/
|
|
3707
|
-
declare function unstringify(value: string): unknown;
|
|
3708
3775
|
|
|
3709
3776
|
type QueryParams = Record<string, string | number | null | undefined> | URLSearchParams;
|
|
3710
3777
|
/**
|
|
@@ -3859,4 +3926,4 @@ declare const CommentsApiError: typeof HttpError;
|
|
|
3859
3926
|
/** @deprecated Use HttpError instead. */
|
|
3860
3927
|
declare const NotificationsApiError: typeof HttpError;
|
|
3861
3928
|
|
|
3862
|
-
export { type AckOp, type ActivityData, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type
|
|
3929
|
+
export { type AckOp, type ActivityData, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, 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, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, HttpError, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, NotificationsApiError, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type PartialUserNotificationSettings, 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 RejectedStorageOpServerMsg, type Relax, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserNotificationSettings, WebsocketCloseCodes, type YDocUpdateServerMsg, type YjsSyncStatus, ackOp, asPos, assert, assertNever, autoRetry, b64decode, batch, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createThreadId, deprecate, deprecateIf, detectDupes, entries, errorIf, freeze, generateCommentUrl, getMentionedIdsFromCommentBody, html, htmlSafe, isChildCrdt, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isPlainObject, isRootCrdt, isStartsWithOperator, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, resolveUsersInCommentBody, shallow, stringify, stringifyCommentBody, throwUsageError, toAbsoluteUrl, toPlainLson, tryParseJson, url, urljoin, wait, withTimeout };
|
package/dist/index.d.ts
CHANGED
|
@@ -151,9 +151,11 @@ type Observable<T> = {
|
|
|
151
151
|
};
|
|
152
152
|
type EventSource<T> = Observable<T> & {
|
|
153
153
|
/**
|
|
154
|
-
* Notify all subscribers about the event.
|
|
154
|
+
* Notify all subscribers about the event. Will return `false` if there
|
|
155
|
+
* weren't any subscribers at the time the .notify() was called, or `true` if
|
|
156
|
+
* there was at least one subscriber.
|
|
155
157
|
*/
|
|
156
|
-
notify(event: T):
|
|
158
|
+
notify(event: T): boolean;
|
|
157
159
|
/**
|
|
158
160
|
* Returns the number of active subscribers.
|
|
159
161
|
*/
|
|
@@ -300,9 +302,6 @@ type LostConnectionEvent = "lost" | "restored" | "failed";
|
|
|
300
302
|
* any value (except null).
|
|
301
303
|
*/
|
|
302
304
|
type BaseAuthResult = NonNullable<Json>;
|
|
303
|
-
declare class LiveblocksError extends Error {
|
|
304
|
-
code: number;
|
|
305
|
-
}
|
|
306
305
|
type Delegates<T extends BaseAuthResult> = {
|
|
307
306
|
authenticate: () => Promise<T>;
|
|
308
307
|
createSocket: (authValue: T) => IWebSocketInstance;
|
|
@@ -1056,7 +1055,7 @@ type StringOperators<T> = T | {
|
|
|
1056
1055
|
* - `startsWith` (`^` in query string)
|
|
1057
1056
|
*/
|
|
1058
1057
|
type QueryMetadata<M extends BaseMetadata> = {
|
|
1059
|
-
[K in keyof M]: string extends M[K] ? StringOperators<M[K]> : M[K];
|
|
1058
|
+
[K in keyof M]: (string extends M[K] ? StringOperators<M[K]> : M[K]) | null;
|
|
1060
1059
|
};
|
|
1061
1060
|
|
|
1062
1061
|
declare global {
|
|
@@ -1522,6 +1521,84 @@ declare namespace DevToolsTreeNode {
|
|
|
1522
1521
|
export type { DevToolsTreeNode_CustomEventTreeNode as CustomEventTreeNode, DevToolsTreeNode_JsonTreeNode as JsonTreeNode, DevToolsTreeNode_LiveTreeNode as LiveTreeNode, DevToolsTreeNode_LsonTreeNode as LsonTreeNode, DevToolsTreeNode_TreeNode as TreeNode, DevToolsTreeNode_UserTreeNode as UserTreeNode };
|
|
1523
1522
|
}
|
|
1524
1523
|
|
|
1524
|
+
type OptionalKeys<T> = {
|
|
1525
|
+
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1526
|
+
}[keyof T];
|
|
1527
|
+
type MakeOptionalFieldsNullable<T> = {
|
|
1528
|
+
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1529
|
+
};
|
|
1530
|
+
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1531
|
+
|
|
1532
|
+
type RoomConnectionErrorContext = {
|
|
1533
|
+
type: "ROOM_CONNECTION_ERROR";
|
|
1534
|
+
code: -1 | 4001 | 4005 | 4006 | (number & {});
|
|
1535
|
+
roomId: string;
|
|
1536
|
+
};
|
|
1537
|
+
type CommentsOrNotificationsErrorContext = {
|
|
1538
|
+
type: "CREATE_THREAD_ERROR";
|
|
1539
|
+
roomId: string;
|
|
1540
|
+
threadId: string;
|
|
1541
|
+
commentId: string;
|
|
1542
|
+
body: CommentBody;
|
|
1543
|
+
metadata: BaseMetadata;
|
|
1544
|
+
} | {
|
|
1545
|
+
type: "DELETE_THREAD_ERROR";
|
|
1546
|
+
roomId: string;
|
|
1547
|
+
threadId: string;
|
|
1548
|
+
} | {
|
|
1549
|
+
type: "EDIT_THREAD_METADATA_ERROR";
|
|
1550
|
+
roomId: string;
|
|
1551
|
+
threadId: string;
|
|
1552
|
+
metadata: Patchable<BaseMetadata>;
|
|
1553
|
+
} | {
|
|
1554
|
+
type: "MARK_THREAD_AS_RESOLVED_ERROR" | "MARK_THREAD_AS_UNRESOLVED_ERROR";
|
|
1555
|
+
roomId: string;
|
|
1556
|
+
threadId: string;
|
|
1557
|
+
} | {
|
|
1558
|
+
type: "CREATE_COMMENT_ERROR" | "EDIT_COMMENT_ERROR";
|
|
1559
|
+
roomId: string;
|
|
1560
|
+
threadId: string;
|
|
1561
|
+
commentId: string;
|
|
1562
|
+
body: CommentBody;
|
|
1563
|
+
} | {
|
|
1564
|
+
type: "DELETE_COMMENT_ERROR";
|
|
1565
|
+
roomId: string;
|
|
1566
|
+
threadId: string;
|
|
1567
|
+
commentId: string;
|
|
1568
|
+
} | {
|
|
1569
|
+
type: "ADD_REACTION_ERROR" | "REMOVE_REACTION_ERROR";
|
|
1570
|
+
roomId: string;
|
|
1571
|
+
threadId: string;
|
|
1572
|
+
commentId: string;
|
|
1573
|
+
emoji: string;
|
|
1574
|
+
} | {
|
|
1575
|
+
type: "MARK_INBOX_NOTIFICATION_AS_READ_ERROR";
|
|
1576
|
+
inboxNotificationId: string;
|
|
1577
|
+
roomId?: string;
|
|
1578
|
+
} | {
|
|
1579
|
+
type: "DELETE_INBOX_NOTIFICATION_ERROR";
|
|
1580
|
+
inboxNotificationId: string;
|
|
1581
|
+
} | {
|
|
1582
|
+
type: "MARK_ALL_INBOX_NOTIFICATIONS_AS_READ_ERROR" | "DELETE_ALL_INBOX_NOTIFICATIONS_ERROR";
|
|
1583
|
+
} | {
|
|
1584
|
+
type: "UPDATE_NOTIFICATION_SETTINGS_ERROR";
|
|
1585
|
+
roomId: string;
|
|
1586
|
+
};
|
|
1587
|
+
type LiveblocksErrorContext = Relax<RoomConnectionErrorContext | CommentsOrNotificationsErrorContext>;
|
|
1588
|
+
declare class LiveblocksError extends Error {
|
|
1589
|
+
readonly context: LiveblocksErrorContext;
|
|
1590
|
+
constructor(message: string, context: LiveblocksErrorContext, cause?: Error);
|
|
1591
|
+
/** Convenience accessor for error.context.roomId (if available) */
|
|
1592
|
+
get roomId(): LiveblocksErrorContext["roomId"];
|
|
1593
|
+
/** @deprecated Prefer using `context.code` instead, to enable type narrowing */
|
|
1594
|
+
get code(): LiveblocksErrorContext["code"];
|
|
1595
|
+
/**
|
|
1596
|
+
* Creates a LiveblocksError from a generic error, by attaching Liveblocks
|
|
1597
|
+
* contextual information like room ID, thread ID, etc.
|
|
1598
|
+
*/
|
|
1599
|
+
static from(context: LiveblocksErrorContext, cause?: Error): LiveblocksError;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1525
1602
|
/**
|
|
1526
1603
|
* Represents a user connected in a room. Treated as immutable.
|
|
1527
1604
|
*/
|
|
@@ -1575,14 +1652,6 @@ declare enum TextEditorType {
|
|
|
1575
1652
|
TipTap = "tiptap"
|
|
1576
1653
|
}
|
|
1577
1654
|
|
|
1578
|
-
type OptionalKeys<T> = {
|
|
1579
|
-
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
1580
|
-
}[keyof T];
|
|
1581
|
-
type MakeOptionalFieldsNullable<T> = {
|
|
1582
|
-
[K in keyof T]: K extends OptionalKeys<T> ? T[K] | null : T[K];
|
|
1583
|
-
};
|
|
1584
|
-
type Patchable<T> = Partial<MakeOptionalFieldsNullable<T>>;
|
|
1585
|
-
|
|
1586
1655
|
type RoomThreadsNotificationSettings = "all" | "replies_and_mentions" | "none";
|
|
1587
1656
|
type RoomNotificationSettings = {
|
|
1588
1657
|
threads: RoomThreadsNotificationSettings;
|
|
@@ -1987,7 +2056,6 @@ type Room<P extends JsonObject = DP, S extends LsonObject = DS, U extends BaseUs
|
|
|
1987
2056
|
readonly self: Observable<User<P, U>>;
|
|
1988
2057
|
readonly myPresence: Observable<P>;
|
|
1989
2058
|
readonly others: Observable<OthersEvent<P, U>>;
|
|
1990
|
-
readonly error: Observable<LiveblocksError>;
|
|
1991
2059
|
/**
|
|
1992
2060
|
* @deprecated Renamed to `storageBatch`. The `storage` event source will
|
|
1993
2061
|
* soon be replaced by another/incompatible API.
|
|
@@ -2386,21 +2454,21 @@ type NotificationChannel = "email" | "slack" | "teams" | "webPush";
|
|
|
2386
2454
|
*/
|
|
2387
2455
|
type NotificationKind<K extends keyof DAD = keyof DAD> = "thread" | "textMention" | K;
|
|
2388
2456
|
/**
|
|
2389
|
-
* A channel
|
|
2457
|
+
* A notification channel settings is a set of notification kinds.
|
|
2390
2458
|
* One setting can have multiple kinds (+ augmentation)
|
|
2391
2459
|
*/
|
|
2392
|
-
type
|
|
2460
|
+
type NotificationChannelSettings = {
|
|
2393
2461
|
[K in NotificationKind]: boolean;
|
|
2394
2462
|
};
|
|
2395
2463
|
/**
|
|
2396
|
-
*
|
|
2397
|
-
* One channel for one
|
|
2464
|
+
* User notification settings are a set of notification channel setting.
|
|
2465
|
+
* One channel for one set of settings.
|
|
2398
2466
|
*/
|
|
2399
|
-
type
|
|
2400
|
-
[C in NotificationChannel]:
|
|
2467
|
+
type UserNotificationSettings = {
|
|
2468
|
+
[C in NotificationChannel]: NotificationChannelSettings;
|
|
2401
2469
|
};
|
|
2402
2470
|
/**
|
|
2403
|
-
* It creates a deep partial specific for `
|
|
2471
|
+
* It creates a deep partial specific for `UserNotificationSettings`
|
|
2404
2472
|
* to offer a nice DX when updating the settings (e.g not being forced to define every keys)
|
|
2405
2473
|
* and at the same the some preserver the augmentation for custom kinds (e.g `liveblocks.config.ts`).
|
|
2406
2474
|
*/
|
|
@@ -2412,16 +2480,16 @@ type DeepPartialWithAugmentation<T> = T extends object ? {
|
|
|
2412
2480
|
} : DeepPartialWithAugmentation<T[P]>;
|
|
2413
2481
|
} : T;
|
|
2414
2482
|
/**
|
|
2415
|
-
* Partial
|
|
2483
|
+
* Partial user notification settings
|
|
2416
2484
|
* with augmentation preserved gracefully
|
|
2417
2485
|
*/
|
|
2418
|
-
type
|
|
2486
|
+
type PartialUserNotificationSettings = DeepPartialWithAugmentation<UserNotificationSettings>;
|
|
2419
2487
|
/**
|
|
2420
2488
|
*
|
|
2421
|
-
* Utility to check if a channel
|
|
2489
|
+
* Utility to check if a notification channel settings
|
|
2422
2490
|
* is enabled for every notification kinds.
|
|
2423
2491
|
*/
|
|
2424
|
-
declare function
|
|
2492
|
+
declare function isNotificationChannelEnabled(settings: NotificationChannelSettings): boolean;
|
|
2425
2493
|
|
|
2426
2494
|
interface RoomHttpApi<M extends BaseMetadata> {
|
|
2427
2495
|
getThreads(options: {
|
|
@@ -2627,8 +2695,8 @@ interface NotificationHttpApi<M extends BaseMetadata> {
|
|
|
2627
2695
|
markInboxNotificationAsRead(inboxNotificationId: string): Promise<void>;
|
|
2628
2696
|
deleteAllInboxNotifications(): Promise<void>;
|
|
2629
2697
|
deleteInboxNotification(inboxNotificationId: string): Promise<void>;
|
|
2630
|
-
|
|
2631
|
-
|
|
2698
|
+
getUserNotificationSettings(): Promise<UserNotificationSettings>;
|
|
2699
|
+
updateUserNotificationSettings(settings: PartialUserNotificationSettings): Promise<UserNotificationSettings>;
|
|
2632
2700
|
}
|
|
2633
2701
|
interface LiveblocksHttpApi<M extends BaseMetadata> extends RoomHttpApi<M>, NotificationHttpApi<M> {
|
|
2634
2702
|
getUserThreads_experimental(options?: {
|
|
@@ -2822,6 +2890,7 @@ type PrivateClientApi<U extends BaseUserMeta, M extends BaseMetadata> = {
|
|
|
2822
2890
|
readonly httpClient: LiveblocksHttpApi<M>;
|
|
2823
2891
|
as<M2 extends BaseMetadata>(): Client<U, M2>;
|
|
2824
2892
|
createSyncSource(): SyncSource;
|
|
2893
|
+
emitError(context: LiveblocksErrorContext, cause?: Error): void;
|
|
2825
2894
|
};
|
|
2826
2895
|
type NotificationsApi<M extends BaseMetadata> = {
|
|
2827
2896
|
/**
|
|
@@ -2918,26 +2987,27 @@ type NotificationsApi<M extends BaseMetadata> = {
|
|
|
2918
2987
|
*/
|
|
2919
2988
|
deleteInboxNotification(inboxNotificationId: string): Promise<void>;
|
|
2920
2989
|
/**
|
|
2921
|
-
* Gets
|
|
2990
|
+
* Gets notifications settings for a user for a project.
|
|
2922
2991
|
*
|
|
2923
2992
|
* @example
|
|
2924
|
-
* const
|
|
2993
|
+
* const notificationSettings = await client.getNotificationSettings();
|
|
2925
2994
|
*/
|
|
2926
|
-
|
|
2995
|
+
getNotificationSettings(options?: {
|
|
2927
2996
|
signal?: AbortSignal;
|
|
2928
|
-
}): Promise<
|
|
2997
|
+
}): Promise<UserNotificationSettings>;
|
|
2929
2998
|
/**
|
|
2930
|
-
* Update
|
|
2999
|
+
* Update notifications settings for a user for a project.
|
|
2931
3000
|
*
|
|
2932
3001
|
* @example
|
|
2933
|
-
* await client.
|
|
3002
|
+
* await client.updateNotificationSettings({
|
|
2934
3003
|
* email: {
|
|
2935
3004
|
* thread: true,
|
|
2936
3005
|
* textMention: false,
|
|
3006
|
+
* $customKind1: true,
|
|
2937
3007
|
* }
|
|
2938
3008
|
* })
|
|
2939
3009
|
*/
|
|
2940
|
-
|
|
3010
|
+
updateNotificationSettings(settings: PartialUserNotificationSettings): Promise<UserNotificationSettings>;
|
|
2941
3011
|
};
|
|
2942
3012
|
/**
|
|
2943
3013
|
* @private Widest-possible Client type, matching _any_ Client instance. Note
|
|
@@ -3035,11 +3105,9 @@ type Client<U extends BaseUserMeta = DU, M extends BaseMetadata = DM> = {
|
|
|
3035
3105
|
getSyncStatus(): SyncStatus;
|
|
3036
3106
|
/**
|
|
3037
3107
|
* All possible client events, subscribable from a single place.
|
|
3038
|
-
*
|
|
3039
|
-
* @private These event sources are private for now, but will become public
|
|
3040
|
-
* once they're stable.
|
|
3041
3108
|
*/
|
|
3042
3109
|
readonly events: {
|
|
3110
|
+
readonly error: Observable<LiveblocksError>;
|
|
3043
3111
|
readonly syncStatus: Observable<void>;
|
|
3044
3112
|
};
|
|
3045
3113
|
} & NotificationsApi<M>;
|
|
@@ -3310,10 +3378,14 @@ declare function assert(condition: boolean, errmsg: string): asserts condition;
|
|
|
3310
3378
|
declare function nn<T>(value: T, errmsg?: string): NonNullable<T>;
|
|
3311
3379
|
|
|
3312
3380
|
declare class HttpError extends Error {
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3381
|
+
response: Response;
|
|
3382
|
+
details?: JsonObject;
|
|
3383
|
+
private constructor();
|
|
3384
|
+
static fromResponse(response: Response): Promise<HttpError>;
|
|
3385
|
+
/**
|
|
3386
|
+
* Convenience accessor for response.status.
|
|
3387
|
+
*/
|
|
3388
|
+
get status(): number;
|
|
3317
3389
|
}
|
|
3318
3390
|
/**
|
|
3319
3391
|
* Wraps a promise factory. Will create promises until one succeeds. If
|
|
@@ -3453,7 +3525,7 @@ declare const nanoid: (t?: number) => string;
|
|
|
3453
3525
|
* // resolved:true AND metadata["status"]:open AND metadata["priority"]:3 AND metadata["org"]^"liveblocks:"
|
|
3454
3526
|
* ```
|
|
3455
3527
|
*/
|
|
3456
|
-
type SimpleFilterValue = string | number | boolean;
|
|
3528
|
+
type SimpleFilterValue = string | number | boolean | null;
|
|
3457
3529
|
type OperatorFilterValue = {
|
|
3458
3530
|
startsWith: string;
|
|
3459
3531
|
};
|
|
@@ -3700,11 +3772,6 @@ declare class SortedList<T> {
|
|
|
3700
3772
|
* nested objects are ordered.
|
|
3701
3773
|
*/
|
|
3702
3774
|
declare function stringify(value: unknown): string;
|
|
3703
|
-
/**
|
|
3704
|
-
* Like JSON.stringify(), but returns the same value no matter how keys in any
|
|
3705
|
-
* nested objects are ordered.
|
|
3706
|
-
*/
|
|
3707
|
-
declare function unstringify(value: string): unknown;
|
|
3708
3775
|
|
|
3709
3776
|
type QueryParams = Record<string, string | number | null | undefined> | URLSearchParams;
|
|
3710
3777
|
/**
|
|
@@ -3859,4 +3926,4 @@ declare const CommentsApiError: typeof HttpError;
|
|
|
3859
3926
|
/** @deprecated Use HttpError instead. */
|
|
3860
3927
|
declare const NotificationsApiError: typeof HttpError;
|
|
3861
3928
|
|
|
3862
|
-
export { type AckOp, type ActivityData, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type
|
|
3929
|
+
export { type AckOp, type ActivityData, type AsyncError, type AsyncLoading, type AsyncResult, type AsyncSuccess, type BaseActivitiesData, type BaseAuthResult, type BaseMetadata, type BaseRoomInfo, type BaseUserMeta, type Brand, type BroadcastEventClientMsg, type BroadcastOptions, type BroadcastedEventServerMsg, type Client, type ClientMsg, ClientMsgCode, type ClientOptions, 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, CommentsApiError, type CommentsEventServerMsg, CrdtType, type CreateListOp, type CreateMapOp, type CreateObjectOp, type CreateOp, type CreateRegisterOp, type CustomAuthenticationResult, type DAD, type DE, type DM, type DP, type DRI, type DS, type DU, DefaultMap, type Delegates, type DeleteCrdtOp, type DeleteObjectKeyOp, DerivedSignal, DevToolsTreeNode as DevTools, protocol as DevToolsMsg, type DistributiveOmit, type EnsureJson, type EnterOptions, type EventSource, type FetchStorageClientMsg, type FetchYDocClientMsg, type GetThreadsOptions, type History, type HistoryVersion, HttpError, type ISignal, type IUserInfo, type IWebSocket, type IWebSocketCloseEvent, type IWebSocketEvent, type IWebSocketInstance, type IWebSocketMessageEvent, type IYjsProvider, type IdTuple, type Immutable, type InboxNotificationCustomData, type InboxNotificationCustomDataPlain, type InboxNotificationData, type InboxNotificationDataPlain, type InboxNotificationDeleteInfo, type InboxNotificationTextMentionData, type InboxNotificationTextMentionDataPlain, type InboxNotificationThreadData, type InboxNotificationThreadDataPlain, type InitialDocumentStateServerMsg, type Json, type JsonArray, type JsonObject, type JsonScalar, type KDAD, LiveList, type LiveListUpdate, LiveMap, type LiveMapUpdate, type LiveNode, LiveObject, type LiveObjectUpdate, type LiveStructure, LiveblocksError, type LiveblocksErrorContext, type LostConnectionEvent, type Lson, type LsonObject, MutableSignal, type NoInfr, type NodeMap, type NotificationChannel, type NotificationChannelSettings, type NotificationKind, NotificationsApiError, type Observable, type Op, OpCode, type OpaqueClient, type OpaqueRoom, type OptionalPromise, type OptionalTupleUnless, type OthersEvent, type ParentToChildNodeMap, type PartialUnless, type PartialUserNotificationSettings, 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 RejectedStorageOpServerMsg, type Relax, type Resolve, type ResolveMentionSuggestionsArgs, type ResolveRoomsInfoArgs, type ResolveUsersArgs, type Room, type RoomEventMessage, type RoomNotificationSettings, type RoomStateServerMsg, type SerializedChild, type SerializedCrdt, type SerializedList, type SerializedMap, type SerializedObject, type SerializedRegister, type SerializedRootObject, type ServerMsg, ServerMsgCode, type SetParentKeyOp, Signal, type SignalType, SortedList, type Status, type StorageStatus, type StorageUpdate, type StringifyCommentBodyElements, type StringifyCommentBodyOptions, type SyncSource, type SyncStatus, TextEditorType, type ThreadData, type ThreadDataPlain, type ThreadDataWithDeleteInfo, type ThreadDeleteInfo, type ToImmutable, type ToJson, type URLSafeString, type UnsubscribeCallback, type UpdateObjectOp, type UpdatePresenceClientMsg, type UpdatePresenceServerMsg, type UpdateStorageClientMsg, type UpdateStorageServerMsg, type UpdateYDocClientMsg, type UploadAttachmentOptions, type User, type UserJoinServerMsg, type UserLeftServerMsg, type UserNotificationSettings, WebsocketCloseCodes, type YDocUpdateServerMsg, type YjsSyncStatus, ackOp, asPos, assert, assertNever, autoRetry, b64decode, batch, chunk, cloneLson, compactObject, fancyConsole as console, convertToCommentData, convertToCommentUserReaction, convertToInboxNotificationData, convertToThreadData, createClient, createCommentAttachmentId, createCommentId, createInboxNotificationId, createThreadId, deprecate, deprecateIf, detectDupes, entries, errorIf, freeze, generateCommentUrl, getMentionedIdsFromCommentBody, html, htmlSafe, isChildCrdt, isCommentBodyLink, isCommentBodyMention, isCommentBodyText, isJsonArray, isJsonObject, isJsonScalar, isLiveNode, isNotificationChannelEnabled, isPlainObject, isRootCrdt, isStartsWithOperator, kInternal, keys, legacy_patchImmutableObject, lsonToJson, makeEventSource, makePoller, makePosition, mapValues, memoizeOnSuccess, nanoid, nn, objectToQuery, patchLiveObjectKey, raise, resolveUsersInCommentBody, shallow, stringify, stringifyCommentBody, throwUsageError, toAbsoluteUrl, toPlainLson, tryParseJson, url, urljoin, wait, withTimeout };
|