@liveblocks/core 3.13.0-metadata2 → 3.13.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.cjs CHANGED
@@ -6,7 +6,7 @@ var __export = (target, all) => {
6
6
 
7
7
  // src/version.ts
8
8
  var PKG_NAME = "@liveblocks/core";
9
- var PKG_VERSION = "3.13.0-metadata2";
9
+ var PKG_VERSION = "3.13.0-rc1";
10
10
  var PKG_FORMAT = "cjs";
11
11
 
12
12
  // src/dupe-detection.ts
@@ -1606,7 +1606,6 @@ function createApiClient({
1606
1606
  comment: {
1607
1607
  id: commentId,
1608
1608
  body: options.body,
1609
- metadata: options.commentMetadata,
1610
1609
  attachmentIds: options.attachmentIds
1611
1610
  },
1612
1611
  metadata: options.metadata
@@ -1660,16 +1659,6 @@ function createApiClient({
1660
1659
  options.metadata
1661
1660
  );
1662
1661
  }
1663
- async function editCommentMetadata(options) {
1664
- return await httpClient.post(
1665
- url`/v2/c/rooms/${options.roomId}/threads/${options.threadId}/comments/${options.commentId}/metadata`,
1666
- await authManager.getAuthValue({
1667
- requestedScope: "comments:read",
1668
- roomId: options.roomId
1669
- }),
1670
- options.metadata
1671
- );
1672
- }
1673
1662
  async function createComment(options) {
1674
1663
  const commentId = _nullishCoalesce(options.commentId, () => ( createCommentId()));
1675
1664
  const comment = await httpClient.post(
@@ -1681,7 +1670,6 @@ function createApiClient({
1681
1670
  {
1682
1671
  id: commentId,
1683
1672
  body: options.body,
1684
- metadata: options.metadata,
1685
1673
  attachmentIds: options.attachmentIds
1686
1674
  }
1687
1675
  );
@@ -1696,8 +1684,7 @@ function createApiClient({
1696
1684
  }),
1697
1685
  {
1698
1686
  body: options.body,
1699
- attachmentIds: options.attachmentIds,
1700
- metadata: options.metadata
1687
+ attachmentIds: options.attachmentIds
1701
1688
  }
1702
1689
  );
1703
1690
  return convertToCommentData(comment);
@@ -2439,7 +2426,6 @@ function createApiClient({
2439
2426
  editThreadMetadata,
2440
2427
  createComment,
2441
2428
  editComment,
2442
- editCommentMetadata,
2443
2429
  deleteComment,
2444
2430
  addReaction,
2445
2431
  removeReaction,
@@ -3104,7 +3090,7 @@ var ServerMsgCode = Object.freeze({
3104
3090
  BROADCASTED_EVENT: 103,
3105
3091
  ROOM_STATE: 104,
3106
3092
  // For Storage
3107
- STORAGE_STATE: 200,
3093
+ INITIAL_STORAGE_STATE: 200,
3108
3094
  UPDATE_STORAGE: 201,
3109
3095
  // For Yjs Docs
3110
3096
  UPDATE_YDOC: 300,
@@ -3118,7 +3104,6 @@ var ServerMsgCode = Object.freeze({
3118
3104
  COMMENT_DELETED: 404,
3119
3105
  COMMENT_REACTION_ADDED: 405,
3120
3106
  COMMENT_REACTION_REMOVED: 406,
3121
- COMMENT_METADATA_UPDATED: 409,
3122
3107
  // Error codes
3123
3108
  REJECT_STORAGE_OP: 299
3124
3109
  // Sent if a mutation was not allowed on the server (i.e. due to permissions, limit exceeded, etc)
@@ -8677,8 +8662,6 @@ function defaultMessageFromContext(context) {
8677
8662
  return "Could not delete thread";
8678
8663
  case "EDIT_THREAD_METADATA_ERROR":
8679
8664
  return "Could not edit thread metadata";
8680
- case "EDIT_COMMENT_METADATA_ERROR":
8681
- return "Could not edit comment metadata";
8682
8665
  case "MARK_THREAD_AS_RESOLVED_ERROR":
8683
8666
  return "Could not mark thread as resolved";
8684
8667
  case "MARK_THREAD_AS_UNRESOLVED_ERROR":
@@ -9492,7 +9475,7 @@ function createRoom(options, config) {
9492
9475
  updates.others.push(onRoomStateMessage(message));
9493
9476
  break;
9494
9477
  }
9495
- case ServerMsgCode.STORAGE_STATE: {
9478
+ case ServerMsgCode.INITIAL_STORAGE_STATE: {
9496
9479
  processInitialStorage(message);
9497
9480
  break;
9498
9481
  }
@@ -9534,8 +9517,7 @@ function createRoom(options, config) {
9534
9517
  case ServerMsgCode.COMMENT_REACTION_REMOVED:
9535
9518
  case ServerMsgCode.COMMENT_CREATED:
9536
9519
  case ServerMsgCode.COMMENT_EDITED:
9537
- case ServerMsgCode.COMMENT_DELETED:
9538
- case ServerMsgCode.COMMENT_METADATA_UPDATED: {
9520
+ case ServerMsgCode.COMMENT_DELETED: {
9539
9521
  eventHub.comments.notify(message);
9540
9522
  break;
9541
9523
  }
@@ -9651,7 +9633,7 @@ function createRoom(options, config) {
9651
9633
  async function streamStorage() {
9652
9634
  if (!managedSocket.authValue) return;
9653
9635
  const items = await httpClient.streamStorage({ roomId });
9654
- processInitialStorage({ type: ServerMsgCode.STORAGE_STATE, items });
9636
+ processInitialStorage({ type: ServerMsgCode.INITIAL_STORAGE_STATE, items });
9655
9637
  }
9656
9638
  function refreshStorage(options2) {
9657
9639
  const messages = context.buffer.messages;
@@ -9887,7 +9869,6 @@ function createRoom(options, config) {
9887
9869
  commentId: options2.commentId,
9888
9870
  metadata: options2.metadata,
9889
9871
  body: options2.body,
9890
- commentMetadata: options2.commentMetadata,
9891
9872
  attachmentIds: options2.attachmentIds
9892
9873
  });
9893
9874
  }
@@ -9900,18 +9881,6 @@ function createRoom(options, config) {
9900
9881
  }) {
9901
9882
  return httpClient.editThreadMetadata({ roomId, threadId, metadata });
9902
9883
  }
9903
- async function editCommentMetadata({
9904
- threadId,
9905
- commentId,
9906
- metadata
9907
- }) {
9908
- return httpClient.editCommentMetadata({
9909
- roomId,
9910
- threadId,
9911
- commentId,
9912
- metadata
9913
- });
9914
- }
9915
9884
  async function markThreadAsResolved(threadId) {
9916
9885
  return httpClient.markThreadAsResolved({ roomId, threadId });
9917
9886
  }
@@ -9933,7 +9902,6 @@ function createRoom(options, config) {
9933
9902
  threadId: options2.threadId,
9934
9903
  commentId: options2.commentId,
9935
9904
  body: options2.body,
9936
- metadata: options2.metadata,
9937
9905
  attachmentIds: options2.attachmentIds
9938
9906
  });
9939
9907
  }
@@ -9943,7 +9911,6 @@ function createRoom(options, config) {
9943
9911
  threadId: options2.threadId,
9944
9912
  commentId: options2.commentId,
9945
9913
  body: options2.body,
9946
- metadata: options2.metadata,
9947
9914
  attachmentIds: options2.attachmentIds
9948
9915
  });
9949
9916
  }
@@ -10131,7 +10098,6 @@ function createRoom(options, config) {
10131
10098
  unsubscribeFromThread,
10132
10099
  createComment,
10133
10100
  editComment,
10134
- editCommentMetadata,
10135
10101
  deleteComment,
10136
10102
  addReaction,
10137
10103
  removeReaction,