@sparkvault/sdk-js 15.2.0 → 15.3.0

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.
@@ -1,5 +1,6 @@
1
1
  import type { ResolvedConfig } from '../../config';
2
2
  import type { ResumeUploadOptions, SendUploadOptions, UploadSession } from '../../ingots/types';
3
+ import { type HelpDeskWidgetIdentityOptions, type HelpDeskWidgetIdentitySession } from './widget-identity';
3
4
  import type { HelpDeskAttachmentDownload, HelpDeskAttachmentInput, HelpDeskAttachmentUpload, HelpDeskConnectOptions, HelpDeskCreateTicketOptions, HelpDeskCustomer, HelpDeskCustomerPatch, HelpDeskDesk, HelpDeskDraft, HelpDeskListTicketsOptions, HelpDeskPinChallenge, HelpDeskReplyCreated, HelpDeskReplyOptions, HelpDeskRequestContext, HelpDeskSession, HelpDeskSessionChange, HelpDeskTicketCreated, HelpDeskTicketDetail, HelpDeskTicketList, HelpDeskTimeline, HelpDeskVerifyPinOptions, HelpDeskExternalChallenge } from './types';
4
5
  /**
5
6
  * One desk's customer client. Sessions stay in memory unless a host supplies a
@@ -26,6 +27,9 @@ export declare class HelpDeskClient {
26
27
  private deadline;
27
28
  private token;
28
29
  private revision;
30
+ private websiteAccountSuppressed;
31
+ private ticketAccess;
32
+ private currentTicketPolicy;
29
33
  private constructor();
30
34
  /** Discover a desk by its configured host, before any customer credentials are sent. */
31
35
  static connect(config: ResolvedConfig, options: HelpDeskConnectOptions): Promise<HelpDeskClient>;
@@ -49,6 +53,16 @@ export declare class HelpDeskClient {
49
53
  refreshSession(): Promise<string | null>;
50
54
  /** Whether company identity can be established without customer interaction. */
51
55
  get hasIdentityProvider(): boolean;
56
+ /** The independent ticket gate must be met before rendering authenticated ticket UI. */
57
+ get hasTicketAccess(): boolean;
58
+ clearTicketAccess(): void;
59
+ get ticketAccessPolicy(): HelpDeskDesk['ticket_access_control'];
60
+ /** Refresh network/policy hints without replacing requester state or composition. */
61
+ refreshTicketAccessPolicy(): Promise<void>;
62
+ unlockTicketAccess(options: {
63
+ password?: string;
64
+ identityGrant?: string;
65
+ }): Promise<void>;
52
66
  /** @internal Read an installed server-proven company bearer without invoking any identity provider. */
53
67
  verifiedSessionTokenFor(requesterId: string): string | null;
54
68
  getSessionToken(): Promise<string | null>;
@@ -92,6 +106,12 @@ export declare class HelpDeskClient {
92
106
  completeIdentity(options: {
93
107
  token: string;
94
108
  }): Promise<HelpDeskSession>;
109
+ /** Uninstalled result: the owning form/controller decides when the new requester becomes current. */
110
+ signInWidgetIdentity(options?: HelpDeskWidgetIdentityOptions): Promise<HelpDeskWidgetIdentitySession>;
111
+ /** Choose a different support identity without logging out or changing the host website. */
112
+ switchSupportAccount(): Promise<void>;
113
+ /** The only operation that resumes the website's configured identity provider after an explicit switch. */
114
+ useWebsiteAccount(): Promise<HelpDeskSession | null>;
95
115
  getMe(): Promise<HelpDeskCustomer>;
96
116
  updateMe(patch: HelpDeskCustomerPatch, context?: HelpDeskRequestContext): Promise<HelpDeskCustomer>;
97
117
  createDraft(context?: HelpDeskRequestContext): Promise<HelpDeskDraft>;
@@ -1,4 +1,21 @@
1
- import type { HelpDeskSession, HelpDeskTicketCreated } from './types';
1
+ import type { HelpDeskCustomer, HelpDeskSession, HelpDeskTicketCreated } from './types';
2
+ /** Internal adapter used by the KB-first widget; legacy forms retain their existing verification flow. */
3
+ export interface HelpDeskWidgetFormIdentity {
4
+ customer: HelpDeskCustomer | null;
5
+ signIn(input: {
6
+ email: string;
7
+ givenName: string;
8
+ familyName: string;
9
+ }): Promise<HelpDeskSession>;
10
+ switchAccount(composition: {
11
+ subject: string;
12
+ body: string;
13
+ } | null): void;
14
+ useWebsiteAccount?: (composition: {
15
+ subject: string;
16
+ body: string;
17
+ } | null) => void;
18
+ }
2
19
  /** The injected form's state; uncertain sends keep an exact snapshot until recovered. */
3
20
  export type HelpDeskFormState = 'authenticating' | 'editing' | 'verifying' | 'submitting' | 'uncertain' | 'success' | 'destroyed';
4
21
  export interface HelpDeskFormOptions {
@@ -10,6 +27,13 @@ export interface HelpDeskFormOptions {
10
27
  body?: string;
11
28
  /** Show the default file picker when the desk permits customer uploads. Defaults to true. */
12
29
  attachments?: boolean;
30
+ /** @internal The support controller owns account transitions and native Identity. */
31
+ widgetIdentity?: HelpDeskWidgetFormIdentity;
32
+ /** @internal Server-minted, content-free assistance correlation. */
33
+ assistanceContext?: () => {
34
+ assistance_attempt_id: string;
35
+ assistance_visitor_id: string;
36
+ } | undefined;
13
37
  /**
14
38
  * Ask host code for a server-issued help desk session. This callback must
15
39
  * not construct a session from a browser-supplied user ID or email address.
@@ -12,6 +12,13 @@ export interface HelpDeskFormController extends HelpDeskFormHandle {
12
12
  * editing.
13
13
  */
14
14
  requestDismiss(): void;
15
+ /** Only unsent, idle text may move to a freshly authorized support composition. */
16
+ getComposition(): {
17
+ subject: string;
18
+ body: string;
19
+ } | null;
20
+ /** Clear a resolved access-gate error without changing a draft or uncertain send. */
21
+ resumeAfterAccess(): void;
15
22
  }
16
23
  /**
17
24
  * Inject a ticket form using only the requester's customer API. Authentication
@@ -3,6 +3,7 @@ import type { ResolvedConfig } from '../../config';
3
3
  import { HelpDeskClient } from './client';
4
4
  import type { HelpDeskConnectOptions } from './types';
5
5
  import type { HelpDeskFormHandle, HelpDeskFormOptions } from './form-types';
6
+ import type { HelpDeskSupportHandle, HelpDeskSupportOptions } from './support-types';
6
7
  /** One-call website setup. No browser secrets or identity assertions are configured here. */
7
8
  export type HelpDeskMountFormOptions = HelpDeskConnectOptions & HelpDeskFormOptions;
8
9
  export type HelpDeskOpenFormOptions = HelpDeskConnectOptions & Omit<HelpDeskFormOptions, 'target'>;
@@ -11,6 +12,8 @@ export declare class HelpDeskModule {
11
12
  constructor(config: ResolvedConfig);
12
13
  /** Resolve a configured desk host and obtain its customer-only, headless API. */
13
14
  connect(options: HelpDeskConnectOptions): Promise<HelpDeskClient>;
15
+ /** Create one KB-first support front door, with an optional floating launcher. */
16
+ createSupport(options: HelpDeskSupportOptions): HelpDeskSupportHandle;
14
17
  /**
15
18
  * Inject a ticket form, including email-code verification where the desk
16
19
  * enables it. A custom onAuthRequired callback may supply a server-issued
@@ -29,3 +32,5 @@ export declare class HelpDeskModule {
29
32
  export { HelpDeskClient } from './client';
30
33
  export type * from './types';
31
34
  export type * from './form-types';
35
+ export type * from './support-types';
36
+ export type { HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentitySession } from './widget-identity';
@@ -0,0 +1,37 @@
1
+ import type { ResolvedConfig } from '../../config';
2
+ import type { KbMediaHydration, KbReaderDocument, KbSearchResponse, KbSearchResult, KbUnlockOptions, KbWidgetConfig } from './kb-types';
3
+ export type { KbMediaHydration, KbReaderDocument, KbSearchResponse, KbSearchResult, KbUnlockOptions, KbWidgetConfig } from './kb-types';
4
+ export declare class HelpDeskKnowledgeBaseClient {
5
+ private readonly sdkConfig;
6
+ private readonly deskId;
7
+ private grant;
8
+ private grantDeadline;
9
+ private config;
10
+ private index;
11
+ private indexPending;
12
+ private readonly objectUrls;
13
+ private generation;
14
+ private readerRevision;
15
+ private readerDocument;
16
+ private activeMedia;
17
+ private destroyed;
18
+ private readonly close;
19
+ constructor(sdkConfig: ResolvedConfig, deskId: string);
20
+ getAccessHeaders(): Record<string, string>;
21
+ private request;
22
+ /** Fresh config validates publication and access before a cached index is reused. */
23
+ load(): Promise<KbWidgetConfig>;
24
+ private canonicalOrigin;
25
+ unlock(options: KbUnlockOptions): Promise<KbWidgetConfig>;
26
+ private currentIndex;
27
+ private result;
28
+ search(issue: string): Promise<KbSearchResponse>;
29
+ resolveLink(value: string): Promise<KbSearchResult | null>;
30
+ read(result: KbSearchResult): Promise<KbReaderDocument>;
31
+ /** Paint article text first; hydrate only approved media without replacing the reader DOM. */
32
+ hydrateAssets(document: KbReaderDocument, callbacks: KbMediaHydration): () => void;
33
+ private readAsset;
34
+ private clearContent;
35
+ clearAccess(): void;
36
+ destroy(): void;
37
+ }
@@ -0,0 +1,49 @@
1
+ /** Published knowledge-base data, independent of customer ticket authorization. */
2
+ export interface KbWidgetConfig {
3
+ available: boolean;
4
+ release_id: string | null;
5
+ canonical_origin: string | null;
6
+ search_enabled: boolean;
7
+ access: {
8
+ mode: 'public' | 'password' | 'ip_allowlist' | 'identity';
9
+ company_id?: string;
10
+ };
11
+ authorized: boolean;
12
+ }
13
+ export interface KbSearchResult {
14
+ id: string;
15
+ kind: 'article' | 'faq';
16
+ title: string;
17
+ summary: string;
18
+ category: string;
19
+ path: string;
20
+ canonical_url: string;
21
+ release_id: string;
22
+ }
23
+ export interface KbSearchResponse {
24
+ release_id: string;
25
+ results: KbSearchResult[];
26
+ total: number;
27
+ }
28
+ export interface KbReaderDocument {
29
+ version: 1;
30
+ kind: 'article' | 'faq';
31
+ id: string;
32
+ title: string;
33
+ canonical_url: string;
34
+ release_id: string;
35
+ /** Platform-rendered, sanitized article body; contains no theme shell or scripts. */
36
+ body_html: string;
37
+ /** Release-local image paths, hydrated separately after the readable text is shown. */
38
+ assets: string[];
39
+ }
40
+ export interface KbMediaHydration {
41
+ onAsset: (path: string, blobUrl: string) => void;
42
+ onError?: (path: string, error: unknown) => void;
43
+ }
44
+ export interface KbUnlockOptions {
45
+ password?: string;
46
+ identity_token?: string;
47
+ /** Opaque auth.sv proof, issued through the built-in SDK Identity handoff. */
48
+ identity_grant?: string;
49
+ }
@@ -0,0 +1,31 @@
1
+ /** Privacy-preserving, optional assistance telemetry. No issue text or identity belongs in this contract. */
2
+ export type SupportContactReason = 'no_results' | 'none_match' | 'article_not_answered';
3
+ export type SupportAttemptStart = {
4
+ availability: 'available';
5
+ releaseId: string;
6
+ resultCount: number;
7
+ } | {
8
+ availability: 'unavailable';
9
+ };
10
+ export interface SupportTicketContext {
11
+ assistance_attempt_id: string;
12
+ assistance_visitor_id: string;
13
+ }
14
+ export interface SupportAttempt {
15
+ /** Use the release actually read when a publication changed during this issue. */
16
+ articleOpened(articleId: string, releaseId?: string): void;
17
+ solved(): void;
18
+ /** Omit the reason only when help-center search was unavailable. */
19
+ contactRequested(reason?: SupportContactReason): void;
20
+ /** Passed only to authenticated ticket creation; browsers never report a successful submission. */
21
+ ticketContext(): SupportTicketContext | undefined;
22
+ }
23
+ export interface SupportAnalyticsOptions {
24
+ deskId: string;
25
+ /** The caller supplies the same approved-origin/access-grant transport used by KB reads. */
26
+ post<T>(path: string, body: Record<string, unknown>): Promise<T>;
27
+ }
28
+ export interface SupportAnalytics {
29
+ start(options: SupportAttemptStart): Promise<SupportAttempt | null>;
30
+ dispose(): void;
31
+ }
@@ -0,0 +1,4 @@
1
+ /** Optional telemetry runs behind the journey; failed analytics never interrupts support. */
2
+ import type { SupportAnalytics, SupportAnalyticsOptions, SupportAttempt, SupportAttemptStart, SupportContactReason, SupportTicketContext } from './support-analytics-types';
3
+ export declare function createSupportAnalytics({ deskId, post }: SupportAnalyticsOptions): SupportAnalytics;
4
+ export type { SupportAnalytics, SupportAnalyticsOptions, SupportAttempt, SupportAttemptStart, SupportContactReason, SupportTicketContext };
@@ -0,0 +1,4 @@
1
+ import type { ResolvedConfig } from '../../config';
2
+ import type { HelpDeskSupportHandle, HelpDeskSupportOptions } from './support-types';
3
+ /** One state machine owns launcher, host links, KB suggestions and the ticket front door. */
4
+ export declare function createHelpDeskSupport(config: ResolvedConfig, options: HelpDeskSupportOptions): HelpDeskSupportHandle;
@@ -0,0 +1,38 @@
1
+ export interface SupportPhoneHistoryActions {
2
+ /** A traversal away minimizes neutrally, never answers the article prompt. */
3
+ onBack: () => void;
4
+ /** Forward into the same active support entry resumes the preserved journey. */
5
+ onForward: () => void;
6
+ }
7
+ /**
8
+ * One same-URL entry while phone support is open. No popstate is cancelled or
9
+ * swallowed, and no cleanup ever calls history.back()/go(). Explicit close,
10
+ * resize and disposal replace only a proven owned current entry with its
11
+ * original host state. The inactive entry can be reused while still owned.
12
+ * A harmless same-URL entry is preferable to consuming a host's later route.
13
+ */
14
+ export declare class SupportPhoneHistory {
15
+ private readonly actions;
16
+ private readonly marker;
17
+ private readonly token;
18
+ private baseState;
19
+ private url;
20
+ private activeReference;
21
+ private inactiveReference;
22
+ private hasInactiveEntry;
23
+ private wantsPhone;
24
+ private mobile;
25
+ private active;
26
+ private forwardAllowed;
27
+ private destroyed;
28
+ private unobserve;
29
+ private readonly onHostMutation;
30
+ private readonly onPopState;
31
+ constructor(actions: SupportPhoneHistoryActions);
32
+ sync(visible: boolean, mobile: boolean): void;
33
+ /** Explicit close also invalidates a forward entry after a neutral Back. */
34
+ deactivate(): void;
35
+ destroy(): void;
36
+ private arm;
37
+ private isMarkedEntry;
38
+ }
@@ -0,0 +1,6 @@
1
+ import type { HelpDeskSupportLauncherOptions } from './support-types';
2
+ /** A convenience path only: it never owns a second support flow. */
3
+ export declare function createSupportLauncher(options: HelpDeskSupportLauncherOptions, open: () => void): {
4
+ setExpanded(expanded: boolean): void;
5
+ destroy(): void;
6
+ };
@@ -0,0 +1,2 @@
1
+ /** The support journey's only skin. Customer content stays in the product register. */
2
+ export declare function injectHelpDeskSupportStyles(): void;
@@ -0,0 +1,39 @@
1
+ import type { HelpDeskConnectOptions, HelpDeskTicketCreated } from './types';
2
+ export type HelpDeskSupportStage = 'issue' | 'results' | 'article' | 'feedback' | 'contact' | 'receipt';
3
+ export interface HelpDeskSupportLauncherOptions {
4
+ /** HTTPS image URL. Omit to use the accessible question-mark icon. */
5
+ imageUrl?: string;
6
+ label?: string;
7
+ /** Distance in CSS pixels, in addition to the device safe area. */
8
+ right?: number;
9
+ bottom?: number;
10
+ }
11
+ /** One persistent, memory-only support session for a website. */
12
+ export interface HelpDeskSupportOptions extends HelpDeskConnectOptions {
13
+ /** Show a floating button immediately. Defaults to false. */
14
+ launcher?: boolean | HelpDeskSupportLauncherOptions;
15
+ attachments?: boolean;
16
+ onSuccess?: (ticket: HelpDeskTicketCreated) => void;
17
+ onError?: (error: Error) => void;
18
+ onStateChange?: (state: HelpDeskSupportState) => void;
19
+ }
20
+ export interface HelpDeskSupportOpenOptions {
21
+ /** Prefill the initial question only when starting a new support conversation. */
22
+ issue?: string;
23
+ }
24
+ export interface HelpDeskSupportState {
25
+ visible: boolean;
26
+ stage: HelpDeskSupportStage;
27
+ busy: boolean;
28
+ }
29
+ export interface HelpDeskSupportHandle {
30
+ /** The one entry point used by the launcher and custom support links. */
31
+ open(options?: HelpDeskSupportOpenOptions): Promise<void>;
32
+ /** Minimize while retaining this browser page's unsent composition. */
33
+ close(): void;
34
+ /** Bind existing or subsequently inserted links to this same widget. */
35
+ attach(selector: string): () => void;
36
+ /** Remove the launcher, dialog, authorization, files and all in-memory support state. */
37
+ destroy(): void;
38
+ getState(): HelpDeskSupportState;
39
+ }
@@ -0,0 +1,144 @@
1
+ import type { KbReaderDocument, KbSearchResult } from './kb-types';
2
+ export type SupportViewStage = 'issue' | 'results' | 'article' | 'feedback' | 'contact' | 'receipt';
3
+ export type SupportContactReason = 'direct' | 'no_results' | 'none_match' | 'article_not_answered';
4
+ /** Presentation data only; the support controller owns authentication and writes. */
5
+ export interface SupportViewState {
6
+ visible: boolean;
7
+ deskName: string;
8
+ stage: SupportViewStage;
9
+ issue: string;
10
+ busy?: boolean;
11
+ error?: string;
12
+ results?: KbSearchResult[];
13
+ article?: KbReaderDocument;
14
+ articleUrl?: string;
15
+ identityPending?: boolean;
16
+ navigationLocked?: boolean;
17
+ kbState?: 'ready' | 'empty' | 'unavailable' | 'locked';
18
+ kbAccessMode?: 'password' | 'ip_allowlist' | 'identity';
19
+ ticketAccessMode?: 'password' | 'identity' | 'ip_allowlist';
20
+ ticketAccessRequired?: boolean;
21
+ ticketPortalUrl?: string;
22
+ position?: {
23
+ right?: number;
24
+ bottom?: number;
25
+ };
26
+ receipt?: {
27
+ ticketNumber: string | number;
28
+ ticketUrl?: string;
29
+ email?: string;
30
+ message?: string;
31
+ };
32
+ returnToWebsiteAccount?: boolean;
33
+ }
34
+ export interface SupportViewActions {
35
+ onIssueChange: (value: string) => void;
36
+ onSearch: (value: string) => void;
37
+ onContact: (reason: SupportContactReason) => void;
38
+ onOpenArticle: (id: string) => void;
39
+ onArticleLink?: (url: string) => void;
40
+ onBack: () => void;
41
+ onClose: () => void;
42
+ onAnswered: () => void;
43
+ onRetry?: () => void;
44
+ onUnlock?: (password?: string) => void;
45
+ onUnlockTicketAccess?: (password?: string) => void;
46
+ onUseWebsiteAccount?: () => void;
47
+ onRestart?: () => void;
48
+ onCancelIdentity?: () => void;
49
+ onBrowserBack?: () => void;
50
+ onBrowserForward?: () => void;
51
+ }
52
+ /**
53
+ * The durable support surface. Every screen is kept, including the shared
54
+ * contact form's mount node; navigating, minimizing and stacking Identity do
55
+ * not destroy the caller's unsent composition.
56
+ *
57
+ * Desktop is deliberately nonmodal. Phone uses the SDK's shared ModalShell,
58
+ * so its page lock and keyboard ownership compose with the Identity dialog.
59
+ */
60
+ export declare class SupportView {
61
+ private readonly actions;
62
+ readonly contactTarget: HTMLDivElement;
63
+ readonly panel: HTMLElement;
64
+ private readonly prefix;
65
+ private readonly screens;
66
+ private readonly scrollers;
67
+ private readonly scrollPositions;
68
+ private readonly headings;
69
+ private readonly deskName;
70
+ private readonly back;
71
+ private readonly close;
72
+ private readonly external;
73
+ private readonly issue;
74
+ private readonly find;
75
+ private readonly issueError;
76
+ private readonly query;
77
+ private readonly resultList;
78
+ private readonly resultCopy;
79
+ private readonly resultStatus;
80
+ private readonly resultError;
81
+ private readonly contactResults;
82
+ private readonly articleTitle;
83
+ private readonly articleCategory;
84
+ private readonly articleContent;
85
+ private readonly articleStatus;
86
+ private readonly articleError;
87
+ private readonly articleRetry;
88
+ private readonly articleFooter;
89
+ private readonly accountReturn;
90
+ private readonly contactTitle;
91
+ private readonly contactStatus;
92
+ private readonly contactError;
93
+ private readonly contactRetry;
94
+ private readonly ticketGate;
95
+ private readonly receiptCopy;
96
+ private readonly receiptTicket;
97
+ private readonly receiptMessage;
98
+ private readonly live;
99
+ private readonly identityNotice;
100
+ private readonly restart;
101
+ private readonly media;
102
+ private readonly onMediaChange;
103
+ private readonly onViewportChange;
104
+ private readonly onKeydown;
105
+ private readonly phoneHistory;
106
+ private shell;
107
+ private opener;
108
+ private state;
109
+ private resultSignature;
110
+ private resultStatusSignature;
111
+ private articleSignature;
112
+ private ticketGateSignature;
113
+ private readonly toastCleanups;
114
+ private destroyed;
115
+ constructor(actions: SupportViewActions);
116
+ render(next: SupportViewState): void;
117
+ /** Programmatic close invalidates Forward restoration even after neutral Back. */
118
+ deactivateHistory(): void;
119
+ /** Focus the shared form after its controller has mounted it. */
120
+ focusContact(): void;
121
+ /** Hydrate only the current reader's matching authorized publication assets. */
122
+ setArticleAsset(path: string, blobUrl: string): void;
123
+ setArticleAssetError(path: string): void;
124
+ /** A nonessential confirmation; timers pause while it cannot be read. */
125
+ showToast(message: string): void;
126
+ destroy(): void;
127
+ private screen;
128
+ private footer;
129
+ private search;
130
+ private resizeIssue;
131
+ private renderResults;
132
+ private renderResultStatus;
133
+ private renderArticle;
134
+ private articleLink;
135
+ private renderReceipt;
136
+ private renderTicketGate;
137
+ private syncPresentation;
138
+ private syncViewport;
139
+ private hide;
140
+ private scrollKey;
141
+ private saveScroll;
142
+ private restoreScroll;
143
+ private focusCurrent;
144
+ }
@@ -50,6 +50,14 @@ export interface HelpDeskDesk {
50
50
  } | null;
51
51
  external_identity?: HelpDeskExternalIdentity | null;
52
52
  customer_can_mark_resolved: boolean;
53
+ /** Optional plain-text note shown only after a request is confirmed sent. */
54
+ ticket_confirmation_message?: string | null;
55
+ /** Independent ticket-portal gate, additional to customer authentication. */
56
+ ticket_access_control?: {
57
+ mode: 'public' | 'password' | 'ip_allowlist' | 'identity';
58
+ company_id?: string;
59
+ ip_allowed?: boolean;
60
+ };
53
61
  customer_can_attach_files: boolean;
54
62
  knowledge_base_enabled: boolean;
55
63
  portal_client: string;
@@ -113,6 +121,9 @@ export interface HelpDeskCreateTicketOptions {
113
121
  /** Help desk safe markup, not HTML. */
114
122
  body: string;
115
123
  attachments?: string[];
124
+ /** Optional server-minted support-assistance correlation; never includes the customer's question. */
125
+ assistance_attempt_id?: string;
126
+ assistance_visitor_id?: string;
116
127
  }
117
128
  export interface HelpDeskTicket {
118
129
  number: number;
@@ -0,0 +1,27 @@
1
+ import type { HelpDeskSession } from './types';
2
+ export interface HelpDeskWidgetIdentityOptions {
3
+ email?: string;
4
+ givenName?: string;
5
+ familyName?: string;
6
+ selectAccount?: boolean;
7
+ /** The current employee gate's company. Its own Identity methods and MFA must also complete. */
8
+ employeeCompanyId?: string;
9
+ signal?: AbortSignal;
10
+ }
11
+ export interface HelpDeskWidgetIdentityChallenge {
12
+ challenge_id: string;
13
+ verifier: string;
14
+ state: string;
15
+ sign_in_url: string;
16
+ expires_at: number;
17
+ }
18
+ export interface HelpDeskWidgetIdentitySession extends HelpDeskSession {
19
+ /** An origin-bound, five-minute proof for explicit employee gate exchanges; never a content bearer. */
20
+ identity_grant: {
21
+ token: string;
22
+ expires_at: number;
23
+ ttl_seconds: number;
24
+ };
25
+ }
26
+ /** Open synchronously inside the user's gesture, before preparing the server challenge. */
27
+ export declare function openWidgetIdentity(options: HelpDeskWidgetIdentityOptions, prepare: () => Promise<HelpDeskWidgetIdentityChallenge>, ready: (challenge: HelpDeskWidgetIdentityChallenge) => Promise<boolean>, redeem: (challenge: HelpDeskWidgetIdentityChallenge, code?: string) => Promise<HelpDeskWidgetIdentitySession>): Promise<HelpDeskWidgetIdentitySession>;
@@ -32,6 +32,8 @@ export { NotifyProductModule, NOTIFY_PRESETS, buildNotifyPresetSend } from './no
32
32
  export { HelpDeskModule, HelpDeskClient } from './help-desk';
33
33
  export type * from './help-desk/types';
34
34
  export type * from './help-desk/form-types';
35
+ export type * from './help-desk/support-types';
36
+ export type { HelpDeskWidgetIdentityOptions, HelpDeskWidgetIdentityChallenge, HelpDeskWidgetIdentitySession } from './help-desk/widget-identity';
35
37
  export type { HelpDeskMountFormOptions, HelpDeskOpenFormOptions } from './help-desk';
36
38
  export type { SignInOptions, SignInResult, VerifyOptions, AttachOptions, VerifyResult, TokenClaims, } from './identity';
37
39
  export type { NotifyChannel, NotifyDeliveryMode, NotifyVerificationLevel, NotifyInteraction, NotifyPresetCategory, NotifyCategory, NotifyPresetName, NotifyPresetSendOptions, NotifyPreset, NotifyRecipient, NotifyRecipientRef, NotifySendContent, NotifyIngotRef, NotifySendPolicy, NotifyEscalation, CreateNotifySendOptions, NotifySendResult, NotifyInboxView, NotifyInboxMarkState, NotifyInboxBulkMarkState, NotifyInboxRow, ListNotifyInboxOptions, ListNotifyInboxResponse, MarkNotifyInboxStateOptions, MarkNotifyInboxStateResponse, MarkNotifyInboxAllOptions, MarkNotifyInboxAllResponse, NotifySendStatus, NotifySendStatusRecipient, NotifyRecipientState, NotifySuppressionReason, NotifySendStatusCounts, NotifySendState, NotifySendSummary, ListNotifySendsOptions, ListNotifySendsResponse, NotifyRecallMode, RecallNotifySendOptions, RecallNotifySendResponse, NotifyReceipt, NotifyReportableVerificationLevel, NotifyReceiptEventType, NotifySendReceipt, ListNotifyReceiptsOptions, ListNotifyReceiptsResponse, NotifySendReceiptsResponse, NotifyConfig, NotifyConfigCategory, NotifyConfigDelivery, NotifyConfigDeliveryPatch, NotifyConfigRealtimeFallbackDelay, NotifyConfigReliability, NotifyConfigHistory, NotifyConfigSecurity, NotifyConfigEvents, NotifyConfigEventsRead, NotifyConfigPatch, NotifyConfigOverrides, NotifyConfigResponse, NotifyDestinationKind, NotifyDestinationState, NotifyDestinationSkipReason, NotifyDestinationFailureReason, NotifyDestinationReason, NotifyDestinationTransportReason, NotifyDestinationTestReason, NotifyDestinationTestResult, NotifySendStatusDestination, NotifySendSummaryDestination, NotifyWebhookDestination, NotifyWebhookDestinationRead, NotifySlackDestination, NotifyTeamsDestination, NotifyTeamsDestinationRead, NotifyConfigDestinations, NotifyConfigDestinationsPatch, } from './notify';