@sparkvault/sdk-js 14.2.2 → 14.2.3
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 +13 -6
- package/dist/index.cjs +1679 -1109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -5
- package/dist/index.mjs +1679 -1109
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/client.d.ts +18 -4
- package/dist/products/help-desk/form-attachments.d.ts +1 -0
- package/dist/products/help-desk/form.d.ts +20 -1
- package/dist/products/help-desk/types.d.ts +3 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/ui/modal-shell.d.ts +41 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3275,8 +3275,10 @@ interface HelpDeskCustomer {
|
|
|
3275
3275
|
}
|
|
3276
3276
|
interface HelpDeskSession {
|
|
3277
3277
|
token: string;
|
|
3278
|
-
/**
|
|
3278
|
+
/** When Core ends the session at the latest, in Unix seconds on Core's clock. Never compared with this device's clock, which may run apart from Core's. */
|
|
3279
3279
|
expires_at: number;
|
|
3280
|
+
/** The session's lifetime in seconds from when its answer lands; the client times a fresh answer on this device's clock from it. */
|
|
3281
|
+
ttl_seconds: number;
|
|
3280
3282
|
customer: HelpDeskCustomer;
|
|
3281
3283
|
}
|
|
3282
3284
|
/** Why customer-specific UI is being told to reconsider its current session. */
|
|
@@ -3420,15 +3422,24 @@ declare class HelpDeskClient {
|
|
|
3420
3422
|
private authorityRevision;
|
|
3421
3423
|
private readonly listeners;
|
|
3422
3424
|
private session;
|
|
3425
|
+
/**
|
|
3426
|
+
* When the installed session ends on this device's clock, in seconds: set
|
|
3427
|
+
* from `ttl_seconds` as an answer lands from Core. Null for a session whose
|
|
3428
|
+
* landing this client did not see (setSession), which ends at Core's 401.
|
|
3429
|
+
*/
|
|
3430
|
+
private deadline;
|
|
3423
3431
|
private token;
|
|
3424
3432
|
private revision;
|
|
3425
3433
|
private constructor();
|
|
3426
3434
|
/** Discover a desk by its configured host, before any customer credentials are sent. */
|
|
3427
3435
|
static connect(config: ResolvedConfig, options: HelpDeskConnectOptions): Promise<HelpDeskClient>;
|
|
3428
3436
|
/**
|
|
3429
|
-
* Install a customer session answer
|
|
3430
|
-
*
|
|
3431
|
-
*
|
|
3437
|
+
* Install a customer session answer the host holds, such as one restored
|
|
3438
|
+
* from its own storage. Its landing time is unknown, so this client sets it
|
|
3439
|
+
* no deadline of its own: it lasts until Core answers 401, which clears it.
|
|
3440
|
+
* A company provider verifies restored sessions again before use. Null
|
|
3441
|
+
* stays signed out until refreshSession() or authenticate() explicitly
|
|
3442
|
+
* resumes the provider.
|
|
3432
3443
|
*/
|
|
3433
3444
|
setSession(session: HelpDeskSession | null): void;
|
|
3434
3445
|
private installSession;
|
|
@@ -3448,7 +3459,11 @@ declare class HelpDeskClient {
|
|
|
3448
3459
|
private rememberToken;
|
|
3449
3460
|
private send;
|
|
3450
3461
|
private establish;
|
|
3451
|
-
/**
|
|
3462
|
+
/**
|
|
3463
|
+
* A public, short-lived challenge from the help desk's own Entropy service.
|
|
3464
|
+
* Core refuses a nonce past its `expires_at` on its own clock, so this
|
|
3465
|
+
* device's clock never judges it.
|
|
3466
|
+
*/
|
|
3452
3467
|
startExternalChallenge(): Promise<HelpDeskExternalChallenge>;
|
|
3453
3468
|
/** Exchange only a purpose-specific company assertion, never an ordinary website token. */
|
|
3454
3469
|
completeExternal(options: {
|
|
@@ -3458,6 +3473,7 @@ declare class HelpDeskClient {
|
|
|
3458
3473
|
private exchangeExternal;
|
|
3459
3474
|
/** Silently establish/renew a company session. Concurrent calls share one proof. */
|
|
3460
3475
|
authenticate(): Promise<HelpDeskSession | null>;
|
|
3476
|
+
/** Install a company session answer that just landed from Core, timed from its `ttl_seconds`. */
|
|
3461
3477
|
private acceptExternalSession;
|
|
3462
3478
|
/** Mint an opaque hosted-portal code from an assertion binding the registered redirect challenge. */
|
|
3463
3479
|
createExternalHandoff(options: {
|