@deepdesk/deepdesk-sdk 17.0.1-beta.6 → 17.0.1-beta.7
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.cjs.js +7 -7
- package/dist/index.d.mts +102 -50
- package/dist/index.d.ts +102 -50
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +22 -22
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -594,10 +594,64 @@ declare namespace Server {
|
|
|
594
594
|
suggestion: string;
|
|
595
595
|
}[];
|
|
596
596
|
};
|
|
597
|
+
enum EventType {
|
|
598
|
+
SEND_MESSAGE = "Send Message",
|
|
599
|
+
HANDLING_TIME = "Handling Time",
|
|
600
|
+
ADD_TO_PERSONAL_COLLECTION = "Add to personal collection",
|
|
601
|
+
DELETE_FROM_PERSONAL_COLLECTION = "Delete from personal collection"
|
|
602
|
+
}
|
|
603
|
+
type UsedSuggestion = {
|
|
604
|
+
ab_test_name?: string | null;
|
|
605
|
+
ab_variant?: string | null;
|
|
606
|
+
input_type: string;
|
|
607
|
+
source?: string;
|
|
608
|
+
source_text?: string;
|
|
609
|
+
text: string;
|
|
610
|
+
training_jobs?: string[];
|
|
611
|
+
};
|
|
597
612
|
/**
|
|
598
|
-
*
|
|
613
|
+
* Abstract API object for event data
|
|
614
|
+
* @deprecated in favor of EventDataV2
|
|
615
|
+
* @see EventV2Data
|
|
599
616
|
*/
|
|
600
617
|
type EventData = {
|
|
618
|
+
conversation_id: string;
|
|
619
|
+
client_version: string;
|
|
620
|
+
source: 'agent' | 'visitor';
|
|
621
|
+
pastes: string[];
|
|
622
|
+
cuts: string[];
|
|
623
|
+
deletions: string[];
|
|
624
|
+
len_text_typed: number;
|
|
625
|
+
len_text_total: number;
|
|
626
|
+
len_text_assisted: number;
|
|
627
|
+
len_text_pasted: number;
|
|
628
|
+
len_text_cut: number;
|
|
629
|
+
len_text_deleted: number;
|
|
630
|
+
time_total_seconds: number;
|
|
631
|
+
chars_per_second: number;
|
|
632
|
+
text: string;
|
|
633
|
+
num_pastes: number;
|
|
634
|
+
text_suggestions_v2: UsedSuggestion[];
|
|
635
|
+
url_suggestions_v2: UsedSuggestion[];
|
|
636
|
+
url_link_suggestions_v2: UsedSuggestion[];
|
|
637
|
+
suggestions_counters: {
|
|
638
|
+
source: Sources;
|
|
639
|
+
count_offered: number;
|
|
640
|
+
}[];
|
|
641
|
+
time_start: string;
|
|
642
|
+
time_stop: string;
|
|
643
|
+
agent_id?: string;
|
|
644
|
+
agent_name?: string;
|
|
645
|
+
agent_email?: string;
|
|
646
|
+
platform: string;
|
|
647
|
+
backend_version: string;
|
|
648
|
+
engine_version: string;
|
|
649
|
+
gpt_version: string;
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
* Backend API object for event data v2
|
|
653
|
+
*/
|
|
654
|
+
type EventV2Data = {
|
|
601
655
|
name: string;
|
|
602
656
|
platform?: string;
|
|
603
657
|
conversation_id?: string;
|
|
@@ -648,28 +702,15 @@ declare namespace Server {
|
|
|
648
702
|
/**
|
|
649
703
|
* Handling time event data
|
|
650
704
|
*/
|
|
651
|
-
type HandlingTimeEventData =
|
|
652
|
-
client_version: string;
|
|
653
|
-
time_start: string;
|
|
654
|
-
time_stop: string;
|
|
655
|
-
};
|
|
705
|
+
type HandlingTimeEventData = Pick<EventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'> & Partial<Pick<EventData, 'agent_id' | 'agent_name' | 'agent_email'>>;
|
|
656
706
|
/**
|
|
657
707
|
* Send message event data
|
|
658
708
|
*/
|
|
659
|
-
type SendMessageEventData =
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
num_pastes: number;
|
|
665
|
-
suggestions: Array<{
|
|
666
|
-
input_type: string;
|
|
667
|
-
source?: Sources;
|
|
668
|
-
source_text?: string;
|
|
669
|
-
text: string;
|
|
670
|
-
training_jobs?: Array<string>;
|
|
671
|
-
}>;
|
|
672
|
-
};
|
|
709
|
+
type SendMessageEventData = Pick<EventData, 'client_version' | 'conversation_id' | 'source' | 'pastes' | 'cuts' | 'deletions' | 'len_text_typed' | 'len_text_total' | 'len_text_assisted' | 'len_text_pasted' | 'len_text_cut' | 'len_text_deleted' | 'time_total_seconds' | 'chars_per_second' | 'num_pastes' | 'text' | 'text_suggestions_v2' | 'suggestions_counters'> & Partial<Pick<EventData, 'agent_id' | 'agent_name' | 'agent_email'>>;
|
|
710
|
+
/**
|
|
711
|
+
* PersonalCollection event data
|
|
712
|
+
*/
|
|
713
|
+
type PersonalCollectionEventData = Pick<EventData, 'text' | 'platform'>;
|
|
673
714
|
/**
|
|
674
715
|
* Search results data
|
|
675
716
|
*/
|
|
@@ -867,15 +908,15 @@ type CreateConversationOptions = {
|
|
|
867
908
|
*/
|
|
868
909
|
type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
|
|
869
910
|
/**
|
|
870
|
-
* Event payload
|
|
911
|
+
* Event v2 payload
|
|
871
912
|
*/
|
|
872
|
-
type
|
|
913
|
+
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
|
|
873
914
|
data: T;
|
|
874
915
|
};
|
|
875
916
|
/**
|
|
876
917
|
* Handling time event data
|
|
877
918
|
*/
|
|
878
|
-
type HandlingTimeEventData = CamelCaseKeys<Server.HandlingTimeEventData
|
|
919
|
+
type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'>>;
|
|
879
920
|
/**
|
|
880
921
|
* Rule event meta data
|
|
881
922
|
*/
|
|
@@ -885,61 +926,67 @@ type RuleEventMeta = {
|
|
|
885
926
|
group: string;
|
|
886
927
|
};
|
|
887
928
|
/**
|
|
888
|
-
* Map the send event name to the data value in the payload
|
|
929
|
+
* Map the send event name to the data value in the payload. (V1)
|
|
930
|
+
* @deprecated
|
|
931
|
+
*/
|
|
932
|
+
type SendEventV1ArgumentMap = {
|
|
933
|
+
'Send Message': SendMessageEventData;
|
|
934
|
+
'Handling Time': HandlingTimeEventData;
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* Map the send event name to the data value in the payload. (V2)
|
|
889
938
|
*/
|
|
890
|
-
type
|
|
891
|
-
'
|
|
892
|
-
'Handling Time': Event$1<HandlingTimeEventData>;
|
|
893
|
-
'Add to personal collection': Event$1<{
|
|
939
|
+
type SendEventV2ArgumentMap = {
|
|
940
|
+
'Add to personal collection': EventV2<{
|
|
894
941
|
text: string;
|
|
895
942
|
}>;
|
|
896
|
-
'Delete from personal collection':
|
|
943
|
+
'Delete from personal collection': EventV2<{
|
|
897
944
|
text: string;
|
|
898
945
|
}>;
|
|
899
|
-
'entities found':
|
|
946
|
+
'entities found': EventV2<{
|
|
900
947
|
entities: Entity[];
|
|
901
948
|
}>;
|
|
902
|
-
'conversation summarized':
|
|
949
|
+
'conversation summarized': EventV2<{
|
|
903
950
|
summary: string;
|
|
904
951
|
assistant?: string;
|
|
905
952
|
}>;
|
|
906
|
-
'style suggested':
|
|
953
|
+
'style suggested': EventV2<{
|
|
907
954
|
keywordMatches: {
|
|
908
955
|
keyword: string;
|
|
909
956
|
suggestion: string;
|
|
910
957
|
}[];
|
|
911
958
|
}>;
|
|
912
|
-
'Image attached':
|
|
959
|
+
'Image attached': EventV2<{
|
|
913
960
|
path: string;
|
|
914
961
|
title: string;
|
|
915
962
|
}>;
|
|
916
|
-
'Assistant response displayed':
|
|
963
|
+
'Assistant response displayed': EventV2<RuleEventMeta & {
|
|
917
964
|
cueText: string;
|
|
918
965
|
}>;
|
|
919
|
-
'Assistant response closed':
|
|
966
|
+
'Assistant response closed': EventV2<RuleEventMeta & {
|
|
920
967
|
cueText: string;
|
|
921
968
|
}>;
|
|
922
|
-
'Assistant response feedback':
|
|
969
|
+
'Assistant response feedback': EventV2<RuleEventMeta & {
|
|
923
970
|
rating: 'up' | 'down';
|
|
924
971
|
cueText: string;
|
|
925
972
|
}>;
|
|
926
|
-
'Assistant response used':
|
|
973
|
+
'Assistant response used': EventV2<RuleEventMeta & {
|
|
927
974
|
usedText: string;
|
|
928
975
|
}>;
|
|
929
|
-
'Assistant response copied':
|
|
976
|
+
'Assistant response copied': EventV2<RuleEventMeta & {
|
|
930
977
|
copiedText: string;
|
|
931
978
|
}>;
|
|
932
|
-
'Assistant call to action':
|
|
979
|
+
'Assistant call to action': EventV2<RuleEventMeta & {
|
|
933
980
|
eventName: string;
|
|
934
981
|
value: string;
|
|
935
982
|
}>;
|
|
936
|
-
'knowledge assist feedback':
|
|
983
|
+
'knowledge assist feedback': EventV2<{
|
|
937
984
|
question: string;
|
|
938
985
|
isFollowUpQuestion: boolean;
|
|
939
986
|
isAgent: boolean;
|
|
940
987
|
answer: Server.KnowledgeResponse['answer'];
|
|
941
988
|
}>;
|
|
942
|
-
'knowledge assist question answered':
|
|
989
|
+
'knowledge assist question answered': EventV2<{
|
|
943
990
|
question: string;
|
|
944
991
|
answer: string;
|
|
945
992
|
sources: {
|
|
@@ -949,32 +996,32 @@ type SendEventArgumentMap = {
|
|
|
949
996
|
isFollowUpQuestion: boolean;
|
|
950
997
|
isAutoInitiated: boolean;
|
|
951
998
|
}>;
|
|
952
|
-
'knowledge assist source viewed':
|
|
999
|
+
'knowledge assist source viewed': EventV2<{
|
|
953
1000
|
question: string;
|
|
954
1001
|
sourceViewed: string;
|
|
955
1002
|
}>;
|
|
956
|
-
'knowledge assist reset':
|
|
1003
|
+
'knowledge assist reset': EventV2<{
|
|
957
1004
|
threadId?: number;
|
|
958
1005
|
}>;
|
|
959
|
-
'summary feedback':
|
|
1006
|
+
'summary feedback': EventV2<{
|
|
960
1007
|
summary: string;
|
|
961
1008
|
rating: 'up' | 'down';
|
|
962
1009
|
}>;
|
|
963
|
-
'summary copied to clipboard':
|
|
1010
|
+
'summary copied to clipboard': EventV2<{
|
|
964
1011
|
originalText: string;
|
|
965
1012
|
finalText: string;
|
|
966
1013
|
assistant: string;
|
|
967
1014
|
}>;
|
|
968
|
-
'open search':
|
|
1015
|
+
'open search': EventV2<{
|
|
969
1016
|
via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
|
|
970
1017
|
}>;
|
|
971
|
-
'open knowledge assistant':
|
|
1018
|
+
'open knowledge assistant': EventV2<{
|
|
972
1019
|
via: 'ctrl+k' | 'widget-shortcut' | 'search-command';
|
|
973
1020
|
}>;
|
|
974
|
-
'open my deepdesk':
|
|
1021
|
+
'open my deepdesk': EventV2<{
|
|
975
1022
|
via: 'widget-shortcut';
|
|
976
1023
|
}>;
|
|
977
|
-
'trigger on demand assistant':
|
|
1024
|
+
'trigger on demand assistant': EventV2<{
|
|
978
1025
|
assistantCode: string;
|
|
979
1026
|
}>;
|
|
980
1027
|
};
|
|
@@ -1039,7 +1086,12 @@ declare class DeepdeskAPI {
|
|
|
1039
1086
|
/**
|
|
1040
1087
|
* Send event with meta data for analytics
|
|
1041
1088
|
*/
|
|
1042
|
-
sendEvent<T extends keyof
|
|
1089
|
+
sendEvent<T extends keyof SendEventV2ArgumentMap>(event: T, payload: SendEventV2ArgumentMap[T]): Promise<void>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Send event with meta data for analytics
|
|
1092
|
+
* @deprecated
|
|
1093
|
+
*/
|
|
1094
|
+
sendEventV1<T extends keyof SendEventV1ArgumentMap>(event: T, payload: SendEventV1ArgumentMap[T]): Promise<void>;
|
|
1043
1095
|
getEntities(messages: Array<{
|
|
1044
1096
|
text: string;
|
|
1045
1097
|
}>): Promise<Entity[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -594,10 +594,64 @@ declare namespace Server {
|
|
|
594
594
|
suggestion: string;
|
|
595
595
|
}[];
|
|
596
596
|
};
|
|
597
|
+
enum EventType {
|
|
598
|
+
SEND_MESSAGE = "Send Message",
|
|
599
|
+
HANDLING_TIME = "Handling Time",
|
|
600
|
+
ADD_TO_PERSONAL_COLLECTION = "Add to personal collection",
|
|
601
|
+
DELETE_FROM_PERSONAL_COLLECTION = "Delete from personal collection"
|
|
602
|
+
}
|
|
603
|
+
type UsedSuggestion = {
|
|
604
|
+
ab_test_name?: string | null;
|
|
605
|
+
ab_variant?: string | null;
|
|
606
|
+
input_type: string;
|
|
607
|
+
source?: string;
|
|
608
|
+
source_text?: string;
|
|
609
|
+
text: string;
|
|
610
|
+
training_jobs?: string[];
|
|
611
|
+
};
|
|
597
612
|
/**
|
|
598
|
-
*
|
|
613
|
+
* Abstract API object for event data
|
|
614
|
+
* @deprecated in favor of EventDataV2
|
|
615
|
+
* @see EventV2Data
|
|
599
616
|
*/
|
|
600
617
|
type EventData = {
|
|
618
|
+
conversation_id: string;
|
|
619
|
+
client_version: string;
|
|
620
|
+
source: 'agent' | 'visitor';
|
|
621
|
+
pastes: string[];
|
|
622
|
+
cuts: string[];
|
|
623
|
+
deletions: string[];
|
|
624
|
+
len_text_typed: number;
|
|
625
|
+
len_text_total: number;
|
|
626
|
+
len_text_assisted: number;
|
|
627
|
+
len_text_pasted: number;
|
|
628
|
+
len_text_cut: number;
|
|
629
|
+
len_text_deleted: number;
|
|
630
|
+
time_total_seconds: number;
|
|
631
|
+
chars_per_second: number;
|
|
632
|
+
text: string;
|
|
633
|
+
num_pastes: number;
|
|
634
|
+
text_suggestions_v2: UsedSuggestion[];
|
|
635
|
+
url_suggestions_v2: UsedSuggestion[];
|
|
636
|
+
url_link_suggestions_v2: UsedSuggestion[];
|
|
637
|
+
suggestions_counters: {
|
|
638
|
+
source: Sources;
|
|
639
|
+
count_offered: number;
|
|
640
|
+
}[];
|
|
641
|
+
time_start: string;
|
|
642
|
+
time_stop: string;
|
|
643
|
+
agent_id?: string;
|
|
644
|
+
agent_name?: string;
|
|
645
|
+
agent_email?: string;
|
|
646
|
+
platform: string;
|
|
647
|
+
backend_version: string;
|
|
648
|
+
engine_version: string;
|
|
649
|
+
gpt_version: string;
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
* Backend API object for event data v2
|
|
653
|
+
*/
|
|
654
|
+
type EventV2Data = {
|
|
601
655
|
name: string;
|
|
602
656
|
platform?: string;
|
|
603
657
|
conversation_id?: string;
|
|
@@ -648,28 +702,15 @@ declare namespace Server {
|
|
|
648
702
|
/**
|
|
649
703
|
* Handling time event data
|
|
650
704
|
*/
|
|
651
|
-
type HandlingTimeEventData =
|
|
652
|
-
client_version: string;
|
|
653
|
-
time_start: string;
|
|
654
|
-
time_stop: string;
|
|
655
|
-
};
|
|
705
|
+
type HandlingTimeEventData = Pick<EventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'> & Partial<Pick<EventData, 'agent_id' | 'agent_name' | 'agent_email'>>;
|
|
656
706
|
/**
|
|
657
707
|
* Send message event data
|
|
658
708
|
*/
|
|
659
|
-
type SendMessageEventData =
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
num_pastes: number;
|
|
665
|
-
suggestions: Array<{
|
|
666
|
-
input_type: string;
|
|
667
|
-
source?: Sources;
|
|
668
|
-
source_text?: string;
|
|
669
|
-
text: string;
|
|
670
|
-
training_jobs?: Array<string>;
|
|
671
|
-
}>;
|
|
672
|
-
};
|
|
709
|
+
type SendMessageEventData = Pick<EventData, 'client_version' | 'conversation_id' | 'source' | 'pastes' | 'cuts' | 'deletions' | 'len_text_typed' | 'len_text_total' | 'len_text_assisted' | 'len_text_pasted' | 'len_text_cut' | 'len_text_deleted' | 'time_total_seconds' | 'chars_per_second' | 'num_pastes' | 'text' | 'text_suggestions_v2' | 'suggestions_counters'> & Partial<Pick<EventData, 'agent_id' | 'agent_name' | 'agent_email'>>;
|
|
710
|
+
/**
|
|
711
|
+
* PersonalCollection event data
|
|
712
|
+
*/
|
|
713
|
+
type PersonalCollectionEventData = Pick<EventData, 'text' | 'platform'>;
|
|
673
714
|
/**
|
|
674
715
|
* Search results data
|
|
675
716
|
*/
|
|
@@ -867,15 +908,15 @@ type CreateConversationOptions = {
|
|
|
867
908
|
*/
|
|
868
909
|
type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
|
|
869
910
|
/**
|
|
870
|
-
* Event payload
|
|
911
|
+
* Event v2 payload
|
|
871
912
|
*/
|
|
872
|
-
type
|
|
913
|
+
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
|
|
873
914
|
data: T;
|
|
874
915
|
};
|
|
875
916
|
/**
|
|
876
917
|
* Handling time event data
|
|
877
918
|
*/
|
|
878
|
-
type HandlingTimeEventData = CamelCaseKeys<Server.HandlingTimeEventData
|
|
919
|
+
type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'>>;
|
|
879
920
|
/**
|
|
880
921
|
* Rule event meta data
|
|
881
922
|
*/
|
|
@@ -885,61 +926,67 @@ type RuleEventMeta = {
|
|
|
885
926
|
group: string;
|
|
886
927
|
};
|
|
887
928
|
/**
|
|
888
|
-
* Map the send event name to the data value in the payload
|
|
929
|
+
* Map the send event name to the data value in the payload. (V1)
|
|
930
|
+
* @deprecated
|
|
931
|
+
*/
|
|
932
|
+
type SendEventV1ArgumentMap = {
|
|
933
|
+
'Send Message': SendMessageEventData;
|
|
934
|
+
'Handling Time': HandlingTimeEventData;
|
|
935
|
+
};
|
|
936
|
+
/**
|
|
937
|
+
* Map the send event name to the data value in the payload. (V2)
|
|
889
938
|
*/
|
|
890
|
-
type
|
|
891
|
-
'
|
|
892
|
-
'Handling Time': Event$1<HandlingTimeEventData>;
|
|
893
|
-
'Add to personal collection': Event$1<{
|
|
939
|
+
type SendEventV2ArgumentMap = {
|
|
940
|
+
'Add to personal collection': EventV2<{
|
|
894
941
|
text: string;
|
|
895
942
|
}>;
|
|
896
|
-
'Delete from personal collection':
|
|
943
|
+
'Delete from personal collection': EventV2<{
|
|
897
944
|
text: string;
|
|
898
945
|
}>;
|
|
899
|
-
'entities found':
|
|
946
|
+
'entities found': EventV2<{
|
|
900
947
|
entities: Entity[];
|
|
901
948
|
}>;
|
|
902
|
-
'conversation summarized':
|
|
949
|
+
'conversation summarized': EventV2<{
|
|
903
950
|
summary: string;
|
|
904
951
|
assistant?: string;
|
|
905
952
|
}>;
|
|
906
|
-
'style suggested':
|
|
953
|
+
'style suggested': EventV2<{
|
|
907
954
|
keywordMatches: {
|
|
908
955
|
keyword: string;
|
|
909
956
|
suggestion: string;
|
|
910
957
|
}[];
|
|
911
958
|
}>;
|
|
912
|
-
'Image attached':
|
|
959
|
+
'Image attached': EventV2<{
|
|
913
960
|
path: string;
|
|
914
961
|
title: string;
|
|
915
962
|
}>;
|
|
916
|
-
'Assistant response displayed':
|
|
963
|
+
'Assistant response displayed': EventV2<RuleEventMeta & {
|
|
917
964
|
cueText: string;
|
|
918
965
|
}>;
|
|
919
|
-
'Assistant response closed':
|
|
966
|
+
'Assistant response closed': EventV2<RuleEventMeta & {
|
|
920
967
|
cueText: string;
|
|
921
968
|
}>;
|
|
922
|
-
'Assistant response feedback':
|
|
969
|
+
'Assistant response feedback': EventV2<RuleEventMeta & {
|
|
923
970
|
rating: 'up' | 'down';
|
|
924
971
|
cueText: string;
|
|
925
972
|
}>;
|
|
926
|
-
'Assistant response used':
|
|
973
|
+
'Assistant response used': EventV2<RuleEventMeta & {
|
|
927
974
|
usedText: string;
|
|
928
975
|
}>;
|
|
929
|
-
'Assistant response copied':
|
|
976
|
+
'Assistant response copied': EventV2<RuleEventMeta & {
|
|
930
977
|
copiedText: string;
|
|
931
978
|
}>;
|
|
932
|
-
'Assistant call to action':
|
|
979
|
+
'Assistant call to action': EventV2<RuleEventMeta & {
|
|
933
980
|
eventName: string;
|
|
934
981
|
value: string;
|
|
935
982
|
}>;
|
|
936
|
-
'knowledge assist feedback':
|
|
983
|
+
'knowledge assist feedback': EventV2<{
|
|
937
984
|
question: string;
|
|
938
985
|
isFollowUpQuestion: boolean;
|
|
939
986
|
isAgent: boolean;
|
|
940
987
|
answer: Server.KnowledgeResponse['answer'];
|
|
941
988
|
}>;
|
|
942
|
-
'knowledge assist question answered':
|
|
989
|
+
'knowledge assist question answered': EventV2<{
|
|
943
990
|
question: string;
|
|
944
991
|
answer: string;
|
|
945
992
|
sources: {
|
|
@@ -949,32 +996,32 @@ type SendEventArgumentMap = {
|
|
|
949
996
|
isFollowUpQuestion: boolean;
|
|
950
997
|
isAutoInitiated: boolean;
|
|
951
998
|
}>;
|
|
952
|
-
'knowledge assist source viewed':
|
|
999
|
+
'knowledge assist source viewed': EventV2<{
|
|
953
1000
|
question: string;
|
|
954
1001
|
sourceViewed: string;
|
|
955
1002
|
}>;
|
|
956
|
-
'knowledge assist reset':
|
|
1003
|
+
'knowledge assist reset': EventV2<{
|
|
957
1004
|
threadId?: number;
|
|
958
1005
|
}>;
|
|
959
|
-
'summary feedback':
|
|
1006
|
+
'summary feedback': EventV2<{
|
|
960
1007
|
summary: string;
|
|
961
1008
|
rating: 'up' | 'down';
|
|
962
1009
|
}>;
|
|
963
|
-
'summary copied to clipboard':
|
|
1010
|
+
'summary copied to clipboard': EventV2<{
|
|
964
1011
|
originalText: string;
|
|
965
1012
|
finalText: string;
|
|
966
1013
|
assistant: string;
|
|
967
1014
|
}>;
|
|
968
|
-
'open search':
|
|
1015
|
+
'open search': EventV2<{
|
|
969
1016
|
via: 'ctrl+k' | 'autocomplete-overlay' | 'widget-shortcut';
|
|
970
1017
|
}>;
|
|
971
|
-
'open knowledge assistant':
|
|
1018
|
+
'open knowledge assistant': EventV2<{
|
|
972
1019
|
via: 'ctrl+k' | 'widget-shortcut' | 'search-command';
|
|
973
1020
|
}>;
|
|
974
|
-
'open my deepdesk':
|
|
1021
|
+
'open my deepdesk': EventV2<{
|
|
975
1022
|
via: 'widget-shortcut';
|
|
976
1023
|
}>;
|
|
977
|
-
'trigger on demand assistant':
|
|
1024
|
+
'trigger on demand assistant': EventV2<{
|
|
978
1025
|
assistantCode: string;
|
|
979
1026
|
}>;
|
|
980
1027
|
};
|
|
@@ -1039,7 +1086,12 @@ declare class DeepdeskAPI {
|
|
|
1039
1086
|
/**
|
|
1040
1087
|
* Send event with meta data for analytics
|
|
1041
1088
|
*/
|
|
1042
|
-
sendEvent<T extends keyof
|
|
1089
|
+
sendEvent<T extends keyof SendEventV2ArgumentMap>(event: T, payload: SendEventV2ArgumentMap[T]): Promise<void>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Send event with meta data for analytics
|
|
1092
|
+
* @deprecated
|
|
1093
|
+
*/
|
|
1094
|
+
sendEventV1<T extends keyof SendEventV1ArgumentMap>(event: T, payload: SendEventV1ArgumentMap[T]): Promise<void>;
|
|
1043
1095
|
getEntities(messages: Array<{
|
|
1044
1096
|
text: string;
|
|
1045
1097
|
}>): Promise<Entity[]>;
|