@deepdesk/deepdesk-sdk 19.4.2-beta.1 → 19.4.2-beta.3

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
@@ -509,6 +509,11 @@ declare class HTTPClient {
509
509
  refreshToken(): Promise<void>;
510
510
  get<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
511
511
  post<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
512
+ postWithStatus<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<{
513
+ status: number;
514
+ data: TResponse;
515
+ }>;
516
+ private requestWithStatus;
512
517
  patch<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
513
518
  put<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
514
519
  delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
@@ -1114,6 +1119,11 @@ declare class DeepdeskAPI {
1114
1119
  private preflight;
1115
1120
  constructor(apiUrl: string, options?: DeepdeskAPIOptions);
1116
1121
  createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
1122
+ /**
1123
+ * Get or create a conversation in one round trip, then update agent fields when it already existed.
1124
+ * Uses POST /api/v2/conversations (server-side get-or-create) instead of GET-by-external-id then POST.
1125
+ */
1126
+ upsertConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
1117
1127
  getMe(): Promise<CamelCaseKeys<Server.Me>>;
1118
1128
  postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
1119
1129
  patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
@@ -3616,4 +3626,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3616
3626
  type CSSModule = Record<string, string>;
3617
3627
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3618
3628
 
3619
- 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 };
3629
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, 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
@@ -509,6 +509,11 @@ declare class HTTPClient {
509
509
  refreshToken(): Promise<void>;
510
510
  get<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
511
511
  post<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
512
+ postWithStatus<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<{
513
+ status: number;
514
+ data: TResponse;
515
+ }>;
516
+ private requestWithStatus;
512
517
  patch<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
513
518
  put<TPayload, TResponse>(path: string, body: TPayload, init?: ExtendedRequestInit): Promise<TResponse>;
514
519
  delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
@@ -1114,6 +1119,11 @@ declare class DeepdeskAPI {
1114
1119
  private preflight;
1115
1120
  constructor(apiUrl: string, options?: DeepdeskAPIOptions);
1116
1121
  createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
1122
+ /**
1123
+ * Get or create a conversation in one round trip, then update agent fields when it already existed.
1124
+ * Uses POST /api/v2/conversations (server-side get-or-create) instead of GET-by-external-id then POST.
1125
+ */
1126
+ upsertConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
1117
1127
  getMe(): Promise<CamelCaseKeys<Server.Me>>;
1118
1128
  postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
1119
1129
  patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
@@ -3616,4 +3626,4 @@ declare function logEvent<T extends keyof SendEventArgumentMap>(event: LogEvent<
3616
3626
  type CSSModule = Record<string, string>;
3617
3627
  declare function useStyles<TStyles extends CSSModule>(componentName: string, defaultStyles: TStyles): TStyles;
3618
3628
 
3619
- 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 };
3629
+ export { type AgentInfo, Card, ContentEditableInput, type Conversation, type ConversationAssistantResult, type ConversationMessage, DeepdeskAPI, DeepdeskSDK, type EvaluationAttachment, 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 };