@sparkvault/sdk-mobile 10.3.0 → 10.4.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/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export type { NameConflictPolicy, DownloadToFileOptions, DownloadToFileResult, S
11
11
  export { MobileHealthClient, } from './health.js';
12
12
  export type { HealthCheckOptions, HealthCheckResult, } from './health.js';
13
13
  export { MobileSparksClient, } from './sparks.js';
14
- export type { CreateSparkOptions, CreateSparkResponse, ListSparksOptions, ListSparksResponse, ShareSparkOptions, Spark, SparkResponse, } from './sparks.js';
14
+ export type { CreateSparkOptions, CreateSparkResponse, ListSparksOptions, ListSparksResponse, ShareSparkOptions, Spark, SparkLinkActionOptions, SparkResponse, } from './sparks.js';
15
15
  export { MobileEntropyClient, } from './entropy.js';
16
16
  export type { EntropyFormat, EntropyResponse, GenerateEntropyOptions, } from './entropy.js';
17
17
  export { MobileNotifyClient, } from './notify.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAYrB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAsBrB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAUrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAMtB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAiBrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAOlB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI/E,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAYrB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAsBrB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAWrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAMtB,OAAO,EACL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAiBrB,OAAO,EACL,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,aAAa,GACd,MAAM,UAAU,CAAC;AAOlB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,6BAA6B,EAC7B,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAI/E,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,iBAAiB,CAAC"}
package/dist/sparks.d.ts CHANGED
@@ -1,22 +1,35 @@
1
1
  import type { MobileHttpClient } from './http.js';
2
- import type { ResendSparkInviteResponse, ShareSparkResponse, SparkShareStatus, UnshareSparkResponse } from './types.js';
2
+ import type { ResendSparkInviteResponse, ShareSparkResponse, SparkShareStatus, SparkShareVisibility, UnshareSparkResponse } from './types.js';
3
3
  /** A Spark as GET /sparks lists it: never its payload, which only `get` reads. */
4
4
  export interface Spark {
5
5
  spark_id: string;
6
6
  account_id: string;
7
7
  content_type: string;
8
8
  size_bytes: number;
9
- /** `ash` once read or recalled, `expired` past its TTL, `deleted` once its owner deleted it. */
9
+ /**
10
+ * Its state when the list answers: `active` while its content is live (a
11
+ * Spark a recipient is reading included), `ash` once a recipient read or
12
+ * answered it or its content was recalled (past `expires_at` too),
13
+ * `expired` past `expires_at` and never burned, `deleted` once its owner
14
+ * deleted it (never reported `ash`).
15
+ */
10
16
  status: 'active' | 'ash' | 'expired' | 'deleted';
11
17
  created_at: number;
12
18
  expires_at: number;
13
- /** When it was read or recalled; null while unread, and for a deleted Spark. */
19
+ /**
20
+ * When it turned `ash`; null for every other `status`, `deleted` included,
21
+ * though a delete burns the content too.
22
+ */
14
23
  burned_at: number | null;
15
24
  /** Seconds left before it expires, 0 once it has. */
16
25
  time_remaining: number;
17
26
  filename?: string;
18
27
  kindling?: string;
19
- /** A link spark (content_type text/uri-list) only: its x.sv link. */
28
+ /**
29
+ * Its x.sv link, while it has one: a link spark (content_type
30
+ * text/uri-list) from its create, any other spark from its share until it
31
+ * is unshared. A deleted Spark keeps the link it had, which opens nothing.
32
+ */
20
33
  link_url?: string;
21
34
  }
22
35
  export interface ListSparksOptions {
@@ -77,13 +90,48 @@ export interface CreateSparkResponse {
77
90
  /** A link spark only: the code in `link_url`. */
78
91
  link_code?: string;
79
92
  }
93
+ /**
94
+ * Options for share. A spark already shared keeps its link: the settings are
95
+ * applied to it in place, and its code never changes.
96
+ */
80
97
  export interface ShareSparkOptions {
81
- /** Link visibility. Defaults to public server-side. */
82
- visibility?: 'public' | 'authenticated' | 'invite_only';
83
- /** For invite_only visibility: identities granted access (server allows max 1). */
98
+ /**
99
+ * Link visibility: public on a spark's first share; an omitted visibility
100
+ * keeps the link's current one.
101
+ */
102
+ visibility?: SparkShareVisibility;
103
+ /**
104
+ * For invite_only visibility: the one identity (an email address or a phone
105
+ * number) the link is delivered to. Refused with any other visibility; an
106
+ * omitted list keeps the link's current invitee.
107
+ */
84
108
  invites?: string[];
85
- /** Link expiration TTL in seconds (server minimum 60, capped at the spark's own expiry). */
109
+ /**
110
+ * Link expiration TTL in seconds (server minimum 60, capped at the spark's
111
+ * own expiry). Applies to a spark's first share only: a change to an
112
+ * existing link keeps its lifetime.
113
+ */
86
114
  expiresInSeconds?: number;
115
+ /**
116
+ * The link this change was asked of (its `link_code`, as a share answered
117
+ * it). When it is no longer the spark's link (turned off, or replaced by
118
+ * another share), the change is refused with a 409 CONFLICT and changes
119
+ * nothing. Omitted, the change applies to the spark's link now.
120
+ */
121
+ linkCode?: string;
122
+ }
123
+ /** Options for resendInvite and unshare, which act on a spark's existing link. */
124
+ export interface SparkLinkActionOptions {
125
+ /**
126
+ * The link this request was asked of (its `link_code`, as a share answered
127
+ * it). A resend asked of a link that is no longer the spark's link (turned
128
+ * off, or replaced by another share) is refused with a 409 CONFLICT,
129
+ * delivering nothing. An unshare is refused only when another share
130
+ * replaced the link, deleting nothing; a link already turned off answers
131
+ * `shared: false`, so a retried unshare is never refused. Omitted, the
132
+ * request acts on the spark's link now.
133
+ */
134
+ linkCode?: string;
87
135
  }
88
136
  export declare class MobileSparksClient {
89
137
  private readonly http;
@@ -95,9 +143,10 @@ export declare class MobileSparksClient {
95
143
  /** Burn a spark before its natural expiry. An already-burned spark resolves (the server returns 204); a missing spark rejects with a 404. */
96
144
  delete(sparkId: string): Promise<void>;
97
145
  /**
98
- * Create (or return the existing) public SparkLink for a spark, yielding a
99
- * shareable `https://x.sv/...` URL. Only active, non-expired sparks can be
100
- * shared.
146
+ * Share a spark via a SparkLink, yielding a shareable `https://x.sv/...` URL:
147
+ * created on the first share; on a spark already shared, the requested
148
+ * settings are applied to the existing link in place (`already_shared`).
149
+ * Only active, non-expired sparks can be shared.
101
150
  */
102
151
  share(sparkId: string, options?: ShareSparkOptions): Promise<ShareSparkResponse>;
103
152
  /**
@@ -105,10 +154,17 @@ export declare class MobileSparksClient {
105
154
  * nothing about the link: the way on from an invitation that could not be
106
155
  * delivered (a share rejected with 502 INVITATION_DELIVERY_FAILED leaves
107
156
  * its link in place, and the same share again delivers nothing).
157
+ * `linkCode` names the link the resend was asked of: a link replaced since
158
+ * is never delivered in its place (409 CONFLICT).
108
159
  */
109
- resendInvite(sparkId: string): Promise<ResendSparkInviteResponse>;
160
+ resendInvite(sparkId: string, options?: SparkLinkActionOptions): Promise<ResendSparkInviteResponse>;
110
161
  /** Current sharing status for a spark. `shared` is false when no SparkLink exists. */
111
162
  getShare(sparkId: string): Promise<SparkShareStatus>;
112
- /** Revoke a spark's SparkLink. Resolves whether or not a link existed. */
113
- unshare(sparkId: string): Promise<UnshareSparkResponse>;
163
+ /**
164
+ * Revoke a spark's SparkLink. Resolves whether or not a link existed, the
165
+ * link `linkCode` names included, so a retried unshare is never refused. A
166
+ * `linkCode` naming a link another share replaced since is refused (409
167
+ * CONFLICT), so the link that took its place is never deleted.
168
+ */
169
+ unshare(sparkId: string, options?: SparkLinkActionOptions): Promise<UnshareSparkResponse>;
114
170
  }
package/dist/sparks.js CHANGED
@@ -31,9 +31,10 @@ export class MobileSparksClient {
31
31
  await this.http.delete(apiPath `/sparks/${sparkId}`);
32
32
  }
33
33
  /**
34
- * Create (or return the existing) public SparkLink for a spark, yielding a
35
- * shareable `https://x.sv/...` URL. Only active, non-expired sparks can be
36
- * shared.
34
+ * Share a spark via a SparkLink, yielding a shareable `https://x.sv/...` URL:
35
+ * created on the first share; on a spark already shared, the requested
36
+ * settings are applied to the existing link in place (`already_shared`).
37
+ * Only active, non-expired sparks can be shared.
37
38
  */
38
39
  async share(sparkId, options = {}) {
39
40
  validateResourceId(sparkId, 'spark ID', 'sparkId');
@@ -44,6 +45,8 @@ export class MobileSparksClient {
44
45
  body.invites = options.invites;
45
46
  if (options.expiresInSeconds !== undefined)
46
47
  body.expires_in_seconds = options.expiresInSeconds;
48
+ if (options.linkCode !== undefined)
49
+ body.link_code = options.linkCode;
47
50
  const response = await this.http.patch(apiPath `/sparks/${sparkId}/share`, body);
48
51
  return response.data;
49
52
  }
@@ -52,10 +55,12 @@ export class MobileSparksClient {
52
55
  * nothing about the link: the way on from an invitation that could not be
53
56
  * delivered (a share rejected with 502 INVITATION_DELIVERY_FAILED leaves
54
57
  * its link in place, and the same share again delivers nothing).
58
+ * `linkCode` names the link the resend was asked of: a link replaced since
59
+ * is never delivered in its place (409 CONFLICT).
55
60
  */
56
- async resendInvite(sparkId) {
61
+ async resendInvite(sparkId, options = {}) {
57
62
  validateResourceId(sparkId, 'spark ID', 'sparkId');
58
- const response = await this.http.post(apiPath `/sparks/${sparkId}/share/resend`);
63
+ const response = await this.http.post(apiPath `/sparks/${sparkId}/share/resend`, options.linkCode === undefined ? undefined : { link_code: options.linkCode });
59
64
  return response.data;
60
65
  }
61
66
  /** Current sharing status for a spark. `shared` is false when no SparkLink exists. */
@@ -64,10 +69,15 @@ export class MobileSparksClient {
64
69
  const response = await this.http.get(apiPath `/sparks/${sparkId}/share`);
65
70
  return response.data;
66
71
  }
67
- /** Revoke a spark's SparkLink. Resolves whether or not a link existed. */
68
- async unshare(sparkId) {
72
+ /**
73
+ * Revoke a spark's SparkLink. Resolves whether or not a link existed, the
74
+ * link `linkCode` names included, so a retried unshare is never refused. A
75
+ * `linkCode` naming a link another share replaced since is refused (409
76
+ * CONFLICT), so the link that took its place is never deleted.
77
+ */
78
+ async unshare(sparkId, options = {}) {
69
79
  validateResourceId(sparkId, 'spark ID', 'sparkId');
70
- const response = await this.http.delete(apiPath `/sparks/${sparkId}/share`);
80
+ const response = await this.http.delete(apiPath `/sparks/${sparkId}/share`, { query: { link_code: options.linkCode } });
71
81
  return response.data;
72
82
  }
73
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sparks.js","sourceRoot":"","sources":["../src/sparks.ts"],"names":[],"mappings":"AAOA,OAAO,E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CACL,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,YAAY,CAAC,OAAe,EAAE,UAAkC,EAAE;QACtE,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CACnC,OAAO,CAAA,WAAW,OAAO,eAAe,EACxC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,CAC7E,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,sFAAsF;IACtF,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC5B,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAClC,OAAO,CAAA,WAAW,OAAO,QAAQ,CAClC,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,UAAkC,EAAE;QACjE,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QACnD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CACrC,OAAO,CAAA,WAAW,OAAO,QAAQ,EACjC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAC3C,CAAC;QACF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -11,10 +11,15 @@
11
11
  * and `link_code` beside the spark), apps/api/src/sparks/list.js (each listed
12
12
  * spark, a link spark's `link_url` included) and apps/api/src/sparks/readCore.js
13
13
  * (`buildReadResponse`: the payload and the name it saves under,
14
- * `download_filename`). A field the server sends that a type leaves out is
15
- * one a typed caller cannot reach: a link spark's caller has no link to send.
14
+ * `download_filename`) and apps/api/src/sparks/share.js (`shareSpark`: the
15
+ * link's settings and status, what the share delivered, and whether it
16
+ * changed a link already there; `getShareStatus`: the same link envelope, or
17
+ * `shared: false`). A field the server sends that a type leaves
18
+ * out is one a typed caller cannot reach: a link spark's caller has no link to
19
+ * send.
16
20
  */
17
21
  import type { CreateSparkResponse, Spark, SparkResponse } from './sparks.js';
22
+ import type { ShareSparkResponse, SparkShareStatus } from './types.js';
18
23
  /** Fails to compile unless `T` resolves to exactly `true`. */
19
24
  type Assert<T extends true> = T;
20
25
  /** Invariant type equality: the SAME type, not merely mutually assignable. */
@@ -30,6 +35,15 @@ export type SparksWireContract = [
30
35
  Assert<Equals<keyof SparkResponse, 'spark_id' | 'payload' | 'content_type' | 'download_filename' | 'size_bytes' | 'status' | 'created_at' | 'burned_at' | 'was_active' | 'filename'>>,
31
36
  Assert<Equals<SparkResponse['download_filename'], string>>,
32
37
  Assert<Equals<SparkResponse['status'], 'active' | 'ash'>>,
33
- Assert<Equals<SparkResponse['burned_at'], number | null>>
38
+ Assert<Equals<SparkResponse['burned_at'], number | null>>,
39
+ Assert<Equals<keyof ShareSparkResponse, 'shared' | 'spark_id' | 'share_url' | 'link_code' | 'visibility' | 'invites' | 'status' | 'expires_at' | 'created_at' | 'already_shared' | 'delivered_to'>>,
40
+ Assert<Equals<ShareSparkResponse['status'], 'active' | 'consumed' | 'expired'>>,
41
+ Assert<Equals<ShareSparkResponse['visibility'], 'public' | 'authenticated' | 'invite_only'>>,
42
+ Assert<Equals<SharedSparkStatus['status'], ShareSparkResponse['status']>>,
43
+ Assert<Equals<SharedSparkStatus['visibility'], ShareSparkResponse['visibility']>>
34
44
  ];
45
+ /** The read of a shared spark's sharing (`shared: true`). */
46
+ type SharedSparkStatus = Extract<SparkShareStatus, {
47
+ shared: true;
48
+ }>;
35
49
  export {};
@@ -11,8 +11,12 @@
11
11
  * and `link_code` beside the spark), apps/api/src/sparks/list.js (each listed
12
12
  * spark, a link spark's `link_url` included) and apps/api/src/sparks/readCore.js
13
13
  * (`buildReadResponse`: the payload and the name it saves under,
14
- * `download_filename`). A field the server sends that a type leaves out is
15
- * one a typed caller cannot reach: a link spark's caller has no link to send.
14
+ * `download_filename`) and apps/api/src/sparks/share.js (`shareSpark`: the
15
+ * link's settings and status, what the share delivered, and whether it
16
+ * changed a link already there; `getShareStatus`: the same link envelope, or
17
+ * `shared: false`). A field the server sends that a type leaves
18
+ * out is one a typed caller cannot reach: a link spark's caller has no link to
19
+ * send.
16
20
  */
17
21
  export {};
18
22
  //# sourceMappingURL=sparks.test-d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sparks.test-d.js","sourceRoot":"","sources":["../src/sparks.test-d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
1
+ {"version":3,"file":"sparks.test-d.js","sourceRoot":"","sources":["../src/sparks.test-d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
package/dist/types.d.ts CHANGED
@@ -1130,17 +1130,35 @@ export interface DebugLogger {
1130
1130
  export interface UploadProgressCallback {
1131
1131
  (bytesUploaded: number, bytesTotal: number): void;
1132
1132
  }
1133
- /** Result of sharing a spark — the created (or already-existing) SparkLink. */
1133
+ /** Who may open a spark's SparkLink. */
1134
+ export type SparkShareVisibility = 'public' | 'authenticated' | 'invite_only';
1135
+ /**
1136
+ * A spark's SparkLink status, as every share route answers it: 'active';
1137
+ * 'consumed' once it was opened (it opens once); or 'expired' once a link
1138
+ * never opened opens nothing: from its `expires_at` on, or once its spark is
1139
+ * burned (read by its id) or reaches its own expiry. A change or a resend is
1140
+ * then refused (403 FORBIDDEN).
1141
+ */
1142
+ export type SparkShareLinkStatus = 'active' | 'consumed' | 'expired';
1143
+ /**
1144
+ * Result of sharing a spark: its SparkLink, created on the first share, or the
1145
+ * existing one with the requested settings applied to it in place.
1146
+ */
1134
1147
  export interface ShareSparkResponse {
1135
1148
  shared: true;
1149
+ spark_id: string;
1136
1150
  /** Public `https://x.sv/{code}` URL for the SparkLink. */
1137
1151
  share_url: string;
1138
1152
  link_code: string;
1139
- visibility: string;
1153
+ visibility: SparkShareVisibility;
1140
1154
  invites?: string[];
1155
+ status: SparkShareLinkStatus;
1141
1156
  expires_at?: number;
1142
1157
  created_at?: number;
1143
- /** True when a SparkLink already existed and was returned as-is. */
1158
+ /**
1159
+ * True when a SparkLink already existed: the requested settings were
1160
+ * applied to it in place, and its code is unchanged.
1161
+ */
1144
1162
  already_shared?: boolean;
1145
1163
  /**
1146
1164
  * The invitees this share delivered the link to: none for a share that
@@ -1168,10 +1186,9 @@ export type SparkShareStatus = {
1168
1186
  spark_id: string;
1169
1187
  share_url: string;
1170
1188
  link_code: string;
1171
- visibility: string;
1189
+ visibility: SparkShareVisibility;
1172
1190
  invites: string[];
1173
- /** Single-use lifecycle: 'active' → 'consumed' (opened once). */
1174
- status: string;
1191
+ status: SparkShareLinkStatus;
1175
1192
  expires_at?: number;
1176
1193
  created_at?: number;
1177
1194
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkvault/sdk-mobile",
3
- "version": "10.3.0",
3
+ "version": "10.4.0",
4
4
  "description": "Mobile SDK for SparkVault Identity, vault, folder, and ingot workflows",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -70,6 +70,7 @@ export type {
70
70
  ListSparksResponse,
71
71
  ShareSparkOptions,
72
72
  Spark,
73
+ SparkLinkActionOptions,
73
74
  SparkResponse,
74
75
  } from './sparks.js';
75
76
  export {
@@ -11,11 +11,16 @@
11
11
  * and `link_code` beside the spark), apps/api/src/sparks/list.js (each listed
12
12
  * spark, a link spark's `link_url` included) and apps/api/src/sparks/readCore.js
13
13
  * (`buildReadResponse`: the payload and the name it saves under,
14
- * `download_filename`). A field the server sends that a type leaves out is
15
- * one a typed caller cannot reach: a link spark's caller has no link to send.
14
+ * `download_filename`) and apps/api/src/sparks/share.js (`shareSpark`: the
15
+ * link's settings and status, what the share delivered, and whether it
16
+ * changed a link already there; `getShareStatus`: the same link envelope, or
17
+ * `shared: false`). A field the server sends that a type leaves
18
+ * out is one a typed caller cannot reach: a link spark's caller has no link to
19
+ * send.
16
20
  */
17
21
 
18
22
  import type { CreateSparkResponse, Spark, SparkResponse } from './sparks.js';
23
+ import type { ShareSparkResponse, SparkShareStatus } from './types.js';
19
24
 
20
25
  /** Fails to compile unless `T` resolves to exactly `true`. */
21
26
  type Assert<T extends true> = T;
@@ -85,4 +90,29 @@ export type SparksWireContract = [
85
90
  Assert<Equals<SparkResponse['download_filename'], string>>,
86
91
  Assert<Equals<SparkResponse['status'], 'active' | 'ash'>>,
87
92
  Assert<Equals<SparkResponse['burned_at'], number | null>>,
93
+ // Exactly the fields a share answers.
94
+ Assert<
95
+ Equals<
96
+ keyof ShareSparkResponse,
97
+ | 'shared'
98
+ | 'spark_id'
99
+ | 'share_url'
100
+ | 'link_code'
101
+ | 'visibility'
102
+ | 'invites'
103
+ | 'status'
104
+ | 'expires_at'
105
+ | 'created_at'
106
+ | 'already_shared'
107
+ | 'delivered_to'
108
+ >
109
+ >,
110
+ Assert<Equals<ShareSparkResponse['status'], 'active' | 'consumed' | 'expired'>>,
111
+ Assert<Equals<ShareSparkResponse['visibility'], 'public' | 'authenticated' | 'invite_only'>>,
112
+ // A read of a shared spark's sharing answers the share's own envelope.
113
+ Assert<Equals<SharedSparkStatus['status'], ShareSparkResponse['status']>>,
114
+ Assert<Equals<SharedSparkStatus['visibility'], ShareSparkResponse['visibility']>>,
88
115
  ];
116
+
117
+ /** The read of a shared spark's sharing (`shared: true`). */
118
+ type SharedSparkStatus = Extract<SparkShareStatus, { shared: true }>;
package/src/sparks.ts CHANGED
@@ -3,6 +3,7 @@ import type {
3
3
  ResendSparkInviteResponse,
4
4
  ShareSparkResponse,
5
5
  SparkShareStatus,
6
+ SparkShareVisibility,
6
7
  UnshareSparkResponse,
7
8
  } from './types.js';
8
9
  import { apiPath } from './request-path.js';
@@ -14,17 +15,30 @@ export interface Spark {
14
15
  account_id: string;
15
16
  content_type: string;
16
17
  size_bytes: number;
17
- /** `ash` once read or recalled, `expired` past its TTL, `deleted` once its owner deleted it. */
18
+ /**
19
+ * Its state when the list answers: `active` while its content is live (a
20
+ * Spark a recipient is reading included), `ash` once a recipient read or
21
+ * answered it or its content was recalled (past `expires_at` too),
22
+ * `expired` past `expires_at` and never burned, `deleted` once its owner
23
+ * deleted it (never reported `ash`).
24
+ */
18
25
  status: 'active' | 'ash' | 'expired' | 'deleted';
19
26
  created_at: number;
20
27
  expires_at: number;
21
- /** When it was read or recalled; null while unread, and for a deleted Spark. */
28
+ /**
29
+ * When it turned `ash`; null for every other `status`, `deleted` included,
30
+ * though a delete burns the content too.
31
+ */
22
32
  burned_at: number | null;
23
33
  /** Seconds left before it expires, 0 once it has. */
24
34
  time_remaining: number;
25
35
  filename?: string;
26
36
  kindling?: string;
27
- /** A link spark (content_type text/uri-list) only: its x.sv link. */
37
+ /**
38
+ * Its x.sv link, while it has one: a link spark (content_type
39
+ * text/uri-list) from its create, any other spark from its share until it
40
+ * is unshared. A deleted Spark keeps the link it had, which opens nothing.
41
+ */
28
42
  link_url?: string;
29
43
  }
30
44
 
@@ -91,13 +105,49 @@ export interface CreateSparkResponse {
91
105
  link_code?: string;
92
106
  }
93
107
 
108
+ /**
109
+ * Options for share. A spark already shared keeps its link: the settings are
110
+ * applied to it in place, and its code never changes.
111
+ */
94
112
  export interface ShareSparkOptions {
95
- /** Link visibility. Defaults to public server-side. */
96
- visibility?: 'public' | 'authenticated' | 'invite_only';
97
- /** For invite_only visibility: identities granted access (server allows max 1). */
113
+ /**
114
+ * Link visibility: public on a spark's first share; an omitted visibility
115
+ * keeps the link's current one.
116
+ */
117
+ visibility?: SparkShareVisibility;
118
+ /**
119
+ * For invite_only visibility: the one identity (an email address or a phone
120
+ * number) the link is delivered to. Refused with any other visibility; an
121
+ * omitted list keeps the link's current invitee.
122
+ */
98
123
  invites?: string[];
99
- /** Link expiration TTL in seconds (server minimum 60, capped at the spark's own expiry). */
124
+ /**
125
+ * Link expiration TTL in seconds (server minimum 60, capped at the spark's
126
+ * own expiry). Applies to a spark's first share only: a change to an
127
+ * existing link keeps its lifetime.
128
+ */
100
129
  expiresInSeconds?: number;
130
+ /**
131
+ * The link this change was asked of (its `link_code`, as a share answered
132
+ * it). When it is no longer the spark's link (turned off, or replaced by
133
+ * another share), the change is refused with a 409 CONFLICT and changes
134
+ * nothing. Omitted, the change applies to the spark's link now.
135
+ */
136
+ linkCode?: string;
137
+ }
138
+
139
+ /** Options for resendInvite and unshare, which act on a spark's existing link. */
140
+ export interface SparkLinkActionOptions {
141
+ /**
142
+ * The link this request was asked of (its `link_code`, as a share answered
143
+ * it). A resend asked of a link that is no longer the spark's link (turned
144
+ * off, or replaced by another share) is refused with a 409 CONFLICT,
145
+ * delivering nothing. An unshare is refused only when another share
146
+ * replaced the link, deleting nothing; a link already turned off answers
147
+ * `shared: false`, so a retried unshare is never refused. Omitted, the
148
+ * request acts on the spark's link now.
149
+ */
150
+ linkCode?: string;
101
151
  }
102
152
 
103
153
  export class MobileSparksClient {
@@ -138,9 +188,10 @@ export class MobileSparksClient {
138
188
  }
139
189
 
140
190
  /**
141
- * Create (or return the existing) public SparkLink for a spark, yielding a
142
- * shareable `https://x.sv/...` URL. Only active, non-expired sparks can be
143
- * shared.
191
+ * Share a spark via a SparkLink, yielding a shareable `https://x.sv/...` URL:
192
+ * created on the first share; on a spark already shared, the requested
193
+ * settings are applied to the existing link in place (`already_shared`).
194
+ * Only active, non-expired sparks can be shared.
144
195
  */
145
196
  async share(sparkId: string, options: ShareSparkOptions = {}): Promise<ShareSparkResponse> {
146
197
  validateResourceId(sparkId, 'spark ID', 'sparkId');
@@ -148,6 +199,7 @@ export class MobileSparksClient {
148
199
  if (options.visibility) body.visibility = options.visibility;
149
200
  if (options.invites) body.invites = options.invites;
150
201
  if (options.expiresInSeconds !== undefined) body.expires_in_seconds = options.expiresInSeconds;
202
+ if (options.linkCode !== undefined) body.link_code = options.linkCode;
151
203
 
152
204
  const response = await this.http.patch<ShareSparkResponse>(
153
205
  apiPath`/sparks/${sparkId}/share`,
@@ -161,11 +213,14 @@ export class MobileSparksClient {
161
213
  * nothing about the link: the way on from an invitation that could not be
162
214
  * delivered (a share rejected with 502 INVITATION_DELIVERY_FAILED leaves
163
215
  * its link in place, and the same share again delivers nothing).
216
+ * `linkCode` names the link the resend was asked of: a link replaced since
217
+ * is never delivered in its place (409 CONFLICT).
164
218
  */
165
- async resendInvite(sparkId: string): Promise<ResendSparkInviteResponse> {
219
+ async resendInvite(sparkId: string, options: SparkLinkActionOptions = {}): Promise<ResendSparkInviteResponse> {
166
220
  validateResourceId(sparkId, 'spark ID', 'sparkId');
167
221
  const response = await this.http.post<ResendSparkInviteResponse>(
168
- apiPath`/sparks/${sparkId}/share/resend`
222
+ apiPath`/sparks/${sparkId}/share/resend`,
223
+ options.linkCode === undefined ? undefined : { link_code: options.linkCode }
169
224
  );
170
225
  return response.data;
171
226
  }
@@ -179,11 +234,17 @@ export class MobileSparksClient {
179
234
  return response.data;
180
235
  }
181
236
 
182
- /** Revoke a spark's SparkLink. Resolves whether or not a link existed. */
183
- async unshare(sparkId: string): Promise<UnshareSparkResponse> {
237
+ /**
238
+ * Revoke a spark's SparkLink. Resolves whether or not a link existed, the
239
+ * link `linkCode` names included, so a retried unshare is never refused. A
240
+ * `linkCode` naming a link another share replaced since is refused (409
241
+ * CONFLICT), so the link that took its place is never deleted.
242
+ */
243
+ async unshare(sparkId: string, options: SparkLinkActionOptions = {}): Promise<UnshareSparkResponse> {
184
244
  validateResourceId(sparkId, 'spark ID', 'sparkId');
185
245
  const response = await this.http.delete<UnshareSparkResponse>(
186
- apiPath`/sparks/${sparkId}/share`
246
+ apiPath`/sparks/${sparkId}/share`,
247
+ { query: { link_code: options.linkCode } }
187
248
  );
188
249
  return response.data;
189
250
  }
package/src/types.ts CHANGED
@@ -1241,17 +1241,37 @@ export interface UploadProgressCallback {
1241
1241
  (bytesUploaded: number, bytesTotal: number): void;
1242
1242
  }
1243
1243
 
1244
- /** Result of sharing a spark — the created (or already-existing) SparkLink. */
1244
+ /** Who may open a spark's SparkLink. */
1245
+ export type SparkShareVisibility = 'public' | 'authenticated' | 'invite_only';
1246
+
1247
+ /**
1248
+ * A spark's SparkLink status, as every share route answers it: 'active';
1249
+ * 'consumed' once it was opened (it opens once); or 'expired' once a link
1250
+ * never opened opens nothing: from its `expires_at` on, or once its spark is
1251
+ * burned (read by its id) or reaches its own expiry. A change or a resend is
1252
+ * then refused (403 FORBIDDEN).
1253
+ */
1254
+ export type SparkShareLinkStatus = 'active' | 'consumed' | 'expired';
1255
+
1256
+ /**
1257
+ * Result of sharing a spark: its SparkLink, created on the first share, or the
1258
+ * existing one with the requested settings applied to it in place.
1259
+ */
1245
1260
  export interface ShareSparkResponse {
1246
1261
  shared: true;
1262
+ spark_id: string;
1247
1263
  /** Public `https://x.sv/{code}` URL for the SparkLink. */
1248
1264
  share_url: string;
1249
1265
  link_code: string;
1250
- visibility: string;
1266
+ visibility: SparkShareVisibility;
1251
1267
  invites?: string[];
1268
+ status: SparkShareLinkStatus;
1252
1269
  expires_at?: number;
1253
1270
  created_at?: number;
1254
- /** True when a SparkLink already existed and was returned as-is. */
1271
+ /**
1272
+ * True when a SparkLink already existed: the requested settings were
1273
+ * applied to it in place, and its code is unchanged.
1274
+ */
1255
1275
  already_shared?: boolean;
1256
1276
  /**
1257
1277
  * The invitees this share delivered the link to: none for a share that
@@ -1283,10 +1303,9 @@ export type SparkShareStatus =
1283
1303
  spark_id: string;
1284
1304
  share_url: string;
1285
1305
  link_code: string;
1286
- visibility: string;
1306
+ visibility: SparkShareVisibility;
1287
1307
  invites: string[];
1288
- /** Single-use lifecycle: 'active' → 'consumed' (opened once). */
1289
- status: string;
1308
+ status: SparkShareLinkStatus;
1290
1309
  expires_at?: number;
1291
1310
  created_at?: number;
1292
1311
  };