@deepdesk/deepdesk-sdk 17.0.0-rc.3 → 17.0.0-rc.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
@@ -1383,7 +1383,17 @@ type Transcript = Array<{
1383
1383
  source: string;
1384
1384
  text: string;
1385
1385
  }>;
1386
- type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1386
+ type TranscriptOption = 'in-memory-transcript' | Transcript;
1387
+ interface EvaluateInput {
1388
+ assistantCode: string;
1389
+ threadId?: number;
1390
+ input?: any;
1391
+ transcript?: TranscriptOption;
1392
+ includeMetadata?: boolean;
1393
+ skipState?: boolean;
1394
+ expectFormat: Server.ResponseFormat;
1395
+ }
1396
+ type SummaryInput = Omit<EvaluateInput, 'assistantCode' | 'expectFormat'>;
1387
1397
 
1388
1398
  type State$1 = {
1389
1399
  data: Entity[] | null;
@@ -1990,12 +2000,12 @@ interface SDKEventMap {
1990
2000
  suggestion: TextSuggestion;
1991
2001
  eventMetrics: SuggestionEventMetrics;
1992
2002
  };
1993
- 'reset': {
2003
+ reset: {
1994
2004
  text: string;
1995
2005
  selectionAfter: SelectionRange;
1996
2006
  };
1997
- 'cues': LegacyCue[];
1998
- 'replace': {
2007
+ cues: LegacyCue[];
2008
+ replace: {
1999
2009
  text: string;
2000
2010
  replace: SelectionRange;
2001
2011
  };
@@ -2005,7 +2015,7 @@ interface SDKEventMap {
2005
2015
  'edit-suggestion': EditTextSuggestionPayload;
2006
2016
  'send-message': string;
2007
2017
  'send-message-event': SendMessageEventData$1;
2008
- 'event': {
2018
+ event: {
2009
2019
  name: string;
2010
2020
  data: unknown;
2011
2021
  };
@@ -2050,6 +2060,7 @@ interface WidgetOptions {
2050
2060
  showImages?: boolean;
2051
2061
  isEmbedded?: boolean;
2052
2062
  knowledgeAssist?: KnowledgeAssistOptions;
2063
+ assistantOptions?: Omit<EvaluateInput, 'assistantCode'>;
2053
2064
  }
2054
2065
  interface KnowledgeAssistantWidgetOptions extends KnowledgeAssistOptions {
2055
2066
  customStyles?: WidgetCustomStyles;
@@ -2260,7 +2271,7 @@ declare class DeepdeskSDK {
2260
2271
  /**
2261
2272
  * Evaluate conversation lifecycle assistant
2262
2273
  * Convenient wrapper around `evaluateAssistant`.
2263
- * By default includes 'stored-transcript' and 'metadata'.
2274
+ * By default includes the server transcript and 'metadata'.
2264
2275
  */
2265
2276
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2266
2277
  input?: Record<string, any>;
@@ -2271,7 +2282,7 @@ declare class DeepdeskSDK {
2271
2282
  /**
2272
2283
  * Get summary from conversation
2273
2284
  */
2274
- getSummary(): Promise<string | null>;
2285
+ getSummary(args?: SummaryInput): Promise<string | null>;
2275
2286
  private handleKeyDown;
2276
2287
  private handleAfterSendMessage;
2277
2288
  handlingTimeStart(): void;
@@ -2467,4 +2478,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
2467
2478
  type CSSModule = Record<string, string>;
2468
2479
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
2469
2480
 
2470
- export { AgentInfo, Card, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
2481
+ 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, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
package/dist/index.d.ts CHANGED
@@ -1383,7 +1383,17 @@ type Transcript = Array<{
1383
1383
  source: string;
1384
1384
  text: string;
1385
1385
  }>;
1386
- type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1386
+ type TranscriptOption = 'in-memory-transcript' | Transcript;
1387
+ interface EvaluateInput {
1388
+ assistantCode: string;
1389
+ threadId?: number;
1390
+ input?: any;
1391
+ transcript?: TranscriptOption;
1392
+ includeMetadata?: boolean;
1393
+ skipState?: boolean;
1394
+ expectFormat: Server.ResponseFormat;
1395
+ }
1396
+ type SummaryInput = Omit<EvaluateInput, 'assistantCode' | 'expectFormat'>;
1387
1397
 
1388
1398
  type State$1 = {
1389
1399
  data: Entity[] | null;
@@ -1990,12 +2000,12 @@ interface SDKEventMap {
1990
2000
  suggestion: TextSuggestion;
1991
2001
  eventMetrics: SuggestionEventMetrics;
1992
2002
  };
1993
- 'reset': {
2003
+ reset: {
1994
2004
  text: string;
1995
2005
  selectionAfter: SelectionRange;
1996
2006
  };
1997
- 'cues': LegacyCue[];
1998
- 'replace': {
2007
+ cues: LegacyCue[];
2008
+ replace: {
1999
2009
  text: string;
2000
2010
  replace: SelectionRange;
2001
2011
  };
@@ -2005,7 +2015,7 @@ interface SDKEventMap {
2005
2015
  'edit-suggestion': EditTextSuggestionPayload;
2006
2016
  'send-message': string;
2007
2017
  'send-message-event': SendMessageEventData$1;
2008
- 'event': {
2018
+ event: {
2009
2019
  name: string;
2010
2020
  data: unknown;
2011
2021
  };
@@ -2050,6 +2060,7 @@ interface WidgetOptions {
2050
2060
  showImages?: boolean;
2051
2061
  isEmbedded?: boolean;
2052
2062
  knowledgeAssist?: KnowledgeAssistOptions;
2063
+ assistantOptions?: Omit<EvaluateInput, 'assistantCode'>;
2053
2064
  }
2054
2065
  interface KnowledgeAssistantWidgetOptions extends KnowledgeAssistOptions {
2055
2066
  customStyles?: WidgetCustomStyles;
@@ -2260,7 +2271,7 @@ declare class DeepdeskSDK {
2260
2271
  /**
2261
2272
  * Evaluate conversation lifecycle assistant
2262
2273
  * Convenient wrapper around `evaluateAssistant`.
2263
- * By default includes 'stored-transcript' and 'metadata'.
2274
+ * By default includes the server transcript and 'metadata'.
2264
2275
  */
2265
2276
  evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
2266
2277
  input?: Record<string, any>;
@@ -2271,7 +2282,7 @@ declare class DeepdeskSDK {
2271
2282
  /**
2272
2283
  * Get summary from conversation
2273
2284
  */
2274
- getSummary(): Promise<string | null>;
2285
+ getSummary(args?: SummaryInput): Promise<string | null>;
2275
2286
  private handleKeyDown;
2276
2287
  private handleAfterSendMessage;
2277
2288
  handlingTimeStart(): void;
@@ -2467,4 +2478,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
2467
2478
  type CSSModule = Record<string, string>;
2468
2479
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
2469
2480
 
2470
- export { AgentInfo, Card, ContentEditableInput, Conversation, ConversationMessage, DeepdeskAPI, DeepdeskSDK, HTTPClient, InputMediator, InputOverlayCustomStyles, InputType, KeyboardHint, Label, Locale, Logger, MountOptions, PinnedMessage, PlatformConfig, RootState, Section, SectionList, SelectionRange, Sources, Suggestion, SuggestionEventMetrics, SuggestionList, SuggestionMetrics, TextAreaInput, TextSuggestion, ToggleButton, UrlSuggestion, VisitorInfo, WidgetCustomStyles, WidgetOptions, attachFile, authenticateWithKey, createFullRange, createOverlayContainer, createRangeFromOffsets, escapeHTML, formatTextMarkup, getRangeOffsets, getRangeText, insertCKEditor, isHTML, isSupportedInputElement, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };
2481
+ 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, updateContentEditable, updateTextArea, useClickOutsideRoot, useStyles, waitForElementVisibilityChange };