@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.
@@ -4,44 +4,24 @@
4
4
  * API client for vault upload operations.
5
5
  */
6
6
  import type { ResolvedConfig } from '../../config';
7
- import type { VaultUploadConfig } from './types';
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
- readonly httpStatus: number;
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
- * Abort all pending requests.
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
- resetSession(): void;
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
  }
@@ -143,7 +143,7 @@ export type UploadViewState = {
143
143
  title: string;
144
144
  message: string;
145
145
  code: string;
146
- httpStatus?: number;
146
+ statusCode?: number;
147
147
  };
148
148
  /**
149
149
  * API response for vault upload info.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkvault/sdk",
3
- "version": "1.23.9",
3
+ "version": "1.24.1",
4
4
  "description": "SparkVault JavaScript SDK - Identity Verification and Encrypted Vaults",
5
5
  "type": "module",
6
6
  "main": "dist/sparkvault.cjs.js",