@sparkvault/sdk-js 8.10.1 → 8.10.2
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/entropy/index.d.ts +9 -1
- package/dist/index.d.ts +38 -7
- package/dist/sparkvault.cjs.js +50 -16
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +50 -16
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/index.d.ts +17 -8
- package/dist/vaults/types.d.ts +15 -0
- package/package.json +1 -1
package/dist/vaults/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ResolvedConfig } from '../config';
|
|
10
10
|
import { HttpClient } from '../http';
|
|
11
|
-
import type { CreateVaultOptions, Vault, UnsealedVault,
|
|
11
|
+
import type { CreateVaultOptions, Vault, UnsealedVault, VaultPage, ListVaultsOptions, VaultDetail, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions } from './types';
|
|
12
12
|
import { type UploadOptions, type UploadAttachOptions, type UploadResult } from './upload';
|
|
13
13
|
/**
|
|
14
14
|
* Callable upload interface with methods.
|
|
@@ -59,13 +59,18 @@ export declare class VaultsModule {
|
|
|
59
59
|
*/
|
|
60
60
|
unseal(vaultId: string, vmk: string): Promise<UnsealedVault>;
|
|
61
61
|
/**
|
|
62
|
-
* List
|
|
62
|
+
* List vaults for the account. Results are paginated (server default 100 per
|
|
63
|
+
* page, max 500); follow `nextCursor` to fetch subsequent pages.
|
|
63
64
|
*
|
|
64
65
|
* @example
|
|
65
|
-
*
|
|
66
|
-
*
|
|
66
|
+
* let cursor: string | undefined;
|
|
67
|
+
* do {
|
|
68
|
+
* const page = await sv.vaults.list({ cursor });
|
|
69
|
+
* page.vaults.forEach((v) => console.log(v.name));
|
|
70
|
+
* cursor = page.nextCursor;
|
|
71
|
+
* } while (cursor);
|
|
67
72
|
*/
|
|
68
|
-
list(): Promise<
|
|
73
|
+
list(options?: ListVaultsOptions): Promise<VaultPage>;
|
|
69
74
|
/**
|
|
70
75
|
* Get a single vault's detail.
|
|
71
76
|
*
|
|
@@ -93,10 +98,14 @@ export declare class VaultsModule {
|
|
|
93
98
|
/**
|
|
94
99
|
* Delete a vault and all its ingots. This action is irreversible!
|
|
95
100
|
*
|
|
101
|
+
* Requires the vault's exact name as confirmation. It is sent as the
|
|
102
|
+
* `X-Confirm-Name` header and must match the vault name exactly
|
|
103
|
+
* (case-sensitive).
|
|
104
|
+
*
|
|
96
105
|
* @example
|
|
97
|
-
* await sv.vaults.delete('vlt_abc',
|
|
106
|
+
* await sv.vaults.delete('vlt_abc', 'My Vault');
|
|
98
107
|
*/
|
|
99
|
-
delete(vaultId: string,
|
|
108
|
+
delete(vaultId: string, name: string): Promise<void>;
|
|
100
109
|
/**
|
|
101
110
|
* Get a vault's public-sharing configuration.
|
|
102
111
|
*
|
|
@@ -185,6 +194,6 @@ export declare class VaultsModule {
|
|
|
185
194
|
private normalizeVaultId;
|
|
186
195
|
private validateCreateOptions;
|
|
187
196
|
}
|
|
188
|
-
export type { CreateVaultOptions, Vault, UnsealedVault, VaultSummary, VaultDetail, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions, } from './types';
|
|
197
|
+
export type { CreateVaultOptions, Vault, UnsealedVault, VaultSummary, VaultPage, ListVaultsOptions, VaultDetail, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions, } from './types';
|
|
189
198
|
export type { UploadOptions, UploadAttachOptions, UploadResult, UploadProgress, VaultUploadConfig, UploadBranding, } from './upload';
|
|
190
199
|
export { VaultUploadModule, UploadApiError } from './upload';
|
package/dist/vaults/types.d.ts
CHANGED
|
@@ -39,6 +39,20 @@ export interface VaultSummary {
|
|
|
39
39
|
/** Total storage used in bytes */
|
|
40
40
|
storageBytes: number;
|
|
41
41
|
}
|
|
42
|
+
/** Options for list. */
|
|
43
|
+
export interface ListVaultsOptions {
|
|
44
|
+
/** Page size (1–500; server default 100) */
|
|
45
|
+
limit?: number;
|
|
46
|
+
/** Pagination cursor from a prior page's `nextCursor` */
|
|
47
|
+
cursor?: string;
|
|
48
|
+
}
|
|
49
|
+
/** A page of vaults. */
|
|
50
|
+
export interface VaultPage {
|
|
51
|
+
/** Vaults on this page */
|
|
52
|
+
vaults: VaultSummary[];
|
|
53
|
+
/** Cursor for the next page, when more results exist */
|
|
54
|
+
nextCursor?: string;
|
|
55
|
+
}
|
|
42
56
|
/** A single vault's detail, as returned by get. */
|
|
43
57
|
export interface VaultDetail {
|
|
44
58
|
/** Vault ID */
|
|
@@ -145,6 +159,7 @@ export interface ListVaultsResponse {
|
|
|
145
159
|
ingot_count: number;
|
|
146
160
|
storage_bytes: number;
|
|
147
161
|
}[];
|
|
162
|
+
next_cursor?: string;
|
|
148
163
|
}
|
|
149
164
|
export interface VaultDetailResponse {
|
|
150
165
|
vault_id: string;
|