@sparkvault/sdk 1.23.9 → 1.24.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.
- package/dist/api-base.d.ts +58 -0
- package/dist/identity/api.d.ts +19 -36
- package/dist/index.d.ts +31 -31
- package/dist/sparkvault.cjs.js +214 -256
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +214 -256
- 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 +9 -33
- package/dist/vaults/upload/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,44 +4,24 @@
|
|
|
4
4
|
* API client for vault upload operations.
|
|
5
5
|
*/
|
|
6
6
|
import type { ResolvedConfig } from '../../config';
|
|
7
|
-
import
|
|
7
|
+
import { SparkVaultApi } from '../../api-base';
|
|
8
8
|
import { SparkVaultError } from '../../errors';
|
|
9
|
+
import type { VaultUploadConfig } from './types';
|
|
9
10
|
/**
|
|
10
|
-
* Error class for upload API errors.
|
|
11
|
+
* Error class for upload API errors. Inherits `code` and `statusCode` from
|
|
12
|
+
* SparkVaultError — no duplicate `httpStatus` field.
|
|
11
13
|
*/
|
|
12
14
|
export declare class UploadApiError extends SparkVaultError {
|
|
13
|
-
|
|
14
|
-
constructor(message: string, code: string, httpStatus: number);
|
|
15
|
+
constructor(message: string, code: string, statusCode: number);
|
|
15
16
|
}
|
|
16
|
-
export declare class UploadApi {
|
|
17
|
+
export declare class UploadApi extends SparkVaultApi {
|
|
17
18
|
private readonly config;
|
|
18
|
-
private readonly timeoutMs;
|
|
19
|
-
/**
|
|
20
|
-
* Abort controller for cancelling all pending requests on close.
|
|
21
|
-
* Replaced by resetSession() at the start of every user-facing session.
|
|
22
|
-
*/
|
|
23
|
-
private closeController;
|
|
24
19
|
constructor(config: ResolvedConfig);
|
|
20
|
+
protected makeError(message: string, code: string, statusCode: number): UploadApiError;
|
|
25
21
|
/**
|
|
26
|
-
*
|
|
27
|
-
* Call this when the renderer is closed to prevent orphaned requests.
|
|
28
|
-
*/
|
|
29
|
-
abort(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Check if the API has been aborted.
|
|
32
|
-
*/
|
|
33
|
-
isAborted(): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Get the abort signal for external use (e.g., XHR uploads).
|
|
36
|
-
*/
|
|
37
|
-
getAbortSignal(): AbortSignal;
|
|
38
|
-
/**
|
|
39
|
-
* Reset the session lifecycle by swapping in a fresh AbortController.
|
|
40
|
-
* The Module calls this at the start of every user-facing session so a
|
|
41
|
-
* previously-closed session can never leak its aborted state into the
|
|
42
|
-
* next one. (Long-lived caches on `this` are intentionally preserved.)
|
|
22
|
+
* Issue a request and unwrap the standard `{ data, meta }` envelope.
|
|
43
23
|
*/
|
|
44
|
-
|
|
24
|
+
private request;
|
|
45
25
|
/**
|
|
46
26
|
* Get vault upload info (public endpoint).
|
|
47
27
|
*/
|
|
@@ -53,8 +33,4 @@ export declare class UploadApi {
|
|
|
53
33
|
forgeUrl: string;
|
|
54
34
|
ingotId: string;
|
|
55
35
|
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Internal request method with timeout handling and error context.
|
|
58
|
-
*/
|
|
59
|
-
private request;
|
|
60
36
|
}
|