@deepdesk/deepdesk-sdk 18.1.2-beta.8 → 18.2.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
@@ -448,7 +448,7 @@ interface EvaluateInput {
448
448
  skipState?: boolean;
449
449
  expectFormat: Server.ResponseFormat;
450
450
  }
451
- type SummaryInput = Omit<EvaluateInput, 'assistantCode' | 'expectFormat'>;
451
+ type SummaryInput = Omit<EvaluateInput, 'expectFormat'>;
452
452
 
453
453
  type Fetch = typeof window.fetch;
454
454
  type HTTPClientOptions = {
@@ -950,11 +950,11 @@ type HandlingTimeEventData = CamelCaseKeys<Server.HandlingTimeEventData>;
950
950
  /**
951
951
  * Rule event meta data
952
952
  */
953
- type RuleEventMeta = {
954
- name?: string;
955
- description?: string;
956
- group: string;
953
+ type AssistantEventMeta = {
954
+ assistantCode: string;
955
+ assistantOutput: string;
957
956
  evaluationId: string;
957
+ sources?: AssistantAnswerSource[];
958
958
  };
959
959
  /**
960
960
  * Map the send event name to the data value in the payload
@@ -971,10 +971,6 @@ type SendEventArgumentMap = {
971
971
  'entities found': Event$1<{
972
972
  entities: Entity[];
973
973
  }>;
974
- 'conversation summarized': Event$1<{
975
- summary: string;
976
- assistant?: string;
977
- }>;
978
974
  'style suggested': Event$1<{
979
975
  keywordMatches: {
980
976
  keyword: string;
@@ -985,28 +981,20 @@ type SendEventArgumentMap = {
985
981
  path: string;
986
982
  title: string;
987
983
  }>;
988
- 'Assistant response displayed': Event$1<RuleEventMeta & {
989
- cueText: string;
984
+ 'Assistant response displayed': Event$1<AssistantEventMeta & {
990
985
  input?: string;
991
- sources?: AssistantAnswerSource[];
992
- }>;
993
- 'Assistant response closed': Event$1<RuleEventMeta & {
994
- cueText: string;
995
986
  }>;
996
- 'Assistant response feedback': Event$1<RuleEventMeta & {
987
+ 'Assistant response closed': Event$1<AssistantEventMeta>;
988
+ 'Assistant response feedback': Event$1<AssistantEventMeta & {
997
989
  rating: 'up' | 'down';
998
- cueText: string;
999
990
  }>;
1000
- 'Assistant response used': Event$1<RuleEventMeta & {
1001
- originalText: string;
991
+ 'Assistant response used': Event$1<AssistantEventMeta & {
1002
992
  usedText: string;
1003
993
  }>;
1004
- 'Assistant response copied': Event$1<RuleEventMeta & {
1005
- originalText: string;
994
+ 'Assistant response copied': Event$1<AssistantEventMeta & {
1006
995
  copiedText: string;
1007
996
  }>;
1008
- 'Assistant call to action': Event$1<RuleEventMeta & {
1009
- originalText: string;
997
+ 'Assistant call to action': Event$1<AssistantEventMeta & {
1010
998
  eventName: string;
1011
999
  value: string;
1012
1000
  }>;
@@ -1019,15 +1007,6 @@ type SendEventArgumentMap = {
1019
1007
  threadId?: number;
1020
1008
  assistantCode: string;
1021
1009
  }>;
1022
- 'summary feedback': Event$1<{
1023
- summary: string;
1024
- rating: 'up' | 'down';
1025
- }>;
1026
- 'summary copied to clipboard': Event$1<{
1027
- originalText: string;
1028
- finalText: string;
1029
- assistant: string;
1030
- }>;
1031
1010
  'open search': Event$1<{
1032
1011
  via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
1033
1012
  }>;
@@ -1152,19 +1131,6 @@ declare class DeepdeskAPI {
1152
1131
  verifyLoginToken(token: string): Promise<{
1153
1132
  isLoggedIn: boolean;
1154
1133
  }>;
1155
- /**
1156
- * Temporarily restore getSummary for more controlled rollout
1157
- * @deprecated
1158
- */
1159
- getSummary(messages: Array<{
1160
- source: string;
1161
- text: string;
1162
- }>, options?: {
1163
- model?: string;
1164
- promptInstruction?: string;
1165
- agentId?: string;
1166
- externalConversationId?: string;
1167
- }): Promise<CamelCaseKeys<Server.Summary>>;
1168
1134
  evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1169
1135
  expectFormat: TOutput;
1170
1136
  threadId?: number;
@@ -2907,9 +2873,8 @@ declare class DeepdeskSDK {
2907
2873
  * });
2908
2874
  * ```
2909
2875
  *
2910
- * @throws {Error} If `setConversationQuery()` has not been called
2911
2876
  */
2912
- getSummary(args?: SummaryInput): Promise<string | null>;
2877
+ getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2913
2878
  private handleKeyDown;
2914
2879
  private handleAfterSendMessage;
2915
2880
  /**
package/dist/index.d.ts CHANGED
@@ -448,7 +448,7 @@ interface EvaluateInput {
448
448
  skipState?: boolean;
449
449
  expectFormat: Server.ResponseFormat;
450
450
  }
451
- type SummaryInput = Omit<EvaluateInput, 'assistantCode' | 'expectFormat'>;
451
+ type SummaryInput = Omit<EvaluateInput, 'expectFormat'>;
452
452
 
453
453
  type Fetch = typeof window.fetch;
454
454
  type HTTPClientOptions = {
@@ -950,11 +950,11 @@ type HandlingTimeEventData = CamelCaseKeys<Server.HandlingTimeEventData>;
950
950
  /**
951
951
  * Rule event meta data
952
952
  */
953
- type RuleEventMeta = {
954
- name?: string;
955
- description?: string;
956
- group: string;
953
+ type AssistantEventMeta = {
954
+ assistantCode: string;
955
+ assistantOutput: string;
957
956
  evaluationId: string;
957
+ sources?: AssistantAnswerSource[];
958
958
  };
959
959
  /**
960
960
  * Map the send event name to the data value in the payload
@@ -971,10 +971,6 @@ type SendEventArgumentMap = {
971
971
  'entities found': Event$1<{
972
972
  entities: Entity[];
973
973
  }>;
974
- 'conversation summarized': Event$1<{
975
- summary: string;
976
- assistant?: string;
977
- }>;
978
974
  'style suggested': Event$1<{
979
975
  keywordMatches: {
980
976
  keyword: string;
@@ -985,28 +981,20 @@ type SendEventArgumentMap = {
985
981
  path: string;
986
982
  title: string;
987
983
  }>;
988
- 'Assistant response displayed': Event$1<RuleEventMeta & {
989
- cueText: string;
984
+ 'Assistant response displayed': Event$1<AssistantEventMeta & {
990
985
  input?: string;
991
- sources?: AssistantAnswerSource[];
992
- }>;
993
- 'Assistant response closed': Event$1<RuleEventMeta & {
994
- cueText: string;
995
986
  }>;
996
- 'Assistant response feedback': Event$1<RuleEventMeta & {
987
+ 'Assistant response closed': Event$1<AssistantEventMeta>;
988
+ 'Assistant response feedback': Event$1<AssistantEventMeta & {
997
989
  rating: 'up' | 'down';
998
- cueText: string;
999
990
  }>;
1000
- 'Assistant response used': Event$1<RuleEventMeta & {
1001
- originalText: string;
991
+ 'Assistant response used': Event$1<AssistantEventMeta & {
1002
992
  usedText: string;
1003
993
  }>;
1004
- 'Assistant response copied': Event$1<RuleEventMeta & {
1005
- originalText: string;
994
+ 'Assistant response copied': Event$1<AssistantEventMeta & {
1006
995
  copiedText: string;
1007
996
  }>;
1008
- 'Assistant call to action': Event$1<RuleEventMeta & {
1009
- originalText: string;
997
+ 'Assistant call to action': Event$1<AssistantEventMeta & {
1010
998
  eventName: string;
1011
999
  value: string;
1012
1000
  }>;
@@ -1019,15 +1007,6 @@ type SendEventArgumentMap = {
1019
1007
  threadId?: number;
1020
1008
  assistantCode: string;
1021
1009
  }>;
1022
- 'summary feedback': Event$1<{
1023
- summary: string;
1024
- rating: 'up' | 'down';
1025
- }>;
1026
- 'summary copied to clipboard': Event$1<{
1027
- originalText: string;
1028
- finalText: string;
1029
- assistant: string;
1030
- }>;
1031
1010
  'open search': Event$1<{
1032
1011
  via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
1033
1012
  }>;
@@ -1152,19 +1131,6 @@ declare class DeepdeskAPI {
1152
1131
  verifyLoginToken(token: string): Promise<{
1153
1132
  isLoggedIn: boolean;
1154
1133
  }>;
1155
- /**
1156
- * Temporarily restore getSummary for more controlled rollout
1157
- * @deprecated
1158
- */
1159
- getSummary(messages: Array<{
1160
- source: string;
1161
- text: string;
1162
- }>, options?: {
1163
- model?: string;
1164
- promptInstruction?: string;
1165
- agentId?: string;
1166
- externalConversationId?: string;
1167
- }): Promise<CamelCaseKeys<Server.Summary>>;
1168
1134
  evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1169
1135
  expectFormat: TOutput;
1170
1136
  threadId?: number;
@@ -2907,9 +2873,8 @@ declare class DeepdeskSDK {
2907
2873
  * });
2908
2874
  * ```
2909
2875
  *
2910
- * @throws {Error} If `setConversationQuery()` has not been called
2911
2876
  */
2912
- getSummary(args?: SummaryInput): Promise<string | null>;
2877
+ getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2913
2878
  private handleKeyDown;
2914
2879
  private handleAfterSendMessage;
2915
2880
  /**