@liveblocks/node 3.13.0-metadata1 → 3.13.0-vincent1

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 CHANGED
@@ -3,7 +3,7 @@ var _core = require('@liveblocks/core');
3
3
 
4
4
  // src/version.ts
5
5
  var PKG_NAME = "@liveblocks/node";
6
- var PKG_VERSION = "3.13.0-metadata1";
6
+ var PKG_VERSION = "3.13.0-vincent1";
7
7
  var PKG_FORMAT = "cjs";
8
8
 
9
9
  // src/client.ts
@@ -559,7 +559,8 @@ var Liveblocks = class {
559
559
  groupsAccesses,
560
560
  usersAccesses,
561
561
  metadata,
562
- tenantId
562
+ tenantId,
563
+ engine
563
564
  } = params;
564
565
  const res = await this.#post(
565
566
  _optionalChain([options, 'optionalAccess', _9 => _9.idempotent]) ? _core.url`/v2/rooms?idempotent` : _core.url`/v2/rooms`,
@@ -569,7 +570,8 @@ var Liveblocks = class {
569
570
  groupsAccesses,
570
571
  usersAccesses,
571
572
  tenantId,
572
- metadata
573
+ metadata,
574
+ engine
573
575
  },
574
576
  options
575
577
  );
@@ -988,7 +990,6 @@ var Liveblocks = class {
988
990
  * @param params.data.userId The user ID of the user who is set to create the comment.
989
991
  * @param params.data.createdAt (optional) The date the comment is set to be created.
990
992
  * @param params.data.body The body of the comment.
991
- * @param params.data.metadata (optional) The metadata for the comment.
992
993
  * @param options.signal (optional) An abort signal to cancel the request.
993
994
  * @returns The created comment.
994
995
  */
@@ -1013,7 +1014,6 @@ var Liveblocks = class {
1013
1014
  * @param params.threadId The thread ID to edit the comment in.
1014
1015
  * @param params.commentId The comment ID to edit.
1015
1016
  * @param params.data.body The body of the comment.
1016
- * @param params.data.metadata (optional) The metadata for the comment. Value must be a string, boolean or number. Use null to delete a key.
1017
1017
  * @param params.data.editedAt (optional) The date the comment was edited.
1018
1018
  * @param options.signal (optional) An abort signal to cancel the request.
1019
1019
  * @returns The edited comment.
@@ -1022,11 +1022,7 @@ var Liveblocks = class {
1022
1022
  const { roomId, threadId, commentId, data } = params;
1023
1023
  const res = await this.#post(
1024
1024
  _core.url`/v2/rooms/${roomId}/threads/${threadId}/comments/${commentId}`,
1025
- {
1026
- body: data.body,
1027
- editedAt: _optionalChain([data, 'access', _13 => _13.editedAt, 'optionalAccess', _14 => _14.toISOString, 'call', _15 => _15()]),
1028
- metadata: data.metadata
1029
- },
1025
+ { ...data, editedAt: _optionalChain([data, 'access', _13 => _13.editedAt, 'optionalAccess', _14 => _14.toISOString, 'call', _15 => _15()]) },
1030
1026
  options
1031
1027
  );
1032
1028
  if (!res.ok) {
@@ -1060,7 +1056,6 @@ var Liveblocks = class {
1060
1056
  * @param params.thread.comment.userId The user ID of the user who created the comment.
1061
1057
  * @param params.thread.comment.createdAt (optional) The date the comment was created.
1062
1058
  * @param params.thread.comment.body The body of the comment.
1063
- * @param params.thread.comment.metadata (optional) The metadata for the comment.
1064
1059
  * @param options.signal (optional) An abort signal to cancel the request.
1065
1060
  * @returns The created thread. The thread will be created with the specified comment as its first comment.
1066
1061
  */
@@ -1204,32 +1199,6 @@ var Liveblocks = class {
1204
1199
  }
1205
1200
  return await res.json();
1206
1201
  }
1207
- /**
1208
- * Updates the metadata of the specified comment in a room.
1209
- * @param params.roomId The room ID to update the comment in.
1210
- * @param params.threadId The thread ID to update the comment in.
1211
- * @param params.commentId The comment ID to update.
1212
- * @param params.data.metadata The metadata for the comment. Value must be a string, boolean or number. Use null to delete a key.
1213
- * @param params.data.userId The user ID of the user who updated the comment.
1214
- * @param params.data.updatedAt (optional) The date the comment metadata is set to be updated.
1215
- * @param options.signal (optional) An abort signal to cancel the request.
1216
- * @returns The updated comment metadata.
1217
- */
1218
- async editCommentMetadata(params, options) {
1219
- const { roomId, threadId, commentId, data } = params;
1220
- const res = await this.#post(
1221
- _core.url`/v2/rooms/${roomId}/threads/${threadId}/comments/${commentId}/metadata`,
1222
- {
1223
- ...data,
1224
- updatedAt: _optionalChain([data, 'access', _23 => _23.updatedAt, 'optionalAccess', _24 => _24.toISOString, 'call', _25 => _25()])
1225
- },
1226
- options
1227
- );
1228
- if (!res.ok) {
1229
- throw await LiveblocksError.from(res);
1230
- }
1231
- return await res.json();
1232
- }
1233
1202
  /**
1234
1203
  * Adds a new comment reaction to a comment.
1235
1204
  * @param params.roomId The room ID to add the comment reaction in.
@@ -1247,7 +1216,7 @@ var Liveblocks = class {
1247
1216
  _core.url`/v2/rooms/${roomId}/threads/${threadId}/comments/${commentId}/add-reaction`,
1248
1217
  {
1249
1218
  ...data,
1250
- createdAt: _optionalChain([data, 'access', _26 => _26.createdAt, 'optionalAccess', _27 => _27.toISOString, 'call', _28 => _28()])
1219
+ createdAt: _optionalChain([data, 'access', _23 => _23.createdAt, 'optionalAccess', _24 => _24.toISOString, 'call', _25 => _25()])
1251
1220
  },
1252
1221
  options
1253
1222
  );
@@ -1273,7 +1242,7 @@ var Liveblocks = class {
1273
1242
  _core.url`/v2/rooms/${roomId}/threads/${threadId}/comments/${params.commentId}/remove-reaction`,
1274
1243
  {
1275
1244
  ...data,
1276
- removedAt: _optionalChain([data, 'access', _29 => _29.removedAt, 'optionalAccess', _30 => _30.toISOString, 'call', _31 => _31()])
1245
+ removedAt: _optionalChain([data, 'access', _26 => _26.removedAt, 'optionalAccess', _27 => _27.toISOString, 'call', _28 => _28()])
1277
1246
  },
1278
1247
  options
1279
1248
  );
@@ -1349,7 +1318,7 @@ var Liveblocks = class {
1349
1318
  */
1350
1319
  async *iterInboxNotifications(criteria, options) {
1351
1320
  const { signal } = _nullishCoalesce(options, () => ( {}));
1352
- const pageSize = _core.checkBounds.call(void 0, "pageSize", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _32 => _32.pageSize]), () => ( 50)), 10);
1321
+ const pageSize = _core.checkBounds.call(void 0, "pageSize", _nullishCoalesce(_optionalChain([options, 'optionalAccess', _29 => _29.pageSize]), () => ( 50)), 10);
1353
1322
  let cursor = void 0;
1354
1323
  while (true) {
1355
1324
  const { nextCursor, data } = await this.getInboxNotifications(
@@ -1673,7 +1642,7 @@ var Liveblocks = class {
1673
1642
  async getGroups(params, options) {
1674
1643
  const res = await this.#get(
1675
1644
  _core.url`/v2/groups`,
1676
- { startingAfter: _optionalChain([params, 'optionalAccess', _33 => _33.startingAfter]), limit: _optionalChain([params, 'optionalAccess', _34 => _34.limit]) },
1645
+ { startingAfter: _optionalChain([params, 'optionalAccess', _30 => _30.startingAfter]), limit: _optionalChain([params, 'optionalAccess', _31 => _31.limit]) },
1677
1646
  options
1678
1647
  );
1679
1648
  if (!res.ok) {
@@ -1735,7 +1704,7 @@ var Liveblocks = class {
1735
1704
  async massMutateStorage(criteria, callback, massOptions) {
1736
1705
  const concurrency = _core.checkBounds.call(void 0,
1737
1706
  "concurrency",
1738
- _nullishCoalesce(_optionalChain([massOptions, 'optionalAccess', _35 => _35.concurrency]), () => ( 8)),
1707
+ _nullishCoalesce(_optionalChain([massOptions, 'optionalAccess', _32 => _32.concurrency]), () => ( 8)),
1739
1708
  1,
1740
1709
  20
1741
1710
  );
@@ -1751,7 +1720,7 @@ var Liveblocks = class {
1751
1720
  }
1752
1721
  async #_mutateOneRoom(roomId, room, callback, options) {
1753
1722
  const debounceInterval = 200;
1754
- const { signal, abort } = _core.makeAbortController.call(void 0, _optionalChain([options, 'optionalAccess', _36 => _36.signal]));
1723
+ const { signal, abort } = _core.makeAbortController.call(void 0, _optionalChain([options, 'optionalAccess', _33 => _33.signal]));
1755
1724
  let opsBuffer = [];
1756
1725
  let outstandingFlush$ = void 0;
1757
1726
  let lastFlush = performance.now();
@@ -1817,7 +1786,7 @@ var Liveblocks = class {
1817
1786
  const res = await this.#post(
1818
1787
  _core.url`/v2/rooms/${roomId}/send-message`,
1819
1788
  { messages },
1820
- { signal: _optionalChain([options, 'optionalAccess', _37 => _37.signal]) }
1789
+ { signal: _optionalChain([options, 'optionalAccess', _34 => _34.signal]) }
1821
1790
  );
1822
1791
  if (!res.ok) {
1823
1792
  throw await LiveblocksError.from(res);
@@ -1954,7 +1923,7 @@ var Liveblocks = class {
1954
1923
  "Content-Type": params.file.type,
1955
1924
  "Content-Length": String(params.file.size)
1956
1925
  },
1957
- signal: _optionalChain([options, 'optionalAccess', _38 => _38.signal])
1926
+ signal: _optionalChain([options, 'optionalAccess', _35 => _35.signal])
1958
1927
  }
1959
1928
  );
1960
1929
  if (!res.ok) {
@@ -2230,7 +2199,6 @@ var WebhookHandler = class _WebhookHandler {
2230
2199
  "commentDeleted",
2231
2200
  "commentReactionAdded",
2232
2201
  "commentReactionRemoved",
2233
- "commentMetadataUpdated",
2234
2202
  "threadMetadataUpdated",
2235
2203
  "threadCreated",
2236
2204
  "threadDeleted",