@deepdesk/deepdesk-sdk 18.1.2-beta.9 → 18.2.1-beta.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,9 +971,14 @@ 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;
974
+ 'entity copied': Event$1<{
975
+ entity: Entity;
976
+ type: 'copy';
977
+ }>;
978
+ 'suggestion feedback': Event$1<{
979
+ text: string;
980
+ source: string;
981
+ context?: string;
977
982
  }>;
978
983
  'style suggested': Event$1<{
979
984
  keywordMatches: {
@@ -985,28 +990,20 @@ type SendEventArgumentMap = {
985
990
  path: string;
986
991
  title: string;
987
992
  }>;
988
- 'Assistant response displayed': Event$1<RuleEventMeta & {
989
- cueText: string;
993
+ 'Assistant response displayed': Event$1<AssistantEventMeta & {
990
994
  input?: string;
991
- sources?: AssistantAnswerSource[];
992
- }>;
993
- 'Assistant response closed': Event$1<RuleEventMeta & {
994
- cueText: string;
995
995
  }>;
996
- 'Assistant response feedback': Event$1<RuleEventMeta & {
996
+ 'Assistant response closed': Event$1<AssistantEventMeta>;
997
+ 'Assistant response feedback': Event$1<AssistantEventMeta & {
997
998
  rating: 'up' | 'down';
998
- cueText: string;
999
999
  }>;
1000
- 'Assistant response used': Event$1<RuleEventMeta & {
1001
- originalText: string;
1000
+ 'Assistant response used': Event$1<AssistantEventMeta & {
1002
1001
  usedText: string;
1003
1002
  }>;
1004
- 'Assistant response copied': Event$1<RuleEventMeta & {
1005
- originalText: string;
1003
+ 'Assistant response copied': Event$1<AssistantEventMeta & {
1006
1004
  copiedText: string;
1007
1005
  }>;
1008
- 'Assistant call to action': Event$1<RuleEventMeta & {
1009
- originalText: string;
1006
+ 'Assistant call to action': Event$1<AssistantEventMeta & {
1010
1007
  eventName: string;
1011
1008
  value: string;
1012
1009
  }>;
@@ -1019,15 +1016,6 @@ type SendEventArgumentMap = {
1019
1016
  threadId?: number;
1020
1017
  assistantCode: string;
1021
1018
  }>;
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
1019
  'open search': Event$1<{
1032
1020
  via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
1033
1021
  }>;
@@ -1152,19 +1140,6 @@ declare class DeepdeskAPI {
1152
1140
  verifyLoginToken(token: string): Promise<{
1153
1141
  isLoggedIn: boolean;
1154
1142
  }>;
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
1143
  evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1169
1144
  expectFormat: TOutput;
1170
1145
  threadId?: number;
@@ -2907,9 +2882,8 @@ declare class DeepdeskSDK {
2907
2882
  * });
2908
2883
  * ```
2909
2884
  *
2910
- * @throws {Error} If `setConversationQuery()` has not been called
2911
2885
  */
2912
- getSummary(args?: SummaryInput): Promise<string | null>;
2886
+ getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2913
2887
  private handleKeyDown;
2914
2888
  private handleAfterSendMessage;
2915
2889
  /**
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,9 +971,14 @@ 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;
974
+ 'entity copied': Event$1<{
975
+ entity: Entity;
976
+ type: 'copy';
977
+ }>;
978
+ 'suggestion feedback': Event$1<{
979
+ text: string;
980
+ source: string;
981
+ context?: string;
977
982
  }>;
978
983
  'style suggested': Event$1<{
979
984
  keywordMatches: {
@@ -985,28 +990,20 @@ type SendEventArgumentMap = {
985
990
  path: string;
986
991
  title: string;
987
992
  }>;
988
- 'Assistant response displayed': Event$1<RuleEventMeta & {
989
- cueText: string;
993
+ 'Assistant response displayed': Event$1<AssistantEventMeta & {
990
994
  input?: string;
991
- sources?: AssistantAnswerSource[];
992
- }>;
993
- 'Assistant response closed': Event$1<RuleEventMeta & {
994
- cueText: string;
995
995
  }>;
996
- 'Assistant response feedback': Event$1<RuleEventMeta & {
996
+ 'Assistant response closed': Event$1<AssistantEventMeta>;
997
+ 'Assistant response feedback': Event$1<AssistantEventMeta & {
997
998
  rating: 'up' | 'down';
998
- cueText: string;
999
999
  }>;
1000
- 'Assistant response used': Event$1<RuleEventMeta & {
1001
- originalText: string;
1000
+ 'Assistant response used': Event$1<AssistantEventMeta & {
1002
1001
  usedText: string;
1003
1002
  }>;
1004
- 'Assistant response copied': Event$1<RuleEventMeta & {
1005
- originalText: string;
1003
+ 'Assistant response copied': Event$1<AssistantEventMeta & {
1006
1004
  copiedText: string;
1007
1005
  }>;
1008
- 'Assistant call to action': Event$1<RuleEventMeta & {
1009
- originalText: string;
1006
+ 'Assistant call to action': Event$1<AssistantEventMeta & {
1010
1007
  eventName: string;
1011
1008
  value: string;
1012
1009
  }>;
@@ -1019,15 +1016,6 @@ type SendEventArgumentMap = {
1019
1016
  threadId?: number;
1020
1017
  assistantCode: string;
1021
1018
  }>;
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
1019
  'open search': Event$1<{
1032
1020
  via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
1033
1021
  }>;
@@ -1152,19 +1140,6 @@ declare class DeepdeskAPI {
1152
1140
  verifyLoginToken(token: string): Promise<{
1153
1141
  isLoggedIn: boolean;
1154
1142
  }>;
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
1143
  evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1169
1144
  expectFormat: TOutput;
1170
1145
  threadId?: number;
@@ -2907,9 +2882,8 @@ declare class DeepdeskSDK {
2907
2882
  * });
2908
2883
  * ```
2909
2884
  *
2910
- * @throws {Error} If `setConversationQuery()` has not been called
2911
2885
  */
2912
- getSummary(args?: SummaryInput): Promise<string | null>;
2886
+ getSummary(args?: Omit<SummaryInput, 'assistantCode'>): Promise<string | null>;
2913
2887
  private handleKeyDown;
2914
2888
  private handleAfterSendMessage;
2915
2889
  /**