@liveblocks/core 3.8.0-next2 → 3.8.0-next4
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 +132 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1756,7 +1756,13 @@ interface NotificationHttpApi<M extends BaseMetadata> {
|
|
|
1756
1756
|
};
|
|
1757
1757
|
requestedAt: Date;
|
|
1758
1758
|
}>;
|
|
1759
|
-
getUnreadInboxNotificationsCount(
|
|
1759
|
+
getUnreadInboxNotificationsCount(options?: {
|
|
1760
|
+
query?: {
|
|
1761
|
+
roomId?: string;
|
|
1762
|
+
kind?: string;
|
|
1763
|
+
};
|
|
1764
|
+
signal?: AbortSignal;
|
|
1765
|
+
}): Promise<number>;
|
|
1760
1766
|
markAllInboxNotificationsAsRead(): Promise<void>;
|
|
1761
1767
|
markInboxNotificationAsRead(inboxNotificationId: string): Promise<void>;
|
|
1762
1768
|
deleteAllInboxNotifications(): Promise<void>;
|
|
@@ -2070,7 +2076,13 @@ type NotificationsApi<M extends BaseMetadata> = {
|
|
|
2070
2076
|
* @example
|
|
2071
2077
|
* const count = await client.getUnreadInboxNotificationsCount();
|
|
2072
2078
|
*/
|
|
2073
|
-
getUnreadInboxNotificationsCount(
|
|
2079
|
+
getUnreadInboxNotificationsCount(options?: {
|
|
2080
|
+
query?: {
|
|
2081
|
+
roomId?: string;
|
|
2082
|
+
kind?: string;
|
|
2083
|
+
};
|
|
2084
|
+
signal?: AbortSignal;
|
|
2085
|
+
}): Promise<number>;
|
|
2074
2086
|
/**
|
|
2075
2087
|
* Marks all inbox notifications as read.
|
|
2076
2088
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1756,7 +1756,13 @@ interface NotificationHttpApi<M extends BaseMetadata> {
|
|
|
1756
1756
|
};
|
|
1757
1757
|
requestedAt: Date;
|
|
1758
1758
|
}>;
|
|
1759
|
-
getUnreadInboxNotificationsCount(
|
|
1759
|
+
getUnreadInboxNotificationsCount(options?: {
|
|
1760
|
+
query?: {
|
|
1761
|
+
roomId?: string;
|
|
1762
|
+
kind?: string;
|
|
1763
|
+
};
|
|
1764
|
+
signal?: AbortSignal;
|
|
1765
|
+
}): Promise<number>;
|
|
1760
1766
|
markAllInboxNotificationsAsRead(): Promise<void>;
|
|
1761
1767
|
markInboxNotificationAsRead(inboxNotificationId: string): Promise<void>;
|
|
1762
1768
|
deleteAllInboxNotifications(): Promise<void>;
|
|
@@ -2070,7 +2076,13 @@ type NotificationsApi<M extends BaseMetadata> = {
|
|
|
2070
2076
|
* @example
|
|
2071
2077
|
* const count = await client.getUnreadInboxNotificationsCount();
|
|
2072
2078
|
*/
|
|
2073
|
-
getUnreadInboxNotificationsCount(
|
|
2079
|
+
getUnreadInboxNotificationsCount(options?: {
|
|
2080
|
+
query?: {
|
|
2081
|
+
roomId?: string;
|
|
2082
|
+
kind?: string;
|
|
2083
|
+
};
|
|
2084
|
+
signal?: AbortSignal;
|
|
2085
|
+
}): Promise<number>;
|
|
2074
2086
|
/**
|
|
2075
2087
|
* Marks all inbox notifications as read.
|
|
2076
2088
|
*
|
package/dist/index.js
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.8.0-
|
|
9
|
+
var PKG_VERSION = "3.8.0-next4";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2212,10 +2212,16 @@ function createApiClient({
|
|
|
2212
2212
|
requestedAt: new Date(json.meta.requestedAt)
|
|
2213
2213
|
};
|
|
2214
2214
|
}
|
|
2215
|
-
async function getUnreadInboxNotificationsCount() {
|
|
2215
|
+
async function getUnreadInboxNotificationsCount(options) {
|
|
2216
|
+
let query;
|
|
2217
|
+
if (options?.query) {
|
|
2218
|
+
query = objectToQuery(options.query);
|
|
2219
|
+
}
|
|
2216
2220
|
const { count } = await httpClient.get(
|
|
2217
2221
|
url`/v2/c/inbox-notifications/count`,
|
|
2218
|
-
await authManager.getAuthValue({ requestedScope: "comments:read" })
|
|
2222
|
+
await authManager.getAuthValue({ requestedScope: "comments:read" }),
|
|
2223
|
+
{ query },
|
|
2224
|
+
{ signal: options?.signal }
|
|
2219
2225
|
);
|
|
2220
2226
|
return count;
|
|
2221
2227
|
}
|