@liveblocks/core 2.10.3-emails1 → 2.11.1
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 +16 -7
- package/dist/index.d.ts +16 -7
- package/dist/index.js +43 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
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 = "2.
|
|
9
|
+
var PKG_VERSION = "2.11.1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -6599,19 +6599,39 @@ ${Array.from(traces).join("\n\n")}`
|
|
|
6599
6599
|
query = objectToQuery(options2.query);
|
|
6600
6600
|
}
|
|
6601
6601
|
const PAGE_SIZE = 50;
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6602
|
+
try {
|
|
6603
|
+
const result = await httpClient2.get(url`/v2/c/rooms/${config.roomId}/threads`, {
|
|
6604
|
+
cursor: options2?.cursor,
|
|
6605
|
+
query,
|
|
6606
|
+
limit: PAGE_SIZE
|
|
6607
|
+
});
|
|
6608
|
+
return {
|
|
6609
|
+
threads: result.data.map(convertToThreadData),
|
|
6610
|
+
inboxNotifications: result.inboxNotifications.map(
|
|
6611
|
+
convertToInboxNotificationData
|
|
6612
|
+
),
|
|
6613
|
+
nextCursor: result.meta.nextCursor,
|
|
6614
|
+
requestedAt: new Date(result.meta.requestedAt)
|
|
6615
|
+
};
|
|
6616
|
+
} catch (err) {
|
|
6617
|
+
if (err instanceof HttpError && err.status === 404) {
|
|
6618
|
+
return {
|
|
6619
|
+
threads: [],
|
|
6620
|
+
inboxNotifications: [],
|
|
6621
|
+
nextCursor: null,
|
|
6622
|
+
//
|
|
6623
|
+
// HACK
|
|
6624
|
+
// requestedAt needs to be a *server* timestamp here. However, on
|
|
6625
|
+
// this 404 error response, there is no such timestamp. So out of
|
|
6626
|
+
// pure necessity we'll fall back to a local timestamp instead (and
|
|
6627
|
+
// allow for a possible 6 hour clock difference between client and
|
|
6628
|
+
// server).
|
|
6629
|
+
//
|
|
6630
|
+
requestedAt: new Date(Date.now() - 6 * 60 * 60 * 1e3)
|
|
6631
|
+
};
|
|
6632
|
+
}
|
|
6633
|
+
throw err;
|
|
6634
|
+
}
|
|
6615
6635
|
}
|
|
6616
6636
|
async function getThread(threadId) {
|
|
6617
6637
|
const response = await httpClient2.rawGet(
|
|
@@ -8279,6 +8299,13 @@ var SortedList = class _SortedList {
|
|
|
8279
8299
|
}
|
|
8280
8300
|
};
|
|
8281
8301
|
|
|
8302
|
+
// src/types/Others.ts
|
|
8303
|
+
var TextEditorType = /* @__PURE__ */ ((TextEditorType2) => {
|
|
8304
|
+
TextEditorType2["Lexical"] = "lexical";
|
|
8305
|
+
TextEditorType2["TipTap"] = "tiptap";
|
|
8306
|
+
return TextEditorType2;
|
|
8307
|
+
})(TextEditorType || {});
|
|
8308
|
+
|
|
8282
8309
|
// src/index.ts
|
|
8283
8310
|
detectDupes(PKG_NAME, PKG_VERSION, PKG_FORMAT);
|
|
8284
8311
|
var CommentsApiError = HttpError;
|
|
@@ -8296,6 +8323,7 @@ export {
|
|
|
8296
8323
|
Promise_withResolvers,
|
|
8297
8324
|
ServerMsgCode,
|
|
8298
8325
|
SortedList,
|
|
8326
|
+
TextEditorType,
|
|
8299
8327
|
WebsocketCloseCodes,
|
|
8300
8328
|
ackOp,
|
|
8301
8329
|
asPos,
|