@sparkvault/sdk-mobile 6.0.2 → 7.0.1

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.
Files changed (156) hide show
  1. package/README.md +5 -5
  2. package/dist/account.d.ts +4 -3
  3. package/dist/account.js +16 -11
  4. package/dist/account.js.map +1 -1
  5. package/dist/app-sdk/email-address.d.ts +37 -0
  6. package/dist/app-sdk/email-address.js +91 -0
  7. package/dist/app-sdk/email-address.js.map +1 -0
  8. package/dist/app-sdk/encoding.d.ts +64 -0
  9. package/dist/app-sdk/encoding.js +245 -0
  10. package/dist/app-sdk/encoding.js.map +1 -0
  11. package/dist/app-sdk/entropy-contract.d.ts +33 -0
  12. package/dist/app-sdk/entropy-contract.js +51 -0
  13. package/dist/app-sdk/entropy-contract.js.map +1 -0
  14. package/dist/app-sdk/filename.d.ts +93 -0
  15. package/dist/app-sdk/filename.js +161 -0
  16. package/dist/app-sdk/filename.js.map +1 -0
  17. package/dist/app-sdk/forge-url.d.ts +107 -0
  18. package/dist/app-sdk/forge-url.js +222 -0
  19. package/dist/app-sdk/forge-url.js.map +1 -0
  20. package/dist/app-sdk/ids.d.ts +48 -0
  21. package/dist/app-sdk/ids.js +65 -0
  22. package/dist/app-sdk/ids.js.map +1 -0
  23. package/dist/app-sdk/ingot-access-log.d.ts +29 -0
  24. package/dist/app-sdk/ingot-access-log.js +49 -0
  25. package/dist/app-sdk/ingot-access-log.js.map +1 -0
  26. package/dist/app-sdk/phone.d.ts +37 -0
  27. package/dist/app-sdk/phone.js +134 -0
  28. package/dist/app-sdk/phone.js.map +1 -0
  29. package/dist/app-sdk/platform-domains.d.ts +41 -0
  30. package/dist/app-sdk/platform-domains.js +82 -0
  31. package/dist/app-sdk/platform-domains.js.map +1 -0
  32. package/dist/app-sdk/request-path.d.ts +49 -0
  33. package/dist/app-sdk/request-path.js +81 -0
  34. package/dist/app-sdk/request-path.js.map +1 -0
  35. package/dist/app-sdk/transfer-retry.d.ts +298 -0
  36. package/dist/app-sdk/transfer-retry.js +535 -0
  37. package/dist/app-sdk/transfer-retry.js.map +1 -0
  38. package/dist/app-sdk/transient.d.ts +23 -0
  39. package/dist/app-sdk/transient.js +29 -0
  40. package/dist/app-sdk/transient.js.map +1 -0
  41. package/dist/app-sdk/upload-publication.d.ts +81 -0
  42. package/dist/app-sdk/upload-publication.js +93 -0
  43. package/dist/app-sdk/upload-publication.js.map +1 -0
  44. package/dist/app-sdk/vat-refusal.d.ts +66 -0
  45. package/dist/app-sdk/vat-refusal.js +69 -0
  46. package/dist/app-sdk/vat-refusal.js.map +1 -0
  47. package/dist/billing.d.ts +9 -17
  48. package/dist/billing.js +14 -17
  49. package/dist/billing.js.map +1 -1
  50. package/dist/config.d.ts +33 -1
  51. package/dist/config.js +23 -17
  52. package/dist/config.js.map +1 -1
  53. package/dist/encoding.d.ts +30 -4
  54. package/dist/encoding.js +89 -83
  55. package/dist/encoding.js.map +1 -1
  56. package/dist/entropy.d.ts +25 -4
  57. package/dist/entropy.js +62 -15
  58. package/dist/entropy.js.map +1 -1
  59. package/dist/entropy.test-d.d.ts +40 -0
  60. package/dist/entropy.test-d.js +12 -0
  61. package/dist/entropy.test-d.js.map +1 -0
  62. package/dist/errors.d.ts +105 -21
  63. package/dist/errors.js +74 -28
  64. package/dist/errors.js.map +1 -1
  65. package/dist/folders.js +8 -7
  66. package/dist/folders.js.map +1 -1
  67. package/dist/http.d.ts +57 -15
  68. package/dist/http.js +125 -138
  69. package/dist/http.js.map +1 -1
  70. package/dist/identity-dialog.js +4 -30
  71. package/dist/identity-dialog.js.map +1 -1
  72. package/dist/identity-input.d.ts +39 -0
  73. package/dist/identity-input.js +59 -0
  74. package/dist/identity-input.js.map +1 -0
  75. package/dist/index.d.ts +8 -7
  76. package/dist/index.js +5 -4
  77. package/dist/index.js.map +1 -1
  78. package/dist/ingots.d.ts +77 -32
  79. package/dist/ingots.js +152 -136
  80. package/dist/ingots.js.map +1 -1
  81. package/dist/mutex.d.ts +1 -2
  82. package/dist/mutex.js +0 -6
  83. package/dist/mutex.js.map +1 -1
  84. package/dist/notify.d.ts +7 -2
  85. package/dist/notify.js +12 -15
  86. package/dist/notify.js.map +1 -1
  87. package/dist/notify.test-d.d.ts +3 -2
  88. package/dist/notify.test-d.js +1 -1
  89. package/dist/products/identity.d.ts +5 -0
  90. package/dist/products/identity.js +40 -35
  91. package/dist/products/identity.js.map +1 -1
  92. package/dist/request-path.d.ts +32 -0
  93. package/dist/request-path.js +35 -0
  94. package/dist/request-path.js.map +1 -0
  95. package/dist/sparks.js +16 -15
  96. package/dist/sparks.js.map +1 -1
  97. package/dist/tus.d.ts +198 -16
  98. package/dist/tus.js +816 -327
  99. package/dist/tus.js.map +1 -1
  100. package/dist/types.d.ts +183 -23
  101. package/dist/users.d.ts +12 -5
  102. package/dist/users.js +27 -19
  103. package/dist/users.js.map +1 -1
  104. package/dist/validation.d.ts +20 -5
  105. package/dist/validation.js +29 -27
  106. package/dist/validation.js.map +1 -1
  107. package/dist/vaults.d.ts +34 -83
  108. package/dist/vaults.js +64 -44
  109. package/dist/vaults.js.map +1 -1
  110. package/dist/vaults.test-d.d.ts +22 -0
  111. package/dist/vaults.test-d.js +14 -0
  112. package/dist/vaults.test-d.js.map +1 -0
  113. package/package.json +4 -2
  114. package/src/account.ts +16 -11
  115. package/src/app-sdk/email-address.js +94 -0
  116. package/src/app-sdk/encoding.js +250 -0
  117. package/src/app-sdk/entropy-contract.js +56 -0
  118. package/src/app-sdk/filename.js +174 -0
  119. package/src/app-sdk/forge-url.js +224 -0
  120. package/src/app-sdk/ids.js +71 -0
  121. package/src/app-sdk/ingot-access-log.js +51 -0
  122. package/src/app-sdk/phone.js +139 -0
  123. package/src/app-sdk/platform-domains.js +99 -0
  124. package/src/app-sdk/request-path.js +81 -0
  125. package/src/app-sdk/transfer-retry.js +563 -0
  126. package/src/app-sdk/transient.js +30 -0
  127. package/src/app-sdk/upload-publication.js +102 -0
  128. package/src/app-sdk/vat-refusal.js +74 -0
  129. package/src/billing.ts +16 -25
  130. package/src/config.ts +56 -23
  131. package/src/encoding.ts +91 -103
  132. package/src/entropy.test-d.ts +47 -0
  133. package/src/entropy.ts +86 -20
  134. package/src/errors.ts +135 -38
  135. package/src/folders.ts +8 -7
  136. package/src/http.ts +145 -150
  137. package/src/identity-dialog.tsx +4 -37
  138. package/src/identity-input.ts +70 -0
  139. package/src/index.ts +13 -3
  140. package/src/ingots.ts +225 -180
  141. package/src/mutex.ts +1 -8
  142. package/src/notify.test-d.ts +3 -1
  143. package/src/notify.ts +19 -17
  144. package/src/products/identity.ts +45 -39
  145. package/src/request-path.ts +45 -0
  146. package/src/sparks.ts +16 -13
  147. package/src/tus.ts +1054 -408
  148. package/src/types.ts +181 -23
  149. package/src/users.ts +27 -17
  150. package/src/validation.ts +30 -24
  151. package/src/vaults.test-d.ts +29 -0
  152. package/src/vaults.ts +87 -153
  153. package/dist/platform-domains.generated.d.ts +0 -2
  154. package/dist/platform-domains.generated.js +0 -16
  155. package/dist/platform-domains.generated.js.map +0 -1
  156. package/src/platform-domains.generated.ts +0 -17
package/dist/tus.d.ts CHANGED
@@ -13,27 +13,37 @@ export interface ParsedForgeUrl {
13
13
  *
14
14
  * A resume that cannot use the session throws a `TusUploadError` whose
15
15
  * `sessionLost` is true exactly when the session is worthless for this file
16
- * and the caller should drop it and start fresh: Forge no longer has it
16
+ * and the caller should drop it and start fresh: the expiry the caller holds
17
+ * for it has passed (refused before any request), Forge no longer has it
17
18
  * (404/410), or its `Upload-Length` is not this file's size (it belongs to a
18
- * different file). A transient HEAD failure (5xx, timeout) is NOT
19
- * `sessionLost`; the session is intact and the same resume can be retried.
19
+ * different file). A HEAD that keeps failing transiently (5xx, timeouts) past
20
+ * the upload's retry budget is NOT `sessionLost`; the session is intact and
21
+ * the same resume can be retried.
20
22
  */
21
23
  export interface TusResumeSession {
22
24
  uploadUrl: string;
23
25
  /** The session's ISTK. Falls back to the one in `forgeUrl` when omitted. */
24
26
  istk?: string;
27
+ /**
28
+ * The session's expiry as the caller holds it (`expiresAt` from
29
+ * `onSessionCreated`, kept current through `onSessionExpiry`). Null or
30
+ * omitted is unknown, and Forge's HEAD decides.
31
+ */
32
+ expiresAt?: number | null;
25
33
  }
26
34
  /** Where a tus session stands server-side, as reported by HEAD. */
27
35
  export interface TusSessionProbe {
28
36
  offset: number;
29
37
  length: number;
30
38
  chunkSize: number;
39
+ /** When the session lapses (epoch ms, Forge's `Upload-Expires`), or null when the HEAD named none. */
40
+ expiresAt: number | null;
31
41
  }
32
42
  export interface TusUploadFromUriOptions {
33
43
  fileUri: string;
34
44
  fileSize: number;
45
+ /** Names the file in error context and debug logs; Forge never receives it. */
35
46
  filename: string;
36
- contentType: string;
37
47
  /**
38
48
  * Forge tus endpoint plus ISTK (`forge_url` from the ingot create).
39
49
  * Required to create a session; on resume it only supplies the ISTK when
@@ -48,6 +58,17 @@ export interface TusUploadFromUriOptions {
48
58
  * relaunch. Not invoked on resume. A throw here fails the upload.
49
59
  */
50
60
  onSessionCreated?: (session: TusSessionInfo) => void;
61
+ /**
62
+ * Invoked whenever the session's expiry, as its latest answer named it,
63
+ * changes: Forge slides it forward with every committed chunk and names it
64
+ * on its answers (`Upload-Expires`). It is null (unknown) after an answer
65
+ * that named none, and from the hand-off of a request the OS carries on
66
+ * without JS (the transfer engine's range, the single-chunk background
67
+ * PATCH): either may have moved it unread. A caller that persists the
68
+ * session keeps its `expiresAt` current with this, so a session it judges
69
+ * expired (`isSessionExpired`) really is. A throw here fails the upload.
70
+ */
71
+ onSessionExpiry?: (expiresAt: number | null) => void;
51
72
  /**
52
73
  * `background` rides the best suspension-proof engine the app provides:
53
74
  * the OS transfer engine (`backgroundTransfer`) for the whole remaining
@@ -75,7 +96,18 @@ export interface TusUploadFromUriOptions {
75
96
  abortBehavior?: UploadAbortBehavior;
76
97
  debug?: DebugLogger;
77
98
  }
78
- export declare function parseForgeUrl(forgeUrl: string): ParsedForgeUrl;
99
+ /**
100
+ * Read a Core-issued Forge upload URL with the platform's transfer URL rule
101
+ * (app-sdk/forge-url.js): https, no credentials or fragment, the encrypt
102
+ * endpoint on an allowed host, and one base64url ISTK.
103
+ *
104
+ * @param allowedHostPatterns - Hosts trusted with the upload; the platform's
105
+ * own hosts by default (a configured SDK passes `allowedDownloadHostPatterns`).
106
+ * @throws SparkVaultValidationError when the URL is refused.
107
+ */
108
+ export declare function parseForgeUrl(forgeUrl: string, allowedHostPatterns?: readonly RegExp[]): ParsedForgeUrl;
109
+ /** The forge-url rule's host check over a configured list of host patterns. */
110
+ export declare function allowsHost(allowedHostPatterns: readonly RegExp[]): (hostname: string) => boolean;
79
111
  /** File context carried on every `TusUploadError` a request throws. */
80
112
  interface TusErrorContext {
81
113
  filename?: string;
@@ -84,16 +116,42 @@ interface TusErrorContext {
84
116
  /**
85
117
  * True when a Forge status says the tus session is gone (expired or
86
118
  * terminated): the persisted session is worthless, and a caller starts a
87
- * fresh upload instead of retrying it.
119
+ * fresh upload instead of retrying it. It is the transfer policy's GONE
120
+ * verdict, so every request that can meet a dead session (HEAD, a PATCH, the
121
+ * OS engine's PATCHes, DELETE) and the app's own session bookkeeping agree on
122
+ * what "gone" is.
88
123
  */
89
124
  export declare function isSessionGone(status: number): boolean;
125
+ /**
126
+ * How far past the expiry Forge named a session still counts as live: the
127
+ * allowance for a device clock running ahead of Forge's. `Upload-Expires` is
128
+ * read off Forge's clock and compared with the device's; a phone on automatic
129
+ * time is within seconds of Forge, one set by hand is typically minutes fast.
130
+ * The two mistakes cost very differently: a live session judged expired is
131
+ * dropped and its file sent again from byte 0, an expired one judged live
132
+ * costs a single HEAD (Forge answers 410, `sessionLost`). So the margin errs
133
+ * long, and stays small against the 72 h idle window a session lives from its
134
+ * last commit (`@sparkvault/app-sdk/upload-expiry`): a session the clock says
135
+ * lapsed hours ago is still dropped without a request.
136
+ */
137
+ export declare const SESSION_EXPIRY_CLOCK_MARGIN_MS: number;
138
+ /**
139
+ * True when the expiry Forge named for a session (`TusSessionInfo.expiresAt`,
140
+ * kept current through `onSessionExpiry`) is past by more than the clock
141
+ * margin: Forge refuses every request to a session past its expiry, so a
142
+ * caller drops it without asking. Within the margin the session is live for
143
+ * all the device clock can tell, and Forge's HEAD decides. An unknown expiry
144
+ * (null) never has passed: only Forge's HEAD can say.
145
+ */
146
+ export declare function isSessionExpired(expiresAt: number | null | undefined, now?: number): boolean;
90
147
  /**
91
148
  * Translate what the OS transfer adapter reports into the SDK's one error
92
149
  * taxonomy, so a caller sees the same `TusUploadError` phases and typed gate
93
150
  * errors whichever engine carried the bytes. Forge's status and body ride
94
- * through untouched: a 402 becomes the gate error the XHR path throws, a
95
- * status `isSessionGone` recognises marks the session lost exactly as HEAD
96
- * would, and any other status keeps its number for the caller's own policy
151
+ * through untouched: the refusal Core decided is `upload_refused` in Core's
152
+ * words as on the XHR path, a 402 becomes the gate error the XHR path
153
+ * throws, a status `isSessionGone` recognises marks the session lost exactly
154
+ * as HEAD would, and any other status keeps its number for the caller's own policy
97
155
  * (a 409 during finalize is a retry-later, not a lost session). The
98
156
  * remaining kinds are transport
99
157
  * outcomes: the caller's own abort is `cancelled`; an OS-ended task
@@ -106,16 +164,137 @@ export declare function mapBackgroundTransferError(err: unknown, context?: TusEr
106
164
  export declare class MobileTusUploader {
107
165
  private readonly config;
108
166
  constructor(config: ResolvedMobileConfig);
167
+ /**
168
+ * Upload a file over tus: create the session (or resume a kept one), send
169
+ * the bytes Forge does not hold, and resolve once Forge has confirmed the
170
+ * ingot published.
171
+ *
172
+ * Every answer is read through the platform's transfer policy
173
+ * (`@sparkvault/app-sdk/transfer-retry`), and one budget per call bounds
174
+ * every retry, the create's included: a request that got no answer, 408,
175
+ * 425, 429, a 5xx or a lease-held 409 waits its backoff (never shorter than
176
+ * `Retry-After`), then asks Forge where the session stands (HEAD) and sends
177
+ * from there; a 409 carrying `Upload-Offset` continues from that offset at
178
+ * once; a receipt Forge defers (503 with `Retry-After`) is asked again,
179
+ * each time after a longer backoff, without spending a failure until the
180
+ * idle limit ends the upload as `upload_received_publishing`
181
+ * (`retryLater`); a gone session is `sessionLost` (`coreCode` naming the
182
+ * code Core ended it with, when the answer named one); a final refusal of
183
+ * Core's (`UPLOAD_POOL_FULL`, `UPLOAD_SUPERSEDED`) is `upload_refused` in
184
+ * Core's words (`coreCode`); any other 4xx ends the upload with the
185
+ * server's answer. No chunk is ever sent at an offset the server did not just name. While the device is offline (`isOnline`), a request that got
186
+ * no answer spends nothing: the upload waits for the network. The OS
187
+ * transfer engine's range is the exception: the engine chains its own
188
+ * requests, and its failure ends the call for the caller's own retry.
189
+ */
109
190
  uploadFromUri(options: TusUploadFromUriOptions): Promise<void>;
191
+ /**
192
+ * Open the upload's session. A create the transfer policy calls RETRY (no
193
+ * answer, 408, 425, 429, a 5xx) is sent again under the upload's budget,
194
+ * its backoff never shorter than `Retry-After`: Forge refuses such a create
195
+ * before it claims the token, or hands the claim back on a transient
196
+ * key-service failure (503), so the same ISTK opens the session on a later
197
+ * attempt. Every other answer is final and never a lost session, a 401
198
+ * included: the token was already used, by an earlier create whose answer
199
+ * was lost, and no Location survives to continue that session from. No
200
+ * session URL exists yet to spread the retries by, and the ISTK never feeds
201
+ * one, so they spread by a key of the endpoint (`transferJitterKey`).
202
+ */
203
+ private createSession;
204
+ /**
205
+ * Where a kept session stands, asked of Forge (HEAD) under the upload's
206
+ * budget, so resume never re-sends bytes the server holds: it is the only
207
+ * way to learn what a background transfer delivered after the process was
208
+ * killed, and what a failed attempt left behind. A HEAD that gets no
209
+ * answer or a transient one is asked again after its backoff; a gone
210
+ * session is `sessionLost`, so the caller drops it and creates a fresh one
211
+ * rather than retrying a dead URL. A session is bound to one file: a length that
212
+ * is not this file's means the persisted session belongs to another file
213
+ * (or this file changed), and PATCHing into it would corrupt the ingot.
214
+ * That makes it as worthless as a gone one: `sessionLost` too.
215
+ */
216
+ private readResumePoint;
217
+ /**
218
+ * Ask Forge once where the session stands (tus HEAD): the probe on a 2xx,
219
+ * or the failure its answer amounts to. Forge re-drives a received
220
+ * upload's publication on its HEAD and answers the full offset whatever the
221
+ * re-drive came to, so an offset at the total proves receipt only: the
222
+ * receipt PATCH (`confirmReceipt`) is what says published.
223
+ */
224
+ private headSession;
225
+ /**
226
+ * Send the chunk that starts at `offset`. Answers where the upload stands
227
+ * next: past the chunk on its 2xx, which for the last chunk is also the
228
+ * publication receipt (Forge answers it only once the ingot is published),
229
+ * or wherever the server says after a failure.
230
+ */
231
+ private sendChunkAt;
232
+ /** PATCH the chunk at `offset` on the transport the upload rides, resolving with Forge's answer. */
233
+ private sendChunk;
234
+ /**
235
+ * Where the upload stands after a failed chunk PATCH, in the server's
236
+ * words: a 409's own `Upload-Offset` at once, otherwise the session's HEAD
237
+ * after the backoff, the HEAD itself retried the same way out of the same
238
+ * budget. A PATCH whose answer was lost may have landed, and one sent at a
239
+ * stale offset is refused, so no chunk is ever sent again at an offset the
240
+ * server did not just name.
241
+ */
242
+ private positionAfterFailure;
243
+ /**
244
+ * Continue from the offset a 409 named, at once and without a HEAD: the
245
+ * server just said where the session stands. Past what this upload sent,
246
+ * the server holds more than it knew, which is progress; anywhere else the
247
+ * answer contradicts the request, so it spends the budget like any failure
248
+ * and repeating it ends the upload.
249
+ */
250
+ private resyncedPosition;
251
+ /**
252
+ * Every byte is on the server but publication is unconfirmed: the final
253
+ * chunk's answer was lost or deferred, or a HEAD's offset proved receipt
254
+ * only. A zero-length PATCH at the final offset re-drives publication if it
255
+ * did not finish (a transient Core or billing failure after the last chunk)
256
+ * and answers 204 once the ingot is published, which is the receipt every
257
+ * upload resolves on. While another request finalizes it answers 409 with
258
+ * `Retry-After`, asked again as a failure; while the publication is
259
+ * deferred, 503 with `Retry-After`, asked again, each time after a longer
260
+ * backoff, without spending a failure until the idle limit ends the upload
261
+ * as `upload_received_publishing` (`retryLater`); a 503 naming no
262
+ * `Retry-After` is no deferral of Forge's, asked again as a failure. A 409
263
+ * naming an earlier offset means bytes are missing, and the upload
264
+ * continues from there. Forge answers it only after its own call to Core,
265
+ * so it waits `HEAD_AND_RECEIPT_TIMEOUT_MS`, as a HEAD does.
266
+ */
267
+ private confirmReceipt;
268
+ /**
269
+ * Wait out the backoff of a failed request, spending a retry of the
270
+ * upload's budget, or of a deferred receipt, spending none for as long as
271
+ * the idle limit allows; never shorter than the answer's `Retry-After`.
272
+ * Throws the failure no retry follows (a gone session, the server's
273
+ * verdict), and the last one, or the deferral, once the budget is spent. A
274
+ * request that got no answer while the device is offline spends nothing:
275
+ * the upload waits for the network (or the caller's abort), the idle clock
276
+ * starts over when it is back, and the next request asks again at once.
277
+ */
278
+ private waitToRetry;
110
279
  /**
111
280
  * Where a persisted session stands, or `null` when Forge no longer has it
112
- * (404/410 — expired or terminated). Any other failure throws with
113
- * `sessionLost` false (a 5xx or timeout says nothing about the session).
114
- * The probe reports the session's own length; whether that length is the
115
- * caller's file is for the caller (or `uploadFromUri`'s resume, which
116
- * throws `sessionLost` on a mismatch) to judge. Lets a caller reconcile
117
- * sessions on relaunch (a completed one just needs its ingot verified; a
118
- * lost one needs a fresh create) before spending an upload slot on it.
281
+ * (404/410 — expired or terminated), from one HEAD and no retry. Any other
282
+ * failure throws with `sessionLost` false (a 5xx or a timeout says nothing
283
+ * against the session), carrying the answer's `retryAfterMs`; a final
284
+ * refusal Core decided on the HEAD's re-drive (`UPLOAD_POOL_FULL` or
285
+ * `UPLOAD_SUPERSEDED` in `X-Upload-Refusal`) throws as `upload_refused`,
286
+ * which no fresh create remedies, and any other code Core ended the session
287
+ * with reads as gone (null). An offset at
288
+ * the session's length proves every byte received, not published: a
289
+ * resume of it sends the receipt. The probe reports the session's own length;
290
+ * whether that length is the caller's file is for the caller (or
291
+ * `uploadFromUri`'s resume, which throws `sessionLost` on a mismatch) to
292
+ * judge. Lets a caller reconcile sessions on relaunch (a completed one just
293
+ * needs its ingot verified; a lost one needs a fresh create) before
294
+ * spending an upload slot on it.
295
+ *
296
+ * @throws SparkVaultValidationError, before any request, when `uploadUrl`
297
+ * is not an upload session on an allowed transfer host.
119
298
  */
120
299
  probeSession(session: {
121
300
  uploadUrl: string;
@@ -141,6 +320,9 @@ export declare class MobileTusUploader {
141
320
  * Forge sent) so the caller can retry later. Not bound to any
142
321
  * abort signal: a terminate is the last thing a caller does with a
143
322
  * session, never something to cancel.
323
+ *
324
+ * @throws SparkVaultValidationError, before any request, when `uploadUrl`
325
+ * is not an upload session on an allowed transfer host.
144
326
  */
145
327
  terminateSession(session: {
146
328
  uploadUrl: string;