@sparkvault/sdk-js 18.0.4 → 18.0.6
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 -7
- package/dist/index.cjs +729 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.mjs +729 -148
- package/dist/index.mjs.map +1 -1
- package/dist/products/help-desk/form.d.ts +4 -4
- package/dist/products/help-desk/index.d.ts +2 -1
- package/dist/products/help-desk/kb-client.d.ts +2 -0
- package/dist/products/help-desk/types.d.ts +9 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@ export interface HelpDeskFormController extends HelpDeskFormHandle {
|
|
|
57
57
|
*/
|
|
58
58
|
focusEntry(focusOptions?: FocusOptions): boolean;
|
|
59
59
|
}
|
|
60
|
+
export declare const HELP_DESK_FORM_TITLE = "Open a Support Ticket";
|
|
60
61
|
/**
|
|
61
62
|
* A ticket's body: the details the customer wrote, or, when they wrote none,
|
|
62
63
|
* the summary, since every ticket carries a message. The one place the two
|
|
@@ -75,9 +76,8 @@ export declare function ticketBody(summary: string, details: string): string;
|
|
|
75
76
|
* A confirmed send replaces the form with its confirmation.
|
|
76
77
|
*
|
|
77
78
|
* The request is a summary and optional details, in a composer that also
|
|
78
|
-
* takes files. A signed-out widget customer writes it
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* beside the request.
|
|
79
|
+
* takes files. A signed-out widget customer writes it before continuing to
|
|
80
|
+
* sign-in, where one button opens the native sign-in window and sends it. A
|
|
81
|
+
* signed-in customer can switch account or sign out beside the request.
|
|
82
82
|
*/
|
|
83
83
|
export declare function mountHelpDeskForm(client: HelpDeskClient, options: HelpDeskFormOptions): HelpDeskFormController;
|
|
@@ -21,7 +21,8 @@ export declare class HelpDeskModule {
|
|
|
21
21
|
/**
|
|
22
22
|
* Inject a ticket form, including email-code verification where the desk
|
|
23
23
|
* enables it. A custom onAuthRequired callback may supply a server-issued
|
|
24
|
-
* help desk session.
|
|
24
|
+
* help desk session. OAuth desks open their hosted portal for sign-in unless
|
|
25
|
+
* a desk session is already installed. Destroy on unmount/account change.
|
|
25
26
|
*/
|
|
26
27
|
mountForm(options: HelpDeskMountFormOptions): Promise<HelpDeskFormHandle>;
|
|
27
28
|
/** Inject a form over an already-connected client that the host also drives headlessly. */
|
|
@@ -37,6 +37,8 @@ export declare class HelpDeskKnowledgeBaseClient {
|
|
|
37
37
|
vote(article: KbReaderDocument, vote: 'yes' | 'no'): Promise<KbArticleVote>;
|
|
38
38
|
private saveVote;
|
|
39
39
|
read(result: KbSearchResult): Promise<KbReaderDocument>;
|
|
40
|
+
/** Record only a displayed reader document; access is checked again by the event endpoint. */
|
|
41
|
+
view(document: KbReaderDocument): Promise<void>;
|
|
40
42
|
/** Paint article text first; hydrate only approved media without replacing the reader DOM. */
|
|
41
43
|
hydrateAssets(document: KbReaderDocument, callbacks: KbMediaHydration): () => void;
|
|
42
44
|
private readAsset;
|
|
@@ -20,6 +20,13 @@ export interface HelpDeskExternalIdentity {
|
|
|
20
20
|
sign_in_url?: string | null;
|
|
21
21
|
guest_email?: boolean;
|
|
22
22
|
}
|
|
23
|
+
/** OAuth endpoints and credentials are configured server-side, never by the host page. */
|
|
24
|
+
export interface HelpDeskOAuthIdentity {
|
|
25
|
+
issuer: string;
|
|
26
|
+
session_ttl_seconds: number;
|
|
27
|
+
/** Independently verified email customers can also sign in at this desk. */
|
|
28
|
+
guest_email?: boolean;
|
|
29
|
+
}
|
|
23
30
|
export interface HelpDeskConnectOptions {
|
|
24
31
|
/** The configured help desk hostname, for example support.example.com. */
|
|
25
32
|
host: string;
|
|
@@ -77,8 +84,9 @@ export interface HelpDeskDesk {
|
|
|
77
84
|
logo_dark_url: string | null;
|
|
78
85
|
icon_url?: string | null;
|
|
79
86
|
};
|
|
80
|
-
auth_mode: 'email_pin' | 'external_sso' | 'external_unavailable';
|
|
87
|
+
auth_mode: 'email_pin' | 'external_sso' | 'external_unavailable' | 'oauth2';
|
|
81
88
|
external_identity?: HelpDeskExternalIdentity | null;
|
|
89
|
+
oauth_identity?: HelpDeskOAuthIdentity | null;
|
|
82
90
|
customer_can_mark_resolved: boolean;
|
|
83
91
|
/** Optional plain-text note shown only after a request is confirmed sent. */
|
|
84
92
|
ticket_confirmation_message?: string | null;
|