@sparkvault/sdk-js 16.4.1 → 16.5.1
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 +21 -13
- package/dist/index.cjs +1075 -418
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.mjs +1075 -418
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/form-attachments.d.ts +23 -6
- package/dist/products/help-desk/form-composer.d.ts +34 -0
- package/dist/products/help-desk/form-draft.d.ts +11 -2
- package/dist/products/help-desk/form-types.d.ts +29 -4
- package/dist/products/help-desk/form.d.ts +32 -9
- package/dist/products/help-desk/icons.d.ts +21 -0
- package/dist/products/help-desk/support-types.d.ts +2 -0
- package/dist/products/help-desk/support-view.d.ts +8 -2
- package/dist/products/help-desk/widget-identity.d.ts +1 -0
- package/dist/products/identity/renderer.d.ts +0 -7
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/ui/live-region.d.ts +15 -0
- package/package.json +1 -1
- package/dist/products/help-desk/support-subject.d.ts +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -3828,6 +3828,7 @@ interface HelpDeskWidgetIdentityOptions {
|
|
|
3828
3828
|
interface HelpDeskWidgetIdentityChallenge {
|
|
3829
3829
|
challenge_id: string;
|
|
3830
3830
|
verifier: string;
|
|
3831
|
+
/** Private to this window, like the verifier: handed only to the first-party page it opened, which Core requires it from. */
|
|
3831
3832
|
state: string;
|
|
3832
3833
|
sign_in_url: string;
|
|
3833
3834
|
expires_at: number;
|
|
@@ -3989,22 +3990,39 @@ declare class HelpDeskClient {
|
|
|
3989
3990
|
private releaseSession;
|
|
3990
3991
|
}
|
|
3991
3992
|
|
|
3992
|
-
/** Internal adapter used by the KB-first widget;
|
|
3993
|
+
/** Internal adapter used by the KB-first support widget; a standalone form verifies the customer itself. */
|
|
3993
3994
|
interface HelpDeskWidgetFormIdentity {
|
|
3994
3995
|
customer: HelpDeskCustomer | null;
|
|
3996
|
+
/** A desk that signs in with SparkVault Identity sends the email alone: its sign-in window asks a missing name itself. */
|
|
3995
3997
|
signIn(input: {
|
|
3996
3998
|
email: string;
|
|
3997
|
-
givenName
|
|
3998
|
-
familyName
|
|
3999
|
+
givenName?: string;
|
|
4000
|
+
familyName?: string;
|
|
3999
4001
|
}): Promise<HelpDeskSession>;
|
|
4000
4002
|
switchAccount(composition: {
|
|
4001
4003
|
subject: string;
|
|
4002
4004
|
body: string;
|
|
4003
4005
|
} | null): void;
|
|
4006
|
+
/**
|
|
4007
|
+
* Present when the host bridges its website account: sign in with it again,
|
|
4008
|
+
* carrying the request, or, `recovering`, a website-account customer's
|
|
4009
|
+
* hidden saved request, which the next form keeps hidden while the website
|
|
4010
|
+
* gives no account back.
|
|
4011
|
+
*/
|
|
4004
4012
|
useWebsiteAccount?: (composition: {
|
|
4005
4013
|
subject: string;
|
|
4006
4014
|
body: string;
|
|
4007
|
-
} | null) => void;
|
|
4015
|
+
} | null, recovering?: boolean) => void;
|
|
4016
|
+
/** Keep a website-account customer's saved request hidden from the start, as the form this one replaces did; `websiteSignedOut` when the website just gave no account back. */
|
|
4017
|
+
recovering?: {
|
|
4018
|
+
websiteSignedOut: boolean;
|
|
4019
|
+
};
|
|
4020
|
+
/** Offer Use website account beside the request: the customer switched away from the website's account. */
|
|
4021
|
+
offerWebsiteAccount: boolean;
|
|
4022
|
+
/** A previous customer's request left the form: forget their question, in view and in storage. */
|
|
4023
|
+
forgetIssue(): void;
|
|
4024
|
+
/** The form left a hidden saved request for a new one: fill it from the question as the customer last wrote it. */
|
|
4025
|
+
followIssue(): void;
|
|
4008
4026
|
}
|
|
4009
4027
|
/** The injected form's state; uncertain sends keep an exact snapshot until recovered. */
|
|
4010
4028
|
type HelpDeskFormState = 'authenticating' | 'editing' | 'verifying' | 'submitting' | 'uncertain' | 'success' | 'destroyed';
|
|
@@ -4019,8 +4037,16 @@ interface HelpDeskFormOptions {
|
|
|
4019
4037
|
attachments?: boolean;
|
|
4020
4038
|
/** Keep this tab's verified requester's draft for 30 minutes, including uncertain-send recovery. Defaults to false. */
|
|
4021
4039
|
persist?: boolean;
|
|
4040
|
+
/** @internal The issue the support wizard fills the form from, in place of `subject` and `body`; a field holding it stays free for a rewritten issue. */
|
|
4041
|
+
issue?: string;
|
|
4022
4042
|
/** @internal The support controller owns account transitions and native Identity. */
|
|
4023
4043
|
widgetIdentity?: HelpDeskWidgetFormIdentity;
|
|
4044
|
+
/** @internal The support wizard is inline on the host's page (any `target`): that page asks before it unloads while the request holds unsent work. */
|
|
4045
|
+
pageLayout?: boolean;
|
|
4046
|
+
/** @internal The form's controls changed in place: it moved between its steps, or its actions changed as it left a hidden saved request. */
|
|
4047
|
+
onScreenChange?: () => void;
|
|
4048
|
+
/** @internal The host page already shows "Secured by SparkVault", so the form leaves its own out. */
|
|
4049
|
+
hostShowsAttribution?: boolean;
|
|
4024
4050
|
/** @internal Server-minted, content-free assistance correlation. */
|
|
4025
4051
|
assistanceContext?: () => {
|
|
4026
4052
|
assistance_attempt_id: string;
|
|
@@ -4065,6 +4091,8 @@ interface HelpDeskSupportLauncherOptions {
|
|
|
4065
4091
|
interface HelpDeskSupportOptions extends HelpDeskConnectOptions {
|
|
4066
4092
|
/** Render the same support journey in this page element. Omit for the floating widget. */
|
|
4067
4093
|
target?: string | HTMLElement;
|
|
4094
|
+
/** @internal The host page already shows "Secured by SparkVault", so the contact form leaves its own out. */
|
|
4095
|
+
hostShowsAttribution?: boolean;
|
|
4068
4096
|
/** Keep recoverable composition in this browser tab through navigation and reload. Defaults to false. */
|
|
4069
4097
|
persist?: boolean;
|
|
4070
4098
|
/** Observe the customer session the journey proves or clears. */
|