@sparkvault/sdk-mobile 12.1.2 → 12.2.0
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/notify.d.ts +12 -4
- package/dist/notify.js.map +1 -1
- package/dist/notify.test-d.d.ts +1 -0
- package/package.json +1 -1
- package/src/notify.test-d.ts +4 -0
- package/src/notify.ts +12 -4
package/dist/notify.d.ts
CHANGED
|
@@ -62,12 +62,20 @@ export interface NotificationRow {
|
|
|
62
62
|
* building a URL from the code.
|
|
63
63
|
*/
|
|
64
64
|
pointer_url?: string;
|
|
65
|
+
/**
|
|
66
|
+
* True for a SEALED send's row, for good, whether or not its reveal still
|
|
67
|
+
* opens. A row is plain text, its `body` the whole message, only when
|
|
68
|
+
* `sealed` is false and it is not `recalled`; a sealed row's `body` is its
|
|
69
|
+
* sender's instructions about the reveal.
|
|
70
|
+
*/
|
|
71
|
+
sealed: boolean;
|
|
65
72
|
/**
|
|
66
73
|
* True only when there is a secure part left to reveal — exactly when
|
|
67
|
-
* `sparklink_code` is present. `false` does NOT mean "cleartext row": a
|
|
68
|
-
* row whose reveal no longer opens (opened, answered, expired or
|
|
69
|
-
* unlocked too, and so is a recalled one, with nothing behind it.
|
|
70
|
-
*
|
|
74
|
+
* `sparklink_code` is present. `false` does NOT mean "cleartext row": a
|
|
75
|
+
* `sealed` row whose reveal no longer opens (opened, answered, expired or
|
|
76
|
+
* gone) is unlocked too, and so is a recalled one, with nothing behind it.
|
|
77
|
+
* Show such a sealed row as no longer available rather than its
|
|
78
|
+
* instructions, which describe a link that opens nothing.
|
|
71
79
|
*/
|
|
72
80
|
locked: boolean;
|
|
73
81
|
/**
|
package/dist/notify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../src/notify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAA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,CAAyB,OAAO,CAAA,2BAA2B,EAAE;YAChG,UAAU,EAAE,SAAS;SACtB,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB,CAAC,SAAiB;QAC3C,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAA,2BAA2B,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACtC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAA,6BAA6B,SAAS,EAAE,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
package/dist/notify.test-d.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ type Assert<T extends true> = T;
|
|
|
31
31
|
type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? true : false;
|
|
32
32
|
export type NotifyWireContract = [
|
|
33
33
|
Assert<Equals<NotificationRow['recalled'], boolean>>,
|
|
34
|
+
Assert<Equals<NotificationRow['sealed'], boolean>>,
|
|
34
35
|
Assert<Equals<NotificationRow['locked'], boolean>>,
|
|
35
36
|
Assert<Equals<NotificationRow['sparklink_code'], string | undefined>>,
|
|
36
37
|
Assert<Equals<NotificationRow['pointer_url'], string | undefined>>,
|
package/package.json
CHANGED
package/src/notify.test-d.ts
CHANGED
|
@@ -40,6 +40,10 @@ export type NotifyWireContract = [
|
|
|
40
40
|
// it optional would let the app skip the "no longer available" branch and fall
|
|
41
41
|
// through to a reveal that opens nothing.
|
|
42
42
|
Assert<Equals<NotificationRow['recalled'], boolean>>,
|
|
43
|
+
// `sealed` is `Boolean(row.sparklink_code)` on the stored row, so it is always
|
|
44
|
+
// on the wire: typing it optional would let a client read a spent sealed row's
|
|
45
|
+
// instructions as a plaintext message.
|
|
46
|
+
Assert<Equals<NotificationRow['sealed'], boolean>>,
|
|
43
47
|
// `locked` is whether the row carries its pointer — always present.
|
|
44
48
|
Assert<Equals<NotificationRow['locked'], boolean>>,
|
|
45
49
|
// The pointer is carried only while its grant still opens and is absent on a
|
package/src/notify.ts
CHANGED
|
@@ -65,12 +65,20 @@ export interface NotificationRow {
|
|
|
65
65
|
* building a URL from the code.
|
|
66
66
|
*/
|
|
67
67
|
pointer_url?: string;
|
|
68
|
+
/**
|
|
69
|
+
* True for a SEALED send's row, for good, whether or not its reveal still
|
|
70
|
+
* opens. A row is plain text, its `body` the whole message, only when
|
|
71
|
+
* `sealed` is false and it is not `recalled`; a sealed row's `body` is its
|
|
72
|
+
* sender's instructions about the reveal.
|
|
73
|
+
*/
|
|
74
|
+
sealed: boolean;
|
|
68
75
|
/**
|
|
69
76
|
* True only when there is a secure part left to reveal — exactly when
|
|
70
|
-
* `sparklink_code` is present. `false` does NOT mean "cleartext row": a
|
|
71
|
-
* row whose reveal no longer opens (opened, answered, expired or
|
|
72
|
-
* unlocked too, and so is a recalled one, with nothing behind it.
|
|
73
|
-
*
|
|
77
|
+
* `sparklink_code` is present. `false` does NOT mean "cleartext row": a
|
|
78
|
+
* `sealed` row whose reveal no longer opens (opened, answered, expired or
|
|
79
|
+
* gone) is unlocked too, and so is a recalled one, with nothing behind it.
|
|
80
|
+
* Show such a sealed row as no longer available rather than its
|
|
81
|
+
* instructions, which describe a link that opens nothing.
|
|
74
82
|
*/
|
|
75
83
|
locked: boolean;
|
|
76
84
|
/**
|