@deepdesk/deepdesk-sdk 10.1.9 → 10.1.11

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
@@ -23,11 +23,11 @@ type ContentProps = {
23
23
  className?: string;
24
24
  lineClamp?: boolean;
25
25
  };
26
- type TitleProps = {
26
+ interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
27
27
  cropText?: boolean;
28
28
  className?: string;
29
29
  as?: string;
30
- };
30
+ }
31
31
  interface CardComposition {
32
32
  Image: FC<ImageProps>;
33
33
  Content: FC<ContentProps>;
@@ -246,7 +246,6 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
246
246
  protected disposeHandlers: (() => void)[];
247
247
  protected currentText: string;
248
248
  protected currentHTML: string | null;
249
- protected currentSelection: SelectionRange | null;
250
249
  protected isFocused: boolean;
251
250
  protected isActive: boolean;
252
251
  protected isSettingValue: boolean;
@@ -983,8 +982,8 @@ declare namespace Server {
983
982
  summarizer: boolean;
984
983
  summarizer_prompt_instruction: string;
985
984
  summarizer_model: string;
986
- knowledge_search: boolean;
987
- knowledge_search_prompt_instruction: string;
985
+ knowledge_assist_for_agents: boolean;
986
+ knowledge_assist_prompt_instruction: string;
988
987
  ui_config: {
989
988
  widget: {
990
989
  types: Array<{
@@ -1183,7 +1182,7 @@ declare class DeepdeskAPI {
1183
1182
  * Search
1184
1183
  */
1185
1184
  search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
1186
- knowledgeSearch(request: KnowledgeRequest, chatHistory: KnowledgeResponse[], profile: string): Promise<CamelCaseKeys<KnowledgeAnswer>>;
1185
+ knowledgeAssist(request: KnowledgeRequest, chatHistory: KnowledgeResponse[], profile: string): Promise<CamelCaseKeys<KnowledgeAnswer>>;
1187
1186
  requestLoginByEmail(email: string): Promise<{
1188
1187
  code: string;
1189
1188
  message: string;
@@ -1969,7 +1968,6 @@ declare class DeepdeskSDK {
1969
1968
  * Method to call when the agent input has changed
1970
1969
  */
1971
1970
  private notifyInputChanged;
1972
- private syncInputHtml;
1973
1971
  /**
1974
1972
  * Method to call for the agent input keydown event
1975
1973
  */
@@ -2048,9 +2046,11 @@ declare class DeepdeskSDK {
2048
2046
 
2049
2047
  declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
2050
2048
  protected observer?: MutationObserver;
2049
+ protected lastKnownSelection: SelectionRange | null;
2051
2050
  getText(): string;
2052
2051
  getHTML(): string;
2053
- getSelection(): SelectionRange | null;
2052
+ getRange(): Range | null;
2053
+ getSelection(): SelectionRange;
2054
2054
  getSelectedText(): string;
2055
2055
  applyChanges(callback: (element: HTMLDivElement) => void | Promise<void>): void;
2056
2056
  listen(): void;
@@ -2058,6 +2058,7 @@ declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
2058
2058
  }
2059
2059
 
2060
2060
  declare class TextAreaInput extends InputMediator<HTMLTextAreaElement> {
2061
+ protected lastKnownSelection: SelectionRange | null;
2061
2062
  getText(): string;
2062
2063
  getHTML(): string | null;
2063
2064
  getSelection(): SelectionRange;
@@ -2093,6 +2094,7 @@ type ContentEditableOptions = {
2093
2094
  replace?: SelectionRange;
2094
2095
  selectionAfter?: SelectionRange | false;
2095
2096
  setRange?: (range: Range) => void | Promise<void>;
2097
+ insertBRs?: boolean;
2096
2098
  };
2097
2099
  declare function updateContentEditable(element: HTMLElement, insertText: string, options?: ContentEditableOptions): Promise<void>;
2098
2100
 
@@ -2143,6 +2145,7 @@ interface TargetFileOptions {
2143
2145
  }
2144
2146
  declare function attachFile(fileInput: HTMLInputElement, target: TargetFileOptions): Promise<void>;
2145
2147
 
2148
+ declare function createFullRange(rootElement: Node): Range;
2146
2149
  declare function createRangeFromOffsets(rootElement: HTMLElement, startOffset: number, endOffset: number): Range;
2147
2150
  declare function getRangeOffsets(rootElement: HTMLElement, range: Range): {
2148
2151
  start: number;
@@ -2163,4 +2166,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
2163
2166
  type CSSModule = Record<string, string>;
2164
2167
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
2165
2168
 
2166
- export { AgentInfo, Card, Chip, 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, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
2169
+ export { AgentInfo, Card, Chip, 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, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
package/dist/index.d.ts CHANGED
@@ -23,11 +23,11 @@ type ContentProps = {
23
23
  className?: string;
24
24
  lineClamp?: boolean;
25
25
  };
26
- type TitleProps = {
26
+ interface TitleProps extends React.HTMLProps<HTMLHeadingElement> {
27
27
  cropText?: boolean;
28
28
  className?: string;
29
29
  as?: string;
30
- };
30
+ }
31
31
  interface CardComposition {
32
32
  Image: FC<ImageProps>;
33
33
  Content: FC<ContentProps>;
@@ -246,7 +246,6 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
246
246
  protected disposeHandlers: (() => void)[];
247
247
  protected currentText: string;
248
248
  protected currentHTML: string | null;
249
- protected currentSelection: SelectionRange | null;
250
249
  protected isFocused: boolean;
251
250
  protected isActive: boolean;
252
251
  protected isSettingValue: boolean;
@@ -983,8 +982,8 @@ declare namespace Server {
983
982
  summarizer: boolean;
984
983
  summarizer_prompt_instruction: string;
985
984
  summarizer_model: string;
986
- knowledge_search: boolean;
987
- knowledge_search_prompt_instruction: string;
985
+ knowledge_assist_for_agents: boolean;
986
+ knowledge_assist_prompt_instruction: string;
988
987
  ui_config: {
989
988
  widget: {
990
989
  types: Array<{
@@ -1183,7 +1182,7 @@ declare class DeepdeskAPI {
1183
1182
  * Search
1184
1183
  */
1185
1184
  search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
1186
- knowledgeSearch(request: KnowledgeRequest, chatHistory: KnowledgeResponse[], profile: string): Promise<CamelCaseKeys<KnowledgeAnswer>>;
1185
+ knowledgeAssist(request: KnowledgeRequest, chatHistory: KnowledgeResponse[], profile: string): Promise<CamelCaseKeys<KnowledgeAnswer>>;
1187
1186
  requestLoginByEmail(email: string): Promise<{
1188
1187
  code: string;
1189
1188
  message: string;
@@ -1969,7 +1968,6 @@ declare class DeepdeskSDK {
1969
1968
  * Method to call when the agent input has changed
1970
1969
  */
1971
1970
  private notifyInputChanged;
1972
- private syncInputHtml;
1973
1971
  /**
1974
1972
  * Method to call for the agent input keydown event
1975
1973
  */
@@ -2048,9 +2046,11 @@ declare class DeepdeskSDK {
2048
2046
 
2049
2047
  declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
2050
2048
  protected observer?: MutationObserver;
2049
+ protected lastKnownSelection: SelectionRange | null;
2051
2050
  getText(): string;
2052
2051
  getHTML(): string;
2053
- getSelection(): SelectionRange | null;
2052
+ getRange(): Range | null;
2053
+ getSelection(): SelectionRange;
2054
2054
  getSelectedText(): string;
2055
2055
  applyChanges(callback: (element: HTMLDivElement) => void | Promise<void>): void;
2056
2056
  listen(): void;
@@ -2058,6 +2058,7 @@ declare class ContentEditableInput extends InputMediator<HTMLDivElement> {
2058
2058
  }
2059
2059
 
2060
2060
  declare class TextAreaInput extends InputMediator<HTMLTextAreaElement> {
2061
+ protected lastKnownSelection: SelectionRange | null;
2061
2062
  getText(): string;
2062
2063
  getHTML(): string | null;
2063
2064
  getSelection(): SelectionRange;
@@ -2093,6 +2094,7 @@ type ContentEditableOptions = {
2093
2094
  replace?: SelectionRange;
2094
2095
  selectionAfter?: SelectionRange | false;
2095
2096
  setRange?: (range: Range) => void | Promise<void>;
2097
+ insertBRs?: boolean;
2096
2098
  };
2097
2099
  declare function updateContentEditable(element: HTMLElement, insertText: string, options?: ContentEditableOptions): Promise<void>;
2098
2100
 
@@ -2143,6 +2145,7 @@ interface TargetFileOptions {
2143
2145
  }
2144
2146
  declare function attachFile(fileInput: HTMLInputElement, target: TargetFileOptions): Promise<void>;
2145
2147
 
2148
+ declare function createFullRange(rootElement: Node): Range;
2146
2149
  declare function createRangeFromOffsets(rootElement: HTMLElement, startOffset: number, endOffset: number): Range;
2147
2150
  declare function getRangeOffsets(rootElement: HTMLElement, range: Range): {
2148
2151
  start: number;
@@ -2163,4 +2166,4 @@ declare function waitForElementVisibilityChange(element: HTMLElement, callback:
2163
2166
  type CSSModule = Record<string, string>;
2164
2167
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
2165
2168
 
2166
- export { AgentInfo, Card, Chip, 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, createOverlayContainer, createRangeFromOffsets, escapeHTML, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };
2169
+ export { AgentInfo, Card, Chip, 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, fetchPlatformConfig, formatTextMarkup, getRangeOffsets, getRangeText, isSupportedInputElement, updateContentEditable, updateTextArea, useStyles, waitForElementVisibilityChange };