@sparkvault/sdk-js 19.0.1 → 19.1.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/README.md +26 -4
- package/dist/npm/chunks/index-BnP-2w0t.cjs +13025 -0
- package/dist/npm/chunks/index-BnP-2w0t.cjs.map +1 -0
- package/dist/npm/chunks/index-CgR08uMG.mjs +12960 -0
- package/dist/npm/chunks/index-CgR08uMG.mjs.map +1 -0
- package/dist/npm/identity.cjs +23 -0
- package/dist/npm/identity.cjs.map +1 -0
- package/dist/npm/identity.mjs +12 -0
- package/dist/npm/identity.mjs.map +1 -0
- package/dist/{index.cjs → npm/index.cjs} +799 -13755
- package/dist/npm/index.cjs.map +1 -0
- package/dist/{index.mjs → npm/index.mjs} +200 -13155
- package/dist/npm/index.mjs.map +1 -0
- package/dist/sparkvault-identity.js +2 -0
- package/dist/sparkvault-identity.js.map +1 -0
- package/dist/sparkvault.js +1 -1
- package/dist/types/identity.d.ts +8 -0
- package/dist/{index.d.ts → types/index.d.ts} +4 -790
- package/dist/types/shared/errors-C-gjmGBs.d.ts +800 -0
- package/package.json +20 -9
- package/dist/api-base.d.ts +0 -116
- package/dist/auto-init.d.ts +0 -32
- package/dist/config.d.ts +0 -79
- package/dist/entropy/index.d.ts +0 -35
- package/dist/entropy/types.d.ts +0 -32
- package/dist/errors.d.ts +0 -146
- package/dist/folders/index.d.ts +0 -102
- package/dist/folders/types.d.ts +0 -91
- package/dist/health.d.ts +0 -18
- package/dist/http.d.ts +0 -46
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/ingots/fetch-download.d.ts +0 -78
- package/dist/ingots/history.d.ts +0 -4
- package/dist/ingots/index.d.ts +0 -388
- package/dist/ingots/revision.d.ts +0 -4
- package/dist/ingots/types.d.ts +0 -556
- package/dist/logger.d.ts +0 -32
- package/dist/notify/index.d.ts +0 -154
- package/dist/notify/types.d.ts +0 -232
- package/dist/products/help-desk/client.d.ts +0 -198
- package/dist/products/help-desk/desk-id.d.ts +0 -2
- package/dist/products/help-desk/form-draft.d.ts +0 -37
- package/dist/products/help-desk/form-types.d.ts +0 -123
- package/dist/products/help-desk/form.d.ts +0 -83
- package/dist/products/help-desk/index.d.ts +0 -47
- package/dist/products/help-desk/kb-client.d.ts +0 -48
- package/dist/products/help-desk/kb-types.d.ts +0 -59
- package/dist/products/help-desk/modal.d.ts +0 -8
- package/dist/products/help-desk/styles.d.ts +0 -9
- package/dist/products/help-desk/support-analytics-types.d.ts +0 -32
- package/dist/products/help-desk/support-analytics.d.ts +0 -3
- package/dist/products/help-desk/support-brand.d.ts +0 -49
- package/dist/products/help-desk/support-controller.d.ts +0 -4
- package/dist/products/help-desk/support-history.d.ts +0 -38
- package/dist/products/help-desk/support-launcher.d.ts +0 -12
- package/dist/products/help-desk/support-styles.d.ts +0 -14
- package/dist/products/help-desk/support-types.d.ts +0 -66
- package/dist/products/help-desk/support-view.d.ts +0 -173
- package/dist/products/help-desk/types.d.ts +0 -285
- package/dist/products/help-desk/widget-identity.d.ts +0 -32
- package/dist/products/identity/api.d.ts +0 -237
- package/dist/products/identity/container.d.ts +0 -44
- package/dist/products/identity/dialog-launcher.d.ts +0 -133
- package/dist/products/identity/federation-flow.d.ts +0 -31
- package/dist/products/identity/handlers/otp-handler.d.ts +0 -69
- package/dist/products/identity/handlers/passkey-handler.d.ts +0 -105
- package/dist/products/identity/handlers/sparklink-handler.d.ts +0 -34
- package/dist/products/identity/index.d.ts +0 -296
- package/dist/products/identity/inline-container.d.ts +0 -53
- package/dist/products/identity/methods.d.ts +0 -19
- package/dist/products/identity/modal.d.ts +0 -51
- package/dist/products/identity/pending-signin.d.ts +0 -102
- package/dist/products/identity/popup-launcher.d.ts +0 -73
- package/dist/products/identity/renderer.d.ts +0 -525
- package/dist/products/identity/state.d.ts +0 -84
- package/dist/products/identity/styles.d.ts +0 -31
- package/dist/products/identity/types.d.ts +0 -561
- package/dist/products/identity/utils/cooldown-timer.d.ts +0 -73
- package/dist/products/identity/utils.d.ts +0 -85
- package/dist/products/identity/views/backup-verify.d.ts +0 -42
- package/dist/products/identity/views/base.d.ts +0 -51
- package/dist/products/identity/views/error.d.ts +0 -65
- package/dist/products/identity/views/icons.d.ts +0 -41
- package/dist/products/identity/views/identity-input.d.ts +0 -80
- package/dist/products/identity/views/index.d.ts +0 -20
- package/dist/products/identity/views/loading.d.ts +0 -23
- package/dist/products/identity/views/method-button.d.ts +0 -14
- package/dist/products/identity/views/method-select.d.ts +0 -42
- package/dist/products/identity/views/origin-not-allowed.d.ts +0 -25
- package/dist/products/identity/views/otp-verify.d.ts +0 -58
- package/dist/products/identity/views/passkey-auto.d.ts +0 -22
- package/dist/products/identity/views/passkey-prompt.d.ts +0 -25
- package/dist/products/identity/views/passkey.d.ts +0 -38
- package/dist/products/identity/views/product-not-configured.d.ts +0 -21
- package/dist/products/identity/views/service-unavailable.d.ts +0 -21
- package/dist/products/identity/views/sms-consent.d.ts +0 -16
- package/dist/products/identity/views/sparklink-waiting.d.ts +0 -40
- package/dist/products/identity/views/two-factor.d.ts +0 -37
- package/dist/products/index.d.ts +0 -51
- package/dist/products/messaging/index.d.ts +0 -38
- package/dist/products/messaging/types.d.ts +0 -162
- package/dist/products/notify/index.d.ts +0 -436
- package/dist/products/notify/project-types.d.ts +0 -44
- package/dist/products/notify/projects.d.ts +0 -15
- package/dist/products/notify/types.d.ts +0 -1327
- package/dist/products/structured-ingots/index.d.ts +0 -31
- package/dist/products/structured-ingots/types-client.d.ts +0 -19
- package/dist/products/structured-ingots/types.d.ts +0 -293
- package/dist/products/structured-ingots/validation.d.ts +0 -25
- package/dist/request-path.d.ts +0 -44
- package/dist/sparks/index.d.ts +0 -91
- package/dist/sparks/types.d.ts +0 -304
- package/dist/ui/chrome.d.ts +0 -16
- package/dist/ui/ds-tokens.d.ts +0 -59
- package/dist/ui/inline-shell.d.ts +0 -19
- package/dist/ui/live-region.d.ts +0 -15
- package/dist/ui/modal-shell.d.ts +0 -67
- package/dist/ui/target.d.ts +0 -6
- package/dist/utils/dom.d.ts +0 -26
- package/dist/vault-session.d.ts +0 -2
- package/dist/vaults/index.d.ts +0 -254
- package/dist/vaults/types.d.ts +0 -368
- package/dist/vaults/upload/api.d.ts +0 -310
- package/dist/vaults/upload/chrome.d.ts +0 -21
- package/dist/vaults/upload/container.d.ts +0 -37
- package/dist/vaults/upload/index.d.ts +0 -76
- package/dist/vaults/upload/inline-container.d.ts +0 -41
- package/dist/vaults/upload/modal.d.ts +0 -55
- package/dist/vaults/upload/renderer.d.ts +0 -150
- package/dist/vaults/upload/styles.d.ts +0 -14
- package/dist/vaults/upload/types.d.ts +0 -220
package/dist/folders/types.d.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Folders Module Types
|
|
3
|
-
*
|
|
4
|
-
* Folders organize ingots within an unsealed vault. Public domain objects are
|
|
5
|
-
* camelCase; wire shapes (snake_case) stay private to the module.
|
|
6
|
-
*/
|
|
7
|
-
import type { UnsealedVault } from '../vaults/types';
|
|
8
|
-
export type { UnsealedVault };
|
|
9
|
-
/** A folder within a vault. */
|
|
10
|
-
export interface Folder {
|
|
11
|
-
/** Folder ID */
|
|
12
|
-
id: string;
|
|
13
|
-
/** Folder name */
|
|
14
|
-
name: string;
|
|
15
|
-
/** Parent folder ID, or null at the vault root */
|
|
16
|
-
parentId: string | null;
|
|
17
|
-
/** Whether the folder is pinned */
|
|
18
|
-
pinned: boolean;
|
|
19
|
-
/** Creation timestamp (Unix seconds) */
|
|
20
|
-
createdAt: number;
|
|
21
|
-
/** Last update timestamp (Unix seconds) */
|
|
22
|
-
updatedAt: number;
|
|
23
|
-
}
|
|
24
|
-
/** A single hop in a folder breadcrumb trail. */
|
|
25
|
-
export interface FolderBreadcrumbItem {
|
|
26
|
-
/** Folder ID, or null for the Root entry */
|
|
27
|
-
id: string | null;
|
|
28
|
-
/** Folder name */
|
|
29
|
-
name: string;
|
|
30
|
-
}
|
|
31
|
-
/** Options for one page of a vault's folders. */
|
|
32
|
-
export interface ListFoldersOptions {
|
|
33
|
-
/** Most folders on one page (1-500; server default 100) */
|
|
34
|
-
limit?: number;
|
|
35
|
-
/** A prior page's `nextPageToken` */
|
|
36
|
-
pageToken?: string;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* One page of a vault's folders: at most `limit` of them, in an order that
|
|
40
|
-
* holds from page to page and is not by name. A page can hold fewer, even
|
|
41
|
-
* none, and still not be the last: follow `nextPageToken`, never the count,
|
|
42
|
-
* and sort what you hold. To show one folder's subfolders, list its contents
|
|
43
|
-
* (`ingots.listContents`), which pages them first.
|
|
44
|
-
*/
|
|
45
|
-
export interface FolderPage {
|
|
46
|
-
/** This page's folders */
|
|
47
|
-
folders: Folder[];
|
|
48
|
-
/** The next page's `pageToken`; null on the last page */
|
|
49
|
-
nextPageToken: string | null;
|
|
50
|
-
}
|
|
51
|
-
/** Options for creating a folder. */
|
|
52
|
-
export interface CreateFolderOptions {
|
|
53
|
-
/** Folder name */
|
|
54
|
-
name: string;
|
|
55
|
-
/** Parent folder ID, or null/omitted for the vault root */
|
|
56
|
-
parentId?: string | null;
|
|
57
|
-
}
|
|
58
|
-
/** Options for updating a folder. */
|
|
59
|
-
export interface UpdateFolderOptions {
|
|
60
|
-
/** New name */
|
|
61
|
-
name?: string;
|
|
62
|
-
/** New parent folder ID, or null for the vault root */
|
|
63
|
-
parentId?: string | null;
|
|
64
|
-
/** New pinned state */
|
|
65
|
-
pinned?: boolean;
|
|
66
|
-
}
|
|
67
|
-
export interface FolderWire {
|
|
68
|
-
folder_id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
parent_id: string | null;
|
|
71
|
-
pinned: boolean;
|
|
72
|
-
created_at: number;
|
|
73
|
-
updated_at: number;
|
|
74
|
-
}
|
|
75
|
-
export interface FolderDetailWire extends FolderWire {
|
|
76
|
-
breadcrumb?: {
|
|
77
|
-
folder_id: string | null;
|
|
78
|
-
name: string;
|
|
79
|
-
}[];
|
|
80
|
-
subfolder_count?: number;
|
|
81
|
-
}
|
|
82
|
-
/** GET /vaults/:id/folders: one page */
|
|
83
|
-
export interface ListFoldersResponse {
|
|
84
|
-
folders?: FolderWire[];
|
|
85
|
-
/** Null on the last page; read as null when absent, so a page without it ends the walk instead of looping. */
|
|
86
|
-
next_page_token?: string | null;
|
|
87
|
-
}
|
|
88
|
-
/** GET /vaults/:id/folders?path=: the folder at the path, or none (never paged) */
|
|
89
|
-
export interface FolderPathLookupResponse {
|
|
90
|
-
folders?: FolderWire[];
|
|
91
|
-
}
|
package/dist/health.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ResolvedConfig } from './config';
|
|
2
|
-
export interface HealthCheckOptions {
|
|
3
|
-
timeout?: number;
|
|
4
|
-
}
|
|
5
|
-
export interface HealthCheckResult {
|
|
6
|
-
online: boolean;
|
|
7
|
-
status: string;
|
|
8
|
-
httpStatus?: number;
|
|
9
|
-
checkedAt: number;
|
|
10
|
-
error?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class HealthModule {
|
|
13
|
-
private readonly config;
|
|
14
|
-
constructor(config: ResolvedConfig);
|
|
15
|
-
check(options?: HealthCheckOptions): Promise<HealthCheckResult>;
|
|
16
|
-
isOnline(options?: HealthCheckOptions): Promise<boolean>;
|
|
17
|
-
private readStatus;
|
|
18
|
-
}
|
package/dist/http.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SparkVault SDK HTTP Client
|
|
3
|
-
*/
|
|
4
|
-
import type { ResolvedConfig } from './config';
|
|
5
|
-
import type { ApiPath, QueryParams } from './request-path';
|
|
6
|
-
export interface RequestOptions {
|
|
7
|
-
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
8
|
-
headers?: Record<string, string>;
|
|
9
|
-
body?: unknown;
|
|
10
|
-
/** Query parameters appended to the path; empty values are left out. */
|
|
11
|
-
query?: QueryParams;
|
|
12
|
-
/** The unsealed vault's Vault Access Token, sent as `X-Vault-Access-Token`. */
|
|
13
|
-
vat?: string;
|
|
14
|
-
timeout?: number;
|
|
15
|
-
/** Override browser cookie behavior for a credential-isolated product surface. */
|
|
16
|
-
credentials?: 'omit' | 'same-origin' | 'include';
|
|
17
|
-
}
|
|
18
|
-
/** A successful answer: its `data`, unwrapped from the `{ data, meta }` envelope. */
|
|
19
|
-
export interface ApiResponse<T = unknown> {
|
|
20
|
-
data: T;
|
|
21
|
-
}
|
|
22
|
-
export declare class HttpClient {
|
|
23
|
-
private readonly config;
|
|
24
|
-
constructor(config: ResolvedConfig);
|
|
25
|
-
private getDefaultHeaders;
|
|
26
|
-
private getAccessToken;
|
|
27
|
-
request<T = unknown>(path: ApiPath, options?: RequestOptions): Promise<ApiResponse<T>>;
|
|
28
|
-
private parseResponse;
|
|
29
|
-
/**
|
|
30
|
-
* The SDK error for a failed answer, typed by its status (a 402's or a 403's
|
|
31
|
-
* by its code too): the gates a host page branches on get their own class,
|
|
32
|
-
* and every other answer is the base error under the service's own code.
|
|
33
|
-
* Each carries the service's code (`serviceCode`), which tells apart two
|
|
34
|
-
* refusals that share a typed class's `code`, and the answer's `Retry-After`
|
|
35
|
-
* (`retryAfterMs`), the floor for whoever retries it: the SDK's own
|
|
36
|
-
* transfers when the answer is a download link's mint, and the host page
|
|
37
|
-
* otherwise.
|
|
38
|
-
*/
|
|
39
|
-
private createErrorFromResponse;
|
|
40
|
-
private unwrapApiResponse;
|
|
41
|
-
get<T = unknown>(path: ApiPath, options?: Omit<RequestOptions, 'method' | 'body'>): Promise<ApiResponse<T>>;
|
|
42
|
-
post<T = unknown>(path: ApiPath, body?: unknown, options?: Omit<RequestOptions, 'method'>): Promise<ApiResponse<T>>;
|
|
43
|
-
put<T = unknown>(path: ApiPath, body?: unknown, options?: Omit<RequestOptions, 'method'>): Promise<ApiResponse<T>>;
|
|
44
|
-
patch<T = unknown>(path: ApiPath, body?: unknown, options?: Omit<RequestOptions, 'method'>): Promise<ApiResponse<T>>;
|
|
45
|
-
delete<T = unknown>(path: ApiPath, options?: Omit<RequestOptions, 'method' | 'body'>): Promise<ApiResponse<T>>;
|
|
46
|
-
}
|