@sparkvault/sdk-js 1.24.6 → 1.25.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 +11 -0
- package/dist/sparkvault.cjs.js +13 -8
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +13 -8
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/upload/api.d.ts +1 -1
- package/dist/vaults/upload/types.d.ts +11 -0
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ export declare class UploadApi extends SparkVaultApi {
|
|
|
29
29
|
/**
|
|
30
30
|
* Initiate an upload to get Forge URL and ingot ID.
|
|
31
31
|
*/
|
|
32
|
-
initiateUpload(vaultId: string, filename: string, sizeBytes: number, contentType: string): Promise<{
|
|
32
|
+
initiateUpload(vaultId: string, filename: string, sizeBytes: number, contentType: string, token?: string, folder?: string): Promise<{
|
|
33
33
|
forgeUrl: string;
|
|
34
34
|
ingotId: string;
|
|
35
35
|
}>;
|
|
@@ -61,6 +61,17 @@ export interface UploadOptions {
|
|
|
61
61
|
backdropBlur?: boolean;
|
|
62
62
|
/** Hide "Upload Another File" button on success screen (for single-file flows) */
|
|
63
63
|
hideUploadAnother?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Vault Access Token. When provided, the upload is authorized by the VAT
|
|
66
|
+
* (no public-upload flag required). When omitted, the public upload flow
|
|
67
|
+
* is used (hosted VMK/DVAK), which requires public upload to be enabled.
|
|
68
|
+
*/
|
|
69
|
+
token?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Slash-delimited folder path within the vault (e.g. "Accounts/001xx").
|
|
72
|
+
* Missing path segments are find-or-created. Omitted means the vault root.
|
|
73
|
+
*/
|
|
74
|
+
folder?: string;
|
|
64
75
|
/** Callback when upload completes successfully (if omitted, uses server-configured redirect) */
|
|
65
76
|
onSuccess?: (result: UploadResult) => void;
|
|
66
77
|
/** Callback when an error occurs (if omitted, uses server-configured redirect) */
|