@liveblocks/core 2.4.1-test1 → 2.4.1-test3
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 +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +31 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -9
- 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.4.1-
|
|
9
|
+
var PKG_VERSION = "2.4.1-test3";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2155,11 +2155,29 @@ function createNotificationsApi({
|
|
|
2155
2155
|
async function getThreads() {
|
|
2156
2156
|
const json = await fetchJson("/threads", void 0, {});
|
|
2157
2157
|
return {
|
|
2158
|
-
threads: json.threads.map(convertToThreadData)
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2158
|
+
threads: json.threads.map(convertToThreadData),
|
|
2159
|
+
inboxNotifications: json.inboxNotifications.map(
|
|
2160
|
+
convertToInboxNotificationData
|
|
2161
|
+
),
|
|
2162
|
+
requestedAt: new Date(json.meta.requestedAt)
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
async function getThreadsSince(options) {
|
|
2166
|
+
const json = await fetchJson("/threads", void 0, {
|
|
2167
|
+
since: options.since.toISOString()
|
|
2168
|
+
});
|
|
2169
|
+
return {
|
|
2170
|
+
threads: {
|
|
2171
|
+
updated: json.threads.map(convertToThreadData),
|
|
2172
|
+
deleted: json.deletedThreads.map(convertToThreadDeleteInfo)
|
|
2173
|
+
},
|
|
2174
|
+
inboxNotifications: {
|
|
2175
|
+
updated: json.inboxNotifications.map(convertToInboxNotificationData),
|
|
2176
|
+
deleted: json.deletedInboxNotifications.map(
|
|
2177
|
+
convertToInboxNotificationDeleteInfo
|
|
2178
|
+
)
|
|
2179
|
+
},
|
|
2180
|
+
requestedAt: new Date(json.meta.requestedAt)
|
|
2163
2181
|
};
|
|
2164
2182
|
}
|
|
2165
2183
|
return {
|
|
@@ -2170,7 +2188,8 @@ function createNotificationsApi({
|
|
|
2170
2188
|
markInboxNotificationAsRead,
|
|
2171
2189
|
deleteAllInboxNotifications,
|
|
2172
2190
|
deleteInboxNotification,
|
|
2173
|
-
getThreads
|
|
2191
|
+
getThreads,
|
|
2192
|
+
getThreadsSince
|
|
2174
2193
|
};
|
|
2175
2194
|
}
|
|
2176
2195
|
|
|
@@ -7507,7 +7526,8 @@ function createClient(options) {
|
|
|
7507
7526
|
markInboxNotificationAsRead,
|
|
7508
7527
|
deleteAllInboxNotifications,
|
|
7509
7528
|
deleteInboxNotification,
|
|
7510
|
-
getThreads
|
|
7529
|
+
getThreads,
|
|
7530
|
+
getThreadsSince
|
|
7511
7531
|
} = createNotificationsApi({
|
|
7512
7532
|
baseUrl,
|
|
7513
7533
|
fetcher: clientOptions.polyfills?.fetch || /* istanbul ignore next */
|
|
@@ -7566,7 +7586,9 @@ function createClient(options) {
|
|
|
7566
7586
|
roomsInfoStore,
|
|
7567
7587
|
getRoomIds() {
|
|
7568
7588
|
return Array.from(roomsById.keys());
|
|
7569
|
-
}
|
|
7589
|
+
},
|
|
7590
|
+
getThreads,
|
|
7591
|
+
getThreadsSince
|
|
7570
7592
|
}
|
|
7571
7593
|
},
|
|
7572
7594
|
kInternal,
|