@liveblocks/node 3.17.0 → 3.18.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseUserMeta, DU, LiveObject, Awaitable, DS, FeedCreateMetadata, FeedUpdateMetadata, Json, DFMD, JsonObject, OptionalTupleUnless, PlainLsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, DFM, Feed, FeedMessage, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, FeedCreateMetadata, FeedUpdateMetadata, Json, DFMD, JsonObject, OptionalTupleUnless, PlainLsonObject, ToJson, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, DFM, Feed, FeedMessage, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
2
2
  export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
3
3
  import { IncomingHttpHeaders } from 'http';
4
4
 
@@ -58,14 +58,6 @@ declare class Session {
58
58
  * @liveblocks/core has browser-specific code.
59
59
  */
60
60
 
61
- type SerializeMaps<T> = T extends ReadonlyMap<infer K, infer V> ? K extends string ? {
62
- readonly [P in K]: SerializeMaps<V>;
63
- } : {
64
- readonly [key: string]: SerializeMaps<V>;
65
- } : T extends object ? {
66
- readonly [P in keyof T]: SerializeMaps<T[P]>;
67
- } : T;
68
- type ToSimplifiedJson<S extends LsonObject> = LsonObject extends S ? JsonObject : SerializeMaps<ToImmutable<S>>;
69
61
  type LiveblocksOptions = {
70
62
  /**
71
63
  * The Liveblocks secret key. Must start with "sk_".
@@ -730,7 +722,7 @@ declare class Liveblocks {
730
722
  */
731
723
  getStorageDocument(roomId: string, format: "plain-lson", options?: RequestOptions): Promise<PlainLsonObject>;
732
724
  getStorageDocument(roomId: string): Promise<PlainLsonObject>;
733
- getStorageDocument(roomId: string, format: "json", options?: RequestOptions): Promise<ToSimplifiedJson<S>>;
725
+ getStorageDocument(roomId: string, format: "json", options?: RequestOptions): Promise<ToJson<S>>;
734
726
  /**
735
727
  * Initializes a room’s Storage. The room must already exist and have an empty Storage.
736
728
  * Calling this endpoint will disconnect all users from the room if there are any.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseUserMeta, DU, LiveObject, Awaitable, DS, FeedCreateMetadata, FeedUpdateMetadata, Json, DFMD, JsonObject, OptionalTupleUnless, PlainLsonObject, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, DFM, Feed, FeedMessage, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
1
+ import { BaseUserMeta, DU, LiveObject, Awaitable, DS, FeedCreateMetadata, FeedUpdateMetadata, Json, DFMD, JsonObject, OptionalTupleUnless, PlainLsonObject, ToJson, QueryMetadata, ThreadData, UserSubscriptionData, CommentData, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, DFM, Feed, FeedMessage, PartialUnless, BaseMetadata, DE, DTM, DCM, NotificationChannel } from '@liveblocks/core';
2
2
  export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
3
3
  import { IncomingHttpHeaders } from 'http';
4
4
 
@@ -58,14 +58,6 @@ declare class Session {
58
58
  * @liveblocks/core has browser-specific code.
59
59
  */
60
60
 
61
- type SerializeMaps<T> = T extends ReadonlyMap<infer K, infer V> ? K extends string ? {
62
- readonly [P in K]: SerializeMaps<V>;
63
- } : {
64
- readonly [key: string]: SerializeMaps<V>;
65
- } : T extends object ? {
66
- readonly [P in keyof T]: SerializeMaps<T[P]>;
67
- } : T;
68
- type ToSimplifiedJson<S extends LsonObject> = LsonObject extends S ? JsonObject : SerializeMaps<ToImmutable<S>>;
69
61
  type LiveblocksOptions = {
70
62
  /**
71
63
  * The Liveblocks secret key. Must start with "sk_".
@@ -730,7 +722,7 @@ declare class Liveblocks {
730
722
  */
731
723
  getStorageDocument(roomId: string, format: "plain-lson", options?: RequestOptions): Promise<PlainLsonObject>;
732
724
  getStorageDocument(roomId: string): Promise<PlainLsonObject>;
733
- getStorageDocument(roomId: string, format: "json", options?: RequestOptions): Promise<ToSimplifiedJson<S>>;
725
+ getStorageDocument(roomId: string, format: "json", options?: RequestOptions): Promise<ToJson<S>>;
734
726
  /**
735
727
  * Initializes a room’s Storage. The room must already exist and have an empty Storage.
736
728
  * Calling this endpoint will disconnect all users from the room if there are any.
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { detectDupes } from "@liveblocks/core";
3
3
 
4
4
  // src/version.ts
5
5
  var PKG_NAME = "@liveblocks/node";
6
- var PKG_VERSION = "3.17.0";
6
+ var PKG_VERSION = "3.18.0-rc1";
7
7
  var PKG_FORMAT = "esm";
8
8
 
9
9
  // src/client.ts