@deepdesk/deepdesk-sdk 19.1.2-beta.0 → 19.1.2-beta.2

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
@@ -1,9 +1,9 @@
1
1
  import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
- import { Middleware, Tuple } from '@reduxjs/toolkit';
5
3
  import * as redux from 'redux';
6
4
  import { Unsubscribe } from 'redux';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import { Middleware, Tuple } from '@reduxjs/toolkit';
7
7
 
8
8
  declare const styles$s: {
9
9
  readonly "content": string;
@@ -406,10 +406,13 @@ declare enum FetchState {
406
406
  ERROR = "error"
407
407
  }
408
408
 
409
+ type CallToAction = Server.CallToAction;
409
410
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
410
411
  isLoading?: boolean;
411
412
  editable?: boolean;
412
413
  evaluationId: string;
414
+ message?: string;
415
+ callToActions?: CallToAction[];
413
416
  };
414
417
 
415
418
  type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
@@ -674,6 +677,11 @@ declare namespace Server {
674
677
  event: string;
675
678
  value?: string;
676
679
  }
680
+ interface EvaluationCallToAction {
681
+ button_text: string;
682
+ event_name: string;
683
+ payload?: string;
684
+ }
677
685
  interface LegacyCue {
678
686
  text: string;
679
687
  title: string;
@@ -696,8 +704,10 @@ declare namespace Server {
696
704
  code: string;
697
705
  name: string;
698
706
  response: string;
707
+ message?: string;
699
708
  editable?: boolean;
700
- call_to_action?: CallToAction;
709
+ call_to_action?: CallToAction | EvaluationCallToAction;
710
+ call_to_actions?: EvaluationCallToAction[];
701
711
  sources?: {
702
712
  name: string;
703
713
  url: string;
@@ -1388,6 +1398,7 @@ declare const reducers: redux.Reducer<{
1388
1398
  insertLink: boolean;
1389
1399
  addToPersonalCollection: boolean;
1390
1400
  inlineSuggestions: boolean;
1401
+ autoSelectSuggestion: boolean;
1391
1402
  suggestionsPlacement: "inline" | "above" | "below";
1392
1403
  floatingMenu: boolean;
1393
1404
  detectSubmit: boolean;
@@ -1451,6 +1462,7 @@ declare const reducers: redux.Reducer<{
1451
1462
  insertLink: boolean;
1452
1463
  addToPersonalCollection: boolean;
1453
1464
  inlineSuggestions: boolean;
1465
+ autoSelectSuggestion: boolean;
1454
1466
  suggestionsPlacement: "inline" | "above" | "below";
1455
1467
  floatingMenu: boolean;
1456
1468
  detectSubmit: boolean;
@@ -1515,6 +1527,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1515
1527
  insertLink: boolean;
1516
1528
  addToPersonalCollection: boolean;
1517
1529
  inlineSuggestions: boolean;
1530
+ autoSelectSuggestion: boolean;
1518
1531
  suggestionsPlacement: "inline" | "above" | "below";
1519
1532
  floatingMenu: boolean;
1520
1533
  detectSubmit: boolean;
@@ -1882,6 +1895,32 @@ interface Channel {
1882
1895
  close(): void;
1883
1896
  }
1884
1897
 
1898
+ type WebsocketOptions = {
1899
+ url: string;
1900
+ maxReconnectAttempts?: number;
1901
+ reconnectInterval?: number;
1902
+ shouldReconnect(): Promise<boolean>;
1903
+ };
1904
+ type EventCallback<T = any> = (data: T) => void;
1905
+ declare class WebsocketClient {
1906
+ options: WebsocketOptions;
1907
+ private socket;
1908
+ private eventListeners;
1909
+ private url;
1910
+ private maxReconnectAttempts;
1911
+ private reconnectInterval;
1912
+ private shouldReconnect;
1913
+ private cleanupCallbacks;
1914
+ constructor(options: WebsocketOptions);
1915
+ connect(): void;
1916
+ private setupListeners;
1917
+ private reconnect;
1918
+ send(event: string, data: any): void;
1919
+ on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
1920
+ close(): void;
1921
+ cleanup(): void;
1922
+ }
1923
+
1885
1924
  type State = {
1886
1925
  locale: Locale;
1887
1926
  deanonymize: boolean;
@@ -1906,6 +1945,7 @@ type State = {
1906
1945
  insertLink: boolean;
1907
1946
  addToPersonalCollection: boolean;
1908
1947
  inlineSuggestions: boolean;
1948
+ autoSelectSuggestion: boolean;
1909
1949
  suggestionsPlacement: 'inline' | 'above' | 'below';
1910
1950
  floatingMenu: boolean;
1911
1951
  detectSubmit: boolean;
@@ -1919,32 +1959,6 @@ type State = {
1919
1959
  type Settings = State;
1920
1960
  declare const set: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<State>, "settings/set">;
1921
1961
 
1922
- type WebsocketOptions = {
1923
- url: string;
1924
- maxReconnectAttempts?: number;
1925
- reconnectInterval?: number;
1926
- shouldReconnect(): Promise<boolean>;
1927
- };
1928
- type EventCallback<T = any> = (data: T) => void;
1929
- declare class WebsocketClient {
1930
- options: WebsocketOptions;
1931
- private socket;
1932
- private eventListeners;
1933
- private url;
1934
- private maxReconnectAttempts;
1935
- private reconnectInterval;
1936
- private shouldReconnect;
1937
- private cleanupCallbacks;
1938
- constructor(options: WebsocketOptions);
1939
- connect(): void;
1940
- private setupListeners;
1941
- private reconnect;
1942
- send(event: string, data: any): void;
1943
- on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
1944
- close(): void;
1945
- cleanup(): void;
1946
- }
1947
-
1948
1962
  declare global {
1949
1963
  interface Window {
1950
1964
  clipboardData: any;
@@ -2130,6 +2144,7 @@ declare class DeepdeskSDK {
2130
2144
  insertLink: boolean;
2131
2145
  addToPersonalCollection: boolean;
2132
2146
  inlineSuggestions: boolean;
2147
+ autoSelectSuggestion: boolean;
2133
2148
  suggestionsPlacement: "inline" | "above" | "below";
2134
2149
  floatingMenu: boolean;
2135
2150
  detectSubmit: boolean;
@@ -2176,6 +2191,7 @@ declare class DeepdeskSDK {
2176
2191
  insertLink: boolean;
2177
2192
  addToPersonalCollection: boolean;
2178
2193
  inlineSuggestions: boolean;
2194
+ autoSelectSuggestion: boolean;
2179
2195
  suggestionsPlacement: "inline" | "above" | "below";
2180
2196
  floatingMenu: boolean;
2181
2197
  detectSubmit: boolean;
@@ -2573,6 +2589,7 @@ declare class DeepdeskSDK {
2573
2589
  * @param settings.adminUrl: Admin URL (default: deepdeskUrl provided by DeepdeskSDK constructor)
2574
2590
  * @param settings.productName: Product name (default: 'Deepdesk')
2575
2591
  * @param settings.hasKeyboardInput: Whether keyboard input is enabled (default: true)
2592
+ * @param settings.autoSelectSuggestion: Automatically select the first text suggestion when suggestions arrive (default: false). When enabled, Space and Enter will not commit suggestions (use Tab instead), similar to inline suggestions.
2576
2593
  *
2577
2594
  * @example
2578
2595
  * ```typescript
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
- import { Middleware, Tuple } from '@reduxjs/toolkit';
5
3
  import * as redux from 'redux';
6
4
  import { Unsubscribe } from 'redux';
5
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
6
+ import { Middleware, Tuple } from '@reduxjs/toolkit';
7
7
 
8
8
  declare const styles$s: {
9
9
  readonly "content": string;
@@ -406,10 +406,13 @@ declare enum FetchState {
406
406
  ERROR = "error"
407
407
  }
408
408
 
409
+ type CallToAction = Server.CallToAction;
409
410
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
410
411
  isLoading?: boolean;
411
412
  editable?: boolean;
412
413
  evaluationId: string;
414
+ message?: string;
415
+ callToActions?: CallToAction[];
413
416
  };
414
417
 
415
418
  type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
@@ -674,6 +677,11 @@ declare namespace Server {
674
677
  event: string;
675
678
  value?: string;
676
679
  }
680
+ interface EvaluationCallToAction {
681
+ button_text: string;
682
+ event_name: string;
683
+ payload?: string;
684
+ }
677
685
  interface LegacyCue {
678
686
  text: string;
679
687
  title: string;
@@ -696,8 +704,10 @@ declare namespace Server {
696
704
  code: string;
697
705
  name: string;
698
706
  response: string;
707
+ message?: string;
699
708
  editable?: boolean;
700
- call_to_action?: CallToAction;
709
+ call_to_action?: CallToAction | EvaluationCallToAction;
710
+ call_to_actions?: EvaluationCallToAction[];
701
711
  sources?: {
702
712
  name: string;
703
713
  url: string;
@@ -1388,6 +1398,7 @@ declare const reducers: redux.Reducer<{
1388
1398
  insertLink: boolean;
1389
1399
  addToPersonalCollection: boolean;
1390
1400
  inlineSuggestions: boolean;
1401
+ autoSelectSuggestion: boolean;
1391
1402
  suggestionsPlacement: "inline" | "above" | "below";
1392
1403
  floatingMenu: boolean;
1393
1404
  detectSubmit: boolean;
@@ -1451,6 +1462,7 @@ declare const reducers: redux.Reducer<{
1451
1462
  insertLink: boolean;
1452
1463
  addToPersonalCollection: boolean;
1453
1464
  inlineSuggestions: boolean;
1465
+ autoSelectSuggestion: boolean;
1454
1466
  suggestionsPlacement: "inline" | "above" | "below";
1455
1467
  floatingMenu: boolean;
1456
1468
  detectSubmit: boolean;
@@ -1515,6 +1527,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1515
1527
  insertLink: boolean;
1516
1528
  addToPersonalCollection: boolean;
1517
1529
  inlineSuggestions: boolean;
1530
+ autoSelectSuggestion: boolean;
1518
1531
  suggestionsPlacement: "inline" | "above" | "below";
1519
1532
  floatingMenu: boolean;
1520
1533
  detectSubmit: boolean;
@@ -1882,6 +1895,32 @@ interface Channel {
1882
1895
  close(): void;
1883
1896
  }
1884
1897
 
1898
+ type WebsocketOptions = {
1899
+ url: string;
1900
+ maxReconnectAttempts?: number;
1901
+ reconnectInterval?: number;
1902
+ shouldReconnect(): Promise<boolean>;
1903
+ };
1904
+ type EventCallback<T = any> = (data: T) => void;
1905
+ declare class WebsocketClient {
1906
+ options: WebsocketOptions;
1907
+ private socket;
1908
+ private eventListeners;
1909
+ private url;
1910
+ private maxReconnectAttempts;
1911
+ private reconnectInterval;
1912
+ private shouldReconnect;
1913
+ private cleanupCallbacks;
1914
+ constructor(options: WebsocketOptions);
1915
+ connect(): void;
1916
+ private setupListeners;
1917
+ private reconnect;
1918
+ send(event: string, data: any): void;
1919
+ on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
1920
+ close(): void;
1921
+ cleanup(): void;
1922
+ }
1923
+
1885
1924
  type State = {
1886
1925
  locale: Locale;
1887
1926
  deanonymize: boolean;
@@ -1906,6 +1945,7 @@ type State = {
1906
1945
  insertLink: boolean;
1907
1946
  addToPersonalCollection: boolean;
1908
1947
  inlineSuggestions: boolean;
1948
+ autoSelectSuggestion: boolean;
1909
1949
  suggestionsPlacement: 'inline' | 'above' | 'below';
1910
1950
  floatingMenu: boolean;
1911
1951
  detectSubmit: boolean;
@@ -1919,32 +1959,6 @@ type State = {
1919
1959
  type Settings = State;
1920
1960
  declare const set: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<State>, "settings/set">;
1921
1961
 
1922
- type WebsocketOptions = {
1923
- url: string;
1924
- maxReconnectAttempts?: number;
1925
- reconnectInterval?: number;
1926
- shouldReconnect(): Promise<boolean>;
1927
- };
1928
- type EventCallback<T = any> = (data: T) => void;
1929
- declare class WebsocketClient {
1930
- options: WebsocketOptions;
1931
- private socket;
1932
- private eventListeners;
1933
- private url;
1934
- private maxReconnectAttempts;
1935
- private reconnectInterval;
1936
- private shouldReconnect;
1937
- private cleanupCallbacks;
1938
- constructor(options: WebsocketOptions);
1939
- connect(): void;
1940
- private setupListeners;
1941
- private reconnect;
1942
- send(event: string, data: any): void;
1943
- on<T = unknown>(eventType: string, callback: EventCallback<T>): void;
1944
- close(): void;
1945
- cleanup(): void;
1946
- }
1947
-
1948
1962
  declare global {
1949
1963
  interface Window {
1950
1964
  clipboardData: any;
@@ -2130,6 +2144,7 @@ declare class DeepdeskSDK {
2130
2144
  insertLink: boolean;
2131
2145
  addToPersonalCollection: boolean;
2132
2146
  inlineSuggestions: boolean;
2147
+ autoSelectSuggestion: boolean;
2133
2148
  suggestionsPlacement: "inline" | "above" | "below";
2134
2149
  floatingMenu: boolean;
2135
2150
  detectSubmit: boolean;
@@ -2176,6 +2191,7 @@ declare class DeepdeskSDK {
2176
2191
  insertLink: boolean;
2177
2192
  addToPersonalCollection: boolean;
2178
2193
  inlineSuggestions: boolean;
2194
+ autoSelectSuggestion: boolean;
2179
2195
  suggestionsPlacement: "inline" | "above" | "below";
2180
2196
  floatingMenu: boolean;
2181
2197
  detectSubmit: boolean;
@@ -2573,6 +2589,7 @@ declare class DeepdeskSDK {
2573
2589
  * @param settings.adminUrl: Admin URL (default: deepdeskUrl provided by DeepdeskSDK constructor)
2574
2590
  * @param settings.productName: Product name (default: 'Deepdesk')
2575
2591
  * @param settings.hasKeyboardInput: Whether keyboard input is enabled (default: true)
2592
+ * @param settings.autoSelectSuggestion: Automatically select the first text suggestion when suggestions arrive (default: false). When enabled, Space and Enter will not commit suggestions (use Tab instead), similar to inline suggestions.
2576
2593
  *
2577
2594
  * @example
2578
2595
  * ```typescript