@sparkvault/sdk-js 15.13.1 → 15.14.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 +34 -4
- package/dist/index.cjs +399 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +20 -2
- package/dist/index.mjs +399 -70
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/client.d.ts +4 -1
- package/dist/products/help-desk/form-draft.d.ts +27 -0
- package/dist/products/help-desk/form-types.d.ts +4 -0
- package/dist/products/help-desk/support-types.d.ts +13 -2
- package/dist/products/help-desk/support-view.d.ts +2 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/upload/modal.d.ts +3 -3
- package/package.json +1 -1
|
@@ -67,7 +67,10 @@ export declare class HelpDeskClient {
|
|
|
67
67
|
unlockTicketAccess(options: {
|
|
68
68
|
password?: string;
|
|
69
69
|
identityGrant?: string;
|
|
70
|
-
}): Promise<
|
|
70
|
+
}): Promise<{
|
|
71
|
+
token: string;
|
|
72
|
+
ttl_seconds: number;
|
|
73
|
+
}>;
|
|
71
74
|
/** @internal Read an installed server-proven company bearer without invoking any identity provider. */
|
|
72
75
|
verifiedSessionTokenFor(requesterId: string): string | null;
|
|
73
76
|
getSessionToken(): Promise<string | null>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** The existing hosted draft format, also used by the shared form. Never stores credentials or file bytes. */
|
|
2
|
+
export interface HelpDeskFormDraft {
|
|
3
|
+
subject: string;
|
|
4
|
+
body: string;
|
|
5
|
+
ticketId: string | null;
|
|
6
|
+
uncertain: {
|
|
7
|
+
ticketId: string;
|
|
8
|
+
subject: string;
|
|
9
|
+
body: string;
|
|
10
|
+
attachments: string[];
|
|
11
|
+
} | null;
|
|
12
|
+
hadFiles: boolean;
|
|
13
|
+
}
|
|
14
|
+
type Composition = {
|
|
15
|
+
subject: string;
|
|
16
|
+
body: string;
|
|
17
|
+
};
|
|
18
|
+
/** The question before sign-in is tab-local and contains no customer identity. */
|
|
19
|
+
export declare function clearSupportIssue(deskId: string): void;
|
|
20
|
+
export declare function readSupportIssue(deskId: string): string | null;
|
|
21
|
+
export declare function readAnonymousFormDraft(deskId: string): Composition | null;
|
|
22
|
+
export declare function saveSupportIssue(deskId: string, issue: string): void;
|
|
23
|
+
export declare function saveAnonymousFormDraft(deskId: string, composition: Composition): void;
|
|
24
|
+
export declare function removeFormDraft(deskId: string, requesterId: string): void;
|
|
25
|
+
export declare function readFormDraft(deskId: string, requesterId: string): HelpDeskFormDraft | null;
|
|
26
|
+
export declare function saveFormDraft(deskId: string, requesterId: string, value: HelpDeskFormDraft): void;
|
|
27
|
+
export {};
|
|
@@ -27,6 +27,8 @@ export interface HelpDeskFormOptions {
|
|
|
27
27
|
body?: string;
|
|
28
28
|
/** Show the default file picker when the desk permits customer uploads. Defaults to true. */
|
|
29
29
|
attachments?: boolean;
|
|
30
|
+
/** Keep this tab's verified requester's draft for 30 minutes, including uncertain-send recovery. Defaults to false. */
|
|
31
|
+
persist?: boolean;
|
|
30
32
|
/** @internal The support controller owns account transitions and native Identity. */
|
|
31
33
|
widgetIdentity?: HelpDeskWidgetFormIdentity;
|
|
32
34
|
/** @internal Server-minted, content-free assistance correlation. */
|
|
@@ -40,6 +42,8 @@ export interface HelpDeskFormOptions {
|
|
|
40
42
|
* Return null to use the desk's existing verification or hosted sign-in.
|
|
41
43
|
*/
|
|
42
44
|
onAuthRequired?: () => HelpDeskSession | null | Promise<HelpDeskSession | null>;
|
|
45
|
+
/** Called after this form installs a verified customer session. Callback failures never affect a send. */
|
|
46
|
+
onSession?: (session: HelpDeskSession) => void;
|
|
43
47
|
/** Called only after the service confirms the ticket. Callback errors never retry it. */
|
|
44
48
|
onSuccess?: (ticket: HelpDeskTicketCreated) => void;
|
|
45
49
|
/** Called after a failed request; uncertain sends retain a read-only exact snapshot for recovery. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HelpDeskConnectOptions, HelpDeskTicketCreated } from './types';
|
|
1
|
+
import type { HelpDeskConnectOptions, HelpDeskSession, HelpDeskTicketCreated } from './types';
|
|
2
2
|
export type HelpDeskSupportStage = 'issue' | 'results' | 'article' | 'feedback' | 'contact' | 'receipt';
|
|
3
3
|
export interface HelpDeskSupportLauncherOptions {
|
|
4
4
|
/** HTTPS image URL. Omit to use the accessible question-mark icon. */
|
|
@@ -8,8 +8,19 @@ export interface HelpDeskSupportLauncherOptions {
|
|
|
8
8
|
right?: number;
|
|
9
9
|
bottom?: number;
|
|
10
10
|
}
|
|
11
|
-
/** One
|
|
11
|
+
/** One support journey for a website or a hosted help desk page. */
|
|
12
12
|
export interface HelpDeskSupportOptions extends HelpDeskConnectOptions {
|
|
13
|
+
/** Render the same support journey in this page element. Omit for the floating widget. */
|
|
14
|
+
target?: string | HTMLElement;
|
|
15
|
+
/** Keep recoverable composition in this browser tab through navigation and reload. Defaults to false. */
|
|
16
|
+
persist?: boolean;
|
|
17
|
+
/** Observe the customer session the journey proves or clears. */
|
|
18
|
+
onSession?: (session: HelpDeskSession | null) => void;
|
|
19
|
+
/** Share an access grant with the enclosing customer portal after the common gate succeeds. */
|
|
20
|
+
onTicketAccess?: (grant: {
|
|
21
|
+
token: string;
|
|
22
|
+
ttl_seconds: number;
|
|
23
|
+
}) => void;
|
|
13
24
|
/** Show a floating button immediately. Defaults to false. */
|
|
14
25
|
launcher?: boolean | HelpDeskSupportLauncherOptions;
|
|
15
26
|
attachments?: boolean;
|
|
@@ -57,6 +57,7 @@ export interface SupportViewActions {
|
|
|
57
57
|
*/
|
|
58
58
|
export declare class SupportView {
|
|
59
59
|
private readonly actions;
|
|
60
|
+
private readonly target?;
|
|
60
61
|
readonly contactTarget: HTMLDivElement;
|
|
61
62
|
readonly panel: HTMLElement;
|
|
62
63
|
private readonly prefix;
|
|
@@ -109,7 +110,7 @@ export declare class SupportView {
|
|
|
109
110
|
private ticketGateSignature;
|
|
110
111
|
private readonly toastCleanups;
|
|
111
112
|
private destroyed;
|
|
112
|
-
constructor(actions: SupportViewActions);
|
|
113
|
+
constructor(actions: SupportViewActions, target?: HTMLElement | undefined);
|
|
113
114
|
render(next: SupportViewState): void;
|
|
114
115
|
/** Programmatic close invalidates Forward restoration even after neutral Back. */
|
|
115
116
|
deactivateHistory(): void;
|