@sparkvault/sdk-js 13.0.9 → 13.0.11
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.cjs +20 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +40 -2
- package/dist/index.mjs +20 -10
- package/dist/index.mjs.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/index.d.ts +5 -3
- package/dist/vaults/types.d.ts +51 -2
- 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, VaultPage, ListVaultsOptions, VaultDetail, ScheduledVaultDeletion, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions } from './types';
|
|
11
|
+
import type { CreateVaultOptions, Vault, UnsealedVault, VaultPage, ListVaultsOptions, VaultDetail, ScheduledVaultDeletion, StartedVaultDeletion, 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.
|
|
@@ -102,6 +102,8 @@ export declare class VaultsModule {
|
|
|
102
102
|
/**
|
|
103
103
|
* Schedule permanent deletion in seven days and immediately lock all vault access.
|
|
104
104
|
* Company admins only; cancelDeletion can abort this schedule before its deadline.
|
|
105
|
+
* A vault whose irreversible cleanup has already started answers that cleanup
|
|
106
|
+
* (`status: 'deleting'`) instead, which nothing can cancel.
|
|
105
107
|
*
|
|
106
108
|
* Requires the vault's exact name as confirmation, matched case-sensitively.
|
|
107
109
|
* The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
|
|
@@ -111,7 +113,7 @@ export declare class VaultsModule {
|
|
|
111
113
|
* @example
|
|
112
114
|
* await sv.vaults.delete('vlt_abc', 'My Vault');
|
|
113
115
|
*/
|
|
114
|
-
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion>;
|
|
116
|
+
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion | StartedVaultDeletion>;
|
|
115
117
|
/** Cancel this exact deletion schedule before its deadline; company admins only. */
|
|
116
118
|
cancelDeletion(vaultId: string, deletionScheduleId: string): Promise<VaultDetail>;
|
|
117
119
|
/**
|
|
@@ -212,6 +214,6 @@ export declare class VaultsModule {
|
|
|
212
214
|
private toggleUploadChannel;
|
|
213
215
|
private validateCreateOptions;
|
|
214
216
|
}
|
|
215
|
-
export type { CreateVaultOptions, Vault, UnsealedVault, VaultSummary, VaultPage, ListVaultsOptions, VaultDetail, VaultLifecycle, ScheduledVaultDeletion, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions, } from './types';
|
|
217
|
+
export type { CreateVaultOptions, Vault, UnsealedVault, VaultSummary, VaultPage, ListVaultsOptions, VaultDetail, VaultLifecycle, ScheduledVaultDeletion, StartedVaultDeletion, UnreachedAdmin, UpdatedVault, VaultSharingConfig, VaultSharingOptions, AccessLogRetention, VaultUploadSettings, UpdateVaultUploadOptions, } from './types';
|
|
216
218
|
export type { UploadOptions, UploadAttachOptions, UploadResult, UploadProgress, VaultUploadConfig, UploadBranding, } from './upload';
|
|
217
219
|
export { VaultUploadModule } from './upload';
|
package/dist/vaults/types.d.ts
CHANGED
|
@@ -42,6 +42,22 @@ export interface VaultLifecycle {
|
|
|
42
42
|
/** Pass this exact schedule to cancelDeletion. */
|
|
43
43
|
deletionScheduleId?: string;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* A company administrator a vault deletion's notice could not reach: the mail
|
|
47
|
+
* service declined their address, and the deletion does not wait for that
|
|
48
|
+
* notice. Until the deadline the notice is tried again at the address they
|
|
49
|
+
* hold then; one it reaches is named no longer.
|
|
50
|
+
*/
|
|
51
|
+
export interface UnreachedAdmin {
|
|
52
|
+
userId: string;
|
|
53
|
+
/** The name the roster shows them by; null when they have none */
|
|
54
|
+
name: string | null;
|
|
55
|
+
/** The address the mail service declined their notice for, which their roster entry still holds */
|
|
56
|
+
email: string;
|
|
57
|
+
/** Why: `deliverability` (the address bounced or was reported as spam) or `consent` (email to it is blocked) */
|
|
58
|
+
reason: string;
|
|
59
|
+
}
|
|
60
|
+
/** A vault's deletion schedule: a company admin can cancel it until `deletionScheduledFor`. */
|
|
45
61
|
export interface ScheduledVaultDeletion {
|
|
46
62
|
id: string;
|
|
47
63
|
status: 'deletion_scheduled';
|
|
@@ -49,6 +65,19 @@ export interface ScheduledVaultDeletion {
|
|
|
49
65
|
deletionScheduledFor: number;
|
|
50
66
|
deletionRequestedBy: string;
|
|
51
67
|
deletionScheduleId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Each administrator the schedule's notice could not reach, empty when it
|
|
70
|
+
* reached every one; null while its notices are still being sent, when
|
|
71
|
+
* get names them once they are.
|
|
72
|
+
*/
|
|
73
|
+
deletionNoticeUnreached: UnreachedAdmin[] | null;
|
|
74
|
+
}
|
|
75
|
+
/** A vault's irreversible cleanup, started: no schedule is left to cancel. */
|
|
76
|
+
export interface StartedVaultDeletion {
|
|
77
|
+
id: string;
|
|
78
|
+
status: 'deleting';
|
|
79
|
+
/** Unix seconds when the cleanup started */
|
|
80
|
+
startedAt: number;
|
|
52
81
|
}
|
|
53
82
|
export interface VaultSummary extends VaultLifecycle {
|
|
54
83
|
/** Vault ID */
|
|
@@ -94,6 +123,13 @@ export interface VaultDetail extends VaultLifecycle {
|
|
|
94
123
|
lastUnsealedAt: number | null;
|
|
95
124
|
/** Lifetime unseal count */
|
|
96
125
|
unsealCount: number;
|
|
126
|
+
/**
|
|
127
|
+
* With `deletion_scheduled`, read in a company admin's signed-in session:
|
|
128
|
+
* each administrator the schedule's notice could not reach, empty when it
|
|
129
|
+
* reached every one; null while its notices are still being sent. Absent
|
|
130
|
+
* otherwise.
|
|
131
|
+
*/
|
|
132
|
+
deletionNoticeUnreached?: UnreachedAdmin[] | null;
|
|
97
133
|
}
|
|
98
134
|
/** The result of renaming a vault. */
|
|
99
135
|
export interface UpdatedVault {
|
|
@@ -179,14 +215,26 @@ interface VaultLifecycleResponse {
|
|
|
179
215
|
deletion_requested_by?: string;
|
|
180
216
|
deletion_schedule_id?: string;
|
|
181
217
|
}
|
|
182
|
-
export interface
|
|
218
|
+
export interface UnreachedAdminResponse {
|
|
219
|
+
user_id: string;
|
|
220
|
+
name: string | null;
|
|
221
|
+
email: string;
|
|
222
|
+
reason: string;
|
|
223
|
+
}
|
|
224
|
+
/** DELETE /v1/vaults/:id: the schedule, or, once a schedule's deadline has passed, the cleanup it started. */
|
|
225
|
+
export type ScheduleVaultDeletionResponse = {
|
|
183
226
|
vault_id: string;
|
|
184
227
|
status: 'deletion_scheduled';
|
|
185
228
|
deletion_requested_at: number;
|
|
186
229
|
deletion_scheduled_for: number;
|
|
187
230
|
deletion_requested_by: string;
|
|
188
231
|
deletion_schedule_id: string;
|
|
189
|
-
|
|
232
|
+
deletion_notice_unreached: UnreachedAdminResponse[] | null;
|
|
233
|
+
} | {
|
|
234
|
+
vault_id: string;
|
|
235
|
+
status: 'deleting';
|
|
236
|
+
started_at: number;
|
|
237
|
+
};
|
|
190
238
|
export interface ListVaultsResponse {
|
|
191
239
|
vaults: (VaultLifecycleResponse & {
|
|
192
240
|
vault_id: string;
|
|
@@ -206,6 +254,7 @@ export interface VaultDetailResponse extends VaultLifecycleResponse {
|
|
|
206
254
|
created_at: number;
|
|
207
255
|
last_unsealed_at?: number | null;
|
|
208
256
|
unseal_count?: number;
|
|
257
|
+
deletion_notice_unreached?: UnreachedAdminResponse[] | null;
|
|
209
258
|
}
|
|
210
259
|
export interface UpdateVaultResponse {
|
|
211
260
|
vault_id: string;
|