@deepdesk/deepdesk-sdk 19.6.2-beta.3 → 19.6.2-beta.5

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
@@ -451,6 +451,12 @@ type State$9 = {
451
451
  cues: Cue[];
452
452
  threads: Record<number, AssistantInteraction[]>;
453
453
  pending: string[];
454
+ widgetAssistantSessionId: string | null;
455
+ assistantThreads: Record<string, {
456
+ threadId: number;
457
+ }>;
458
+ activeAssistantCode: string | null;
459
+ nextLocalThreadId: number;
454
460
  };
455
461
  type Transcript = Array<{
456
462
  source: string;
@@ -728,6 +734,7 @@ declare namespace Server {
728
734
  type EvaluationResponse = {
729
735
  evaluation_id: string;
730
736
  evaluation_status: EvaluationStatus;
737
+ session_id?: string;
731
738
  output: EvaluationOutput | KAAnswer | string;
732
739
  };
733
740
  type EvaluationOutput = Array<{
@@ -877,6 +884,12 @@ declare namespace Server {
877
884
  */
878
885
  knowledge_assistant: string | null;
879
886
  knowledge_assistant_new: string | null;
887
+ widget_interactive_assistants: Array<{
888
+ code: string;
889
+ name: string;
890
+ display_name: string | null;
891
+ order: number;
892
+ }>;
880
893
  on_demand_assistants: Array<OnDemandAssistant>;
881
894
  active_config: {
882
895
  default_locale: string;
@@ -1232,11 +1245,23 @@ declare class DeepdeskAPI {
1232
1245
  externalConversationId?: string;
1233
1246
  attachments?: EvaluationAttachment[];
1234
1247
  }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1248
+ interactWithAssistant(init: {
1249
+ assistantCode: string;
1250
+ message: string;
1251
+ sessionId?: string;
1252
+ externalConversationId?: string;
1253
+ }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1254
+ /**
1255
+ * @deprecated Prefer `interactWithAssistant` for widget chat. Kept for existing SDK consumers.
1256
+ */
1235
1257
  createAssistantThread(init: {
1236
1258
  assistantCode: string;
1237
1259
  }): Promise<{
1238
1260
  id: number;
1239
1261
  }>;
1262
+ /**
1263
+ * @deprecated Prefer `interactWithAssistant` for widget chat. Kept for existing SDK consumers.
1264
+ */
1240
1265
  postMessageToAssistantThread(init: {
1241
1266
  assistantCode: string;
1242
1267
  threadId: number;
@@ -1257,6 +1282,9 @@ interface State$8 {
1257
1282
  type State$7 = {
1258
1283
  data: Profile | null;
1259
1284
  fetchState: FetchState;
1285
+ /** Bumped on reset/clear so in-flight getProfile cannot repopulate profile. */
1286
+ generation: number;
1287
+ inFlightRequestId: string | null;
1260
1288
  };
1261
1289
 
1262
1290
  /**
@@ -1884,6 +1912,9 @@ type TextSuggestionStyles = typeof styles$3;
1884
1912
  declare const styles$2: {
1885
1913
  readonly "footer": string;
1886
1914
  readonly "footerShortcut": string;
1915
+ readonly "interactiveAssistantTab": string;
1916
+ readonly "interactiveAssistantTabActive": string;
1917
+ readonly "interactiveAssistantTabs": string;
1887
1918
  readonly "link": string;
1888
1919
  readonly "loginText": string;
1889
1920
  readonly "root": string;
@@ -2016,6 +2047,7 @@ type State = {
2016
2047
  showTextSuggestions: boolean;
2017
2048
  showEntitiesCommand: boolean;
2018
2049
  showSummaryCommand: boolean;
2050
+ /** @deprecated Use the knowledge-assist widget block; still synced from profile for legacy consumers. */
2019
2051
  showKnowledgeSearch: boolean;
2020
2052
  textSuggestionsCount: number;
2021
2053
  recommendTextSuggestions: boolean;
@@ -2672,7 +2704,8 @@ declare class DeepdeskSDK {
2672
2704
  * @param settings.showTextSuggestions: Show text suggestions (default: true)
2673
2705
  * @param settings.showEntitiesCommand: Show entities command (default: false)
2674
2706
  * @param settings.showSummaryCommand: Show summary command (default: false)
2675
- * @param settings.showKnowledgeSearch: Show knowledge search (default: false)
2707
+ * @param settings.showKnowledgeSearch: @deprecated Use the knowledge-assist widget block instead.
2708
+ * Still accepted for backward compatibility; profile load overwrites this from {@link deriveShowKnowledgeSearch}.
2676
2709
  * @param settings.textSuggestionsCount: Number of text suggestions to show (default: 3)
2677
2710
  * @param settings.recommendTextSuggestions: Recommend text suggestions (default: true)
2678
2711
  * @param settings.searchTriggerKey: Key to trigger search (default: 'k')
@@ -3467,6 +3500,17 @@ declare class DeepdeskSDK {
3467
3500
  private setupHandlingTime;
3468
3501
  private handleError;
3469
3502
  private loadProfileConfigPromise;
3503
+ private loadProfileConfigPromiseKey;
3504
+ /**
3505
+ * Subscription/dedupe key for conversation + profile. Admin validates profile codes as
3506
+ * `[a-z0-9-]+` (no colon), so the last `:` separates conversation id from profileCode
3507
+ * even when the id contains `:`.
3508
+ */
3509
+ private getConversationProfileKey;
3510
+ private getProfileLoadKey;
3511
+ private isCurrentProfileLoadKey;
3512
+ private getConversationLoadedKey;
3513
+ private resetProfileDerivedSettings;
3470
3514
  private loadProfileConfig;
3471
3515
  /**
3472
3516
  * Authenticates user via popup window.
package/dist/index.d.ts CHANGED
@@ -451,6 +451,12 @@ type State$9 = {
451
451
  cues: Cue[];
452
452
  threads: Record<number, AssistantInteraction[]>;
453
453
  pending: string[];
454
+ widgetAssistantSessionId: string | null;
455
+ assistantThreads: Record<string, {
456
+ threadId: number;
457
+ }>;
458
+ activeAssistantCode: string | null;
459
+ nextLocalThreadId: number;
454
460
  };
455
461
  type Transcript = Array<{
456
462
  source: string;
@@ -728,6 +734,7 @@ declare namespace Server {
728
734
  type EvaluationResponse = {
729
735
  evaluation_id: string;
730
736
  evaluation_status: EvaluationStatus;
737
+ session_id?: string;
731
738
  output: EvaluationOutput | KAAnswer | string;
732
739
  };
733
740
  type EvaluationOutput = Array<{
@@ -877,6 +884,12 @@ declare namespace Server {
877
884
  */
878
885
  knowledge_assistant: string | null;
879
886
  knowledge_assistant_new: string | null;
887
+ widget_interactive_assistants: Array<{
888
+ code: string;
889
+ name: string;
890
+ display_name: string | null;
891
+ order: number;
892
+ }>;
880
893
  on_demand_assistants: Array<OnDemandAssistant>;
881
894
  active_config: {
882
895
  default_locale: string;
@@ -1232,11 +1245,23 @@ declare class DeepdeskAPI {
1232
1245
  externalConversationId?: string;
1233
1246
  attachments?: EvaluationAttachment[];
1234
1247
  }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1248
+ interactWithAssistant(init: {
1249
+ assistantCode: string;
1250
+ message: string;
1251
+ sessionId?: string;
1252
+ externalConversationId?: string;
1253
+ }): Promise<CamelCaseKeys<Server.EvaluationResponse>>;
1254
+ /**
1255
+ * @deprecated Prefer `interactWithAssistant` for widget chat. Kept for existing SDK consumers.
1256
+ */
1235
1257
  createAssistantThread(init: {
1236
1258
  assistantCode: string;
1237
1259
  }): Promise<{
1238
1260
  id: number;
1239
1261
  }>;
1262
+ /**
1263
+ * @deprecated Prefer `interactWithAssistant` for widget chat. Kept for existing SDK consumers.
1264
+ */
1240
1265
  postMessageToAssistantThread(init: {
1241
1266
  assistantCode: string;
1242
1267
  threadId: number;
@@ -1257,6 +1282,9 @@ interface State$8 {
1257
1282
  type State$7 = {
1258
1283
  data: Profile | null;
1259
1284
  fetchState: FetchState;
1285
+ /** Bumped on reset/clear so in-flight getProfile cannot repopulate profile. */
1286
+ generation: number;
1287
+ inFlightRequestId: string | null;
1260
1288
  };
1261
1289
 
1262
1290
  /**
@@ -1884,6 +1912,9 @@ type TextSuggestionStyles = typeof styles$3;
1884
1912
  declare const styles$2: {
1885
1913
  readonly "footer": string;
1886
1914
  readonly "footerShortcut": string;
1915
+ readonly "interactiveAssistantTab": string;
1916
+ readonly "interactiveAssistantTabActive": string;
1917
+ readonly "interactiveAssistantTabs": string;
1887
1918
  readonly "link": string;
1888
1919
  readonly "loginText": string;
1889
1920
  readonly "root": string;
@@ -2016,6 +2047,7 @@ type State = {
2016
2047
  showTextSuggestions: boolean;
2017
2048
  showEntitiesCommand: boolean;
2018
2049
  showSummaryCommand: boolean;
2050
+ /** @deprecated Use the knowledge-assist widget block; still synced from profile for legacy consumers. */
2019
2051
  showKnowledgeSearch: boolean;
2020
2052
  textSuggestionsCount: number;
2021
2053
  recommendTextSuggestions: boolean;
@@ -2672,7 +2704,8 @@ declare class DeepdeskSDK {
2672
2704
  * @param settings.showTextSuggestions: Show text suggestions (default: true)
2673
2705
  * @param settings.showEntitiesCommand: Show entities command (default: false)
2674
2706
  * @param settings.showSummaryCommand: Show summary command (default: false)
2675
- * @param settings.showKnowledgeSearch: Show knowledge search (default: false)
2707
+ * @param settings.showKnowledgeSearch: @deprecated Use the knowledge-assist widget block instead.
2708
+ * Still accepted for backward compatibility; profile load overwrites this from {@link deriveShowKnowledgeSearch}.
2676
2709
  * @param settings.textSuggestionsCount: Number of text suggestions to show (default: 3)
2677
2710
  * @param settings.recommendTextSuggestions: Recommend text suggestions (default: true)
2678
2711
  * @param settings.searchTriggerKey: Key to trigger search (default: 'k')
@@ -3467,6 +3500,17 @@ declare class DeepdeskSDK {
3467
3500
  private setupHandlingTime;
3468
3501
  private handleError;
3469
3502
  private loadProfileConfigPromise;
3503
+ private loadProfileConfigPromiseKey;
3504
+ /**
3505
+ * Subscription/dedupe key for conversation + profile. Admin validates profile codes as
3506
+ * `[a-z0-9-]+` (no colon), so the last `:` separates conversation id from profileCode
3507
+ * even when the id contains `:`.
3508
+ */
3509
+ private getConversationProfileKey;
3510
+ private getProfileLoadKey;
3511
+ private isCurrentProfileLoadKey;
3512
+ private getConversationLoadedKey;
3513
+ private resetProfileDerivedSettings;
3470
3514
  private loadProfileConfig;
3471
3515
  /**
3472
3516
  * Authenticates user via popup window.