@sparkvault/sdk-js 8.10.2 → 8.10.4
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 +22 -13
- package/dist/notify/types.d.ts +22 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1843,39 +1843,48 @@ declare class EntropyModule {
|
|
|
1843
1843
|
* Notify Module Types
|
|
1844
1844
|
*
|
|
1845
1845
|
* The signed-in user's first-party inbox. Unlike Entropy/Sparks, notification
|
|
1846
|
-
* ROWS are NOT remapped to camelCase:
|
|
1847
|
-
*
|
|
1848
|
-
*
|
|
1849
|
-
*
|
|
1850
|
-
*
|
|
1851
|
-
*
|
|
1846
|
+
* ROWS are NOT remapped to camelCase: their fields mirror the wire. A row carries
|
|
1847
|
+
* its cleartext part (`title`, and for a cleartext send a short `body`) natively;
|
|
1848
|
+
* a SECURE send's content is never carried here — it lives behind the SparkLink
|
|
1849
|
+
* `sparklink_code`. Keeping the wire shape verbatim is the single source of truth
|
|
1850
|
+
* shared with `@sparkvault/sdk-mobile` and the first-party console, so do not
|
|
1851
|
+
* "camelCase" these rows. Only the input option `createdAt` is camelCase for call
|
|
1852
|
+
* ergonomics (mapped to `created_at` on the wire).
|
|
1852
1853
|
*/
|
|
1853
1854
|
/** Inbox views the feed can be filtered to. `all` excludes archived rows. */
|
|
1854
1855
|
type NotificationInboxState = 'all' | 'unseen' | 'unread' | 'archived';
|
|
1855
1856
|
/** Terminal display states the recipient can apply to one of their rows. */
|
|
1856
1857
|
type NotificationMarkState = 'seen' | 'read' | 'archived';
|
|
1857
1858
|
/**
|
|
1858
|
-
*
|
|
1859
|
-
* the
|
|
1860
|
-
*
|
|
1859
|
+
* An inbox row in the two-part notification model. The `title` (and, for a
|
|
1860
|
+
* cleartext send, the short `body`) is the NON-sensitive cleartext part, shown
|
|
1861
|
+
* natively. A SECURE send's content lives behind the SparkLink (`sparklink_code`)
|
|
1862
|
+
* and is never carried here — open the pointer to reveal it. Timestamps are epoch
|
|
1863
|
+
* SECONDS.
|
|
1861
1864
|
*/
|
|
1862
1865
|
interface NotificationRow {
|
|
1863
1866
|
notification_id: string;
|
|
1864
1867
|
send_id: string;
|
|
1865
1868
|
created_at: number;
|
|
1866
1869
|
title: string;
|
|
1870
|
+
/**
|
|
1871
|
+
* The short cleartext body of a plaintext send, shown natively. Absent on a
|
|
1872
|
+
* sealed row (its content lives behind the pointer).
|
|
1873
|
+
*/
|
|
1874
|
+
body?: string;
|
|
1867
1875
|
category: string;
|
|
1868
1876
|
type: string;
|
|
1869
1877
|
seen_at: number | null;
|
|
1870
1878
|
read_at: number | null;
|
|
1871
1879
|
archived_at: number | null;
|
|
1872
1880
|
/**
|
|
1873
|
-
* The grant to open. Present only for a SEALED send — a
|
|
1874
|
-
* its content inline in the channel and mints no grant, so its row has
|
|
1875
|
-
* pointer. Guard before building a URL from it.
|
|
1881
|
+
* The grant to open. Present only for a SEALED (secure) send — a cleartext send
|
|
1882
|
+
* delivers its content inline in the channel and mints no grant, so its row has
|
|
1883
|
+
* no pointer. Guard before building a URL from it.
|
|
1876
1884
|
*/
|
|
1877
1885
|
sparklink_code?: string;
|
|
1878
|
-
|
|
1886
|
+
/** True only when there is a secure part to reveal (i.e. `sparklink_code` is set). */
|
|
1887
|
+
locked: boolean;
|
|
1879
1888
|
thread_id?: string;
|
|
1880
1889
|
}
|
|
1881
1890
|
interface ListNotificationsOptions {
|
package/dist/notify/types.d.ts
CHANGED
|
@@ -2,39 +2,48 @@
|
|
|
2
2
|
* Notify Module Types
|
|
3
3
|
*
|
|
4
4
|
* The signed-in user's first-party inbox. Unlike Entropy/Sparks, notification
|
|
5
|
-
* ROWS are NOT remapped to camelCase:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* ROWS are NOT remapped to camelCase: their fields mirror the wire. A row carries
|
|
6
|
+
* its cleartext part (`title`, and for a cleartext send a short `body`) natively;
|
|
7
|
+
* a SECURE send's content is never carried here — it lives behind the SparkLink
|
|
8
|
+
* `sparklink_code`. Keeping the wire shape verbatim is the single source of truth
|
|
9
|
+
* shared with `@sparkvault/sdk-mobile` and the first-party console, so do not
|
|
10
|
+
* "camelCase" these rows. Only the input option `createdAt` is camelCase for call
|
|
11
|
+
* ergonomics (mapped to `created_at` on the wire).
|
|
11
12
|
*/
|
|
12
13
|
/** Inbox views the feed can be filtered to. `all` excludes archived rows. */
|
|
13
14
|
export type NotificationInboxState = 'all' | 'unseen' | 'unread' | 'archived';
|
|
14
15
|
/** Terminal display states the recipient can apply to one of their rows. */
|
|
15
16
|
export type NotificationMarkState = 'seen' | 'read' | 'archived';
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
* the
|
|
19
|
-
*
|
|
18
|
+
* An inbox row in the two-part notification model. The `title` (and, for a
|
|
19
|
+
* cleartext send, the short `body`) is the NON-sensitive cleartext part, shown
|
|
20
|
+
* natively. A SECURE send's content lives behind the SparkLink (`sparklink_code`)
|
|
21
|
+
* and is never carried here — open the pointer to reveal it. Timestamps are epoch
|
|
22
|
+
* SECONDS.
|
|
20
23
|
*/
|
|
21
24
|
export interface NotificationRow {
|
|
22
25
|
notification_id: string;
|
|
23
26
|
send_id: string;
|
|
24
27
|
created_at: number;
|
|
25
28
|
title: string;
|
|
29
|
+
/**
|
|
30
|
+
* The short cleartext body of a plaintext send, shown natively. Absent on a
|
|
31
|
+
* sealed row (its content lives behind the pointer).
|
|
32
|
+
*/
|
|
33
|
+
body?: string;
|
|
26
34
|
category: string;
|
|
27
35
|
type: string;
|
|
28
36
|
seen_at: number | null;
|
|
29
37
|
read_at: number | null;
|
|
30
38
|
archived_at: number | null;
|
|
31
39
|
/**
|
|
32
|
-
* The grant to open. Present only for a SEALED send — a
|
|
33
|
-
* its content inline in the channel and mints no grant, so its row has
|
|
34
|
-
* pointer. Guard before building a URL from it.
|
|
40
|
+
* The grant to open. Present only for a SEALED (secure) send — a cleartext send
|
|
41
|
+
* delivers its content inline in the channel and mints no grant, so its row has
|
|
42
|
+
* no pointer. Guard before building a URL from it.
|
|
35
43
|
*/
|
|
36
44
|
sparklink_code?: string;
|
|
37
|
-
|
|
45
|
+
/** True only when there is a secure part to reveal (i.e. `sparklink_code` is set). */
|
|
46
|
+
locked: boolean;
|
|
38
47
|
thread_id?: string;
|
|
39
48
|
}
|
|
40
49
|
export interface ListNotificationsOptions {
|