@nivaro/sdk 0.1.15 → 0.1.16
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.ts +17 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2323,6 +2323,20 @@ interface NotificationItem {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
interface NotificationPage {
|
|
2325
2325
|
data: NotificationItem[];
|
|
2326
|
+
/** Present with `bundle: 'record'` — rows about one record, folded. */
|
|
2327
|
+
bundles?: Array<{
|
|
2328
|
+
collection: string;
|
|
2329
|
+
item: string;
|
|
2330
|
+
label: string;
|
|
2331
|
+
count: number;
|
|
2332
|
+
unread: number;
|
|
2333
|
+
lane: 'critical' | 'needs_you' | 'fyi';
|
|
2334
|
+
categories: string[];
|
|
2335
|
+
newest: string | null;
|
|
2336
|
+
url: string | null;
|
|
2337
|
+
ids: number[];
|
|
2338
|
+
rows: NotificationItem[];
|
|
2339
|
+
}>;
|
|
2326
2340
|
total: number;
|
|
2327
2341
|
page: number;
|
|
2328
2342
|
limit: number;
|
|
@@ -2337,6 +2351,9 @@ declare function listNotifications(query?: {
|
|
|
2337
2351
|
/** 'critical' | 'needs_you' | 'fyi' | 'attention' (= critical + needs_you). */
|
|
2338
2352
|
lane?: string;
|
|
2339
2353
|
category?: string;
|
|
2354
|
+
/** 'record' folds rows that name the same record into `bundles` on the page;
|
|
2355
|
+
* bundled rows leave `data`. */
|
|
2356
|
+
bundle?: 'record';
|
|
2340
2357
|
}): Command<NotificationPage>;
|
|
2341
2358
|
/** Unread notification count for the current user, split by lane.
|
|
2342
2359
|
* `attention` (critical + needs-you) is what a badge should show. */
|
package/dist/index.js
CHANGED
|
@@ -658,6 +658,7 @@ function listNotifications(query) {
|
|
|
658
658
|
if (query?.app) params.app = query.app;
|
|
659
659
|
if (query?.lane) params.lane = query.lane;
|
|
660
660
|
if (query?.category) params.category = query.category;
|
|
661
|
+
if (query?.bundle) params.bundle = query.bundle;
|
|
661
662
|
return cmd("GET", "/notifications", params);
|
|
662
663
|
}
|
|
663
664
|
function readUnreadNotificationCount() {
|
package/package.json
CHANGED