@sparkvault/sdk-js 18.0.5 → 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 +20 -6
- package/dist/index.cjs +136 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.mjs +136 -26
- package/dist/index.mjs.map +1 -1
- 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
|
@@ -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;
|