@deepdesk/deepdesk-sdk 18.2.1-beta.9 → 19.0.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
@@ -409,15 +409,13 @@ declare enum FetchState {
409
409
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
410
410
  isLoading?: boolean;
411
411
  editable?: boolean;
412
- specialType?: 'summary';
413
412
  evaluationId: string;
414
413
  };
415
414
 
416
- type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
415
+ type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
417
416
  type ArrayItemType<T> = T extends Array<infer I> ? I : never;
418
- type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
417
+ type Cue = ArrayItemType<EvaluationOutput> & {
419
418
  isLoading?: boolean;
420
- specialType?: 'summary';
421
419
  evaluationId: string;
422
420
  };
423
421
  type AssistantAnswerSource = {
@@ -449,9 +447,7 @@ interface EvaluateInput {
449
447
  transcript?: TranscriptOption;
450
448
  includeMetadata?: boolean;
451
449
  skipState?: boolean;
452
- expectFormat: Server.ResponseFormat;
453
450
  }
454
- type SummaryInput = Omit<EvaluateInput, 'expectFormat'>;
455
451
 
456
452
  type Fetch = typeof window.fetch;
457
453
  type HTTPClientOptions = {
@@ -676,7 +672,6 @@ declare namespace Server {
676
672
  event: string;
677
673
  value?: string;
678
674
  }
679
- type ResponseFormat = 'text' | 'json-object' | 'json-schema:cues' | 'json-schema:knowledge-assist';
680
675
  interface LegacyCue {
681
676
  text: string;
682
677
  title: string;
@@ -690,24 +685,22 @@ declare namespace Server {
690
685
  MAX_RECURSION_LEVEL = "max_recursion_level",
691
686
  NO_ACCESS_TO_ASSISTANT = "no_access_to_assistant"
692
687
  }
693
- type EvaluationResponse<Output extends ResponseFormat> = {
688
+ type EvaluationResponse = {
694
689
  evaluation_id: string;
695
690
  evaluation_status: EvaluationStatus;
696
- output: EvaluationOutput<Output>;
691
+ output: EvaluationOutput;
697
692
  };
698
- type EvaluationOutput<T extends ResponseFormat> = T extends 'text' ? string : T extends 'json-object' ? unknown : T extends 'json-schema:cues' ? Array<{
693
+ type EvaluationOutput = Array<{
699
694
  code: string;
700
695
  name: string;
701
696
  response: string;
702
697
  editable?: boolean;
703
698
  call_to_action?: CallToAction;
704
- }> : T extends 'json-schema:knowledge-assist' ? {
705
- response: string;
706
699
  sources?: {
707
700
  name: string;
708
701
  url: string;
709
702
  }[];
710
- } : never;
703
+ }>;
711
704
  /**
712
705
  * Handling time event data
713
706
  */
@@ -1130,10 +1123,6 @@ declare class DeepdeskAPI {
1130
1123
  * Search
1131
1124
  */
1132
1125
  search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
1133
- knowledgeAssist(request: CamelCaseKeys<Server.KnowledgeRequest>, chatHistory: Server.KnowledgeResponse[], assistantCode: string, meta?: {
1134
- agentId?: string;
1135
- conversationId?: string;
1136
- }): Promise<CamelCaseKeys<Server.KnowledgeResponse['answer']>>;
1137
1126
  requestLoginByEmail(email: string): Promise<{
1138
1127
  code: string;
1139
1128
  message: string;
@@ -1143,8 +1132,7 @@ declare class DeepdeskAPI {
1143
1132
  verifyLoginToken(token: string): Promise<{
1144
1133
  isLoggedIn: boolean;
1145
1134
  }>;
1146
- evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1147
- expectFormat: TOutput;
1135
+ evaluateAssistant<TInput = Record<string, unknown>>(assistantCode: string, options?: {
1148
1136
  threadId?: number;
1149
1137
  input: TInput;
1150
1138
  transcript?: Array<{
@@ -1152,7 +1140,7 @@ declare class DeepdeskAPI {
1152
1140
  text: string;
1153
1141
  }>;
1154
1142
  externalConversationId?: string;
1155
- }): Promise<CamelCaseKeys<Server.EvaluationResponse<TOutput>>>;
1143
+ }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1156
1144
  createAssistantThread(init: {
1157
1145
  assistantCode: string;
1158
1146
  }): Promise<{
@@ -1335,6 +1323,7 @@ interface State$2 {
1335
1323
  loginFetchState: FetchState;
1336
1324
  verifyFetchState: FetchState;
1337
1325
  showLoginOverlay: boolean;
1326
+ loginError: string | null;
1338
1327
  }
1339
1328
 
1340
1329
  type State$1 = {
@@ -1363,6 +1352,7 @@ declare const reducers: redux.Reducer<{
1363
1352
  customData?: CustomData;
1364
1353
  platformVariables?: VariableMapping;
1365
1354
  fetchState: FetchState;
1355
+ showNicknameDialog: boolean;
1366
1356
  };
1367
1357
  input: State$7;
1368
1358
  settings: {
@@ -1387,6 +1377,7 @@ declare const reducers: redux.Reducer<{
1387
1377
  searchTriggerKey: string;
1388
1378
  visible: boolean;
1389
1379
  insertLink: boolean;
1380
+ addToPersonalCollection: boolean;
1390
1381
  inlineSuggestions: boolean;
1391
1382
  suggestionsPlacement: "inline" | "above" | "below";
1392
1383
  floatingMenu: boolean;
@@ -1424,6 +1415,7 @@ declare const reducers: redux.Reducer<{
1424
1415
  customData?: CustomData;
1425
1416
  platformVariables?: VariableMapping;
1426
1417
  fetchState: FetchState;
1418
+ showNicknameDialog: boolean;
1427
1419
  } | undefined;
1428
1420
  input: State$7 | undefined;
1429
1421
  settings: {
@@ -1448,6 +1440,7 @@ declare const reducers: redux.Reducer<{
1448
1440
  searchTriggerKey: string;
1449
1441
  visible: boolean;
1450
1442
  insertLink: boolean;
1443
+ addToPersonalCollection: boolean;
1451
1444
  inlineSuggestions: boolean;
1452
1445
  suggestionsPlacement: "inline" | "above" | "below";
1453
1446
  floatingMenu: boolean;
@@ -1486,6 +1479,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1486
1479
  customData?: CustomData;
1487
1480
  platformVariables?: VariableMapping;
1488
1481
  fetchState: FetchState;
1482
+ showNicknameDialog: boolean;
1489
1483
  };
1490
1484
  input: State$7;
1491
1485
  settings: {
@@ -1510,6 +1504,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1510
1504
  searchTriggerKey: string;
1511
1505
  visible: boolean;
1512
1506
  insertLink: boolean;
1507
+ addToPersonalCollection: boolean;
1513
1508
  inlineSuggestions: boolean;
1514
1509
  suggestionsPlacement: "inline" | "above" | "below";
1515
1510
  floatingMenu: boolean;
@@ -1733,6 +1728,9 @@ declare const styles$5: {
1733
1728
  readonly "hintsHidden": string;
1734
1729
  readonly "isCollapsed": string;
1735
1730
  readonly "isInline": string;
1731
+ readonly "loginError": string;
1732
+ readonly "loginErrorDismiss": string;
1733
+ readonly "loginErrorMessage": string;
1736
1734
  readonly "root": string;
1737
1735
  readonly "toggleButton": string;
1738
1736
  readonly "toggleButtonWrapper": string;
@@ -1894,6 +1892,7 @@ type State = {
1894
1892
  searchTriggerKey: string;
1895
1893
  visible: boolean;
1896
1894
  insertLink: boolean;
1895
+ addToPersonalCollection: boolean;
1897
1896
  inlineSuggestions: boolean;
1898
1897
  suggestionsPlacement: 'inline' | 'above' | 'below';
1899
1898
  floatingMenu: boolean;
@@ -1963,10 +1962,6 @@ interface SDKEventMap {
1963
1962
  selectionAfter: SelectionRange;
1964
1963
  };
1965
1964
  cues: LegacyCue[];
1966
- replace: {
1967
- text: string;
1968
- replace: SelectionRange;
1969
- };
1970
1965
  'select-image': {
1971
1966
  suggestion: TextSuggestion;
1972
1967
  };
@@ -2022,7 +2017,6 @@ interface WidgetOptions {
2022
2017
  }
2023
2018
  interface KnowledgeAssistantWidgetOptions extends KnowledgeAssistOptions {
2024
2019
  customStyles?: WidgetCustomStyles;
2025
- isLegacyKnowledgeAssist?: boolean;
2026
2020
  title?: string;
2027
2021
  }
2028
2022
  declare class DeepdeskSDK {
@@ -2041,6 +2035,8 @@ declare class DeepdeskSDK {
2041
2035
  private floatingMenu;
2042
2036
  private widgetElement;
2043
2037
  private widgetRoot;
2038
+ private nicknameDialogUnsubscribe;
2039
+ private nicknameDialogFailed;
2044
2040
  private dynamicThunkObject;
2045
2041
  private queues;
2046
2042
  isMounted: boolean;
@@ -2095,6 +2091,7 @@ declare class DeepdeskSDK {
2095
2091
  customData?: CustomData;
2096
2092
  platformVariables?: VariableMapping;
2097
2093
  fetchState: FetchState;
2094
+ showNicknameDialog: boolean;
2098
2095
  };
2099
2096
  input: State$7;
2100
2097
  settings: {
@@ -2119,6 +2116,7 @@ declare class DeepdeskSDK {
2119
2116
  searchTriggerKey: string;
2120
2117
  visible: boolean;
2121
2118
  insertLink: boolean;
2119
+ addToPersonalCollection: boolean;
2122
2120
  inlineSuggestions: boolean;
2123
2121
  suggestionsPlacement: "inline" | "above" | "below";
2124
2122
  floatingMenu: boolean;
@@ -2164,6 +2162,7 @@ declare class DeepdeskSDK {
2164
2162
  searchTriggerKey: string;
2165
2163
  visible: boolean;
2166
2164
  insertLink: boolean;
2165
+ addToPersonalCollection: boolean;
2167
2166
  inlineSuggestions: boolean;
2168
2167
  suggestionsPlacement: "inline" | "above" | "below";
2169
2168
  floatingMenu: boolean;
@@ -2754,7 +2753,6 @@ declare class DeepdeskSDK {
2754
2753
  *
2755
2754
  * @param assistantCode - The assistant code to evaluate
2756
2755
  * @param options - Evaluation options
2757
- * @param options.expectFormat - Expected response format ('json-schema:cues', 'json-schema:knowledge-assist', 'text', 'json-object')
2758
2756
  * @param options.input - Additional input data for the assistant
2759
2757
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2760
2758
  * @param options.includeMetadata - Whether to include metadata in the response
@@ -2765,7 +2763,6 @@ declare class DeepdeskSDK {
2765
2763
  * ```typescript
2766
2764
  * // Evaluate assistant with cues format
2767
2765
  * const result = await sdk.evaluateAssistant('assistant-code-123', {
2768
- * expectFormat: 'json-schema:cues',
2769
2766
  * input: {
2770
2767
  * customerType: 'premium',
2771
2768
  * issueType: 'technical'
@@ -2774,7 +2771,6 @@ declare class DeepdeskSDK {
2774
2771
  *
2775
2772
  * // Evaluate with custom transcript
2776
2773
  * const result = await sdk.evaluateAssistant('assistant-code-456', {
2777
- * expectFormat: 'text',
2778
2774
  * transcript: [
2779
2775
  * { source: 'visitor', text: 'I have a problem with my order' },
2780
2776
  * { source: 'agent', text: 'I can help you with that' }
@@ -2788,13 +2784,12 @@ declare class DeepdeskSDK {
2788
2784
  * });
2789
2785
  * ```
2790
2786
  */
2791
- evaluateAssistant<T extends Server.ResponseFormat = 'json-schema:cues'>(assistantCode: string, options?: {
2792
- expectFormat?: T;
2787
+ evaluateAssistant(assistantCode: string, options?: {
2793
2788
  input?: Record<string, any>;
2794
2789
  transcript?: TranscriptOption;
2795
2790
  includeMetadata?: boolean;
2796
2791
  showCuesInWidget?: boolean;
2797
- }): Promise<EvaluationOutput<T> | string>;
2792
+ }): Promise<EvaluationOutput | string>;
2798
2793
  /**
2799
2794
  * Evaluates conversation lifecycle assistants.
2800
2795
  *
@@ -2841,52 +2836,6 @@ declare class DeepdeskSDK {
2841
2836
  includeMetadata?: boolean;
2842
2837
  showCuesInWidget?: boolean;
2843
2838
  }): Promise<void>;
2844
- /**
2845
- * @deprecated Specific 'Summarizer' assistants are deprecated.
2846
- *
2847
- * Generates a summary of the current conversation.
2848
- *
2849
- * This method uses the summarizer assistant configured in the profile to
2850
- * generate a concise summary of the current conversation. It assumes that
2851
- * `setConversationQuery()` has been called before this method and will
2852
- * throw an error if this is not the case.
2853
- *
2854
- * @param args - Summary generation options
2855
- * @param args.includeMetadata - Whether to include metadata in the summary
2856
- * @param args.transcript - Custom transcript to use (optional)
2857
- * @returns Promise that resolves to the summary text or null if no summarizer is configured
2858
- *
2859
- * @example
2860
- * ```typescript
2861
- * // Set up conversation query first
2862
- * sdk.setConversationQuery(async () => {
2863
- * return [
2864
- * { source: 'visitor', text: 'I have a problem with my order' },
2865
- * { source: 'agent', text: 'I can help you with that' },
2866
- * { source: 'visitor', text: 'My order number is 12345' }
2867
- * ];
2868
- * });
2869
- *
2870
- * // Generate summary
2871
- * const summary = await sdk.getSummary();
2872
- * console.log('Conversation summary:', summary);
2873
- *
2874
- * // Generate summary with metadata
2875
- * const summaryWithMetadata = await sdk.getSummary({
2876
- * includeMetadata: true
2877
- * });
2878
- *
2879
- * // Generate summary with custom transcript
2880
- * const customSummary = await sdk.getSummary({
2881
- * transcript: [
2882
- * { source: 'visitor', text: 'Custom conversation data' },
2883
- * { source: 'agent', text: 'Agent response' }
2884
- * ]
2885
- * });
2886
- * ```
2887
- *
2888
- */
2889
- getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2890
2839
  private handleKeyDown;
2891
2840
  private handleAfterSendMessage;
2892
2841
  /**
@@ -3061,9 +3010,6 @@ declare class DeepdeskSDK {
3061
3010
  * text: msg.content
3062
3011
  * }));
3063
3012
  * });
3064
- *
3065
- * // Now you can use features that require setConversationQuery to be set
3066
- * const summary = await sdk.getSummary();
3067
3013
  * ```
3068
3014
  */
3069
3015
  setConversationQuery(fetchFn: () => Promise<Array<{
@@ -3180,6 +3126,7 @@ declare class DeepdeskSDK {
3180
3126
  * @throws {Error} If the input element is not a supported type (textarea or contentEditable div)
3181
3127
  */
3182
3128
  mount(inputElement: HTMLElement, options?: MountOptions): void;
3129
+ private promptForNickname;
3183
3130
  /**
3184
3131
  * Subscribes to internal state changes.
3185
3132
  *
@@ -3331,7 +3278,6 @@ declare class DeepdeskSDK {
3331
3278
  * @param options.customStyles - Custom styling for the widget
3332
3279
  * @param options.initialQuestion - Initial question to display
3333
3280
  * @param options.emptyState - Custom empty state configuration
3334
- * @param options.isLegacyKnowledgeAssist - Whether to use legacy knowledge assistant (default: false)
3335
3281
  * @param options.title - Custom title for the widget
3336
3282
  * @returns Object with unmount function to clean up the widget
3337
3283
  *
package/dist/index.d.ts CHANGED
@@ -409,15 +409,13 @@ declare enum FetchState {
409
409
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
410
410
  isLoading?: boolean;
411
411
  editable?: boolean;
412
- specialType?: 'summary';
413
412
  evaluationId: string;
414
413
  };
415
414
 
416
- type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
415
+ type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
417
416
  type ArrayItemType<T> = T extends Array<infer I> ? I : never;
418
- type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
417
+ type Cue = ArrayItemType<EvaluationOutput> & {
419
418
  isLoading?: boolean;
420
- specialType?: 'summary';
421
419
  evaluationId: string;
422
420
  };
423
421
  type AssistantAnswerSource = {
@@ -449,9 +447,7 @@ interface EvaluateInput {
449
447
  transcript?: TranscriptOption;
450
448
  includeMetadata?: boolean;
451
449
  skipState?: boolean;
452
- expectFormat: Server.ResponseFormat;
453
450
  }
454
- type SummaryInput = Omit<EvaluateInput, 'expectFormat'>;
455
451
 
456
452
  type Fetch = typeof window.fetch;
457
453
  type HTTPClientOptions = {
@@ -676,7 +672,6 @@ declare namespace Server {
676
672
  event: string;
677
673
  value?: string;
678
674
  }
679
- type ResponseFormat = 'text' | 'json-object' | 'json-schema:cues' | 'json-schema:knowledge-assist';
680
675
  interface LegacyCue {
681
676
  text: string;
682
677
  title: string;
@@ -690,24 +685,22 @@ declare namespace Server {
690
685
  MAX_RECURSION_LEVEL = "max_recursion_level",
691
686
  NO_ACCESS_TO_ASSISTANT = "no_access_to_assistant"
692
687
  }
693
- type EvaluationResponse<Output extends ResponseFormat> = {
688
+ type EvaluationResponse = {
694
689
  evaluation_id: string;
695
690
  evaluation_status: EvaluationStatus;
696
- output: EvaluationOutput<Output>;
691
+ output: EvaluationOutput;
697
692
  };
698
- type EvaluationOutput<T extends ResponseFormat> = T extends 'text' ? string : T extends 'json-object' ? unknown : T extends 'json-schema:cues' ? Array<{
693
+ type EvaluationOutput = Array<{
699
694
  code: string;
700
695
  name: string;
701
696
  response: string;
702
697
  editable?: boolean;
703
698
  call_to_action?: CallToAction;
704
- }> : T extends 'json-schema:knowledge-assist' ? {
705
- response: string;
706
699
  sources?: {
707
700
  name: string;
708
701
  url: string;
709
702
  }[];
710
- } : never;
703
+ }>;
711
704
  /**
712
705
  * Handling time event data
713
706
  */
@@ -1130,10 +1123,6 @@ declare class DeepdeskAPI {
1130
1123
  * Search
1131
1124
  */
1132
1125
  search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
1133
- knowledgeAssist(request: CamelCaseKeys<Server.KnowledgeRequest>, chatHistory: Server.KnowledgeResponse[], assistantCode: string, meta?: {
1134
- agentId?: string;
1135
- conversationId?: string;
1136
- }): Promise<CamelCaseKeys<Server.KnowledgeResponse['answer']>>;
1137
1126
  requestLoginByEmail(email: string): Promise<{
1138
1127
  code: string;
1139
1128
  message: string;
@@ -1143,8 +1132,7 @@ declare class DeepdeskAPI {
1143
1132
  verifyLoginToken(token: string): Promise<{
1144
1133
  isLoggedIn: boolean;
1145
1134
  }>;
1146
- evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1147
- expectFormat: TOutput;
1135
+ evaluateAssistant<TInput = Record<string, unknown>>(assistantCode: string, options?: {
1148
1136
  threadId?: number;
1149
1137
  input: TInput;
1150
1138
  transcript?: Array<{
@@ -1152,7 +1140,7 @@ declare class DeepdeskAPI {
1152
1140
  text: string;
1153
1141
  }>;
1154
1142
  externalConversationId?: string;
1155
- }): Promise<CamelCaseKeys<Server.EvaluationResponse<TOutput>>>;
1143
+ }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1156
1144
  createAssistantThread(init: {
1157
1145
  assistantCode: string;
1158
1146
  }): Promise<{
@@ -1335,6 +1323,7 @@ interface State$2 {
1335
1323
  loginFetchState: FetchState;
1336
1324
  verifyFetchState: FetchState;
1337
1325
  showLoginOverlay: boolean;
1326
+ loginError: string | null;
1338
1327
  }
1339
1328
 
1340
1329
  type State$1 = {
@@ -1363,6 +1352,7 @@ declare const reducers: redux.Reducer<{
1363
1352
  customData?: CustomData;
1364
1353
  platformVariables?: VariableMapping;
1365
1354
  fetchState: FetchState;
1355
+ showNicknameDialog: boolean;
1366
1356
  };
1367
1357
  input: State$7;
1368
1358
  settings: {
@@ -1387,6 +1377,7 @@ declare const reducers: redux.Reducer<{
1387
1377
  searchTriggerKey: string;
1388
1378
  visible: boolean;
1389
1379
  insertLink: boolean;
1380
+ addToPersonalCollection: boolean;
1390
1381
  inlineSuggestions: boolean;
1391
1382
  suggestionsPlacement: "inline" | "above" | "below";
1392
1383
  floatingMenu: boolean;
@@ -1424,6 +1415,7 @@ declare const reducers: redux.Reducer<{
1424
1415
  customData?: CustomData;
1425
1416
  platformVariables?: VariableMapping;
1426
1417
  fetchState: FetchState;
1418
+ showNicknameDialog: boolean;
1427
1419
  } | undefined;
1428
1420
  input: State$7 | undefined;
1429
1421
  settings: {
@@ -1448,6 +1440,7 @@ declare const reducers: redux.Reducer<{
1448
1440
  searchTriggerKey: string;
1449
1441
  visible: boolean;
1450
1442
  insertLink: boolean;
1443
+ addToPersonalCollection: boolean;
1451
1444
  inlineSuggestions: boolean;
1452
1445
  suggestionsPlacement: "inline" | "above" | "below";
1453
1446
  floatingMenu: boolean;
@@ -1486,6 +1479,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1486
1479
  customData?: CustomData;
1487
1480
  platformVariables?: VariableMapping;
1488
1481
  fetchState: FetchState;
1482
+ showNicknameDialog: boolean;
1489
1483
  };
1490
1484
  input: State$7;
1491
1485
  settings: {
@@ -1510,6 +1504,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1510
1504
  searchTriggerKey: string;
1511
1505
  visible: boolean;
1512
1506
  insertLink: boolean;
1507
+ addToPersonalCollection: boolean;
1513
1508
  inlineSuggestions: boolean;
1514
1509
  suggestionsPlacement: "inline" | "above" | "below";
1515
1510
  floatingMenu: boolean;
@@ -1733,6 +1728,9 @@ declare const styles$5: {
1733
1728
  readonly "hintsHidden": string;
1734
1729
  readonly "isCollapsed": string;
1735
1730
  readonly "isInline": string;
1731
+ readonly "loginError": string;
1732
+ readonly "loginErrorDismiss": string;
1733
+ readonly "loginErrorMessage": string;
1736
1734
  readonly "root": string;
1737
1735
  readonly "toggleButton": string;
1738
1736
  readonly "toggleButtonWrapper": string;
@@ -1894,6 +1892,7 @@ type State = {
1894
1892
  searchTriggerKey: string;
1895
1893
  visible: boolean;
1896
1894
  insertLink: boolean;
1895
+ addToPersonalCollection: boolean;
1897
1896
  inlineSuggestions: boolean;
1898
1897
  suggestionsPlacement: 'inline' | 'above' | 'below';
1899
1898
  floatingMenu: boolean;
@@ -1963,10 +1962,6 @@ interface SDKEventMap {
1963
1962
  selectionAfter: SelectionRange;
1964
1963
  };
1965
1964
  cues: LegacyCue[];
1966
- replace: {
1967
- text: string;
1968
- replace: SelectionRange;
1969
- };
1970
1965
  'select-image': {
1971
1966
  suggestion: TextSuggestion;
1972
1967
  };
@@ -2022,7 +2017,6 @@ interface WidgetOptions {
2022
2017
  }
2023
2018
  interface KnowledgeAssistantWidgetOptions extends KnowledgeAssistOptions {
2024
2019
  customStyles?: WidgetCustomStyles;
2025
- isLegacyKnowledgeAssist?: boolean;
2026
2020
  title?: string;
2027
2021
  }
2028
2022
  declare class DeepdeskSDK {
@@ -2041,6 +2035,8 @@ declare class DeepdeskSDK {
2041
2035
  private floatingMenu;
2042
2036
  private widgetElement;
2043
2037
  private widgetRoot;
2038
+ private nicknameDialogUnsubscribe;
2039
+ private nicknameDialogFailed;
2044
2040
  private dynamicThunkObject;
2045
2041
  private queues;
2046
2042
  isMounted: boolean;
@@ -2095,6 +2091,7 @@ declare class DeepdeskSDK {
2095
2091
  customData?: CustomData;
2096
2092
  platformVariables?: VariableMapping;
2097
2093
  fetchState: FetchState;
2094
+ showNicknameDialog: boolean;
2098
2095
  };
2099
2096
  input: State$7;
2100
2097
  settings: {
@@ -2119,6 +2116,7 @@ declare class DeepdeskSDK {
2119
2116
  searchTriggerKey: string;
2120
2117
  visible: boolean;
2121
2118
  insertLink: boolean;
2119
+ addToPersonalCollection: boolean;
2122
2120
  inlineSuggestions: boolean;
2123
2121
  suggestionsPlacement: "inline" | "above" | "below";
2124
2122
  floatingMenu: boolean;
@@ -2164,6 +2162,7 @@ declare class DeepdeskSDK {
2164
2162
  searchTriggerKey: string;
2165
2163
  visible: boolean;
2166
2164
  insertLink: boolean;
2165
+ addToPersonalCollection: boolean;
2167
2166
  inlineSuggestions: boolean;
2168
2167
  suggestionsPlacement: "inline" | "above" | "below";
2169
2168
  floatingMenu: boolean;
@@ -2754,7 +2753,6 @@ declare class DeepdeskSDK {
2754
2753
  *
2755
2754
  * @param assistantCode - The assistant code to evaluate
2756
2755
  * @param options - Evaluation options
2757
- * @param options.expectFormat - Expected response format ('json-schema:cues', 'json-schema:knowledge-assist', 'text', 'json-object')
2758
2756
  * @param options.input - Additional input data for the assistant
2759
2757
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2760
2758
  * @param options.includeMetadata - Whether to include metadata in the response
@@ -2765,7 +2763,6 @@ declare class DeepdeskSDK {
2765
2763
  * ```typescript
2766
2764
  * // Evaluate assistant with cues format
2767
2765
  * const result = await sdk.evaluateAssistant('assistant-code-123', {
2768
- * expectFormat: 'json-schema:cues',
2769
2766
  * input: {
2770
2767
  * customerType: 'premium',
2771
2768
  * issueType: 'technical'
@@ -2774,7 +2771,6 @@ declare class DeepdeskSDK {
2774
2771
  *
2775
2772
  * // Evaluate with custom transcript
2776
2773
  * const result = await sdk.evaluateAssistant('assistant-code-456', {
2777
- * expectFormat: 'text',
2778
2774
  * transcript: [
2779
2775
  * { source: 'visitor', text: 'I have a problem with my order' },
2780
2776
  * { source: 'agent', text: 'I can help you with that' }
@@ -2788,13 +2784,12 @@ declare class DeepdeskSDK {
2788
2784
  * });
2789
2785
  * ```
2790
2786
  */
2791
- evaluateAssistant<T extends Server.ResponseFormat = 'json-schema:cues'>(assistantCode: string, options?: {
2792
- expectFormat?: T;
2787
+ evaluateAssistant(assistantCode: string, options?: {
2793
2788
  input?: Record<string, any>;
2794
2789
  transcript?: TranscriptOption;
2795
2790
  includeMetadata?: boolean;
2796
2791
  showCuesInWidget?: boolean;
2797
- }): Promise<EvaluationOutput<T> | string>;
2792
+ }): Promise<EvaluationOutput | string>;
2798
2793
  /**
2799
2794
  * Evaluates conversation lifecycle assistants.
2800
2795
  *
@@ -2841,52 +2836,6 @@ declare class DeepdeskSDK {
2841
2836
  includeMetadata?: boolean;
2842
2837
  showCuesInWidget?: boolean;
2843
2838
  }): Promise<void>;
2844
- /**
2845
- * @deprecated Specific 'Summarizer' assistants are deprecated.
2846
- *
2847
- * Generates a summary of the current conversation.
2848
- *
2849
- * This method uses the summarizer assistant configured in the profile to
2850
- * generate a concise summary of the current conversation. It assumes that
2851
- * `setConversationQuery()` has been called before this method and will
2852
- * throw an error if this is not the case.
2853
- *
2854
- * @param args - Summary generation options
2855
- * @param args.includeMetadata - Whether to include metadata in the summary
2856
- * @param args.transcript - Custom transcript to use (optional)
2857
- * @returns Promise that resolves to the summary text or null if no summarizer is configured
2858
- *
2859
- * @example
2860
- * ```typescript
2861
- * // Set up conversation query first
2862
- * sdk.setConversationQuery(async () => {
2863
- * return [
2864
- * { source: 'visitor', text: 'I have a problem with my order' },
2865
- * { source: 'agent', text: 'I can help you with that' },
2866
- * { source: 'visitor', text: 'My order number is 12345' }
2867
- * ];
2868
- * });
2869
- *
2870
- * // Generate summary
2871
- * const summary = await sdk.getSummary();
2872
- * console.log('Conversation summary:', summary);
2873
- *
2874
- * // Generate summary with metadata
2875
- * const summaryWithMetadata = await sdk.getSummary({
2876
- * includeMetadata: true
2877
- * });
2878
- *
2879
- * // Generate summary with custom transcript
2880
- * const customSummary = await sdk.getSummary({
2881
- * transcript: [
2882
- * { source: 'visitor', text: 'Custom conversation data' },
2883
- * { source: 'agent', text: 'Agent response' }
2884
- * ]
2885
- * });
2886
- * ```
2887
- *
2888
- */
2889
- getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2890
2839
  private handleKeyDown;
2891
2840
  private handleAfterSendMessage;
2892
2841
  /**
@@ -3061,9 +3010,6 @@ declare class DeepdeskSDK {
3061
3010
  * text: msg.content
3062
3011
  * }));
3063
3012
  * });
3064
- *
3065
- * // Now you can use features that require setConversationQuery to be set
3066
- * const summary = await sdk.getSummary();
3067
3013
  * ```
3068
3014
  */
3069
3015
  setConversationQuery(fetchFn: () => Promise<Array<{
@@ -3180,6 +3126,7 @@ declare class DeepdeskSDK {
3180
3126
  * @throws {Error} If the input element is not a supported type (textarea or contentEditable div)
3181
3127
  */
3182
3128
  mount(inputElement: HTMLElement, options?: MountOptions): void;
3129
+ private promptForNickname;
3183
3130
  /**
3184
3131
  * Subscribes to internal state changes.
3185
3132
  *
@@ -3331,7 +3278,6 @@ declare class DeepdeskSDK {
3331
3278
  * @param options.customStyles - Custom styling for the widget
3332
3279
  * @param options.initialQuestion - Initial question to display
3333
3280
  * @param options.emptyState - Custom empty state configuration
3334
- * @param options.isLegacyKnowledgeAssist - Whether to use legacy knowledge assistant (default: false)
3335
3281
  * @param options.title - Custom title for the widget
3336
3282
  * @returns Object with unmount function to clean up the widget
3337
3283
  *