@liveblocks/node 2.19.0 → 2.20.0-blocknote

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.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 = "2.19.0";
6
+ var PKG_VERSION = "2.20.0-blocknote";
7
7
  var PKG_FORMAT = "esm";
8
8
 
9
9
  // src/client.ts
@@ -12,6 +12,7 @@ import {
12
12
  convertToCommentUserReaction,
13
13
  convertToInboxNotificationData,
14
14
  convertToThreadData,
15
+ createUserNotificationSettings,
15
16
  objectToQuery,
16
17
  tryParseJson,
17
18
  url as url2,
@@ -1015,7 +1016,7 @@ var Liveblocks = class {
1015
1016
  const { roomId, threadId } = params;
1016
1017
  const res = await this.#post(
1017
1018
  url2`/v2/rooms/${roomId}/threads/${threadId}/mark-as-resolved`,
1018
- {},
1019
+ { userId: params.data.userId },
1019
1020
  options
1020
1021
  );
1021
1022
  if (!res.ok) {
@@ -1035,7 +1036,7 @@ var Liveblocks = class {
1035
1036
  const { roomId, threadId } = params;
1036
1037
  const res = await this.#post(
1037
1038
  url2`/v2/rooms/${roomId}/threads/${threadId}/mark-as-unresolved`,
1038
- {},
1039
+ { userId: params.data.userId },
1039
1040
  options
1040
1041
  );
1041
1042
  if (!res.ok) {
@@ -1298,7 +1299,9 @@ var Liveblocks = class {
1298
1299
  if (!res.ok) {
1299
1300
  throw await LiveblocksError.from(res);
1300
1301
  }
1301
- return await res.json();
1302
+ const plainSettings = await res.json();
1303
+ const settings = createUserNotificationSettings(plainSettings);
1304
+ return settings;
1302
1305
  }
1303
1306
  /**
1304
1307
  * Update the user's notification settings.
@@ -1316,7 +1319,9 @@ var Liveblocks = class {
1316
1319
  if (!res.ok) {
1317
1320
  throw await LiveblocksError.from(res);
1318
1321
  }
1319
- return await res.json();
1322
+ const plainSettings = await res.json();
1323
+ const settings = createUserNotificationSettings(plainSettings);
1324
+ return settings;
1320
1325
  }
1321
1326
  /**
1322
1327
  * Delete the user's notification settings