@sparkvault/sdk-js 15.13.0 → 15.14.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.
package/dist/index.d.ts CHANGED
@@ -3721,7 +3721,10 @@ declare class HelpDeskClient {
3721
3721
  unlockTicketAccess(options: {
3722
3722
  password?: string;
3723
3723
  identityGrant?: string;
3724
- }): Promise<void>;
3724
+ }): Promise<{
3725
+ token: string;
3726
+ ttl_seconds: number;
3727
+ }>;
3725
3728
  /** @internal Read an installed server-proven company bearer without invoking any identity provider. */
3726
3729
  verifiedSessionTokenFor(requesterId: string): string | null;
3727
3730
  getSessionToken(): Promise<string | null>;
@@ -3829,6 +3832,8 @@ interface HelpDeskFormOptions {
3829
3832
  body?: string;
3830
3833
  /** Show the default file picker when the desk permits customer uploads. Defaults to true. */
3831
3834
  attachments?: boolean;
3835
+ /** Keep this tab's verified requester's draft for 30 minutes, including uncertain-send recovery. Defaults to false. */
3836
+ persist?: boolean;
3832
3837
  /** @internal The support controller owns account transitions and native Identity. */
3833
3838
  widgetIdentity?: HelpDeskWidgetFormIdentity;
3834
3839
  /** @internal Server-minted, content-free assistance correlation. */
@@ -3842,6 +3847,8 @@ interface HelpDeskFormOptions {
3842
3847
  * Return null to use the desk's existing verification or hosted sign-in.
3843
3848
  */
3844
3849
  onAuthRequired?: () => HelpDeskSession | null | Promise<HelpDeskSession | null>;
3850
+ /** Called after this form installs a verified customer session. Callback failures never affect a send. */
3851
+ onSession?: (session: HelpDeskSession) => void;
3845
3852
  /** Called only after the service confirms the ticket. Callback errors never retry it. */
3846
3853
  onSuccess?: (ticket: HelpDeskTicketCreated) => void;
3847
3854
  /** Called after a failed request; uncertain sends retain a read-only exact snapshot for recovery. */
@@ -3867,8 +3874,19 @@ interface HelpDeskSupportLauncherOptions {
3867
3874
  right?: number;
3868
3875
  bottom?: number;
3869
3876
  }
3870
- /** One persistent, memory-only support session for a website. */
3877
+ /** One support journey for a website or a hosted help desk page. */
3871
3878
  interface HelpDeskSupportOptions extends HelpDeskConnectOptions {
3879
+ /** Render the same support journey in this page element. Omit for the floating widget. */
3880
+ target?: string | HTMLElement;
3881
+ /** Keep recoverable composition in this browser tab through navigation and reload. Defaults to false. */
3882
+ persist?: boolean;
3883
+ /** Observe the customer session the journey proves or clears. */
3884
+ onSession?: (session: HelpDeskSession | null) => void;
3885
+ /** Share an access grant with the enclosing customer portal after the common gate succeeds. */
3886
+ onTicketAccess?: (grant: {
3887
+ token: string;
3888
+ ttl_seconds: number;
3889
+ }) => void;
3872
3890
  /** Show a floating button immediately. Defaults to false. */
3873
3891
  launcher?: boolean | HelpDeskSupportLauncherOptions;
3874
3892
  attachments?: boolean;