@deepdesk/deepdesk-sdk 19.3.0 → 19.3.1-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
@@ -407,6 +407,11 @@ declare enum FetchState {
407
407
  ERROR = "error"
408
408
  }
409
409
 
410
+ interface State$a {
411
+ current: Conversation | null;
412
+ isSupported: boolean | null;
413
+ }
414
+
410
415
  type CallToAction = Server.CallToAction;
411
416
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
412
417
  isLoading?: boolean;
@@ -421,6 +426,13 @@ type ArrayItemType<T> = T extends Array<infer I> ? I : never;
421
426
  type Cue = ArrayItemType<EvaluationOutput> & {
422
427
  isLoading?: boolean;
423
428
  evaluationId: string;
429
+ externalConversationId?: string;
430
+ };
431
+ type ConversationAssistantResult = {
432
+ assistantCode: string;
433
+ evaluationId: string;
434
+ output: EvaluationOutput;
435
+ externalConversationId: string;
424
436
  };
425
437
  type AssistantAnswerSource = {
426
438
  url?: string;
@@ -434,7 +446,7 @@ type AssistantInteraction = {
434
446
  };
435
447
  evaluationId: string;
436
448
  };
437
- type State$a = {
449
+ type State$9 = {
438
450
  cues: Cue[];
439
451
  threads: Record<number, AssistantInteraction[]>;
440
452
  pending: string[];
@@ -450,6 +462,7 @@ interface EvaluateInput {
450
462
  input?: any;
451
463
  transcript?: TranscriptOption;
452
464
  includeMetadata?: boolean;
465
+ externalConversationId?: string;
453
466
  skipState?: boolean;
454
467
  }
455
468
 
@@ -1009,6 +1022,10 @@ type SendEventArgumentMap = {
1009
1022
  'Assistant response displayed': Event$1<AssistantEventMeta & {
1010
1023
  input?: string;
1011
1024
  }>;
1025
+ 'Assistant evaluation completed': Event$1<AssistantEventMeta & {
1026
+ externalConversationId?: string;
1027
+ evaluationStatus: 'success' | 'failed';
1028
+ }>;
1012
1029
  'Assistant response closed': Event$1<AssistantEventMeta>;
1013
1030
  'Assistant response feedback': Event$1<AssistantEventMeta & {
1014
1031
  rating: 'up' | 'down';
@@ -1178,12 +1195,12 @@ declare class DeepdeskAPI {
1178
1195
  }
1179
1196
 
1180
1197
  type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1181
- interface State$9 {
1198
+ interface State$8 {
1182
1199
  list: StyleSuggestion;
1183
1200
  fetchState: FetchState;
1184
1201
  }
1185
1202
 
1186
- type State$8 = {
1203
+ type State$7 = {
1187
1204
  data: Profile | null;
1188
1205
  fetchState: FetchState;
1189
1206
  };
@@ -1304,7 +1321,7 @@ type MetricState = {
1304
1321
  textSuggestions: SuggestionMetrics[];
1305
1322
  cuts: any[];
1306
1323
  };
1307
- type State$7 = {
1324
+ type State$6 = {
1308
1325
  text: string;
1309
1326
  html: string | null;
1310
1327
  suggestionTextStart: number;
@@ -1321,27 +1338,22 @@ type State$7 = {
1321
1338
  selectedSuggestionIndex: number;
1322
1339
  };
1323
1340
 
1324
- type State$6 = {
1341
+ type State$5 = {
1325
1342
  startTime: Date | null;
1326
1343
  stopTime: Date | null;
1327
1344
  };
1328
1345
 
1329
- type State$5 = {
1346
+ type State$4 = {
1330
1347
  token: string | null;
1331
1348
  interval: NodeJS.Timer | null;
1332
1349
  };
1333
1350
 
1334
1351
  type ContentType = CamelCaseKeys<Server.ContentType>;
1335
- type State$4 = {
1352
+ type State$3 = {
1336
1353
  data: ContentType[] | null;
1337
1354
  fetchState: FetchState;
1338
1355
  };
1339
1356
 
1340
- interface State$3 {
1341
- current: Conversation | null;
1342
- isSupported: boolean | null;
1343
- }
1344
-
1345
1357
  interface State$2 {
1346
1358
  isLoggedIn: boolean | null;
1347
1359
  loginFetchState: FetchState;
@@ -1362,13 +1374,13 @@ interface StoreConfig {
1362
1374
  preloadedState?: any;
1363
1375
  }
1364
1376
  declare const reducers: redux.Reducer<{
1365
- assistants: State$a;
1377
+ assistants: State$9;
1366
1378
  auth: State$2;
1367
- conversation: State$3;
1368
- contentTypes: State$4;
1369
- passwordlessToken: State$5;
1379
+ conversation: State$a;
1380
+ contentTypes: State$3;
1381
+ passwordlessToken: State$4;
1370
1382
  entities: State$1;
1371
- handlingTime: State$6;
1383
+ handlingTime: State$5;
1372
1384
  info: {
1373
1385
  agentInfo?: AgentInfo;
1374
1386
  agentSettings: unknown;
@@ -1378,7 +1390,7 @@ declare const reducers: redux.Reducer<{
1378
1390
  fetchState: FetchState;
1379
1391
  showNicknameDialog: boolean;
1380
1392
  };
1381
- input: State$7;
1393
+ input: State$6;
1382
1394
  settings: {
1383
1395
  locale: Locale;
1384
1396
  deanonymize: boolean;
@@ -1415,9 +1427,9 @@ declare const reducers: redux.Reducer<{
1415
1427
  enableFeedbackForm: boolean;
1416
1428
  hasKeyboardInput: boolean;
1417
1429
  };
1418
- profile: State$8;
1430
+ profile: State$7;
1419
1431
  search: State$b;
1420
- styleSuggestions: State$9;
1432
+ styleSuggestions: State$8;
1421
1433
  ui: {
1422
1434
  showTabHint: boolean;
1423
1435
  inputHasFocus: boolean;
@@ -1427,13 +1439,13 @@ declare const reducers: redux.Reducer<{
1427
1439
  };
1428
1440
  textSuggestions: TextSuggestionState;
1429
1441
  }, redux.UnknownAction, Partial<{
1430
- assistants: State$a | undefined;
1442
+ assistants: State$9 | undefined;
1431
1443
  auth: State$2 | undefined;
1432
- conversation: State$3 | undefined;
1433
- contentTypes: State$4 | undefined;
1434
- passwordlessToken: State$5 | undefined;
1444
+ conversation: State$a | undefined;
1445
+ contentTypes: State$3 | undefined;
1446
+ passwordlessToken: State$4 | undefined;
1435
1447
  entities: State$1 | undefined;
1436
- handlingTime: State$6 | undefined;
1448
+ handlingTime: State$5 | undefined;
1437
1449
  info: {
1438
1450
  agentInfo?: AgentInfo;
1439
1451
  agentSettings: unknown;
@@ -1443,7 +1455,7 @@ declare const reducers: redux.Reducer<{
1443
1455
  fetchState: FetchState;
1444
1456
  showNicknameDialog: boolean;
1445
1457
  } | undefined;
1446
- input: State$7 | undefined;
1458
+ input: State$6 | undefined;
1447
1459
  settings: {
1448
1460
  locale: Locale;
1449
1461
  deanonymize: boolean;
@@ -1480,9 +1492,9 @@ declare const reducers: redux.Reducer<{
1480
1492
  enableFeedbackForm: boolean;
1481
1493
  hasKeyboardInput: boolean;
1482
1494
  } | undefined;
1483
- profile: State$8 | undefined;
1495
+ profile: State$7 | undefined;
1484
1496
  search: State$b | undefined;
1485
- styleSuggestions: State$9 | undefined;
1497
+ styleSuggestions: State$8 | undefined;
1486
1498
  ui: {
1487
1499
  showTabHint: boolean;
1488
1500
  inputHasFocus: boolean;
@@ -1493,13 +1505,13 @@ declare const reducers: redux.Reducer<{
1493
1505
  textSuggestions: TextSuggestionState | undefined;
1494
1506
  }>>;
1495
1507
  declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStore<{
1496
- assistants: State$a;
1508
+ assistants: State$9;
1497
1509
  auth: State$2;
1498
- conversation: State$3;
1499
- contentTypes: State$4;
1500
- passwordlessToken: State$5;
1510
+ conversation: State$a;
1511
+ contentTypes: State$3;
1512
+ passwordlessToken: State$4;
1501
1513
  entities: State$1;
1502
- handlingTime: State$6;
1514
+ handlingTime: State$5;
1503
1515
  info: {
1504
1516
  agentInfo?: AgentInfo;
1505
1517
  agentSettings: unknown;
@@ -1509,7 +1521,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1509
1521
  fetchState: FetchState;
1510
1522
  showNicknameDialog: boolean;
1511
1523
  };
1512
- input: State$7;
1524
+ input: State$6;
1513
1525
  settings: {
1514
1526
  locale: Locale;
1515
1527
  deanonymize: boolean;
@@ -1546,9 +1558,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1546
1558
  enableFeedbackForm: boolean;
1547
1559
  hasKeyboardInput: boolean;
1548
1560
  };
1549
- profile: State$8;
1561
+ profile: State$7;
1550
1562
  search: State$b;
1551
- styleSuggestions: State$9;
1563
+ styleSuggestions: State$8;
1552
1564
  ui: {
1553
1565
  showTabHint: boolean;
1554
1566
  inputHasFocus: boolean;
@@ -2034,6 +2046,7 @@ interface RenderOptions {
2034
2046
  appendOverlayTo?: HTMLElement;
2035
2047
  inputMediator?: InputMediator<HTMLElement>;
2036
2048
  }
2049
+
2037
2050
  interface MountOptions extends Partial<Settings>, RenderOptions {
2038
2051
  }
2039
2052
  interface KnowledgeAssistOptions {
@@ -2112,13 +2125,13 @@ declare class DeepdeskSDK {
2112
2125
  */
2113
2126
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, websocketClient, }: SDKOptions);
2114
2127
  get state(): {
2115
- assistants: State$a;
2128
+ assistants: State$9;
2116
2129
  auth: State$2;
2117
- conversation: State$3;
2118
- contentTypes: State$4;
2119
- passwordlessToken: State$5;
2130
+ conversation: State$a;
2131
+ contentTypes: State$3;
2132
+ passwordlessToken: State$4;
2120
2133
  entities: State$1;
2121
- handlingTime: State$6;
2134
+ handlingTime: State$5;
2122
2135
  info: {
2123
2136
  agentInfo?: AgentInfo;
2124
2137
  agentSettings: unknown;
@@ -2128,7 +2141,7 @@ declare class DeepdeskSDK {
2128
2141
  fetchState: FetchState;
2129
2142
  showNicknameDialog: boolean;
2130
2143
  };
2131
- input: State$7;
2144
+ input: State$6;
2132
2145
  settings: {
2133
2146
  locale: Locale;
2134
2147
  deanonymize: boolean;
@@ -2165,9 +2178,9 @@ declare class DeepdeskSDK {
2165
2178
  enableFeedbackForm: boolean;
2166
2179
  hasKeyboardInput: boolean;
2167
2180
  };
2168
- profile: State$8;
2181
+ profile: State$7;
2169
2182
  search: State$b;
2170
- styleSuggestions: State$9;
2183
+ styleSuggestions: State$8;
2171
2184
  ui: {
2172
2185
  showTabHint: boolean;
2173
2186
  inputHasFocus: boolean;
@@ -2786,10 +2799,11 @@ declare class DeepdeskSDK {
2786
2799
  */
2787
2800
  notifyExternalSuggestion(suggestion: StageSuggestion): void;
2788
2801
  /**
2789
- * Evaluates an assistant with the given code.
2802
+ * Evaluates a single assistant by code.
2790
2803
  *
2791
- * This is a low-level method that allows you to evaluate an assistant.
2792
- * You are probably better off using `evaluateConversationAssistant()` for conversation lifecycle events.
2804
+ * Use for on-demand or fixed-code flows. For lifecycle hooks (accepted,
2805
+ * new-message, ended), prefer `evaluateConversationAssistant()` so the
2806
+ * profile decides which assistants run.
2793
2807
  *
2794
2808
  * @param assistantCode - The assistant code to evaluate
2795
2809
  * @param options - Evaluation options
@@ -2797,6 +2811,7 @@ declare class DeepdeskSDK {
2797
2811
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2798
2812
  * @param options.includeMetadata - Whether to include metadata in the response
2799
2813
  * @param options.showCuesInWidget - Whether to show cues in the widget (default: true)
2814
+ * @param options.externalConversationId - Optional conversation id to evaluate without switching the loaded conversation
2800
2815
  * @returns Promise that resolves to evaluation output or string
2801
2816
  *
2802
2817
  * @example
@@ -2829,14 +2844,15 @@ declare class DeepdeskSDK {
2829
2844
  transcript?: TranscriptOption;
2830
2845
  includeMetadata?: boolean;
2831
2846
  showCuesInWidget?: boolean;
2847
+ externalConversationId?: string;
2832
2848
  }): Promise<EvaluationOutput | string>;
2833
2849
  /**
2834
- * Evaluates conversation lifecycle assistants.
2850
+ * Evaluates conversation lifecycle assistants configured in the profile.
2835
2851
  *
2836
- * This is a convenient wrapper around `evaluateAssistant()` that evaluates
2837
- * assistants based on conversation lifecycle events. It automatically loads
2838
- * the profile configuration and evaluates the appropriate assistants for
2839
- * the given event.
2852
+ * Resolves assistant codes from the profile for the given event and runs
2853
+ * each one. Prefer this over `evaluateAssistant()` when the trigger is a
2854
+ * lifecycle moment (close chat, new message) and Studio config should
2855
+ * control which assistants run.
2840
2856
  *
2841
2857
  * @param event - The conversation event type 'accepted' | 'new-message' | 'ended'
2842
2858
  * @param options - Evaluation options
@@ -2844,7 +2860,8 @@ declare class DeepdeskSDK {
2844
2860
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2845
2861
  * @param options.includeMetadata - Whether to include metadata in the response
2846
2862
  * @param options.showCuesInWidget - Whether to show cues in the widget (default: true)
2847
- * @returns Promise that resolves when evaluation is complete
2863
+ * @param options.externalConversationId - Optional conversation id to evaluate without switching the loaded conversation
2864
+ * @returns Promise that resolves when evaluation is complete, or with assistant results when `showCuesInWidget` is false
2848
2865
  *
2849
2866
  * @example
2850
2867
  * ```typescript
@@ -2875,7 +2892,8 @@ declare class DeepdeskSDK {
2875
2892
  transcript?: TranscriptOption;
2876
2893
  includeMetadata?: boolean;
2877
2894
  showCuesInWidget?: boolean;
2878
- }): Promise<void>;
2895
+ externalConversationId?: string;
2896
+ }): Promise<ConversationAssistantResult[] | void>;
2879
2897
  private handleKeyDown;
2880
2898
  private handleAfterSendMessage;
2881
2899
  /**
@@ -3551,4 +3569,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3551
3569
  type CSSModule = Record<string, string>;
3552
3570
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3553
3571
 
3554
- export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type PinnedMessage, type PlatformConfig, 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 };
3572
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type PinnedMessage, type PlatformConfig, 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 };
package/dist/index.d.ts CHANGED
@@ -407,6 +407,11 @@ declare enum FetchState {
407
407
  ERROR = "error"
408
408
  }
409
409
 
410
+ interface State$a {
411
+ current: Conversation | null;
412
+ isSupported: boolean | null;
413
+ }
414
+
410
415
  type CallToAction = Server.CallToAction;
411
416
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
412
417
  isLoading?: boolean;
@@ -421,6 +426,13 @@ type ArrayItemType<T> = T extends Array<infer I> ? I : never;
421
426
  type Cue = ArrayItemType<EvaluationOutput> & {
422
427
  isLoading?: boolean;
423
428
  evaluationId: string;
429
+ externalConversationId?: string;
430
+ };
431
+ type ConversationAssistantResult = {
432
+ assistantCode: string;
433
+ evaluationId: string;
434
+ output: EvaluationOutput;
435
+ externalConversationId: string;
424
436
  };
425
437
  type AssistantAnswerSource = {
426
438
  url?: string;
@@ -434,7 +446,7 @@ type AssistantInteraction = {
434
446
  };
435
447
  evaluationId: string;
436
448
  };
437
- type State$a = {
449
+ type State$9 = {
438
450
  cues: Cue[];
439
451
  threads: Record<number, AssistantInteraction[]>;
440
452
  pending: string[];
@@ -450,6 +462,7 @@ interface EvaluateInput {
450
462
  input?: any;
451
463
  transcript?: TranscriptOption;
452
464
  includeMetadata?: boolean;
465
+ externalConversationId?: string;
453
466
  skipState?: boolean;
454
467
  }
455
468
 
@@ -1009,6 +1022,10 @@ type SendEventArgumentMap = {
1009
1022
  'Assistant response displayed': Event$1<AssistantEventMeta & {
1010
1023
  input?: string;
1011
1024
  }>;
1025
+ 'Assistant evaluation completed': Event$1<AssistantEventMeta & {
1026
+ externalConversationId?: string;
1027
+ evaluationStatus: 'success' | 'failed';
1028
+ }>;
1012
1029
  'Assistant response closed': Event$1<AssistantEventMeta>;
1013
1030
  'Assistant response feedback': Event$1<AssistantEventMeta & {
1014
1031
  rating: 'up' | 'down';
@@ -1178,12 +1195,12 @@ declare class DeepdeskAPI {
1178
1195
  }
1179
1196
 
1180
1197
  type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1181
- interface State$9 {
1198
+ interface State$8 {
1182
1199
  list: StyleSuggestion;
1183
1200
  fetchState: FetchState;
1184
1201
  }
1185
1202
 
1186
- type State$8 = {
1203
+ type State$7 = {
1187
1204
  data: Profile | null;
1188
1205
  fetchState: FetchState;
1189
1206
  };
@@ -1304,7 +1321,7 @@ type MetricState = {
1304
1321
  textSuggestions: SuggestionMetrics[];
1305
1322
  cuts: any[];
1306
1323
  };
1307
- type State$7 = {
1324
+ type State$6 = {
1308
1325
  text: string;
1309
1326
  html: string | null;
1310
1327
  suggestionTextStart: number;
@@ -1321,27 +1338,22 @@ type State$7 = {
1321
1338
  selectedSuggestionIndex: number;
1322
1339
  };
1323
1340
 
1324
- type State$6 = {
1341
+ type State$5 = {
1325
1342
  startTime: Date | null;
1326
1343
  stopTime: Date | null;
1327
1344
  };
1328
1345
 
1329
- type State$5 = {
1346
+ type State$4 = {
1330
1347
  token: string | null;
1331
1348
  interval: NodeJS.Timer | null;
1332
1349
  };
1333
1350
 
1334
1351
  type ContentType = CamelCaseKeys<Server.ContentType>;
1335
- type State$4 = {
1352
+ type State$3 = {
1336
1353
  data: ContentType[] | null;
1337
1354
  fetchState: FetchState;
1338
1355
  };
1339
1356
 
1340
- interface State$3 {
1341
- current: Conversation | null;
1342
- isSupported: boolean | null;
1343
- }
1344
-
1345
1357
  interface State$2 {
1346
1358
  isLoggedIn: boolean | null;
1347
1359
  loginFetchState: FetchState;
@@ -1362,13 +1374,13 @@ interface StoreConfig {
1362
1374
  preloadedState?: any;
1363
1375
  }
1364
1376
  declare const reducers: redux.Reducer<{
1365
- assistants: State$a;
1377
+ assistants: State$9;
1366
1378
  auth: State$2;
1367
- conversation: State$3;
1368
- contentTypes: State$4;
1369
- passwordlessToken: State$5;
1379
+ conversation: State$a;
1380
+ contentTypes: State$3;
1381
+ passwordlessToken: State$4;
1370
1382
  entities: State$1;
1371
- handlingTime: State$6;
1383
+ handlingTime: State$5;
1372
1384
  info: {
1373
1385
  agentInfo?: AgentInfo;
1374
1386
  agentSettings: unknown;
@@ -1378,7 +1390,7 @@ declare const reducers: redux.Reducer<{
1378
1390
  fetchState: FetchState;
1379
1391
  showNicknameDialog: boolean;
1380
1392
  };
1381
- input: State$7;
1393
+ input: State$6;
1382
1394
  settings: {
1383
1395
  locale: Locale;
1384
1396
  deanonymize: boolean;
@@ -1415,9 +1427,9 @@ declare const reducers: redux.Reducer<{
1415
1427
  enableFeedbackForm: boolean;
1416
1428
  hasKeyboardInput: boolean;
1417
1429
  };
1418
- profile: State$8;
1430
+ profile: State$7;
1419
1431
  search: State$b;
1420
- styleSuggestions: State$9;
1432
+ styleSuggestions: State$8;
1421
1433
  ui: {
1422
1434
  showTabHint: boolean;
1423
1435
  inputHasFocus: boolean;
@@ -1427,13 +1439,13 @@ declare const reducers: redux.Reducer<{
1427
1439
  };
1428
1440
  textSuggestions: TextSuggestionState;
1429
1441
  }, redux.UnknownAction, Partial<{
1430
- assistants: State$a | undefined;
1442
+ assistants: State$9 | undefined;
1431
1443
  auth: State$2 | undefined;
1432
- conversation: State$3 | undefined;
1433
- contentTypes: State$4 | undefined;
1434
- passwordlessToken: State$5 | undefined;
1444
+ conversation: State$a | undefined;
1445
+ contentTypes: State$3 | undefined;
1446
+ passwordlessToken: State$4 | undefined;
1435
1447
  entities: State$1 | undefined;
1436
- handlingTime: State$6 | undefined;
1448
+ handlingTime: State$5 | undefined;
1437
1449
  info: {
1438
1450
  agentInfo?: AgentInfo;
1439
1451
  agentSettings: unknown;
@@ -1443,7 +1455,7 @@ declare const reducers: redux.Reducer<{
1443
1455
  fetchState: FetchState;
1444
1456
  showNicknameDialog: boolean;
1445
1457
  } | undefined;
1446
- input: State$7 | undefined;
1458
+ input: State$6 | undefined;
1447
1459
  settings: {
1448
1460
  locale: Locale;
1449
1461
  deanonymize: boolean;
@@ -1480,9 +1492,9 @@ declare const reducers: redux.Reducer<{
1480
1492
  enableFeedbackForm: boolean;
1481
1493
  hasKeyboardInput: boolean;
1482
1494
  } | undefined;
1483
- profile: State$8 | undefined;
1495
+ profile: State$7 | undefined;
1484
1496
  search: State$b | undefined;
1485
- styleSuggestions: State$9 | undefined;
1497
+ styleSuggestions: State$8 | undefined;
1486
1498
  ui: {
1487
1499
  showTabHint: boolean;
1488
1500
  inputHasFocus: boolean;
@@ -1493,13 +1505,13 @@ declare const reducers: redux.Reducer<{
1493
1505
  textSuggestions: TextSuggestionState | undefined;
1494
1506
  }>>;
1495
1507
  declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStore<{
1496
- assistants: State$a;
1508
+ assistants: State$9;
1497
1509
  auth: State$2;
1498
- conversation: State$3;
1499
- contentTypes: State$4;
1500
- passwordlessToken: State$5;
1510
+ conversation: State$a;
1511
+ contentTypes: State$3;
1512
+ passwordlessToken: State$4;
1501
1513
  entities: State$1;
1502
- handlingTime: State$6;
1514
+ handlingTime: State$5;
1503
1515
  info: {
1504
1516
  agentInfo?: AgentInfo;
1505
1517
  agentSettings: unknown;
@@ -1509,7 +1521,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1509
1521
  fetchState: FetchState;
1510
1522
  showNicknameDialog: boolean;
1511
1523
  };
1512
- input: State$7;
1524
+ input: State$6;
1513
1525
  settings: {
1514
1526
  locale: Locale;
1515
1527
  deanonymize: boolean;
@@ -1546,9 +1558,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit.EnhancedStor
1546
1558
  enableFeedbackForm: boolean;
1547
1559
  hasKeyboardInput: boolean;
1548
1560
  };
1549
- profile: State$8;
1561
+ profile: State$7;
1550
1562
  search: State$b;
1551
- styleSuggestions: State$9;
1563
+ styleSuggestions: State$8;
1552
1564
  ui: {
1553
1565
  showTabHint: boolean;
1554
1566
  inputHasFocus: boolean;
@@ -2034,6 +2046,7 @@ interface RenderOptions {
2034
2046
  appendOverlayTo?: HTMLElement;
2035
2047
  inputMediator?: InputMediator<HTMLElement>;
2036
2048
  }
2049
+
2037
2050
  interface MountOptions extends Partial<Settings>, RenderOptions {
2038
2051
  }
2039
2052
  interface KnowledgeAssistOptions {
@@ -2112,13 +2125,13 @@ declare class DeepdeskSDK {
2112
2125
  */
2113
2126
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, websocketClient, }: SDKOptions);
2114
2127
  get state(): {
2115
- assistants: State$a;
2128
+ assistants: State$9;
2116
2129
  auth: State$2;
2117
- conversation: State$3;
2118
- contentTypes: State$4;
2119
- passwordlessToken: State$5;
2130
+ conversation: State$a;
2131
+ contentTypes: State$3;
2132
+ passwordlessToken: State$4;
2120
2133
  entities: State$1;
2121
- handlingTime: State$6;
2134
+ handlingTime: State$5;
2122
2135
  info: {
2123
2136
  agentInfo?: AgentInfo;
2124
2137
  agentSettings: unknown;
@@ -2128,7 +2141,7 @@ declare class DeepdeskSDK {
2128
2141
  fetchState: FetchState;
2129
2142
  showNicknameDialog: boolean;
2130
2143
  };
2131
- input: State$7;
2144
+ input: State$6;
2132
2145
  settings: {
2133
2146
  locale: Locale;
2134
2147
  deanonymize: boolean;
@@ -2165,9 +2178,9 @@ declare class DeepdeskSDK {
2165
2178
  enableFeedbackForm: boolean;
2166
2179
  hasKeyboardInput: boolean;
2167
2180
  };
2168
- profile: State$8;
2181
+ profile: State$7;
2169
2182
  search: State$b;
2170
- styleSuggestions: State$9;
2183
+ styleSuggestions: State$8;
2171
2184
  ui: {
2172
2185
  showTabHint: boolean;
2173
2186
  inputHasFocus: boolean;
@@ -2786,10 +2799,11 @@ declare class DeepdeskSDK {
2786
2799
  */
2787
2800
  notifyExternalSuggestion(suggestion: StageSuggestion): void;
2788
2801
  /**
2789
- * Evaluates an assistant with the given code.
2802
+ * Evaluates a single assistant by code.
2790
2803
  *
2791
- * This is a low-level method that allows you to evaluate an assistant.
2792
- * You are probably better off using `evaluateConversationAssistant()` for conversation lifecycle events.
2804
+ * Use for on-demand or fixed-code flows. For lifecycle hooks (accepted,
2805
+ * new-message, ended), prefer `evaluateConversationAssistant()` so the
2806
+ * profile decides which assistants run.
2793
2807
  *
2794
2808
  * @param assistantCode - The assistant code to evaluate
2795
2809
  * @param options - Evaluation options
@@ -2797,6 +2811,7 @@ declare class DeepdeskSDK {
2797
2811
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2798
2812
  * @param options.includeMetadata - Whether to include metadata in the response
2799
2813
  * @param options.showCuesInWidget - Whether to show cues in the widget (default: true)
2814
+ * @param options.externalConversationId - Optional conversation id to evaluate without switching the loaded conversation
2800
2815
  * @returns Promise that resolves to evaluation output or string
2801
2816
  *
2802
2817
  * @example
@@ -2829,14 +2844,15 @@ declare class DeepdeskSDK {
2829
2844
  transcript?: TranscriptOption;
2830
2845
  includeMetadata?: boolean;
2831
2846
  showCuesInWidget?: boolean;
2847
+ externalConversationId?: string;
2832
2848
  }): Promise<EvaluationOutput | string>;
2833
2849
  /**
2834
- * Evaluates conversation lifecycle assistants.
2850
+ * Evaluates conversation lifecycle assistants configured in the profile.
2835
2851
  *
2836
- * This is a convenient wrapper around `evaluateAssistant()` that evaluates
2837
- * assistants based on conversation lifecycle events. It automatically loads
2838
- * the profile configuration and evaluates the appropriate assistants for
2839
- * the given event.
2852
+ * Resolves assistant codes from the profile for the given event and runs
2853
+ * each one. Prefer this over `evaluateAssistant()` when the trigger is a
2854
+ * lifecycle moment (close chat, new message) and Studio config should
2855
+ * control which assistants run.
2840
2856
  *
2841
2857
  * @param event - The conversation event type 'accepted' | 'new-message' | 'ended'
2842
2858
  * @param options - Evaluation options
@@ -2844,7 +2860,8 @@ declare class DeepdeskSDK {
2844
2860
  * @param options.transcript - Transcript option ('in-memory-transcript' or custom transcript)
2845
2861
  * @param options.includeMetadata - Whether to include metadata in the response
2846
2862
  * @param options.showCuesInWidget - Whether to show cues in the widget (default: true)
2847
- * @returns Promise that resolves when evaluation is complete
2863
+ * @param options.externalConversationId - Optional conversation id to evaluate without switching the loaded conversation
2864
+ * @returns Promise that resolves when evaluation is complete, or with assistant results when `showCuesInWidget` is false
2848
2865
  *
2849
2866
  * @example
2850
2867
  * ```typescript
@@ -2875,7 +2892,8 @@ declare class DeepdeskSDK {
2875
2892
  transcript?: TranscriptOption;
2876
2893
  includeMetadata?: boolean;
2877
2894
  showCuesInWidget?: boolean;
2878
- }): Promise<void>;
2895
+ externalConversationId?: string;
2896
+ }): Promise<ConversationAssistantResult[] | void>;
2879
2897
  private handleKeyDown;
2880
2898
  private handleAfterSendMessage;
2881
2899
  /**
@@ -3551,4 +3569,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3551
3569
  type CSSModule = Record<string, string>;
3552
3570
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3553
3571
 
3554
- export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type PinnedMessage, type PlatformConfig, 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 };
3572
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, type InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, type Logger, type MountOptions, type PinnedMessage, type PlatformConfig, 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 };