@sparkvault/sdk-js 11.0.2 → 11.1.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.
@@ -21,7 +21,10 @@ export declare class IngotsModule {
21
21
  *
22
22
  * Reserves the ingot record and returns the Forge upload URL (carrying the
23
23
  * ISTK upload session token). Use this when you want to drive the TUS
24
- * transfer yourself; otherwise prefer {@link upload}.
24
+ * transfer yourself; otherwise prefer {@link upload}. A create another
25
+ * upload of the same file superseded before its token was issued rejects
26
+ * with code `upload_refused` (`details.coreCode` UPLOAD_SUPERSEDED): the
27
+ * later upload is the one kept, so a new upload is no remedy.
25
28
  *
26
29
  * @example
27
30
  * const session = await sv.ingots.createUpload({
@@ -64,7 +67,10 @@ export declare class IngotsModule {
64
67
  * Upload a file as a new ingot (high-level flow).
65
68
  *
66
69
  * Creates the upload session, streams the file to Forge over TUS, then
67
- * confirms the server finalized the upload before resolving.
70
+ * confirms the server finalized the upload before resolving. A file the
71
+ * server refused for good — another upload of it superseded this one, at
72
+ * its create or while it streamed, or the storage pool cannot take it —
73
+ * rejects with code `upload_refused`, as {@link sendUpload} does.
68
74
  *
69
75
  * @example
70
76
  * const ingot = await sv.ingots.upload(unsealed, {
@@ -73,7 +79,9 @@ export declare class IngotsModule {
73
79
  */
74
80
  upload(vault: UnsealedVault, options: UploadIngotOptions): Promise<CreatedIngot>;
75
81
  /**
76
- * Replace an existing ingot's content (high-level flow).
82
+ * Replace an existing ingot's content (high-level flow). Rejects as
83
+ * {@link upload} does, a replacement another upload of the same ingot
84
+ * superseded included (`upload_refused`).
77
85
  *
78
86
  * @example
79
87
  * await sv.ingots.replace(unsealed, 'ing_abc', { file: updatedFile });