@deepdesk/deepdesk-sdk 19.7.1 → 19.7.2-beta.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.mts CHANGED
@@ -2048,16 +2048,23 @@ declare class WebsocketClient {
2048
2048
  private eventListeners;
2049
2049
  private url;
2050
2050
  private maxReconnectAttempts;
2051
+ private readonly initialReconnectAttempts;
2051
2052
  private reconnectInterval;
2052
2053
  private shouldReconnect;
2053
2054
  private cleanupCallbacks;
2055
+ private disposed;
2056
+ private reconnectTimer?;
2054
2057
  constructor(options: WebsocketOptions);
2055
2058
  connect(): void;
2059
+ private attachSocket;
2056
2060
  private setupListeners;
2057
- private reconnect;
2061
+ private tryReconnect;
2058
2062
  send(event: string, data: any): void;
2059
2063
  on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
2060
2064
  close(): void;
2065
+ /** Page navigation prompt (e.g. cancelled "Leave site?") — close only, keep reconnect eligible. */
2066
+ private closeForPageLeave;
2067
+ private stopSocketWithoutReconnect;
2061
2068
  cleanup(): void;
2062
2069
  }
2063
2070
 
@@ -2223,6 +2230,7 @@ declare class DeepdeskSDK {
2223
2230
  private eventListeners;
2224
2231
  private unmountHandlers;
2225
2232
  private disposeHandlers;
2233
+ private disposed;
2226
2234
  private inlineSuggestions;
2227
2235
  private aboveSuggestions;
2228
2236
  private belowSuggestions;
@@ -3873,6 +3881,8 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
3873
3881
  isVisible: boolean;
3874
3882
  }) => void, interval?: number): Cancelable;
3875
3883
 
3884
+ declare function clearWidgetAssistantSessionId(externalConversationId: string | undefined): void;
3885
+
3876
3886
  type LogEvent<T extends keyof SendEventArgumentMap, P extends T = T> = {
3877
3887
  name: T;
3878
3888
  data: SendEventArgumentMap[P]['data'];
@@ -3882,4 +3892,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3882
3892
  type CSSModule = Record<string, string>;
3883
3893
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3884
3894
 
3885
- export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type OpenAdminFeedbackHandler, type PinnedMessage, type PlatformConfig, type ReloadConversationContextOptions, type RootState, Section, SectionList, type SelectionRange, Sources, Suggestion, type SuggestionEventMetrics, SuggestionList, type SuggestionMetrics, TextAreaInput, type TextSuggestion, ToggleButton, type UrlSuggestion, type VisitorInfo, type WidgetCustomStyles, type WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, logEvent, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
3895
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type OpenAdminFeedbackHandler, type PinnedMessage, type PlatformConfig, type ReloadConversationContextOptions, type RootState, Section, SectionList, type SelectionRange, Sources, Suggestion, type SuggestionEventMetrics, SuggestionList, type SuggestionMetrics, TextAreaInput, type TextSuggestion, ToggleButton, type UrlSuggestion, type VisitorInfo, type WidgetCustomStyles, type WidgetOptions, attachFile, authenticateWithKey, clearWidgetAssistantSessionId, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, logEvent, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
package/dist/index.d.ts CHANGED
@@ -2048,16 +2048,23 @@ declare class WebsocketClient {
2048
2048
  private eventListeners;
2049
2049
  private url;
2050
2050
  private maxReconnectAttempts;
2051
+ private readonly initialReconnectAttempts;
2051
2052
  private reconnectInterval;
2052
2053
  private shouldReconnect;
2053
2054
  private cleanupCallbacks;
2055
+ private disposed;
2056
+ private reconnectTimer?;
2054
2057
  constructor(options: WebsocketOptions);
2055
2058
  connect(): void;
2059
+ private attachSocket;
2056
2060
  private setupListeners;
2057
- private reconnect;
2061
+ private tryReconnect;
2058
2062
  send(event: string, data: any): void;
2059
2063
  on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
2060
2064
  close(): void;
2065
+ /** Page navigation prompt (e.g. cancelled "Leave site?") — close only, keep reconnect eligible. */
2066
+ private closeForPageLeave;
2067
+ private stopSocketWithoutReconnect;
2061
2068
  cleanup(): void;
2062
2069
  }
2063
2070
 
@@ -2223,6 +2230,7 @@ declare class DeepdeskSDK {
2223
2230
  private eventListeners;
2224
2231
  private unmountHandlers;
2225
2232
  private disposeHandlers;
2233
+ private disposed;
2226
2234
  private inlineSuggestions;
2227
2235
  private aboveSuggestions;
2228
2236
  private belowSuggestions;
@@ -3873,6 +3881,8 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
3873
3881
  isVisible: boolean;
3874
3882
  }) => void, interval?: number): Cancelable;
3875
3883
 
3884
+ declare function clearWidgetAssistantSessionId(externalConversationId: string | undefined): void;
3885
+
3876
3886
  type LogEvent<T extends keyof SendEventArgumentMap, P extends T = T> = {
3877
3887
  name: T;
3878
3888
  data: SendEventArgumentMap[P]['data'];
@@ -3882,4 +3892,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3882
3892
  type CSSModule = Record<string, string>;
3883
3893
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3884
3894
 
3885
- export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type OpenAdminFeedbackHandler, type PinnedMessage, type PlatformConfig, type ReloadConversationContextOptions, type RootState, Section, SectionList, type SelectionRange, Sources, Suggestion, type SuggestionEventMetrics, SuggestionList, type SuggestionMetrics, TextAreaInput, type TextSuggestion, ToggleButton, type UrlSuggestion, type VisitorInfo, type WidgetCustomStyles, type WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, logEvent, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
3895
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type OpenAdminFeedbackHandler, type PinnedMessage, type PlatformConfig, type ReloadConversationContextOptions, type RootState, Section, SectionList, type SelectionRange, Sources, Suggestion, type SuggestionEventMetrics, SuggestionList, type SuggestionMetrics, TextAreaInput, type TextSuggestion, ToggleButton, type UrlSuggestion, type VisitorInfo, type WidgetCustomStyles, type WidgetOptions, attachFile, authenticateWithKey, clearWidgetAssistantSessionId, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, logEvent, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };