@sparkvault/sdk-js 14.0.0 → 14.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 +136 -1
- package/dist/http.d.ts +2 -0
- package/dist/index.cjs +7814 -4962
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1119 -756
- package/dist/index.mjs +7813 -4963
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/client.d.ts +106 -0
- package/dist/products/help-desk/form-attachments.d.ts +18 -0
- package/dist/products/help-desk/form-types.d.ts +33 -0
- package/dist/products/help-desk/form.d.ts +8 -0
- package/dist/products/help-desk/index.d.ts +31 -0
- package/dist/products/help-desk/modal.d.ts +8 -0
- package/dist/products/help-desk/styles.d.ts +2 -0
- package/dist/products/help-desk/types.d.ts +195 -0
- package/dist/products/index.d.ts +8 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ interface RequestOptions {
|
|
|
113
113
|
/** The unsealed vault's Vault Access Token, sent as `X-Vault-Access-Token`. */
|
|
114
114
|
vat?: string;
|
|
115
115
|
timeout?: number;
|
|
116
|
+
/** Override browser cookie behavior for a credential-isolated product surface. */
|
|
117
|
+
credentials?: 'omit' | 'same-origin' | 'include';
|
|
116
118
|
}
|
|
117
119
|
/** A successful answer: its `data`, unwrapped from the `{ data, meta }` envelope. */
|
|
118
120
|
interface ApiResponse<T = unknown> {
|
|
@@ -2567,855 +2569,1216 @@ declare class NotifyProductModule {
|
|
|
2567
2569
|
}
|
|
2568
2570
|
|
|
2569
2571
|
/**
|
|
2570
|
-
*
|
|
2572
|
+
* Folders Module Types
|
|
2571
2573
|
*
|
|
2572
|
-
*
|
|
2573
|
-
*
|
|
2574
|
-
* Currently exposes `identity`; future products attach here alongside it.
|
|
2574
|
+
* Folders organize ingots within an unsealed vault. Public domain objects are
|
|
2575
|
+
* camelCase; wire shapes (snake_case) stay private to the module.
|
|
2575
2576
|
*/
|
|
2576
2577
|
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2578
|
+
/** A folder within a vault. */
|
|
2579
|
+
interface Folder {
|
|
2580
|
+
/** Folder ID */
|
|
2581
|
+
id: string;
|
|
2582
|
+
/** Folder name */
|
|
2583
|
+
name: string;
|
|
2584
|
+
/** Parent folder ID, or null at the vault root */
|
|
2585
|
+
parentId: string | null;
|
|
2586
|
+
/** Whether the folder is pinned */
|
|
2587
|
+
pinned: boolean;
|
|
2588
|
+
/** Creation timestamp (Unix seconds) */
|
|
2589
|
+
createdAt: number;
|
|
2590
|
+
/** Last update timestamp (Unix seconds) */
|
|
2591
|
+
updatedAt: number;
|
|
2591
2592
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
logoLightUrl: string | null;
|
|
2606
|
-
/** Dark theme logo URL */
|
|
2607
|
-
logoDarkUrl: string | null;
|
|
2593
|
+
/** A single hop in a folder breadcrumb trail. */
|
|
2594
|
+
interface FolderBreadcrumbItem {
|
|
2595
|
+
/** Folder ID, or null for the Root entry */
|
|
2596
|
+
id: string | null;
|
|
2597
|
+
/** Folder name */
|
|
2598
|
+
name: string;
|
|
2599
|
+
}
|
|
2600
|
+
/** Options for one page of a vault's folders. */
|
|
2601
|
+
interface ListFoldersOptions {
|
|
2602
|
+
/** Most folders on one page (1-500; server default 100) */
|
|
2603
|
+
limit?: number;
|
|
2604
|
+
/** A prior page's `nextPageToken` */
|
|
2605
|
+
pageToken?: string;
|
|
2608
2606
|
}
|
|
2609
2607
|
/**
|
|
2610
|
-
*
|
|
2608
|
+
* One page of a vault's folders: at most `limit` of them, in an order that
|
|
2609
|
+
* holds from page to page and is not by name. A page can hold fewer, even
|
|
2610
|
+
* none, and still not be the last: follow `nextPageToken`, never the count,
|
|
2611
|
+
* and sort what you hold. To show one folder's subfolders, list its contents
|
|
2612
|
+
* (`ingots.listContents`), which pages them first.
|
|
2611
2613
|
*/
|
|
2612
|
-
interface
|
|
2613
|
-
/**
|
|
2614
|
-
|
|
2615
|
-
/**
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2614
|
+
interface FolderPage {
|
|
2615
|
+
/** This page's folders */
|
|
2616
|
+
folders: Folder[];
|
|
2617
|
+
/** The next page's `pageToken`; null on the last page */
|
|
2618
|
+
nextPageToken: string | null;
|
|
2619
|
+
}
|
|
2620
|
+
/** Options for creating a folder. */
|
|
2621
|
+
interface CreateFolderOptions {
|
|
2622
|
+
/** Folder name */
|
|
2623
|
+
name: string;
|
|
2624
|
+
/** Parent folder ID, or null/omitted for the vault root */
|
|
2625
|
+
parentId?: string | null;
|
|
2626
|
+
}
|
|
2627
|
+
/** Options for updating a folder. */
|
|
2628
|
+
interface UpdateFolderOptions {
|
|
2629
|
+
/** New name */
|
|
2630
|
+
name?: string;
|
|
2631
|
+
/** New parent folder ID, or null for the vault root */
|
|
2632
|
+
parentId?: string | null;
|
|
2633
|
+
/** New pinned state */
|
|
2634
|
+
pinned?: boolean;
|
|
2619
2635
|
}
|
|
2636
|
+
|
|
2620
2637
|
/**
|
|
2621
|
-
*
|
|
2638
|
+
* Ingots Module Types
|
|
2639
|
+
*
|
|
2640
|
+
* Ingot operations run against an unsealed vault: every call carries the
|
|
2641
|
+
* vault's short-lived Vault Access Token (VAT) via the `X-Vault-Access-Token`
|
|
2642
|
+
* header. Public domain objects are camelCase; wire shapes (snake_case) stay
|
|
2643
|
+
* private to the module.
|
|
2622
2644
|
*/
|
|
2623
|
-
|
|
2624
|
-
/** Vault ID */
|
|
2625
|
-
vaultId: string;
|
|
2626
|
-
/** Vault name */
|
|
2627
|
-
vaultName: string;
|
|
2628
|
-
/** Maximum upload size in bytes */
|
|
2629
|
-
maxSizeBytes: number;
|
|
2630
|
-
/** Branding information */
|
|
2631
|
-
branding: UploadBranding;
|
|
2632
|
-
/** Encryption details */
|
|
2633
|
-
encryption: EncryptionInfo;
|
|
2634
|
-
/** Forge status */
|
|
2635
|
-
forgeStatus: 'active' | 'inactive';
|
|
2636
|
-
}
|
|
2645
|
+
|
|
2637
2646
|
/**
|
|
2638
|
-
*
|
|
2639
|
-
* -
|
|
2640
|
-
*
|
|
2647
|
+
* What the server does when a create's name is already held in the target
|
|
2648
|
+
* folder (case-insensitive). The server decides on the holder it read before
|
|
2649
|
+
* writing anything, so a caller that must not replace content says so here:
|
|
2650
|
+
* - `upsert` (the server default): the upload replaces the holder's content.
|
|
2651
|
+
* - `complete_pending`: a holder whose own upload never finalized is completed
|
|
2652
|
+
* (`created: false`); a published holder is refused with a 409 CONFLICT whose
|
|
2653
|
+
* `details.reason` is `'NAME_HELD'`, and is left untouched. The details
|
|
2654
|
+
* describe the holder (`ingot_id`, `status`, `size_bytes`) unless another
|
|
2655
|
+
* app manages it or another request claimed the name first, when they carry
|
|
2656
|
+
* the reason alone.
|
|
2657
|
+
* - `refuse`: any holder, its upload finished or not, is refused with that
|
|
2658
|
+
* same 409 and left untouched; the create only ever mints.
|
|
2659
|
+
* - `new_name`: the holder is never touched; the ingot is minted under the
|
|
2660
|
+
* first free numbered name the server picks ("report (2).pdf"), returned as
|
|
2661
|
+
* the result's `name`.
|
|
2641
2662
|
*/
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2663
|
+
declare const NAME_CONFLICT_POLICIES: readonly ["upsert", "complete_pending", "refuse", "new_name"];
|
|
2664
|
+
type NameConflictPolicy = (typeof NAME_CONFLICT_POLICIES)[number];
|
|
2665
|
+
/** Ingot metadata as returned by list/get/contents. */
|
|
2666
|
+
interface Ingot {
|
|
2667
|
+
/** Ingot ID */
|
|
2668
|
+
id: string;
|
|
2669
|
+
/** Ingot name */
|
|
2670
|
+
name: string;
|
|
2645
2671
|
/**
|
|
2646
|
-
*
|
|
2647
|
-
*
|
|
2648
|
-
*
|
|
2649
|
-
*
|
|
2672
|
+
* The name a download of the ingot saves under, as Forge names it: `name`,
|
|
2673
|
+
* kept as it is when the first word of the extension it shows (up to an
|
|
2674
|
+
* ASCII space, in any case) is one the MIME registry knows or holds a
|
|
2675
|
+
* character none of the registry's extensions is spelled with, which may
|
|
2676
|
+
* draw as one, and otherwise completed with the extension `contentType`'s
|
|
2677
|
+
* files are named with (the first the registry lists for it, or, for the
|
|
2678
|
+
* few types whose first is not the one desktops name their files with, the
|
|
2679
|
+
* one they do: `.mp3` for `audio/mpeg`, `.mov` for `video/quicktime`), never
|
|
2680
|
+
* one a saved copy must never open as. Save a copy under it, handed to a
|
|
2681
|
+
* browser as `application/octet-stream` unless `contentType` is a raster
|
|
2682
|
+
* image, audio, video or PDF format (never SVG, a playlist or a stream
|
|
2683
|
+
* redirector): a browser renames a saved copy by the type it is handed
|
|
2684
|
+
* (Chrome saves `Invoice` typed `application/x-msdownload` as
|
|
2685
|
+
* `Invoice.exe`), and completes or replaces no extension of a copy handed
|
|
2686
|
+
* as `application/octet-stream`.
|
|
2650
2687
|
*/
|
|
2651
|
-
|
|
2652
|
-
/**
|
|
2653
|
-
|
|
2654
|
-
/**
|
|
2655
|
-
|
|
2688
|
+
downloadFilename: string;
|
|
2689
|
+
/** Content type (MIME) */
|
|
2690
|
+
contentType: string;
|
|
2691
|
+
/** Size in bytes */
|
|
2692
|
+
size: number;
|
|
2693
|
+
/** Lifecycle status: `uploading` until Forge activates the upload, then `active` */
|
|
2694
|
+
status: 'uploading' | 'active';
|
|
2695
|
+
/** Creation timestamp (Unix seconds) */
|
|
2696
|
+
createdAt: number;
|
|
2697
|
+
/** Containing folder ID, or null at the vault root */
|
|
2698
|
+
folderId: string | null;
|
|
2656
2699
|
/**
|
|
2657
|
-
*
|
|
2658
|
-
*
|
|
2700
|
+
* Client-computed, vault-keyed HMAC of the plaintext (43-char base64url),
|
|
2701
|
+
* or null when the uploader did not supply one.
|
|
2659
2702
|
*/
|
|
2660
|
-
|
|
2703
|
+
contentHmac: string | null;
|
|
2704
|
+
/** Opaque published-content revision; null for legacy/unpublished content. */
|
|
2705
|
+
contentVersion: string | null;
|
|
2706
|
+
}
|
|
2707
|
+
/** The discrete primitive returned by createUpload — a Forge TUS session. */
|
|
2708
|
+
interface IngotUpload {
|
|
2709
|
+
/** Ingot ID */
|
|
2710
|
+
id: string;
|
|
2711
|
+
/** The name the ingot is stored under: the server's numbered name under `new_name`. */
|
|
2712
|
+
name: string;
|
|
2713
|
+
/** Content type (MIME) */
|
|
2714
|
+
contentType: string;
|
|
2715
|
+
/** Size in bytes */
|
|
2716
|
+
size: number;
|
|
2717
|
+
/** Forge upload URL carrying the ISTK (upload session token) */
|
|
2718
|
+
uploadUrl: string;
|
|
2719
|
+
/** Upload session expiry (Unix seconds) */
|
|
2720
|
+
expiresAt: number;
|
|
2661
2721
|
/**
|
|
2662
|
-
*
|
|
2663
|
-
*
|
|
2664
|
-
* File to the SDK, which shows only the secure-upload progress dialog.
|
|
2722
|
+
* Whether the server minted this ingot (true) or staged the upload onto the
|
|
2723
|
+
* ingot already holding the name (false, as `onNameConflict` allowed).
|
|
2665
2724
|
*/
|
|
2666
|
-
|
|
2725
|
+
created: boolean;
|
|
2667
2726
|
/**
|
|
2668
|
-
*
|
|
2669
|
-
*
|
|
2670
|
-
*
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
2673
|
-
* the setting is off.
|
|
2727
|
+
* The upload the create staged onto the ingot (Core's `upload_id`): the id
|
|
2728
|
+
* Forge keys the upload's session by, and the `contentVersion` the ingot
|
|
2729
|
+
* reads once the upload publishes. Giving the upload up ends it with the
|
|
2730
|
+
* file the create made through this id (`endUpload`). Null when the server
|
|
2731
|
+
* named none.
|
|
2674
2732
|
*/
|
|
2675
|
-
|
|
2733
|
+
uploadId: string | null;
|
|
2734
|
+
}
|
|
2735
|
+
/**
|
|
2736
|
+
* What became of a given-up upload's file (`endUpload`): `deleted`, the vault
|
|
2737
|
+
* holds it no longer (this end deleted it, or it was already gone); `kept`,
|
|
2738
|
+
* this end deleted nothing, and a read of it by id (`get`) shows the file as
|
|
2739
|
+
* it is now.
|
|
2740
|
+
*/
|
|
2741
|
+
type UploadEnd = 'deleted' | 'kept';
|
|
2742
|
+
/** A finalized ingot, returned by the high-level upload/replace flows. */
|
|
2743
|
+
interface CreatedIngot {
|
|
2744
|
+
/** Ingot ID */
|
|
2745
|
+
id: string;
|
|
2746
|
+
/** The name the ingot is stored under: the server's numbered name under `new_name`. */
|
|
2747
|
+
name: string;
|
|
2748
|
+
/** Content type (MIME) */
|
|
2749
|
+
contentType: string;
|
|
2750
|
+
/** Size in bytes */
|
|
2751
|
+
size: number;
|
|
2676
2752
|
/**
|
|
2677
|
-
*
|
|
2678
|
-
*
|
|
2753
|
+
* Whether the upload minted this ingot (true) or replaced the content of an
|
|
2754
|
+
* existing one (false): a same-name upload the name-conflict policy staged
|
|
2755
|
+
* onto its holder, or any `replace`.
|
|
2679
2756
|
*/
|
|
2680
|
-
|
|
2681
|
-
/** Callback when upload completes successfully */
|
|
2682
|
-
onSuccess?: (result: UploadResult) => void;
|
|
2683
|
-
/** Callback when an error occurs */
|
|
2684
|
-
onError?: (error: Error) => void;
|
|
2685
|
-
/** Callback when user cancels */
|
|
2686
|
-
onCancel?: () => void;
|
|
2687
|
-
/** Callback for upload progress */
|
|
2688
|
-
onProgress?: (progress: UploadProgress) => void;
|
|
2689
|
-
/**
|
|
2690
|
-
* Called once the widget has read the vault's upload page and shows its
|
|
2691
|
-
* form (or, given a `file`, starts uploading it). A failure after it is the
|
|
2692
|
-
* widget's to show, with the way on its failure leaves (the same file
|
|
2693
|
-
* again, or another); one before it means the upload page could not load.
|
|
2694
|
-
*/
|
|
2695
|
-
onReady?: () => void;
|
|
2696
|
-
}
|
|
2697
|
-
/** Options for attach() - binds upload to element clicks */
|
|
2698
|
-
interface UploadAttachOptions {
|
|
2699
|
-
/** Vault ID to upload to */
|
|
2700
|
-
vaultId: string;
|
|
2701
|
-
/** Callback when upload completes successfully */
|
|
2702
|
-
onSuccess?: (result: UploadResult) => void;
|
|
2703
|
-
/** Callback when an error occurs */
|
|
2704
|
-
onError?: (error: Error) => void;
|
|
2705
|
-
/** Callback when user cancels */
|
|
2706
|
-
onCancel?: () => void;
|
|
2707
|
-
/** Callback for upload progress */
|
|
2708
|
-
onProgress?: (progress: UploadProgress) => void;
|
|
2709
|
-
}
|
|
2710
|
-
/**
|
|
2711
|
-
* Upload progress information.
|
|
2712
|
-
*/
|
|
2713
|
-
interface UploadProgress {
|
|
2714
|
-
/** Bytes uploaded */
|
|
2715
|
-
bytesUploaded: number;
|
|
2716
|
-
/** Total bytes */
|
|
2717
|
-
bytesTotal: number;
|
|
2718
|
-
/** Percentage (0-100) */
|
|
2719
|
-
percentage: number;
|
|
2720
|
-
/** Current phase */
|
|
2721
|
-
phase: 'uploading' | 'ceremony' | 'complete';
|
|
2757
|
+
created: boolean;
|
|
2722
2758
|
}
|
|
2723
|
-
/**
|
|
2724
|
-
|
|
2725
|
-
*/
|
|
2726
|
-
|
|
2759
|
+
/** The discrete primitive returned by createDownloadLink. */
|
|
2760
|
+
interface IngotDownloadLink {
|
|
2761
|
+
/** Opaque published-content revision; null for legacy content. */
|
|
2762
|
+
contentVersion: string | null;
|
|
2763
|
+
/** Short-lived signed Forge download URL */
|
|
2764
|
+
downloadUrl: string;
|
|
2727
2765
|
/** Ingot ID */
|
|
2728
|
-
|
|
2729
|
-
/**
|
|
2730
|
-
|
|
2731
|
-
/**
|
|
2732
|
-
|
|
2733
|
-
/**
|
|
2766
|
+
id: string;
|
|
2767
|
+
/** Ingot name */
|
|
2768
|
+
name: string;
|
|
2769
|
+
/** Size in bytes */
|
|
2770
|
+
size: number;
|
|
2771
|
+
/** Content type (MIME) */
|
|
2772
|
+
contentType: string;
|
|
2773
|
+
}
|
|
2774
|
+
/** Options for the createUpload primitive. */
|
|
2775
|
+
interface CreateUploadOptions {
|
|
2776
|
+
/** Unsealed vault the ingot belongs to */
|
|
2777
|
+
vault: UnsealedVault;
|
|
2778
|
+
/** Ingot name */
|
|
2779
|
+
name: string;
|
|
2780
|
+
/** Content type (MIME) */
|
|
2781
|
+
contentType: string;
|
|
2782
|
+
/** Declared upload size in bytes */
|
|
2734
2783
|
sizeBytes: number;
|
|
2735
|
-
/**
|
|
2736
|
-
|
|
2784
|
+
/** Slash-delimited folder path (find-or-created from root). */
|
|
2785
|
+
folder?: string;
|
|
2786
|
+
/** Existing folder ID to upload into. Mutually exclusive with `folder`. */
|
|
2787
|
+
folderId?: string;
|
|
2788
|
+
/** Vault-keyed plaintext HMAC (43-char base64url) to store on the ingot. */
|
|
2789
|
+
contentHmac?: string;
|
|
2790
|
+
/** What a name already held in the target folder does; omitted means the server's `upsert`. */
|
|
2791
|
+
onNameConflict?: NameConflictPolicy;
|
|
2792
|
+
}
|
|
2793
|
+
/** Options for the high-level upload flow. */
|
|
2794
|
+
interface UploadIngotOptions {
|
|
2795
|
+
/** File or Blob to upload */
|
|
2796
|
+
file: File | Blob;
|
|
2797
|
+
/** Optional name (defaults to file name) */
|
|
2798
|
+
name?: string;
|
|
2799
|
+
/**
|
|
2800
|
+
* Content type (the file's own `type` if not provided). A file of no type is
|
|
2801
|
+
* sent with none, and Core stores the type the registry lists for the name's
|
|
2802
|
+
* extension, else `application/octet-stream`.
|
|
2803
|
+
*/
|
|
2804
|
+
contentType?: string;
|
|
2805
|
+
/** Slash-delimited folder path (find-or-created from root). */
|
|
2806
|
+
folder?: string;
|
|
2807
|
+
/** Existing folder ID to upload into. Mutually exclusive with `folder`. */
|
|
2808
|
+
folderId?: string;
|
|
2809
|
+
/** Vault-keyed plaintext HMAC (43-char base64url) to store on the ingot. */
|
|
2810
|
+
contentHmac?: string;
|
|
2811
|
+
/** What a name already held in the target folder does; omitted means the server's `upsert`. */
|
|
2812
|
+
onNameConflict?: NameConflictPolicy;
|
|
2813
|
+
/** Progress callback for the Forge/TUS transfer */
|
|
2814
|
+
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
2737
2815
|
}
|
|
2738
|
-
|
|
2739
|
-
/**
|
|
2740
|
-
* Vaults Module
|
|
2741
|
-
*
|
|
2742
|
-
* Create and manage encrypted vaults (the control plane). Uses Triple
|
|
2743
|
-
* Zero-Trust encryption (SVMK + AMK + VMK). Ingot, folder, spark, and entropy
|
|
2744
|
-
* operations live in their own modules; this module owns the vault record,
|
|
2745
|
-
* its sharing/upload configuration, and the browser upload widget.
|
|
2746
|
-
*/
|
|
2747
|
-
|
|
2748
2816
|
/**
|
|
2749
|
-
*
|
|
2750
|
-
*
|
|
2817
|
+
* The upload session a file's bytes go to, which `sendUpload` hands over once
|
|
2818
|
+
* Forge opens it (`onSessionCreated`): what `resumeUpload` continues the
|
|
2819
|
+
* upload in. Its URL addresses the upload itself (a request to it can end the
|
|
2820
|
+
* upload), so keep it in memory, never in a log or a URL a person shares.
|
|
2751
2821
|
*/
|
|
2752
|
-
interface
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
close(): void;
|
|
2756
|
-
/** Open the upload widget as a popup. Equivalent to calling `upload(options)`. */
|
|
2757
|
-
pop(options: UploadOptions): Promise<UploadResult>;
|
|
2758
|
-
/** Render the upload widget inline. Equivalent to `upload({ ...options, target })`. */
|
|
2759
|
-
render(options: UploadOptions): Promise<UploadResult>;
|
|
2822
|
+
interface UploadSession {
|
|
2823
|
+
/** The session's URL on Forge. */
|
|
2824
|
+
readonly sessionUrl: string;
|
|
2760
2825
|
}
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2826
|
+
/** Options for sendUpload. */
|
|
2827
|
+
interface SendUploadOptions {
|
|
2828
|
+
/** Cancels the transfer. */
|
|
2829
|
+
signal?: AbortSignal;
|
|
2830
|
+
/** Bytes sent so far and the file size; never runs backwards. */
|
|
2831
|
+
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
2764
2832
|
/**
|
|
2765
|
-
*
|
|
2766
|
-
*
|
|
2767
|
-
*
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
2770
|
-
* @example Attach to clicks
|
|
2771
|
-
* sv.vaults.upload.attach('.upload-btn', { vaultId: 'vlt_abc123' });
|
|
2772
|
-
*
|
|
2773
|
-
* @example Inline mode
|
|
2774
|
-
* sv.vaults.upload({ vaultId: 'vlt_abc123', target: '#upload-area' });
|
|
2833
|
+
* Hands over the upload's session once Forge opens it, before the first
|
|
2834
|
+
* byte is sent, so the caller can `resumeUpload` the upload in it later:
|
|
2835
|
+
* after `upload_received_publishing`, to learn whether the server published
|
|
2836
|
+
* it, or after a failure, to send only the bytes the server lacks. A throw
|
|
2837
|
+
* here ends the transfer with that error.
|
|
2775
2838
|
*/
|
|
2776
|
-
|
|
2777
|
-
|
|
2839
|
+
onSessionCreated?: (session: UploadSession) => void;
|
|
2840
|
+
}
|
|
2841
|
+
/** Options for resumeUpload. */
|
|
2842
|
+
type ResumeUploadOptions = Omit<SendUploadOptions, 'onSessionCreated'>;
|
|
2843
|
+
/** Options for replacing an existing ingot's content. */
|
|
2844
|
+
interface ReplaceIngotOptions {
|
|
2845
|
+
/** File or Blob to upload as the new content */
|
|
2846
|
+
file: File | Blob;
|
|
2847
|
+
/** Optional new name (defaults to file name) */
|
|
2848
|
+
name?: string;
|
|
2849
|
+
/** Vault-keyed plaintext HMAC (43-char base64url) for the NEW content. */
|
|
2850
|
+
contentHmac?: string;
|
|
2778
2851
|
/**
|
|
2779
|
-
*
|
|
2780
|
-
*
|
|
2781
|
-
*
|
|
2782
|
-
* @example
|
|
2783
|
-
* const vault = await sv.vaults.create({ name: 'My Vault' });
|
|
2784
|
-
* console.log('Save this VMK:', vault.vmk);
|
|
2852
|
+
* Content type (the file's own `type` if not provided). A file of no type
|
|
2853
|
+
* keeps the type the ingot stores, which Core reads from the name by its
|
|
2854
|
+
* extension only when it is `application/octet-stream` or unparsable.
|
|
2785
2855
|
*/
|
|
2786
|
-
|
|
2856
|
+
contentType?: string;
|
|
2857
|
+
/** Progress callback for the Forge/TUS transfer */
|
|
2858
|
+
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
2859
|
+
}
|
|
2860
|
+
/** Options for list. */
|
|
2861
|
+
interface ListIngotsOptions {
|
|
2862
|
+
/** Page size */
|
|
2863
|
+
limit?: number;
|
|
2864
|
+
/** Pagination cursor */
|
|
2865
|
+
cursor?: string;
|
|
2787
2866
|
/**
|
|
2788
|
-
*
|
|
2789
|
-
*
|
|
2790
|
-
*
|
|
2791
|
-
* @param vaultId - The vault to unseal.
|
|
2792
|
-
* @param key - The vault's VMK, or a DVAK token issued for it.
|
|
2793
|
-
*
|
|
2794
|
-
* @example
|
|
2795
|
-
* const unsealed = await sv.vaults.unseal('vlt_abc', vmk);
|
|
2796
|
-
* const delegated = await sv.vaults.unseal('vlt_abc', 'dvak_...');
|
|
2797
|
-
* console.log('Token:', unsealed.vatToken);
|
|
2867
|
+
* Sort field (name | size | content_type | created | access_count): it
|
|
2868
|
+
* orders only the page answered, never the list across pages
|
|
2798
2869
|
*/
|
|
2799
|
-
|
|
2870
|
+
sortBy?: string;
|
|
2871
|
+
/** Sort direction of the page */
|
|
2872
|
+
sortOrder?: 'asc' | 'desc';
|
|
2873
|
+
}
|
|
2874
|
+
/** Options for listContents. */
|
|
2875
|
+
interface ListContentsOptions {
|
|
2876
|
+
/** Folder to list (null/omitted lists the vault root) */
|
|
2877
|
+
folderId?: string | null;
|
|
2878
|
+
/** Most children on one page (1-500; server default 100) */
|
|
2879
|
+
limit?: number;
|
|
2880
|
+
/** A prior page's `nextPageToken`, for the same folder and order */
|
|
2881
|
+
pageToken?: string;
|
|
2882
|
+
/** Ingot creation order; `desc` (newest first) by default */
|
|
2883
|
+
sortOrder?: 'asc' | 'desc';
|
|
2884
|
+
}
|
|
2885
|
+
/**
|
|
2886
|
+
* One page of a folder's listing. The folder's children run as one sequence
|
|
2887
|
+
* across its pages: every direct subfolder first, in a stable order that is
|
|
2888
|
+
* not by name, then every ingot directly in the folder in creation order
|
|
2889
|
+
* (newest first under `desc`). A page holds at most `limit` children in all,
|
|
2890
|
+
* so one page can hold the last subfolders and the first ingots, and a page
|
|
2891
|
+
* can hold fewer than `limit`, even none, and still not be the last: follow
|
|
2892
|
+
* `nextPageToken`, never the count. Ordering by name, size or type is the
|
|
2893
|
+
* caller's, over the children it holds.
|
|
2894
|
+
*/
|
|
2895
|
+
interface FolderContents {
|
|
2896
|
+
/** The folder listed, on every page; null at the vault root */
|
|
2897
|
+
folder: {
|
|
2898
|
+
id: string;
|
|
2899
|
+
name: string;
|
|
2900
|
+
parentId: string | null;
|
|
2901
|
+
} | null;
|
|
2902
|
+
/** Root → … → the folder listed, on every page */
|
|
2903
|
+
breadcrumb: FolderBreadcrumbItem[];
|
|
2904
|
+
/** This page's subfolders */
|
|
2905
|
+
folders: Folder[];
|
|
2906
|
+
/** This page's ingots */
|
|
2907
|
+
ingots: Ingot[];
|
|
2908
|
+
/** The next page's `pageToken`; null on the last page */
|
|
2909
|
+
nextPageToken: string | null;
|
|
2910
|
+
}
|
|
2911
|
+
/** Options for search. */
|
|
2912
|
+
interface SearchIngotsOptions {
|
|
2800
2913
|
/**
|
|
2801
|
-
*
|
|
2802
|
-
*
|
|
2803
|
-
*
|
|
2804
|
-
*
|
|
2805
|
-
*
|
|
2806
|
-
*
|
|
2807
|
-
* const page = await sv.vaults.list({ cursor });
|
|
2808
|
-
* page.vaults.forEach((v) => console.log(v.name));
|
|
2809
|
-
* cursor = page.nextCursor;
|
|
2810
|
-
* } while (cursor);
|
|
2811
|
-
*/
|
|
2812
|
-
list(options?: ListVaultsOptions): Promise<VaultPage>;
|
|
2813
|
-
/**
|
|
2814
|
-
* Get a single vault's detail.
|
|
2815
|
-
*
|
|
2816
|
-
* @example
|
|
2817
|
-
* const vault = await sv.vaults.get('vlt_abc');
|
|
2818
|
-
* console.log(vault.status, vault.ingotCount);
|
|
2819
|
-
*/
|
|
2820
|
-
get(vaultId: string): Promise<VaultDetail>;
|
|
2821
|
-
/**
|
|
2822
|
-
* Rename a vault.
|
|
2823
|
-
*
|
|
2824
|
-
* @example
|
|
2825
|
-
* await sv.vaults.update('vlt_abc', { name: 'Renamed Vault' });
|
|
2826
|
-
*/
|
|
2827
|
-
update(vaultId: string, options: {
|
|
2828
|
-
name: string;
|
|
2829
|
-
}): Promise<UpdatedVault>;
|
|
2830
|
-
/**
|
|
2831
|
-
* Seal a vault, revoking all active access tokens.
|
|
2832
|
-
*
|
|
2833
|
-
* @example
|
|
2834
|
-
* await sv.vaults.seal('vlt_abc');
|
|
2835
|
-
*/
|
|
2836
|
-
seal(vaultId: string): Promise<void>;
|
|
2837
|
-
/**
|
|
2838
|
-
* Schedule permanent deletion in seven days and immediately lock all vault access.
|
|
2839
|
-
* Company admins only; cancelDeletion can abort this schedule before its deadline.
|
|
2840
|
-
* A vault whose irreversible cleanup has already started answers that cleanup
|
|
2841
|
-
* (`status: 'deleting'`) instead, which nothing can cancel.
|
|
2842
|
-
*
|
|
2843
|
-
* Requires the vault's exact name as confirmation, matched case-sensitively.
|
|
2844
|
-
* The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
|
|
2845
|
-
* named with any Unicode (emoji, CJK, the U+202F in macOS-style names) is
|
|
2846
|
-
* deletable — an HTTP header value cannot carry non-latin1 characters.
|
|
2847
|
-
*
|
|
2848
|
-
* @example
|
|
2849
|
-
* await sv.vaults.delete('vlt_abc', 'My Vault');
|
|
2850
|
-
*/
|
|
2851
|
-
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion | StartedVaultDeletion>;
|
|
2852
|
-
/** Cancel this exact deletion schedule before its deadline; company admins only. */
|
|
2853
|
-
cancelDeletion(vaultId: string, deletionScheduleId: string): Promise<VaultDetail>;
|
|
2854
|
-
/**
|
|
2855
|
-
* Get a vault's public-sharing configuration. Every sharing write below
|
|
2856
|
-
* answers the same configuration as that write left it.
|
|
2857
|
-
*
|
|
2858
|
-
* @example
|
|
2859
|
-
* const sharing = await sv.vaults.getSharingConfig('vlt_abc');
|
|
2914
|
+
* A part of the ingot's file name, matched ignoring letter case, accents
|
|
2915
|
+
* and Unicode compatibility forms (`resume` matches `Résumé.pdf`, `strasse`
|
|
2916
|
+
* matches `Straße.txt`); a whole name matches too. Results come in creation
|
|
2917
|
+
* order, newest first unless `sortOrder` is `asc`, and a page can hold none
|
|
2918
|
+
* while `nextCursor` is set: follow it. Text no name can hold is refused
|
|
2919
|
+
* (400).
|
|
2860
2920
|
*/
|
|
2861
|
-
|
|
2921
|
+
q?: string;
|
|
2862
2922
|
/**
|
|
2863
|
-
*
|
|
2864
|
-
*
|
|
2865
|
-
*
|
|
2866
|
-
*
|
|
2923
|
+
* The MIME type to match, in lowercase: a family (`image`, `video`,
|
|
2924
|
+
* `audio`, `text`, `application`, ...), which every type under it matches,
|
|
2925
|
+
* or an exact type (`application/pdf`), which matches that type whatever
|
|
2926
|
+
* its parameters. A well-formed value no ingot carries matches none; the
|
|
2927
|
+
* server refuses a value that is neither.
|
|
2867
2928
|
*/
|
|
2868
|
-
|
|
2929
|
+
fileType?: string;
|
|
2930
|
+
/** Scope the search to one folder (whole vault when omitted) */
|
|
2931
|
+
folderId?: string;
|
|
2932
|
+
/** Minimum size in bytes */
|
|
2933
|
+
minSize?: number;
|
|
2934
|
+
/** Maximum size in bytes */
|
|
2935
|
+
maxSize?: number;
|
|
2936
|
+
/** Page size */
|
|
2937
|
+
limit?: number;
|
|
2938
|
+
/** Pagination cursor */
|
|
2939
|
+
cursor?: string;
|
|
2940
|
+
/** Sort direction */
|
|
2941
|
+
sortOrder?: 'asc' | 'desc';
|
|
2942
|
+
}
|
|
2943
|
+
/** A page of ingots. */
|
|
2944
|
+
interface IngotPage {
|
|
2945
|
+
/** Ingots on this page */
|
|
2946
|
+
ingots: Ingot[];
|
|
2947
|
+
/** Cursor for the next page, when more results exist */
|
|
2948
|
+
nextCursor?: string;
|
|
2949
|
+
}
|
|
2950
|
+
/** Ingot sharing configuration. */
|
|
2951
|
+
interface IngotSharingConfig {
|
|
2952
|
+
/** Whether the ingot is shared */
|
|
2953
|
+
shared: boolean;
|
|
2954
|
+
/** Visibility mode */
|
|
2955
|
+
visibility?: 'invite_only' | 'authenticated' | 'public';
|
|
2956
|
+
/** The share's permanent files.sv URL, the link its recipients open; null while the ingot is not shared */
|
|
2957
|
+
publicUrl: string | null;
|
|
2958
|
+
/** The share's link code (the URL's last segment); null while the ingot is not shared */
|
|
2959
|
+
linkCode: string | null;
|
|
2960
|
+
/** Whether the vault's public file sharing is on */
|
|
2961
|
+
sharingEnabled: boolean;
|
|
2962
|
+
/** Whether the vault makes every ingot public, which pins this one to public */
|
|
2963
|
+
vaultAllIngotsPublic: boolean;
|
|
2964
|
+
/** The vault's share recipient session length, in seconds */
|
|
2965
|
+
sessionLengthSeconds: number;
|
|
2966
|
+
/** Active invites */
|
|
2967
|
+
invites?: IngotInvite[];
|
|
2968
|
+
}
|
|
2969
|
+
/** Options for updateSharingConfig. */
|
|
2970
|
+
interface UpdateIngotSharingOptions {
|
|
2971
|
+
/** Whether the ingot is shared */
|
|
2972
|
+
shared?: boolean;
|
|
2973
|
+
/** Visibility mode */
|
|
2974
|
+
visibility?: 'invite_only' | 'authenticated' | 'public';
|
|
2975
|
+
}
|
|
2976
|
+
/** A sharing invite on an ingot. */
|
|
2977
|
+
interface IngotInvite {
|
|
2978
|
+
/** Invite ID */
|
|
2979
|
+
id: string;
|
|
2980
|
+
/** Invited identity (email/phone) */
|
|
2981
|
+
identity: string;
|
|
2982
|
+
/** Identity type */
|
|
2983
|
+
identityType: 'email' | 'phone';
|
|
2984
|
+
/** When this identity was invited (Unix seconds) */
|
|
2985
|
+
invitedAt: number;
|
|
2986
|
+
}
|
|
2987
|
+
/** An invitation addInvite made or resent. */
|
|
2988
|
+
interface IngotInvitation extends IngotInvite {
|
|
2989
|
+
/** The URL this invitee was sent: the share's files.sv URL, with their own token when the share invites several */
|
|
2990
|
+
shareUrl: string;
|
|
2991
|
+
/** Whether the invitation was delivered by email or text */
|
|
2992
|
+
delivered: boolean;
|
|
2993
|
+
}
|
|
2994
|
+
/**
|
|
2995
|
+
* An ingot access-log entry: a download that delivered the file, a SparkLink
|
|
2996
|
+
* open of it included. The server records an access as the download that
|
|
2997
|
+
* delivered it, so `download` is the one action.
|
|
2998
|
+
*/
|
|
2999
|
+
interface IngotAccessLog {
|
|
2869
3000
|
/**
|
|
2870
|
-
*
|
|
2871
|
-
*
|
|
2872
|
-
* @example
|
|
2873
|
-
* await sv.vaults.disableSharing('vlt_abc');
|
|
3001
|
+
* The entry's time (Unix seconds) as a string. The server issues no entry id,
|
|
3002
|
+
* so entries in the same second share it.
|
|
2874
3003
|
*/
|
|
2875
|
-
|
|
3004
|
+
id: string;
|
|
3005
|
+
/** What the access was */
|
|
3006
|
+
action: 'download';
|
|
3007
|
+
/** Who accessed: a member's email, an API key's name, or a SparkLink visitor's identity */
|
|
3008
|
+
identity: string;
|
|
3009
|
+
/** Source IP address */
|
|
3010
|
+
ipAddress: string;
|
|
3011
|
+
/** Client user agent */
|
|
3012
|
+
userAgent: string;
|
|
3013
|
+
/** Event timestamp (Unix seconds) */
|
|
3014
|
+
timestamp: number;
|
|
3015
|
+
}
|
|
3016
|
+
/** A page of access logs. */
|
|
3017
|
+
interface IngotAccessLogPage {
|
|
3018
|
+
/** Log entries on this page */
|
|
3019
|
+
logs: IngotAccessLog[];
|
|
3020
|
+
/** Cursor for the next page, when more results exist */
|
|
3021
|
+
nextCursor?: string;
|
|
3022
|
+
}
|
|
3023
|
+
/** Options for getAccessLogs. */
|
|
3024
|
+
interface AccessLogsOptions {
|
|
3025
|
+
/** Page size */
|
|
3026
|
+
limit?: number;
|
|
3027
|
+
/** Pagination cursor */
|
|
3028
|
+
cursor?: string;
|
|
3029
|
+
}
|
|
3030
|
+
/** One hash-check hit: this HMAC exists on an active ingot in the vault. */
|
|
3031
|
+
interface HashCheckMatch {
|
|
3032
|
+
content_hmac: string;
|
|
3033
|
+
ingot_id: string;
|
|
3034
|
+
}
|
|
3035
|
+
interface HashCheckResponse {
|
|
3036
|
+
found: HashCheckMatch[];
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/** Customer-only help desk contracts. Response fields retain the API's names. */
|
|
3040
|
+
interface HelpDeskIdentityRequest {
|
|
3041
|
+
/** Server-generated nonce. The company backend must include it in its signed assertion. */
|
|
3042
|
+
nonce: string;
|
|
3043
|
+
audience: string;
|
|
3044
|
+
deskId: string;
|
|
3045
|
+
}
|
|
3046
|
+
interface HelpDeskExternalChallenge {
|
|
3047
|
+
nonce: string;
|
|
3048
|
+
/** Held only by the initiating browser; used for hosted PKCE redemption, never sent to the company. */
|
|
3049
|
+
verifier: string;
|
|
3050
|
+
expires_at: number;
|
|
3051
|
+
}
|
|
3052
|
+
interface HelpDeskExternalIdentity {
|
|
3053
|
+
issuer: string;
|
|
3054
|
+
key_id: string;
|
|
3055
|
+
assertion_audience: string;
|
|
3056
|
+
session_ttl_seconds: number;
|
|
3057
|
+
handoff_url?: string | null;
|
|
3058
|
+
sign_in_url?: string | null;
|
|
3059
|
+
guest_email?: boolean;
|
|
3060
|
+
}
|
|
3061
|
+
interface HelpDeskConnectOptions {
|
|
3062
|
+
/** The configured help desk hostname, for example support.example.com. */
|
|
3063
|
+
host: string;
|
|
3064
|
+
/** A help desk hdt_ bearer provider. Core access tokens and API keys are never used. */
|
|
3065
|
+
getSessionToken?: () => string | null | Promise<string | null>;
|
|
3066
|
+
/** Obtain a purpose-specific JWT from the signed-in company's backend. No customer consent is shown. */
|
|
3067
|
+
getIdentityAssertion?: (request: HelpDeskIdentityRequest) => string | null | Promise<string | null>;
|
|
3068
|
+
/** Same-origin backend endpoint accepting POST {nonce,audience,desk_id}; returns {assertion} or {data:{assertion}}. */
|
|
3069
|
+
identityEndpoint?: string;
|
|
3070
|
+
}
|
|
3071
|
+
interface HelpDeskDesk {
|
|
3072
|
+
kind: 'desk';
|
|
3073
|
+
desk_id: string;
|
|
3074
|
+
handle: string;
|
|
3075
|
+
canonical_host: string;
|
|
3076
|
+
sending_host: string;
|
|
3077
|
+
organization_name: string | null;
|
|
3078
|
+
branding: {
|
|
3079
|
+
color: string | null;
|
|
3080
|
+
logo_url: string | null;
|
|
3081
|
+
logo_dark_url: string | null;
|
|
3082
|
+
icon_url?: string | null;
|
|
3083
|
+
};
|
|
3084
|
+
auth_mode: 'email_pin' | 'identity' | 'identity_unavailable' | 'external_sso' | 'external_unavailable';
|
|
3085
|
+
identity: {
|
|
3086
|
+
issuer_account_id: string;
|
|
3087
|
+
client_id: string;
|
|
3088
|
+
} | null;
|
|
3089
|
+
external_identity?: HelpDeskExternalIdentity | null;
|
|
3090
|
+
customer_can_mark_resolved: boolean;
|
|
3091
|
+
customer_can_attach_files: boolean;
|
|
3092
|
+
knowledge_base_enabled: boolean;
|
|
3093
|
+
portal_client: string;
|
|
3094
|
+
}
|
|
3095
|
+
interface HelpDeskCustomer {
|
|
3096
|
+
requester_id: string;
|
|
3097
|
+
email: string;
|
|
3098
|
+
display_name: string | null;
|
|
3099
|
+
assurance: 'identity' | 'email_pin' | 'external_sso';
|
|
3100
|
+
/** Company-session mailbox proof asserted by the trusted server. False forbids update emails. */
|
|
3101
|
+
email_verified?: boolean;
|
|
3102
|
+
email_updates?: boolean;
|
|
3103
|
+
needs_display_name: boolean;
|
|
3104
|
+
}
|
|
3105
|
+
interface HelpDeskSession {
|
|
3106
|
+
token: string;
|
|
3107
|
+
/** Absolute expiry in Unix seconds. */
|
|
3108
|
+
expires_at: number;
|
|
3109
|
+
customer: HelpDeskCustomer;
|
|
3110
|
+
}
|
|
3111
|
+
/** Why customer-specific UI is being told to reconsider its current session. */
|
|
3112
|
+
interface HelpDeskSessionChange {
|
|
3113
|
+
source: 'provider' | 'set' | 'clear' | 'refresh' | 'external' | 'renew';
|
|
3114
|
+
/** Present only for a company proof verified by the server, never a decoded browser JWT. */
|
|
3115
|
+
requesterId?: string;
|
|
3116
|
+
previousRequesterId?: string;
|
|
3117
|
+
/** True only for a proof initiated by this client's company-provider flow. */
|
|
3118
|
+
automatic?: boolean;
|
|
3119
|
+
}
|
|
3120
|
+
interface HelpDeskPinChallenge {
|
|
3121
|
+
challenge_id: string;
|
|
3122
|
+
binding_secret: string;
|
|
3123
|
+
expires_at: number;
|
|
3124
|
+
}
|
|
3125
|
+
interface HelpDeskVerifyPinOptions {
|
|
3126
|
+
challengeId: string;
|
|
3127
|
+
bindingSecret: string;
|
|
3128
|
+
code: string;
|
|
3129
|
+
}
|
|
3130
|
+
interface HelpDeskCustomerPatch {
|
|
3131
|
+
display_name?: string;
|
|
3132
|
+
email_updates?: boolean;
|
|
3133
|
+
}
|
|
3134
|
+
/** Refuse a write if its customer changed while the host composed the request. */
|
|
3135
|
+
interface HelpDeskRequestContext {
|
|
3136
|
+
expectedSessionToken?: string;
|
|
3137
|
+
}
|
|
3138
|
+
interface HelpDeskDraft {
|
|
3139
|
+
ticket_id: string;
|
|
3140
|
+
}
|
|
3141
|
+
interface HelpDeskTicketCreated {
|
|
3142
|
+
ticket_id: string;
|
|
3143
|
+
number: number;
|
|
3144
|
+
}
|
|
3145
|
+
interface HelpDeskCreateTicketOptions {
|
|
3146
|
+
/** Reuse the same draft ID after a failed/uncertain send; never create another draft to retry. */
|
|
3147
|
+
ticketId: string;
|
|
3148
|
+
subject: string;
|
|
3149
|
+
/** Help desk safe markup, not HTML. */
|
|
3150
|
+
body: string;
|
|
3151
|
+
attachments?: string[];
|
|
3152
|
+
}
|
|
3153
|
+
interface HelpDeskTicket {
|
|
3154
|
+
number: number;
|
|
3155
|
+
subject: string;
|
|
3156
|
+
status: 'open' | 'waiting_on_customer' | 'on_hold' | 'closed';
|
|
3157
|
+
close_reason: 'resolved' | 'duplicate' | null;
|
|
3158
|
+
awaiting_first_response: boolean;
|
|
3159
|
+
created_at: number;
|
|
3160
|
+
last_public_activity_at: number | null;
|
|
3161
|
+
muted: boolean;
|
|
3162
|
+
can_resolve?: boolean;
|
|
3163
|
+
feedback?: Record<string, unknown>;
|
|
3164
|
+
}
|
|
3165
|
+
/** Customer-visible events. Internal operator notes are never included. */
|
|
3166
|
+
interface HelpDeskEvent {
|
|
3167
|
+
event_id: string;
|
|
3168
|
+
type: string;
|
|
3169
|
+
seq: number;
|
|
3170
|
+
created_at: number;
|
|
3171
|
+
actor: {
|
|
3172
|
+
kind: string;
|
|
3173
|
+
label: string | null;
|
|
3174
|
+
avatar_handle: string | null;
|
|
3175
|
+
};
|
|
3176
|
+
body: unknown | null;
|
|
3177
|
+
attachments: Array<Record<string, unknown>>;
|
|
3178
|
+
status?: {
|
|
3179
|
+
from: string | null;
|
|
3180
|
+
to: string | null;
|
|
3181
|
+
};
|
|
3182
|
+
merged?: {
|
|
3183
|
+
number: number | null;
|
|
3184
|
+
};
|
|
3185
|
+
left_out?: {
|
|
3186
|
+
files: Array<{
|
|
3187
|
+
reason: string;
|
|
3188
|
+
content_type: string;
|
|
3189
|
+
size: number;
|
|
3190
|
+
}>;
|
|
3191
|
+
count: number;
|
|
3192
|
+
};
|
|
3193
|
+
}
|
|
3194
|
+
interface HelpDeskListTicketsOptions {
|
|
3195
|
+
status?: 'open' | 'closed';
|
|
3196
|
+
number?: number;
|
|
3197
|
+
cursor?: string;
|
|
3198
|
+
}
|
|
3199
|
+
interface HelpDeskTicketList {
|
|
3200
|
+
items: HelpDeskTicket[];
|
|
3201
|
+
next_cursor: string | null;
|
|
3202
|
+
}
|
|
3203
|
+
interface HelpDeskTimeline {
|
|
3204
|
+
events: HelpDeskEvent[];
|
|
3205
|
+
next_cursor: string | null;
|
|
3206
|
+
}
|
|
3207
|
+
interface HelpDeskTicketDetail extends HelpDeskTimeline {
|
|
3208
|
+
ticket: HelpDeskTicket;
|
|
3209
|
+
}
|
|
3210
|
+
interface HelpDeskReplyOptions {
|
|
3211
|
+
body: string;
|
|
3212
|
+
attachments?: string[];
|
|
3213
|
+
}
|
|
3214
|
+
interface HelpDeskReplyCreated {
|
|
3215
|
+
event_id: string;
|
|
3216
|
+
}
|
|
3217
|
+
interface HelpDeskAttachmentInput {
|
|
3218
|
+
name: string;
|
|
3219
|
+
size: number;
|
|
3220
|
+
}
|
|
3221
|
+
interface HelpDeskAttachmentUpload {
|
|
3222
|
+
attachment_id: string;
|
|
3223
|
+
ingot_id: string;
|
|
3224
|
+
forge_url: string;
|
|
3225
|
+
expires_at: number;
|
|
3226
|
+
max_bytes: number;
|
|
3227
|
+
pending_until: number;
|
|
3228
|
+
}
|
|
3229
|
+
interface HelpDeskAttachmentDownload {
|
|
3230
|
+
url: string;
|
|
3231
|
+
expires_at: number;
|
|
3232
|
+
disposition: string;
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
/**
|
|
3236
|
+
* One desk's customer client. Sessions stay in memory unless a host supplies a
|
|
3237
|
+
* provider. A provider must supply an hdt_ token, not a website identity JWT.
|
|
3238
|
+
*/
|
|
3239
|
+
declare class HelpDeskClient {
|
|
3240
|
+
readonly desk: Readonly<HelpDeskDesk>;
|
|
3241
|
+
private readonly http;
|
|
3242
|
+
private readonly transfers;
|
|
3243
|
+
private readonly provider?;
|
|
3244
|
+
private readonly assertionProvider?;
|
|
3245
|
+
private authentication;
|
|
3246
|
+
private verifiedRequesterId;
|
|
3247
|
+
private provedSession;
|
|
3248
|
+
private readonly renewedTokens;
|
|
3249
|
+
private authorityRevision;
|
|
3250
|
+
private readonly listeners;
|
|
3251
|
+
private session;
|
|
3252
|
+
private token;
|
|
3253
|
+
private revision;
|
|
3254
|
+
private constructor();
|
|
3255
|
+
/** Discover a desk by its configured host, before any customer credentials are sent. */
|
|
3256
|
+
static connect(config: ResolvedConfig, options: HelpDeskConnectOptions): Promise<HelpDeskClient>;
|
|
3257
|
+
/**
|
|
3258
|
+
* Install a customer session answer. A company provider verifies restored
|
|
3259
|
+
* sessions again before use. Null stays signed out until refreshSession()
|
|
3260
|
+
* or authenticate() explicitly resumes the provider.
|
|
3261
|
+
*/
|
|
3262
|
+
setSession(session: HelpDeskSession | null): void;
|
|
3263
|
+
private installSession;
|
|
3264
|
+
clearSession(): void;
|
|
3265
|
+
/**
|
|
3266
|
+
* Observe identity changes and explicit clear/refresh actions. A first provider
|
|
3267
|
+
* discovery is distinguished from a host replacing the customer during lookup.
|
|
3268
|
+
*/
|
|
3269
|
+
subscribeSession(listener: (change: HelpDeskSessionChange) => void): () => void;
|
|
3270
|
+
/** Explicitly refresh the host-managed session, for example after a backend handoff. */
|
|
3271
|
+
refreshSession(): Promise<string | null>;
|
|
3272
|
+
/** Whether company identity can be established without customer interaction. */
|
|
3273
|
+
get hasIdentityProvider(): boolean;
|
|
3274
|
+
/** @internal Read an installed server-proven company bearer without invoking any identity provider. */
|
|
3275
|
+
verifiedSessionTokenFor(requesterId: string): string | null;
|
|
3276
|
+
getSessionToken(): Promise<string | null>;
|
|
3277
|
+
private rememberToken;
|
|
3278
|
+
private send;
|
|
3279
|
+
private establish;
|
|
3280
|
+
/** A public, short-lived challenge from the help desk's own Entropy service. */
|
|
3281
|
+
startExternalChallenge(): Promise<HelpDeskExternalChallenge>;
|
|
3282
|
+
/** Exchange only a purpose-specific company assertion, never an ordinary website token. */
|
|
3283
|
+
completeExternal(options: {
|
|
3284
|
+
assertion: string;
|
|
3285
|
+
nonce: string;
|
|
3286
|
+
}): Promise<HelpDeskSession>;
|
|
3287
|
+
private exchangeExternal;
|
|
3288
|
+
/** Silently establish/renew a company session. Concurrent calls share one proof. */
|
|
3289
|
+
authenticate(): Promise<HelpDeskSession | null>;
|
|
3290
|
+
private acceptExternalSession;
|
|
3291
|
+
/** Mint an opaque hosted-portal code from an assertion binding the registered redirect challenge. */
|
|
3292
|
+
createExternalHandoff(options: {
|
|
3293
|
+
assertion: string;
|
|
3294
|
+
nonce: string;
|
|
3295
|
+
redirectOrigin: string;
|
|
3296
|
+
}): Promise<{
|
|
3297
|
+
code: string;
|
|
3298
|
+
expires_at: number;
|
|
3299
|
+
}>;
|
|
3300
|
+
/** Redeem a hosted code only with the initiating browser's original verifier and nonce. */
|
|
3301
|
+
redeemExternal(options: {
|
|
3302
|
+
code: string;
|
|
3303
|
+
nonce: string;
|
|
3304
|
+
verifier: string;
|
|
3305
|
+
}): Promise<HelpDeskSession>;
|
|
3306
|
+
startPin(email: string): Promise<HelpDeskPinChallenge>;
|
|
3307
|
+
verifyPin(options: HelpDeskVerifyPinOptions): Promise<HelpDeskSession>;
|
|
3308
|
+
/** Identity completion still requires a server-approved desk portal origin. */
|
|
3309
|
+
completeIdentity(options: {
|
|
3310
|
+
token: string;
|
|
3311
|
+
}): Promise<HelpDeskSession>;
|
|
3312
|
+
getMe(): Promise<HelpDeskCustomer>;
|
|
3313
|
+
updateMe(patch: HelpDeskCustomerPatch, context?: HelpDeskRequestContext): Promise<HelpDeskCustomer>;
|
|
3314
|
+
createDraft(context?: HelpDeskRequestContext): Promise<HelpDeskDraft>;
|
|
3315
|
+
/** Retrying the same draft ID recovers the original ticket after a lost response. */
|
|
3316
|
+
createTicket(options: HelpDeskCreateTicketOptions, context?: HelpDeskRequestContext): Promise<HelpDeskTicketCreated>;
|
|
3317
|
+
listTickets(options?: HelpDeskListTicketsOptions): Promise<HelpDeskTicketList>;
|
|
3318
|
+
getTicket(number: number, options?: {
|
|
3319
|
+
response?: string;
|
|
3320
|
+
}): Promise<HelpDeskTicketDetail>;
|
|
3321
|
+
listEvents(number: number, cursor?: string): Promise<HelpDeskTimeline>;
|
|
3322
|
+
/** Replies have no client idempotency key: reconcile an uncertain response before retrying. */
|
|
3323
|
+
replyToTicket(number: number, options: HelpDeskReplyOptions, context?: HelpDeskRequestContext): Promise<HelpDeskReplyCreated>;
|
|
3324
|
+
resolveTicket(number: number, context?: HelpDeskRequestContext): Promise<void>;
|
|
3325
|
+
muteTicket(number: number, muted: boolean, context?: HelpDeskRequestContext): Promise<void>;
|
|
3326
|
+
/** Send an already-issued attachment directly to Forge, resolving only after publication is confirmed. */
|
|
3327
|
+
sendAttachment(uploadUrl: string, file: File | Blob, options?: SendUploadOptions): Promise<void>;
|
|
3328
|
+
/** Check/resume the original transfer; receiving every byte alone is not proof the attachment is published. */
|
|
3329
|
+
resumeAttachment(session: UploadSession, file: File | Blob, options?: ResumeUploadOptions): Promise<void>;
|
|
3330
|
+
initiateDraftAttachment(ticketId: string, file: HelpDeskAttachmentInput, context?: HelpDeskRequestContext): Promise<HelpDeskAttachmentUpload>;
|
|
3331
|
+
cancelDraftAttachment(ticketId: string, attachmentId: string, context?: HelpDeskRequestContext): Promise<void>;
|
|
3332
|
+
initiateTicketAttachment(number: number, file: HelpDeskAttachmentInput, context?: HelpDeskRequestContext): Promise<HelpDeskAttachmentUpload>;
|
|
3333
|
+
cancelTicketAttachment(number: number, attachmentId: string, context?: HelpDeskRequestContext): Promise<void>;
|
|
3334
|
+
attachmentDownload(attachmentId: string, number: number): Promise<HelpDeskAttachmentDownload>;
|
|
3335
|
+
/** Revoke this bearer, clearing only the session whose logout completed. */
|
|
3336
|
+
logout(): Promise<void>;
|
|
3337
|
+
}
|
|
3338
|
+
|
|
3339
|
+
/** The injected form's state; uncertain sends keep an exact snapshot until recovered. */
|
|
3340
|
+
type HelpDeskFormState = 'authenticating' | 'editing' | 'verifying' | 'submitting' | 'uncertain' | 'success' | 'destroyed';
|
|
3341
|
+
interface HelpDeskFormOptions {
|
|
3342
|
+
/** The element (or selector) to replace with a ticket form. */
|
|
3343
|
+
target: string | HTMLElement;
|
|
3344
|
+
/** Optional subject to begin a new request with. */
|
|
3345
|
+
subject?: string;
|
|
3346
|
+
/** Optional safe-markup description to begin a new request with. */
|
|
3347
|
+
body?: string;
|
|
3348
|
+
/** Show the default file picker when the desk permits customer uploads. Defaults to true. */
|
|
3349
|
+
attachments?: boolean;
|
|
2876
3350
|
/**
|
|
2877
|
-
*
|
|
2878
|
-
*
|
|
2879
|
-
*
|
|
2880
|
-
* so the API accepts `allIngotsPublic: true` only with a read-write VAT for
|
|
2881
|
-
* the vault: pass the unsealed vault for that change.
|
|
2882
|
-
*
|
|
2883
|
-
* @example
|
|
2884
|
-
* await sv.vaults.updateSharingConfig('vlt_abc', { sessionLengthSeconds: 1800 });
|
|
2885
|
-
*
|
|
2886
|
-
* @example Make every ingot public
|
|
2887
|
-
* const unsealed = await sv.vaults.unseal('vlt_abc', vmk);
|
|
2888
|
-
* await sv.vaults.updateSharingConfig('vlt_abc', { allIngotsPublic: true }, unsealed);
|
|
3351
|
+
* Ask host code for a server-issued help desk session. This callback must
|
|
3352
|
+
* not construct a session from a browser-supplied user ID or email address.
|
|
3353
|
+
* Return null to use the desk's existing verification or hosted sign-in.
|
|
2889
3354
|
*/
|
|
2890
|
-
|
|
3355
|
+
onAuthRequired?: () => HelpDeskSession | null | Promise<HelpDeskSession | null>;
|
|
3356
|
+
/** Called only after the service confirms the ticket. Callback errors never retry it. */
|
|
3357
|
+
onSuccess?: (ticket: HelpDeskTicketCreated) => void;
|
|
3358
|
+
/** Called after a failed request; uncertain sends retain a read-only exact snapshot for recovery. */
|
|
3359
|
+
onError?: (error: Error) => void;
|
|
3360
|
+
onStateChange?: (state: HelpDeskFormState) => void;
|
|
3361
|
+
/** Called when the customer chooses Cancel, after the form is destroyed. */
|
|
3362
|
+
onCancel?: () => void;
|
|
3363
|
+
}
|
|
3364
|
+
interface HelpDeskFormHandle {
|
|
3365
|
+
/** Remove the form and suppress pending UI updates and callbacks; does not log out. */
|
|
3366
|
+
destroy(): void;
|
|
3367
|
+
/** Clear the completed/idle form. Ignored while a request is pending or its send outcome is uncertain. */
|
|
3368
|
+
reset(): void;
|
|
3369
|
+
getState(): HelpDeskFormState;
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
/** Customer ticket APIs and optional UI, isolated from Core/operator credentials. */
|
|
3373
|
+
|
|
3374
|
+
/** One-call website setup. No browser secrets or identity assertions are configured here. */
|
|
3375
|
+
type HelpDeskMountFormOptions = HelpDeskConnectOptions & HelpDeskFormOptions;
|
|
3376
|
+
type HelpDeskOpenFormOptions = HelpDeskConnectOptions & Omit<HelpDeskFormOptions, 'target'>;
|
|
3377
|
+
declare class HelpDeskModule {
|
|
3378
|
+
private readonly config;
|
|
3379
|
+
constructor(config: ResolvedConfig);
|
|
3380
|
+
/** Resolve a configured desk host and obtain its customer-only, headless API. */
|
|
3381
|
+
connect(options: HelpDeskConnectOptions): Promise<HelpDeskClient>;
|
|
3382
|
+
/**
|
|
3383
|
+
* Inject a ticket form, including email-code verification where the desk
|
|
3384
|
+
* enables it. A custom onAuthRequired callback may supply a server-issued
|
|
3385
|
+
* help desk session. Destroy the returned handle on unmount/account change.
|
|
3386
|
+
*/
|
|
3387
|
+
mountForm(options: HelpDeskMountFormOptions): Promise<HelpDeskFormHandle>;
|
|
3388
|
+
/** Inject a form over an already-connected client that the host also drives headlessly. */
|
|
3389
|
+
mountClientForm(client: HelpDeskClient, options: HelpDeskFormOptions): HelpDeskFormHandle;
|
|
3390
|
+
/** Open a ticket form in the SDK's accessible modal. */
|
|
3391
|
+
openForm(options: HelpDeskOpenFormOptions): Promise<HelpDeskFormHandle>;
|
|
3392
|
+
/** Open a modal over a client whose company session the host also drives headlessly. */
|
|
3393
|
+
openClientForm(client: HelpDeskClient, options?: Omit<HelpDeskFormOptions, 'target'>): HelpDeskFormHandle;
|
|
3394
|
+
/** Bind existing support buttons, including ones added later. Cleanup closes this binding's form. */
|
|
3395
|
+
attach(selector: string, options: HelpDeskOpenFormOptions): () => void;
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
/**
|
|
3399
|
+
* Products Module
|
|
3400
|
+
*
|
|
3401
|
+
* Namespace for SparkVault first-party products. Each product is a
|
|
3402
|
+
* self-contained surface (UI + API) the account can enable independently.
|
|
3403
|
+
* Identity, Notify, and the customer-facing Help Desk attach here.
|
|
3404
|
+
*/
|
|
3405
|
+
|
|
3406
|
+
declare class ProductsModule {
|
|
3407
|
+
/** Identity verification product (passkey, OTP, SparkLink, social). */
|
|
3408
|
+
readonly identity: IdentityModule;
|
|
2891
3409
|
/**
|
|
2892
|
-
*
|
|
2893
|
-
*
|
|
2894
|
-
*
|
|
2895
|
-
* const { retentionSeconds } = await sv.vaults.getAccessLogRetention('vlt_abc');
|
|
3410
|
+
* Notify product — the tenant/sender surface (send, sender-side inbox, status,
|
|
3411
|
+
* receipts, config). Distinct from `sv.notify`, which is the signed-in
|
|
3412
|
+
* recipient's own inbox.
|
|
2896
3413
|
*/
|
|
2897
|
-
|
|
3414
|
+
readonly notify: NotifyProductModule;
|
|
3415
|
+
/** Customer-only help desk API and optional injected ticket form. */
|
|
3416
|
+
readonly helpDesk: HelpDeskModule;
|
|
2898
3417
|
/**
|
|
2899
|
-
*
|
|
2900
|
-
*
|
|
2901
|
-
* @example
|
|
2902
|
-
* await sv.vaults.updateAccessLogRetention('vlt_abc', 7776000);
|
|
3418
|
+
* `http` defaults to a client over the same resolved config so constructing
|
|
3419
|
+
* this module standalone stays a one-argument call.
|
|
2903
3420
|
*/
|
|
2904
|
-
|
|
3421
|
+
constructor(config: ResolvedConfig, http?: HttpClient);
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
/**
|
|
3425
|
+
* Vault Upload Module Types
|
|
3426
|
+
*
|
|
3427
|
+
* Types for the embedded vault upload widget.
|
|
3428
|
+
*/
|
|
3429
|
+
/**
|
|
3430
|
+
* Branding configuration from vault upload info.
|
|
3431
|
+
*/
|
|
3432
|
+
interface UploadBranding {
|
|
3433
|
+
/** Organization name */
|
|
3434
|
+
organizationName: string;
|
|
3435
|
+
/** Light theme logo URL */
|
|
3436
|
+
logoLightUrl: string | null;
|
|
3437
|
+
/** Dark theme logo URL */
|
|
3438
|
+
logoDarkUrl: string | null;
|
|
3439
|
+
}
|
|
3440
|
+
/**
|
|
3441
|
+
* Encryption information for the vault.
|
|
3442
|
+
*/
|
|
3443
|
+
interface EncryptionInfo {
|
|
3444
|
+
/** Encryption algorithm (e.g., 'AES-256-GCM') */
|
|
3445
|
+
algorithm: string;
|
|
3446
|
+
/** Key derivation method (e.g., 'Triple Zero-Trust') */
|
|
3447
|
+
keyDerivation: string;
|
|
3448
|
+
/** Post-quantum protection status */
|
|
3449
|
+
postQuantum: string;
|
|
3450
|
+
}
|
|
3451
|
+
/**
|
|
3452
|
+
* Vault upload configuration from API.
|
|
3453
|
+
*/
|
|
3454
|
+
interface VaultUploadConfig {
|
|
3455
|
+
/** Vault ID */
|
|
3456
|
+
vaultId: string;
|
|
3457
|
+
/** Vault name */
|
|
3458
|
+
vaultName: string;
|
|
3459
|
+
/** Maximum upload size in bytes */
|
|
3460
|
+
maxSizeBytes: number;
|
|
3461
|
+
/** Branding information */
|
|
3462
|
+
branding: UploadBranding;
|
|
3463
|
+
/** Encryption details */
|
|
3464
|
+
encryption: EncryptionInfo;
|
|
3465
|
+
/** Forge status */
|
|
3466
|
+
forgeStatus: 'active' | 'inactive';
|
|
3467
|
+
}
|
|
3468
|
+
/**
|
|
3469
|
+
* Options for upload().
|
|
3470
|
+
* - Without `target`: Opens a dialog (modal)
|
|
3471
|
+
* - With `target`: Renders inline into the specified element
|
|
3472
|
+
*/
|
|
3473
|
+
interface UploadOptions {
|
|
3474
|
+
/** Vault ID to upload to */
|
|
3475
|
+
vaultId: string;
|
|
2905
3476
|
/**
|
|
2906
|
-
*
|
|
2907
|
-
*
|
|
2908
|
-
*
|
|
2909
|
-
*
|
|
2910
|
-
* @example
|
|
2911
|
-
* const upload = await sv.vaults.getUploadConfig('vlt_abc');
|
|
3477
|
+
* Target element for inline rendering. Can be:
|
|
3478
|
+
* - A CSS selector string (e.g., "#upload-container")
|
|
3479
|
+
* - An HTMLElement reference
|
|
3480
|
+
* - Omitted for dialog mode (default)
|
|
2912
3481
|
*/
|
|
2913
|
-
|
|
3482
|
+
target?: string | HTMLElement;
|
|
3483
|
+
/** Override backdrop blur for this dialog (uses global config if omitted) */
|
|
3484
|
+
backdropBlur?: boolean;
|
|
3485
|
+
/** Hide "Upload Another File" button on success screen (for single-file flows) */
|
|
3486
|
+
hideUploadAnother?: boolean;
|
|
2914
3487
|
/**
|
|
2915
|
-
*
|
|
2916
|
-
*
|
|
2917
|
-
* @example
|
|
2918
|
-
* await sv.vaults.enableUploadPortal('vlt_abc', vmk);
|
|
3488
|
+
* Skip the success screen entirely. On completion the SDK fires onSuccess
|
|
3489
|
+
* and closes the dialog, so a host site can render its own post-upload UI.
|
|
2919
3490
|
*/
|
|
2920
|
-
|
|
3491
|
+
hideSuccessScreen?: boolean;
|
|
2921
3492
|
/**
|
|
2922
|
-
*
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
2925
|
-
* await sv.vaults.disableUploadPortal('vlt_abc');
|
|
3493
|
+
* Upload this File directly, skipping the SDK's drop-zone. The host owns
|
|
3494
|
+
* file selection (its own button, picker, or drop target) and hands the
|
|
3495
|
+
* File to the SDK, which shows only the secure-upload progress dialog.
|
|
2926
3496
|
*/
|
|
2927
|
-
|
|
3497
|
+
file?: File;
|
|
2928
3498
|
/**
|
|
2929
|
-
*
|
|
2930
|
-
*
|
|
2931
|
-
*
|
|
2932
|
-
*
|
|
3499
|
+
* Vault Access Token, sent only on the upload's POST, where it supplies the
|
|
3500
|
+
* vault key in place of the System DVAK the widget setting provisions; a
|
|
3501
|
+
* read-only VAT is refused 403. It does not lift the vault's Embedded Upload
|
|
3502
|
+
* Widget setting: the widget opens by reading the vault's upload info, a
|
|
3503
|
+
* request that carries no VAT and is refused (UPLOAD_SOURCE_DISABLED) while
|
|
3504
|
+
* the setting is off.
|
|
2933
3505
|
*/
|
|
2934
|
-
|
|
3506
|
+
token?: string;
|
|
2935
3507
|
/**
|
|
2936
|
-
*
|
|
2937
|
-
*
|
|
2938
|
-
* @example
|
|
2939
|
-
* await sv.vaults.disableUploadWidget('vlt_abc');
|
|
3508
|
+
* Slash-delimited folder path within the vault (e.g. "Accounts/001xx").
|
|
3509
|
+
* Missing path segments are find-or-created. Omitted means the vault root.
|
|
2940
3510
|
*/
|
|
2941
|
-
|
|
3511
|
+
folder?: string;
|
|
3512
|
+
/** Callback when upload completes successfully */
|
|
3513
|
+
onSuccess?: (result: UploadResult) => void;
|
|
3514
|
+
/** Callback when an error occurs */
|
|
3515
|
+
onError?: (error: Error) => void;
|
|
3516
|
+
/** Callback when user cancels */
|
|
3517
|
+
onCancel?: () => void;
|
|
3518
|
+
/** Callback for upload progress */
|
|
3519
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
2942
3520
|
/**
|
|
2943
|
-
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
*
|
|
3521
|
+
* Called once the widget has read the vault's upload page and shows its
|
|
3522
|
+
* form (or, given a `file`, starts uploading it). A failure after it is the
|
|
3523
|
+
* widget's to show, with the way on its failure leaves (the same file
|
|
3524
|
+
* again, or another); one before it means the upload page could not load.
|
|
2947
3525
|
*/
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3526
|
+
onReady?: () => void;
|
|
3527
|
+
}
|
|
3528
|
+
/** Options for attach() - binds upload to element clicks */
|
|
3529
|
+
interface UploadAttachOptions {
|
|
3530
|
+
/** Vault ID to upload to */
|
|
3531
|
+
vaultId: string;
|
|
3532
|
+
/** Callback when upload completes successfully */
|
|
3533
|
+
onSuccess?: (result: UploadResult) => void;
|
|
3534
|
+
/** Callback when an error occurs */
|
|
3535
|
+
onError?: (error: Error) => void;
|
|
3536
|
+
/** Callback when user cancels */
|
|
3537
|
+
onCancel?: () => void;
|
|
3538
|
+
/** Callback for upload progress */
|
|
3539
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
2951
3540
|
}
|
|
2952
|
-
|
|
2953
3541
|
/**
|
|
2954
|
-
*
|
|
2955
|
-
*
|
|
2956
|
-
* Folders organize ingots within an unsealed vault. Public domain objects are
|
|
2957
|
-
* camelCase; wire shapes (snake_case) stay private to the module.
|
|
3542
|
+
* Upload progress information.
|
|
2958
3543
|
*/
|
|
2959
|
-
|
|
2960
|
-
/**
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
|
|
2964
|
-
/**
|
|
2965
|
-
|
|
2966
|
-
/**
|
|
2967
|
-
|
|
2968
|
-
/** Whether the folder is pinned */
|
|
2969
|
-
pinned: boolean;
|
|
2970
|
-
/** Creation timestamp (Unix seconds) */
|
|
2971
|
-
createdAt: number;
|
|
2972
|
-
/** Last update timestamp (Unix seconds) */
|
|
2973
|
-
updatedAt: number;
|
|
2974
|
-
}
|
|
2975
|
-
/** A single hop in a folder breadcrumb trail. */
|
|
2976
|
-
interface FolderBreadcrumbItem {
|
|
2977
|
-
/** Folder ID, or null for the Root entry */
|
|
2978
|
-
id: string | null;
|
|
2979
|
-
/** Folder name */
|
|
2980
|
-
name: string;
|
|
2981
|
-
}
|
|
2982
|
-
/** Options for one page of a vault's folders. */
|
|
2983
|
-
interface ListFoldersOptions {
|
|
2984
|
-
/** Most folders on one page (1-500; server default 100) */
|
|
2985
|
-
limit?: number;
|
|
2986
|
-
/** A prior page's `nextPageToken` */
|
|
2987
|
-
pageToken?: string;
|
|
3544
|
+
interface UploadProgress {
|
|
3545
|
+
/** Bytes uploaded */
|
|
3546
|
+
bytesUploaded: number;
|
|
3547
|
+
/** Total bytes */
|
|
3548
|
+
bytesTotal: number;
|
|
3549
|
+
/** Percentage (0-100) */
|
|
3550
|
+
percentage: number;
|
|
3551
|
+
/** Current phase */
|
|
3552
|
+
phase: 'uploading' | 'ceremony' | 'complete';
|
|
2988
3553
|
}
|
|
2989
3554
|
/**
|
|
2990
|
-
*
|
|
2991
|
-
* holds from page to page and is not by name. A page can hold fewer, even
|
|
2992
|
-
* none, and still not be the last: follow `nextPageToken`, never the count,
|
|
2993
|
-
* and sort what you hold. To show one folder's subfolders, list its contents
|
|
2994
|
-
* (`ingots.listContents`), which pages them first.
|
|
3555
|
+
* Successful upload result.
|
|
2995
3556
|
*/
|
|
2996
|
-
interface
|
|
2997
|
-
/**
|
|
2998
|
-
|
|
2999
|
-
/**
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
parentId?: string | null;
|
|
3008
|
-
}
|
|
3009
|
-
/** Options for updating a folder. */
|
|
3010
|
-
interface UpdateFolderOptions {
|
|
3011
|
-
/** New name */
|
|
3012
|
-
name?: string;
|
|
3013
|
-
/** New parent folder ID, or null for the vault root */
|
|
3014
|
-
parentId?: string | null;
|
|
3015
|
-
/** New pinned state */
|
|
3016
|
-
pinned?: boolean;
|
|
3557
|
+
interface UploadResult {
|
|
3558
|
+
/** Ingot ID */
|
|
3559
|
+
ingotId: string;
|
|
3560
|
+
/** Vault ID */
|
|
3561
|
+
vaultId: string;
|
|
3562
|
+
/** Original filename */
|
|
3563
|
+
filename: string;
|
|
3564
|
+
/** File size in bytes */
|
|
3565
|
+
sizeBytes: number;
|
|
3566
|
+
/** Upload time in UTC, as "YYYY-MM-DD HH:MM:SS UTC" */
|
|
3567
|
+
uploadTime: string;
|
|
3017
3568
|
}
|
|
3018
3569
|
|
|
3019
3570
|
/**
|
|
3020
|
-
*
|
|
3571
|
+
* Vaults Module
|
|
3021
3572
|
*
|
|
3022
|
-
*
|
|
3023
|
-
*
|
|
3024
|
-
*
|
|
3025
|
-
*
|
|
3573
|
+
* Create and manage encrypted vaults (the control plane). Uses Triple
|
|
3574
|
+
* Zero-Trust encryption (SVMK + AMK + VMK). Ingot, folder, spark, and entropy
|
|
3575
|
+
* operations live in their own modules; this module owns the vault record,
|
|
3576
|
+
* its sharing/upload configuration, and the browser upload widget.
|
|
3026
3577
|
*/
|
|
3027
3578
|
|
|
3028
3579
|
/**
|
|
3029
|
-
*
|
|
3030
|
-
*
|
|
3031
|
-
* writing anything, so a caller that must not replace content says so here:
|
|
3032
|
-
* - `upsert` (the server default): the upload replaces the holder's content.
|
|
3033
|
-
* - `complete_pending`: a holder whose own upload never finalized is completed
|
|
3034
|
-
* (`created: false`); a published holder is refused with a 409 CONFLICT whose
|
|
3035
|
-
* `details.reason` is `'NAME_HELD'`, and is left untouched. The details
|
|
3036
|
-
* describe the holder (`ingot_id`, `status`, `size_bytes`) unless another
|
|
3037
|
-
* app manages it or another request claimed the name first, when they carry
|
|
3038
|
-
* the reason alone.
|
|
3039
|
-
* - `refuse`: any holder, its upload finished or not, is refused with that
|
|
3040
|
-
* same 409 and left untouched; the create only ever mints.
|
|
3041
|
-
* - `new_name`: the holder is never touched; the ingot is minted under the
|
|
3042
|
-
* first free numbered name the server picks ("report (2).pdf"), returned as
|
|
3043
|
-
* the result's `name`.
|
|
3580
|
+
* Callable upload interface with methods.
|
|
3581
|
+
* Allows both `sv.vaults.upload(options)` and `sv.vaults.upload.attach(selector, options)`.
|
|
3044
3582
|
*/
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
/**
|
|
3050
|
-
|
|
3051
|
-
/**
|
|
3052
|
-
|
|
3583
|
+
interface UploadCallable {
|
|
3584
|
+
(options: UploadOptions): Promise<UploadResult>;
|
|
3585
|
+
attach(selector: string, options: UploadAttachOptions): () => void;
|
|
3586
|
+
close(): void;
|
|
3587
|
+
/** Open the upload widget as a popup. Equivalent to calling `upload(options)`. */
|
|
3588
|
+
pop(options: UploadOptions): Promise<UploadResult>;
|
|
3589
|
+
/** Render the upload widget inline. Equivalent to `upload({ ...options, target })`. */
|
|
3590
|
+
render(options: UploadOptions): Promise<UploadResult>;
|
|
3591
|
+
}
|
|
3592
|
+
declare class VaultsModule {
|
|
3593
|
+
private readonly http;
|
|
3594
|
+
private readonly uploadModule;
|
|
3053
3595
|
/**
|
|
3054
|
-
*
|
|
3055
|
-
*
|
|
3056
|
-
*
|
|
3057
|
-
*
|
|
3058
|
-
*
|
|
3059
|
-
*
|
|
3060
|
-
*
|
|
3061
|
-
*
|
|
3062
|
-
*
|
|
3063
|
-
*
|
|
3064
|
-
* image, audio, video or PDF format (never SVG, a playlist or a stream
|
|
3065
|
-
* redirector): a browser renames a saved copy by the type it is handed
|
|
3066
|
-
* (Chrome saves `Invoice` typed `application/x-msdownload` as
|
|
3067
|
-
* `Invoice.exe`), and completes or replaces no extension of a copy handed
|
|
3068
|
-
* as `application/octet-stream`.
|
|
3596
|
+
* Upload to a vault with public upload enabled.
|
|
3597
|
+
*
|
|
3598
|
+
* @example Dialog mode
|
|
3599
|
+
* const result = await sv.vaults.upload({ vaultId: 'vlt_abc123' });
|
|
3600
|
+
*
|
|
3601
|
+
* @example Attach to clicks
|
|
3602
|
+
* sv.vaults.upload.attach('.upload-btn', { vaultId: 'vlt_abc123' });
|
|
3603
|
+
*
|
|
3604
|
+
* @example Inline mode
|
|
3605
|
+
* sv.vaults.upload({ vaultId: 'vlt_abc123', target: '#upload-area' });
|
|
3069
3606
|
*/
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
contentType: string;
|
|
3073
|
-
/** Size in bytes */
|
|
3074
|
-
size: number;
|
|
3075
|
-
/** Lifecycle status: `uploading` until Forge activates the upload, then `active` */
|
|
3076
|
-
status: 'uploading' | 'active';
|
|
3077
|
-
/** Creation timestamp (Unix seconds) */
|
|
3078
|
-
createdAt: number;
|
|
3079
|
-
/** Containing folder ID, or null at the vault root */
|
|
3080
|
-
folderId: string | null;
|
|
3607
|
+
readonly upload: UploadCallable;
|
|
3608
|
+
constructor(config: ResolvedConfig, http: HttpClient);
|
|
3081
3609
|
/**
|
|
3082
|
-
*
|
|
3083
|
-
*
|
|
3610
|
+
* Create a new encrypted vault.
|
|
3611
|
+
* IMPORTANT: Store the VMK securely - it cannot be recovered!
|
|
3612
|
+
*
|
|
3613
|
+
* @example
|
|
3614
|
+
* const vault = await sv.vaults.create({ name: 'My Vault' });
|
|
3615
|
+
* console.log('Save this VMK:', vault.vmk);
|
|
3084
3616
|
*/
|
|
3085
|
-
|
|
3086
|
-
/** Opaque published-content revision; null for legacy/unpublished content. */
|
|
3087
|
-
contentVersion: string | null;
|
|
3088
|
-
}
|
|
3089
|
-
/** The discrete primitive returned by createUpload — a Forge TUS session. */
|
|
3090
|
-
interface IngotUpload {
|
|
3091
|
-
/** Ingot ID */
|
|
3092
|
-
id: string;
|
|
3093
|
-
/** The name the ingot is stored under: the server's numbered name under `new_name`. */
|
|
3094
|
-
name: string;
|
|
3095
|
-
/** Content type (MIME) */
|
|
3096
|
-
contentType: string;
|
|
3097
|
-
/** Size in bytes */
|
|
3098
|
-
size: number;
|
|
3099
|
-
/** Forge upload URL carrying the ISTK (upload session token) */
|
|
3100
|
-
uploadUrl: string;
|
|
3101
|
-
/** Upload session expiry (Unix seconds) */
|
|
3102
|
-
expiresAt: number;
|
|
3617
|
+
create(options: CreateVaultOptions): Promise<Vault>;
|
|
3103
3618
|
/**
|
|
3104
|
-
*
|
|
3105
|
-
*
|
|
3619
|
+
* Unseal a vault to access its contents.
|
|
3620
|
+
* Returns a short-lived Vault Access Token (VAT).
|
|
3621
|
+
*
|
|
3622
|
+
* @param vaultId - The vault to unseal.
|
|
3623
|
+
* @param key - The vault's VMK, or a DVAK token issued for it.
|
|
3624
|
+
*
|
|
3625
|
+
* @example
|
|
3626
|
+
* const unsealed = await sv.vaults.unseal('vlt_abc', vmk);
|
|
3627
|
+
* const delegated = await sv.vaults.unseal('vlt_abc', 'dvak_...');
|
|
3628
|
+
* console.log('Token:', unsealed.vatToken);
|
|
3106
3629
|
*/
|
|
3107
|
-
|
|
3630
|
+
unseal(vaultId: string, key: string): Promise<UnsealedVault>;
|
|
3108
3631
|
/**
|
|
3109
|
-
*
|
|
3110
|
-
*
|
|
3111
|
-
*
|
|
3112
|
-
*
|
|
3113
|
-
*
|
|
3632
|
+
* List vaults for the account. Results are paginated (server default 100 per
|
|
3633
|
+
* page, max 500); follow `nextCursor` to fetch subsequent pages.
|
|
3634
|
+
*
|
|
3635
|
+
* @example
|
|
3636
|
+
* let cursor: string | undefined;
|
|
3637
|
+
* do {
|
|
3638
|
+
* const page = await sv.vaults.list({ cursor });
|
|
3639
|
+
* page.vaults.forEach((v) => console.log(v.name));
|
|
3640
|
+
* cursor = page.nextCursor;
|
|
3641
|
+
* } while (cursor);
|
|
3114
3642
|
*/
|
|
3115
|
-
|
|
3116
|
-
}
|
|
3117
|
-
/**
|
|
3118
|
-
* What became of a given-up upload's file (`endUpload`): `deleted`, the vault
|
|
3119
|
-
* holds it no longer (this end deleted it, or it was already gone); `kept`,
|
|
3120
|
-
* this end deleted nothing, and a read of it by id (`get`) shows the file as
|
|
3121
|
-
* it is now.
|
|
3122
|
-
*/
|
|
3123
|
-
type UploadEnd = 'deleted' | 'kept';
|
|
3124
|
-
/** A finalized ingot, returned by the high-level upload/replace flows. */
|
|
3125
|
-
interface CreatedIngot {
|
|
3126
|
-
/** Ingot ID */
|
|
3127
|
-
id: string;
|
|
3128
|
-
/** The name the ingot is stored under: the server's numbered name under `new_name`. */
|
|
3129
|
-
name: string;
|
|
3130
|
-
/** Content type (MIME) */
|
|
3131
|
-
contentType: string;
|
|
3132
|
-
/** Size in bytes */
|
|
3133
|
-
size: number;
|
|
3643
|
+
list(options?: ListVaultsOptions): Promise<VaultPage>;
|
|
3134
3644
|
/**
|
|
3135
|
-
*
|
|
3136
|
-
*
|
|
3137
|
-
*
|
|
3645
|
+
* Get a single vault's detail.
|
|
3646
|
+
*
|
|
3647
|
+
* @example
|
|
3648
|
+
* const vault = await sv.vaults.get('vlt_abc');
|
|
3649
|
+
* console.log(vault.status, vault.ingotCount);
|
|
3138
3650
|
*/
|
|
3139
|
-
|
|
3140
|
-
}
|
|
3141
|
-
/** The discrete primitive returned by createDownloadLink. */
|
|
3142
|
-
interface IngotDownloadLink {
|
|
3143
|
-
/** Opaque published-content revision; null for legacy content. */
|
|
3144
|
-
contentVersion: string | null;
|
|
3145
|
-
/** Short-lived signed Forge download URL */
|
|
3146
|
-
downloadUrl: string;
|
|
3147
|
-
/** Ingot ID */
|
|
3148
|
-
id: string;
|
|
3149
|
-
/** Ingot name */
|
|
3150
|
-
name: string;
|
|
3151
|
-
/** Size in bytes */
|
|
3152
|
-
size: number;
|
|
3153
|
-
/** Content type (MIME) */
|
|
3154
|
-
contentType: string;
|
|
3155
|
-
}
|
|
3156
|
-
/** Options for the createUpload primitive. */
|
|
3157
|
-
interface CreateUploadOptions {
|
|
3158
|
-
/** Unsealed vault the ingot belongs to */
|
|
3159
|
-
vault: UnsealedVault;
|
|
3160
|
-
/** Ingot name */
|
|
3161
|
-
name: string;
|
|
3162
|
-
/** Content type (MIME) */
|
|
3163
|
-
contentType: string;
|
|
3164
|
-
/** Declared upload size in bytes */
|
|
3165
|
-
sizeBytes: number;
|
|
3166
|
-
/** Slash-delimited folder path (find-or-created from root). */
|
|
3167
|
-
folder?: string;
|
|
3168
|
-
/** Existing folder ID to upload into. Mutually exclusive with `folder`. */
|
|
3169
|
-
folderId?: string;
|
|
3170
|
-
/** Vault-keyed plaintext HMAC (43-char base64url) to store on the ingot. */
|
|
3171
|
-
contentHmac?: string;
|
|
3172
|
-
/** What a name already held in the target folder does; omitted means the server's `upsert`. */
|
|
3173
|
-
onNameConflict?: NameConflictPolicy;
|
|
3174
|
-
}
|
|
3175
|
-
/** Options for the high-level upload flow. */
|
|
3176
|
-
interface UploadIngotOptions {
|
|
3177
|
-
/** File or Blob to upload */
|
|
3178
|
-
file: File | Blob;
|
|
3179
|
-
/** Optional name (defaults to file name) */
|
|
3180
|
-
name?: string;
|
|
3651
|
+
get(vaultId: string): Promise<VaultDetail>;
|
|
3181
3652
|
/**
|
|
3182
|
-
*
|
|
3183
|
-
*
|
|
3184
|
-
*
|
|
3653
|
+
* Rename a vault.
|
|
3654
|
+
*
|
|
3655
|
+
* @example
|
|
3656
|
+
* await sv.vaults.update('vlt_abc', { name: 'Renamed Vault' });
|
|
3657
|
+
*/
|
|
3658
|
+
update(vaultId: string, options: {
|
|
3659
|
+
name: string;
|
|
3660
|
+
}): Promise<UpdatedVault>;
|
|
3661
|
+
/**
|
|
3662
|
+
* Seal a vault, revoking all active access tokens.
|
|
3663
|
+
*
|
|
3664
|
+
* @example
|
|
3665
|
+
* await sv.vaults.seal('vlt_abc');
|
|
3666
|
+
*/
|
|
3667
|
+
seal(vaultId: string): Promise<void>;
|
|
3668
|
+
/**
|
|
3669
|
+
* Schedule permanent deletion in seven days and immediately lock all vault access.
|
|
3670
|
+
* Company admins only; cancelDeletion can abort this schedule before its deadline.
|
|
3671
|
+
* A vault whose irreversible cleanup has already started answers that cleanup
|
|
3672
|
+
* (`status: 'deleting'`) instead, which nothing can cancel.
|
|
3673
|
+
*
|
|
3674
|
+
* Requires the vault's exact name as confirmation, matched case-sensitively.
|
|
3675
|
+
* The name is sent base64(UTF-8) as the `X-Confirm-Name-B64` header so a vault
|
|
3676
|
+
* named with any Unicode (emoji, CJK, the U+202F in macOS-style names) is
|
|
3677
|
+
* deletable — an HTTP header value cannot carry non-latin1 characters.
|
|
3678
|
+
*
|
|
3679
|
+
* @example
|
|
3680
|
+
* await sv.vaults.delete('vlt_abc', 'My Vault');
|
|
3681
|
+
*/
|
|
3682
|
+
delete(vaultId: string, name: string): Promise<ScheduledVaultDeletion | StartedVaultDeletion>;
|
|
3683
|
+
/** Cancel this exact deletion schedule before its deadline; company admins only. */
|
|
3684
|
+
cancelDeletion(vaultId: string, deletionScheduleId: string): Promise<VaultDetail>;
|
|
3685
|
+
/**
|
|
3686
|
+
* Get a vault's public-sharing configuration. Every sharing write below
|
|
3687
|
+
* answers the same configuration as that write left it.
|
|
3688
|
+
*
|
|
3689
|
+
* @example
|
|
3690
|
+
* const sharing = await sv.vaults.getSharingConfig('vlt_abc');
|
|
3691
|
+
*/
|
|
3692
|
+
getSharingConfig(vaultId: string): Promise<VaultSharingConfig>;
|
|
3693
|
+
/**
|
|
3694
|
+
* Enable public sharing for a vault.
|
|
3695
|
+
*
|
|
3696
|
+
* @example
|
|
3697
|
+
* await sv.vaults.enableSharing('vlt_abc', vmk, { sessionLengthSeconds: 3600 });
|
|
3698
|
+
*/
|
|
3699
|
+
enableSharing(vaultId: string, vmk: string, options?: VaultSharingOptions): Promise<VaultSharingConfig>;
|
|
3700
|
+
/**
|
|
3701
|
+
* Disable public sharing for a vault.
|
|
3702
|
+
*
|
|
3703
|
+
* @example
|
|
3704
|
+
* await sv.vaults.disableSharing('vlt_abc');
|
|
3705
|
+
*/
|
|
3706
|
+
disableSharing(vaultId: string): Promise<VaultSharingConfig>;
|
|
3707
|
+
/**
|
|
3708
|
+
* Update a vault's sharing configuration (without changing enabled state).
|
|
3709
|
+
*
|
|
3710
|
+
* Making every ingot public publishes each file to anyone holding its URL,
|
|
3711
|
+
* so the API accepts `allIngotsPublic: true` only with a read-write VAT for
|
|
3712
|
+
* the vault: pass the unsealed vault for that change.
|
|
3713
|
+
*
|
|
3714
|
+
* @example
|
|
3715
|
+
* await sv.vaults.updateSharingConfig('vlt_abc', { sessionLengthSeconds: 1800 });
|
|
3716
|
+
*
|
|
3717
|
+
* @example Make every ingot public
|
|
3718
|
+
* const unsealed = await sv.vaults.unseal('vlt_abc', vmk);
|
|
3719
|
+
* await sv.vaults.updateSharingConfig('vlt_abc', { allIngotsPublic: true }, unsealed);
|
|
3720
|
+
*/
|
|
3721
|
+
updateSharingConfig(vaultId: string, config: VaultSharingOptions, vault?: UnsealedVault): Promise<VaultSharingConfig>;
|
|
3722
|
+
/**
|
|
3723
|
+
* Get a vault's access-log retention window.
|
|
3724
|
+
*
|
|
3725
|
+
* @example
|
|
3726
|
+
* const { retentionSeconds } = await sv.vaults.getAccessLogRetention('vlt_abc');
|
|
3727
|
+
*/
|
|
3728
|
+
getAccessLogRetention(vaultId: string): Promise<AccessLogRetention>;
|
|
3729
|
+
/**
|
|
3730
|
+
* Update a vault's access-log retention window.
|
|
3731
|
+
*
|
|
3732
|
+
* @example
|
|
3733
|
+
* await sv.vaults.updateAccessLogRetention('vlt_abc', 7776000);
|
|
3185
3734
|
*/
|
|
3186
|
-
|
|
3187
|
-
/** Slash-delimited folder path (find-or-created from root). */
|
|
3188
|
-
folder?: string;
|
|
3189
|
-
/** Existing folder ID to upload into. Mutually exclusive with `folder`. */
|
|
3190
|
-
folderId?: string;
|
|
3191
|
-
/** Vault-keyed plaintext HMAC (43-char base64url) to store on the ingot. */
|
|
3192
|
-
contentHmac?: string;
|
|
3193
|
-
/** What a name already held in the target folder does; omitted means the server's `upsert`. */
|
|
3194
|
-
onNameConflict?: NameConflictPolicy;
|
|
3195
|
-
/** Progress callback for the Forge/TUS transfer */
|
|
3196
|
-
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
3197
|
-
}
|
|
3198
|
-
/**
|
|
3199
|
-
* The upload session a file's bytes go to, which `sendUpload` hands over once
|
|
3200
|
-
* Forge opens it (`onSessionCreated`): what `resumeUpload` continues the
|
|
3201
|
-
* upload in. Its URL addresses the upload itself (a request to it can end the
|
|
3202
|
-
* upload), so keep it in memory, never in a log or a URL a person shares.
|
|
3203
|
-
*/
|
|
3204
|
-
interface UploadSession {
|
|
3205
|
-
/** The session's URL on Forge. */
|
|
3206
|
-
readonly sessionUrl: string;
|
|
3207
|
-
}
|
|
3208
|
-
/** Options for sendUpload. */
|
|
3209
|
-
interface SendUploadOptions {
|
|
3210
|
-
/** Cancels the transfer. */
|
|
3211
|
-
signal?: AbortSignal;
|
|
3212
|
-
/** Bytes sent so far and the file size; never runs backwards. */
|
|
3213
|
-
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
3735
|
+
updateAccessLogRetention(vaultId: string, seconds: number): Promise<AccessLogRetention>;
|
|
3214
3736
|
/**
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3217
|
-
*
|
|
3218
|
-
*
|
|
3219
|
-
*
|
|
3737
|
+
* Get a vault's upload-channel configuration. Every upload write below
|
|
3738
|
+
* answers the same configuration as that write left it: both channels, the
|
|
3739
|
+
* shared settings, and the portal's URL while the portal is on.
|
|
3740
|
+
*
|
|
3741
|
+
* @example
|
|
3742
|
+
* const upload = await sv.vaults.getUploadConfig('vlt_abc');
|
|
3220
3743
|
*/
|
|
3221
|
-
|
|
3222
|
-
}
|
|
3223
|
-
/** Options for resumeUpload. */
|
|
3224
|
-
type ResumeUploadOptions = Omit<SendUploadOptions, 'onSessionCreated'>;
|
|
3225
|
-
/** Options for replacing an existing ingot's content. */
|
|
3226
|
-
interface ReplaceIngotOptions {
|
|
3227
|
-
/** File or Blob to upload as the new content */
|
|
3228
|
-
file: File | Blob;
|
|
3229
|
-
/** Optional new name (defaults to file name) */
|
|
3230
|
-
name?: string;
|
|
3231
|
-
/** Vault-keyed plaintext HMAC (43-char base64url) for the NEW content. */
|
|
3232
|
-
contentHmac?: string;
|
|
3744
|
+
getUploadConfig(vaultId: string): Promise<VaultUploadSettings>;
|
|
3233
3745
|
/**
|
|
3234
|
-
*
|
|
3235
|
-
*
|
|
3236
|
-
*
|
|
3746
|
+
* Enable the public upload portal for a vault.
|
|
3747
|
+
*
|
|
3748
|
+
* @example
|
|
3749
|
+
* await sv.vaults.enableUploadPortal('vlt_abc', vmk);
|
|
3237
3750
|
*/
|
|
3238
|
-
|
|
3239
|
-
/** Progress callback for the Forge/TUS transfer */
|
|
3240
|
-
onProgress?: (bytesUploaded: number, bytesTotal: number) => void;
|
|
3241
|
-
}
|
|
3242
|
-
/** Options for list. */
|
|
3243
|
-
interface ListIngotsOptions {
|
|
3244
|
-
/** Page size */
|
|
3245
|
-
limit?: number;
|
|
3246
|
-
/** Pagination cursor */
|
|
3247
|
-
cursor?: string;
|
|
3751
|
+
enableUploadPortal(vaultId: string, vmk: string): Promise<VaultUploadSettings>;
|
|
3248
3752
|
/**
|
|
3249
|
-
*
|
|
3250
|
-
*
|
|
3753
|
+
* Disable the public upload portal for a vault.
|
|
3754
|
+
*
|
|
3755
|
+
* @example
|
|
3756
|
+
* await sv.vaults.disableUploadPortal('vlt_abc');
|
|
3251
3757
|
*/
|
|
3252
|
-
|
|
3253
|
-
/** Sort direction of the page */
|
|
3254
|
-
sortOrder?: 'asc' | 'desc';
|
|
3255
|
-
}
|
|
3256
|
-
/** Options for listContents. */
|
|
3257
|
-
interface ListContentsOptions {
|
|
3258
|
-
/** Folder to list (null/omitted lists the vault root) */
|
|
3259
|
-
folderId?: string | null;
|
|
3260
|
-
/** Most children on one page (1-500; server default 100) */
|
|
3261
|
-
limit?: number;
|
|
3262
|
-
/** A prior page's `nextPageToken`, for the same folder and order */
|
|
3263
|
-
pageToken?: string;
|
|
3264
|
-
/** Ingot creation order; `desc` (newest first) by default */
|
|
3265
|
-
sortOrder?: 'asc' | 'desc';
|
|
3266
|
-
}
|
|
3267
|
-
/**
|
|
3268
|
-
* One page of a folder's listing. The folder's children run as one sequence
|
|
3269
|
-
* across its pages: every direct subfolder first, in a stable order that is
|
|
3270
|
-
* not by name, then every ingot directly in the folder in creation order
|
|
3271
|
-
* (newest first under `desc`). A page holds at most `limit` children in all,
|
|
3272
|
-
* so one page can hold the last subfolders and the first ingots, and a page
|
|
3273
|
-
* can hold fewer than `limit`, even none, and still not be the last: follow
|
|
3274
|
-
* `nextPageToken`, never the count. Ordering by name, size or type is the
|
|
3275
|
-
* caller's, over the children it holds.
|
|
3276
|
-
*/
|
|
3277
|
-
interface FolderContents {
|
|
3278
|
-
/** The folder listed, on every page; null at the vault root */
|
|
3279
|
-
folder: {
|
|
3280
|
-
id: string;
|
|
3281
|
-
name: string;
|
|
3282
|
-
parentId: string | null;
|
|
3283
|
-
} | null;
|
|
3284
|
-
/** Root → … → the folder listed, on every page */
|
|
3285
|
-
breadcrumb: FolderBreadcrumbItem[];
|
|
3286
|
-
/** This page's subfolders */
|
|
3287
|
-
folders: Folder[];
|
|
3288
|
-
/** This page's ingots */
|
|
3289
|
-
ingots: Ingot[];
|
|
3290
|
-
/** The next page's `pageToken`; null on the last page */
|
|
3291
|
-
nextPageToken: string | null;
|
|
3292
|
-
}
|
|
3293
|
-
/** Options for search. */
|
|
3294
|
-
interface SearchIngotsOptions {
|
|
3758
|
+
disableUploadPortal(vaultId: string): Promise<VaultUploadSettings>;
|
|
3295
3759
|
/**
|
|
3296
|
-
*
|
|
3297
|
-
*
|
|
3298
|
-
*
|
|
3299
|
-
*
|
|
3300
|
-
* while `nextCursor` is set: follow it. Text no name can hold is refused
|
|
3301
|
-
* (400).
|
|
3760
|
+
* Enable the upload widget for a vault.
|
|
3761
|
+
*
|
|
3762
|
+
* @example
|
|
3763
|
+
* await sv.vaults.enableUploadWidget('vlt_abc', vmk);
|
|
3302
3764
|
*/
|
|
3303
|
-
|
|
3765
|
+
enableUploadWidget(vaultId: string, vmk: string): Promise<VaultUploadSettings>;
|
|
3304
3766
|
/**
|
|
3305
|
-
*
|
|
3306
|
-
*
|
|
3307
|
-
*
|
|
3308
|
-
*
|
|
3309
|
-
* server refuses a value that is neither.
|
|
3767
|
+
* Disable the upload widget for a vault.
|
|
3768
|
+
*
|
|
3769
|
+
* @example
|
|
3770
|
+
* await sv.vaults.disableUploadWidget('vlt_abc');
|
|
3310
3771
|
*/
|
|
3311
|
-
|
|
3312
|
-
/** Scope the search to one folder (whole vault when omitted) */
|
|
3313
|
-
folderId?: string;
|
|
3314
|
-
/** Minimum size in bytes */
|
|
3315
|
-
minSize?: number;
|
|
3316
|
-
/** Maximum size in bytes */
|
|
3317
|
-
maxSize?: number;
|
|
3318
|
-
/** Page size */
|
|
3319
|
-
limit?: number;
|
|
3320
|
-
/** Pagination cursor */
|
|
3321
|
-
cursor?: string;
|
|
3322
|
-
/** Sort direction */
|
|
3323
|
-
sortOrder?: 'asc' | 'desc';
|
|
3324
|
-
}
|
|
3325
|
-
/** A page of ingots. */
|
|
3326
|
-
interface IngotPage {
|
|
3327
|
-
/** Ingots on this page */
|
|
3328
|
-
ingots: Ingot[];
|
|
3329
|
-
/** Cursor for the next page, when more results exist */
|
|
3330
|
-
nextCursor?: string;
|
|
3331
|
-
}
|
|
3332
|
-
/** Ingot sharing configuration. */
|
|
3333
|
-
interface IngotSharingConfig {
|
|
3334
|
-
/** Whether the ingot is shared */
|
|
3335
|
-
shared: boolean;
|
|
3336
|
-
/** Visibility mode */
|
|
3337
|
-
visibility?: 'invite_only' | 'authenticated' | 'public';
|
|
3338
|
-
/** The share's permanent files.sv URL, the link its recipients open; null while the ingot is not shared */
|
|
3339
|
-
publicUrl: string | null;
|
|
3340
|
-
/** The share's link code (the URL's last segment); null while the ingot is not shared */
|
|
3341
|
-
linkCode: string | null;
|
|
3342
|
-
/** Whether the vault's public file sharing is on */
|
|
3343
|
-
sharingEnabled: boolean;
|
|
3344
|
-
/** Whether the vault makes every ingot public, which pins this one to public */
|
|
3345
|
-
vaultAllIngotsPublic: boolean;
|
|
3346
|
-
/** The vault's share recipient session length, in seconds */
|
|
3347
|
-
sessionLengthSeconds: number;
|
|
3348
|
-
/** Active invites */
|
|
3349
|
-
invites?: IngotInvite[];
|
|
3350
|
-
}
|
|
3351
|
-
/** Options for updateSharingConfig. */
|
|
3352
|
-
interface UpdateIngotSharingOptions {
|
|
3353
|
-
/** Whether the ingot is shared */
|
|
3354
|
-
shared?: boolean;
|
|
3355
|
-
/** Visibility mode */
|
|
3356
|
-
visibility?: 'invite_only' | 'authenticated' | 'public';
|
|
3357
|
-
}
|
|
3358
|
-
/** A sharing invite on an ingot. */
|
|
3359
|
-
interface IngotInvite {
|
|
3360
|
-
/** Invite ID */
|
|
3361
|
-
id: string;
|
|
3362
|
-
/** Invited identity (email/phone) */
|
|
3363
|
-
identity: string;
|
|
3364
|
-
/** Identity type */
|
|
3365
|
-
identityType: 'email' | 'phone';
|
|
3366
|
-
/** When this identity was invited (Unix seconds) */
|
|
3367
|
-
invitedAt: number;
|
|
3368
|
-
}
|
|
3369
|
-
/** An invitation addInvite made or resent. */
|
|
3370
|
-
interface IngotInvitation extends IngotInvite {
|
|
3371
|
-
/** The URL this invitee was sent: the share's files.sv URL, with their own token when the share invites several */
|
|
3372
|
-
shareUrl: string;
|
|
3373
|
-
/** Whether the invitation was delivered by email or text */
|
|
3374
|
-
delivered: boolean;
|
|
3375
|
-
}
|
|
3376
|
-
/**
|
|
3377
|
-
* An ingot access-log entry: a download that delivered the file, a SparkLink
|
|
3378
|
-
* open of it included. The server records an access as the download that
|
|
3379
|
-
* delivered it, so `download` is the one action.
|
|
3380
|
-
*/
|
|
3381
|
-
interface IngotAccessLog {
|
|
3772
|
+
disableUploadWidget(vaultId: string): Promise<VaultUploadSettings>;
|
|
3382
3773
|
/**
|
|
3383
|
-
*
|
|
3384
|
-
*
|
|
3774
|
+
* Update a vault's upload settings (max size, notification email).
|
|
3775
|
+
*
|
|
3776
|
+
* @example
|
|
3777
|
+
* await sv.vaults.updateUploadConfig('vlt_abc', { maxSizeBytes: 1048576 });
|
|
3385
3778
|
*/
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
/** Who accessed: a member's email, an API key's name, or a SparkLink visitor's identity */
|
|
3390
|
-
identity: string;
|
|
3391
|
-
/** Source IP address */
|
|
3392
|
-
ipAddress: string;
|
|
3393
|
-
/** Client user agent */
|
|
3394
|
-
userAgent: string;
|
|
3395
|
-
/** Event timestamp (Unix seconds) */
|
|
3396
|
-
timestamp: number;
|
|
3397
|
-
}
|
|
3398
|
-
/** A page of access logs. */
|
|
3399
|
-
interface IngotAccessLogPage {
|
|
3400
|
-
/** Log entries on this page */
|
|
3401
|
-
logs: IngotAccessLog[];
|
|
3402
|
-
/** Cursor for the next page, when more results exist */
|
|
3403
|
-
nextCursor?: string;
|
|
3404
|
-
}
|
|
3405
|
-
/** Options for getAccessLogs. */
|
|
3406
|
-
interface AccessLogsOptions {
|
|
3407
|
-
/** Page size */
|
|
3408
|
-
limit?: number;
|
|
3409
|
-
/** Pagination cursor */
|
|
3410
|
-
cursor?: string;
|
|
3411
|
-
}
|
|
3412
|
-
/** One hash-check hit: this HMAC exists on an active ingot in the vault. */
|
|
3413
|
-
interface HashCheckMatch {
|
|
3414
|
-
content_hmac: string;
|
|
3415
|
-
ingot_id: string;
|
|
3416
|
-
}
|
|
3417
|
-
interface HashCheckResponse {
|
|
3418
|
-
found: HashCheckMatch[];
|
|
3779
|
+
updateUploadConfig(vaultId: string, config: UpdateVaultUploadOptions): Promise<VaultUploadSettings>;
|
|
3780
|
+
private toggleUploadChannel;
|
|
3781
|
+
private validateCreateOptions;
|
|
3419
3782
|
}
|
|
3420
3783
|
|
|
3421
3784
|
/**
|
|
@@ -4576,7 +4939,7 @@ declare const logger: {
|
|
|
4576
4939
|
/**
|
|
4577
4940
|
* SparkVault JavaScript SDK
|
|
4578
4941
|
*
|
|
4579
|
-
* A unified SDK for Identity, Vaults, Ingots, Folders, Sparks, and Entropy.
|
|
4942
|
+
* A unified SDK for Identity, Help Desk, Notify, Vaults, Ingots, Folders, Sparks, and Entropy.
|
|
4580
4943
|
*
|
|
4581
4944
|
* @example CDN Usage (Recommended)
|
|
4582
4945
|
* ```html
|
|
@@ -4605,7 +4968,7 @@ declare const logger: {
|
|
|
4605
4968
|
*/
|
|
4606
4969
|
|
|
4607
4970
|
declare class SparkVault {
|
|
4608
|
-
/** First-party products
|
|
4971
|
+
/** First-party products: Identity, Notify, and customer-facing Help Desk. */
|
|
4609
4972
|
readonly products: ProductsModule;
|
|
4610
4973
|
/** Encrypted vault control plane (create, unseal, sharing, upload config). */
|
|
4611
4974
|
readonly vaults: VaultsModule;
|
|
@@ -4658,5 +5021,5 @@ declare global {
|
|
|
4658
5021
|
}
|
|
4659
5022
|
}
|
|
4660
5023
|
|
|
4661
|
-
export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, IdentityModule, IdentityProviderError, IngotsModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, TimeoutError, UnauthorizedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
|
|
4662
|
-
export type { AccessLogRetention, AccessLogsOptions, CreateFolderOptions, CreateNotifySendOptions, CreateSparkOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, HealthCheckOptions, HealthCheckResult, AttachOptions as IdentityAttachOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownloadLink, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotificationSender, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigDestinations, NotifyConfigDestinationsPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyDestinationFailureReason, NotifyDestinationKind, NotifyDestinationReason, NotifyDestinationSkipReason, NotifyDestinationState, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusDestination, NotifySendStatusRecipient, NotifySendSummary, NotifySendSummaryDestination, NotifySlackDestination, NotifySuppressionReason, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyVerificationLevel, NotifyWebhookDestination, NotifyWebhookDestinationRead, QuotaResource, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
|
|
5024
|
+
export { AuthenticationError, AuthorizationError, EntropyModule, FoldersModule, HelpDeskClient, HelpDeskModule, IdentityModule, IdentityProviderError, IngotsModule, NAME_CONFLICT_POLICIES, NOTIFY_PRESETS, NetworkError, NotifyModule, NotifyProductModule, NotifySubscriptionRequiredError, PlanRequiredError, PopupBlockedError, ProductsModule, QuotaExceededError, SparkVault, SparkVaultError, SparksModule, TimeoutError, UnauthorizedError, UserCancelledError, ValidationError, VaultsModule, buildNotifyPresetSend, SparkVault as default, fetchDownload, isReceivedUploadFailure, logger, setDebugMode };
|
|
5025
|
+
export type { AccessLogRetention, AccessLogsOptions, CreateFolderOptions, CreateNotifySendOptions, CreateSparkOptions, CreateUploadOptions, CreateVaultOptions, CreatedIngot, CreatedSpark, EntropyFormat, EntropyResult, FetchDownloadOptions, FetchedDownload, Folder, FolderBreadcrumbItem, FolderContents, FolderPage, GenerateEntropyOptions, HealthCheckOptions, HealthCheckResult, HelpDeskAttachmentDownload, HelpDeskAttachmentInput, HelpDeskAttachmentUpload, HelpDeskConnectOptions, HelpDeskCreateTicketOptions, HelpDeskCustomer, HelpDeskCustomerPatch, HelpDeskDesk, HelpDeskDraft, HelpDeskEvent, HelpDeskExternalChallenge, HelpDeskExternalIdentity, HelpDeskFormHandle, HelpDeskFormOptions, HelpDeskFormState, HelpDeskIdentityRequest, HelpDeskListTicketsOptions, HelpDeskMountFormOptions, HelpDeskOpenFormOptions, HelpDeskPinChallenge, HelpDeskReplyCreated, HelpDeskReplyOptions, HelpDeskRequestContext, HelpDeskSession, HelpDeskSessionChange, HelpDeskTicket, HelpDeskTicketCreated, HelpDeskTicketDetail, HelpDeskTicketList, HelpDeskTimeline, HelpDeskVerifyPinOptions, AttachOptions as IdentityAttachOptions, Ingot, IngotAccessLog, IngotAccessLogPage, IngotDownloadLink, IngotInvitation, IngotInvite, IngotPage, IngotSharingConfig, IngotUpload, ListContentsOptions, ListFoldersOptions, ListIngotsOptions, ListNotificationsOptions, ListNotificationsResponse, ListNotifyInboxOptions, ListNotifyInboxResponse, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, ListNotifySendsOptions, ListNotifySendsResponse, ListSparksOptions, MarkAllNotificationsStateOptions, MarkAllNotificationsStateResponse, MarkAllReadResult, MarkNotificationStateOptions, MarkNotificationStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, NameConflictPolicy, NotificationBulkMarkState, NotificationInboxState, NotificationMarkState, NotificationRow, NotificationSender, NotifyCategory, NotifyChannel, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigDestinations, NotifyConfigDestinationsPatch, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigHistory, NotifyConfigOverrides, NotifyConfigPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigResponse, NotifyConfigSecurity, NotifyDeliveryMode, NotifyDestinationFailureReason, NotifyDestinationKind, NotifyDestinationReason, NotifyDestinationSkipReason, NotifyDestinationState, NotifyEscalation, NotifyInboxBulkMarkState, NotifyInboxMarkState, NotifyInboxRow, NotifyInboxView, NotifyIngotRef, NotifyInteraction, NotifyPreset, NotifyPresetCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyRecallMode, NotifyReceipt, NotifyReceiptEventType, NotifyRecipient, NotifyRecipientRef, NotifyRecipientState, NotifyReportableVerificationLevel, NotifySendContent, NotifySendPolicy, NotifySendReceipt, NotifySendReceiptsResponse, NotifySendResult, NotifySendState, NotifySendStatus, NotifySendStatusCounts, NotifySendStatusDestination, NotifySendStatusRecipient, NotifySendSummary, NotifySendSummaryDestination, NotifySlackDestination, NotifySuppressionReason, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyVerificationLevel, NotifyWebhookDestination, NotifyWebhookDestinationRead, QuotaResource, RecallNotifySendOptions, RecallNotifySendResponse, RegisterWebPushResponse, ReplaceIngotOptions, ResumeUploadOptions, ScheduledVaultDeletion, SearchIngotsOptions, SendUploadOptions, ShareSparkOptions, SignInOptions, SignInResult, Spark, SparkInviteResend, SparkPage, SparkShare, SparkSummary, SparkVaultConfig, SparkVisibility, StartedVaultDeletion, SubscribeWebPushOptions, SubscribeWebPushResult, SubscribeWebPushStatus, TokenClaims, UnreachedAdmin, UnreadCountResponse, UnsealedVault, UnsubscribeWebPushResponse, UpdateFolderOptions, UpdateIngotSharingOptions, UpdateVaultUploadOptions, UpdatedVault, UploadAttachOptions, UploadBranding, UploadEnd, UploadIngotOptions, UploadOptions, UploadProgress, UploadResult, UploadSession, Vault, VaultDetail, VaultLifecycle, VaultSharingConfig, VaultSharingOptions, VaultSummary, VaultUploadConfig, VaultUploadSettings, VerifyOptions, VerifyResult, WebPushKeyResponse, WebPushStatus, WebPushStatusOptions, WebPushStatusResult, WebPushSubscriptionInput };
|