@deepdesk/deepdesk-sdk 14.1.1-beta.0 → 14.1.1-beta.10
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 +152 -97
- package/dist/index.d.ts +152 -97
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +16 -16
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
- package/widget.css +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -292,7 +292,7 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
292
292
|
dispose(): void;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
type State$
|
|
295
|
+
type State$g = {
|
|
296
296
|
startTime: Date | null;
|
|
297
297
|
stopTime: Date | null;
|
|
298
298
|
};
|
|
@@ -458,10 +458,15 @@ declare class DeepdeskBrokerAPI {
|
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
type EvaluationOutput = CamelCaseKeys<Server.EvaluationOutput>;
|
|
461
|
-
type State$
|
|
461
|
+
type State$f = {
|
|
462
462
|
outputs: EvaluationOutput[];
|
|
463
463
|
fetchState: FetchState;
|
|
464
464
|
};
|
|
465
|
+
type Transcript = Array<{
|
|
466
|
+
source: string;
|
|
467
|
+
text: string;
|
|
468
|
+
}>;
|
|
469
|
+
type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
|
|
465
470
|
|
|
466
471
|
interface StoreConfig {
|
|
467
472
|
deepdeskAPI: DeepdeskAPI;
|
|
@@ -471,17 +476,17 @@ interface StoreConfig {
|
|
|
471
476
|
preloadedState?: any;
|
|
472
477
|
}
|
|
473
478
|
declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
474
|
-
assistants: State$
|
|
475
|
-
answer: State$
|
|
476
|
-
auth: State$
|
|
477
|
-
autoflows: State$
|
|
478
|
-
conversation: State$
|
|
479
|
-
contentTypes: State$
|
|
480
|
-
customMessages: State$
|
|
481
|
-
passwordlessToken: State$
|
|
482
|
-
entities: State$
|
|
483
|
-
knowledgeAssistant: State$
|
|
484
|
-
handlingTime: State$
|
|
479
|
+
assistants: State$f;
|
|
480
|
+
answer: State$6;
|
|
481
|
+
auth: State$e;
|
|
482
|
+
autoflows: State$d;
|
|
483
|
+
conversation: State$c;
|
|
484
|
+
contentTypes: State$b;
|
|
485
|
+
customMessages: State$a;
|
|
486
|
+
passwordlessToken: State$9;
|
|
487
|
+
entities: State$8;
|
|
488
|
+
knowledgeAssistant: State$7;
|
|
489
|
+
handlingTime: State$g;
|
|
485
490
|
info: {
|
|
486
491
|
agentInfo?: AgentInfo | undefined;
|
|
487
492
|
agentSettings: unknown;
|
|
@@ -490,7 +495,7 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
490
495
|
platformVariables?: VariableMapping | undefined;
|
|
491
496
|
fetchState: FetchState;
|
|
492
497
|
};
|
|
493
|
-
input: State$
|
|
498
|
+
input: State$5;
|
|
494
499
|
settings: {
|
|
495
500
|
locale: Locale;
|
|
496
501
|
deanonymize: boolean;
|
|
@@ -523,9 +528,8 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
523
528
|
enableFeedbackForm: boolean;
|
|
524
529
|
hasKeyboardInput: boolean;
|
|
525
530
|
};
|
|
526
|
-
profile: State$
|
|
527
|
-
search: State$
|
|
528
|
-
summary: State$3;
|
|
531
|
+
profile: State$4;
|
|
532
|
+
search: State$3;
|
|
529
533
|
styleSuggestions: State$2;
|
|
530
534
|
ui: {
|
|
531
535
|
showTabHint: boolean;
|
|
@@ -538,17 +542,17 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
538
542
|
textSuggestions: TextSuggestionState;
|
|
539
543
|
}>, redux.AnyAction>;
|
|
540
544
|
declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
|
|
541
|
-
assistants: State$
|
|
542
|
-
answer: State$
|
|
543
|
-
auth: State$
|
|
544
|
-
autoflows: State$
|
|
545
|
-
conversation: State$
|
|
546
|
-
contentTypes: State$
|
|
547
|
-
customMessages: State$
|
|
548
|
-
passwordlessToken: State$
|
|
549
|
-
entities: State$
|
|
550
|
-
knowledgeAssistant: State$
|
|
551
|
-
handlingTime: State$
|
|
545
|
+
assistants: State$f;
|
|
546
|
+
answer: State$6;
|
|
547
|
+
auth: State$e;
|
|
548
|
+
autoflows: State$d;
|
|
549
|
+
conversation: State$c;
|
|
550
|
+
contentTypes: State$b;
|
|
551
|
+
customMessages: State$a;
|
|
552
|
+
passwordlessToken: State$9;
|
|
553
|
+
entities: State$8;
|
|
554
|
+
knowledgeAssistant: State$7;
|
|
555
|
+
handlingTime: State$g;
|
|
552
556
|
info: {
|
|
553
557
|
agentInfo?: AgentInfo | undefined;
|
|
554
558
|
agentSettings: unknown;
|
|
@@ -557,7 +561,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
557
561
|
platformVariables?: VariableMapping | undefined;
|
|
558
562
|
fetchState: FetchState;
|
|
559
563
|
};
|
|
560
|
-
input: State$
|
|
564
|
+
input: State$5;
|
|
561
565
|
settings: {
|
|
562
566
|
locale: Locale;
|
|
563
567
|
deanonymize: boolean;
|
|
@@ -590,9 +594,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
590
594
|
enableFeedbackForm: boolean;
|
|
591
595
|
hasKeyboardInput: boolean;
|
|
592
596
|
};
|
|
593
|
-
profile: State$
|
|
594
|
-
search: State$
|
|
595
|
-
summary: State$3;
|
|
597
|
+
profile: State$4;
|
|
598
|
+
search: State$3;
|
|
596
599
|
styleSuggestions: State$2;
|
|
597
600
|
ui: {
|
|
598
601
|
showTabHint: boolean;
|
|
@@ -604,17 +607,17 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
604
607
|
rules: State$1;
|
|
605
608
|
textSuggestions: TextSuggestionState;
|
|
606
609
|
}, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
|
|
607
|
-
assistants: State$
|
|
608
|
-
answer: State$
|
|
609
|
-
auth: State$
|
|
610
|
-
autoflows: State$
|
|
611
|
-
conversation: State$
|
|
612
|
-
contentTypes: State$
|
|
613
|
-
customMessages: State$
|
|
614
|
-
passwordlessToken: State$
|
|
615
|
-
entities: State$
|
|
616
|
-
knowledgeAssistant: State$
|
|
617
|
-
handlingTime: State$
|
|
610
|
+
assistants: State$f;
|
|
611
|
+
answer: State$6;
|
|
612
|
+
auth: State$e;
|
|
613
|
+
autoflows: State$d;
|
|
614
|
+
conversation: State$c;
|
|
615
|
+
contentTypes: State$b;
|
|
616
|
+
customMessages: State$a;
|
|
617
|
+
passwordlessToken: State$9;
|
|
618
|
+
entities: State$8;
|
|
619
|
+
knowledgeAssistant: State$7;
|
|
620
|
+
handlingTime: State$g;
|
|
618
621
|
info: {
|
|
619
622
|
agentInfo?: AgentInfo | undefined;
|
|
620
623
|
agentSettings: unknown;
|
|
@@ -623,7 +626,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
623
626
|
platformVariables?: VariableMapping | undefined;
|
|
624
627
|
fetchState: FetchState;
|
|
625
628
|
};
|
|
626
|
-
input: State$
|
|
629
|
+
input: State$5;
|
|
627
630
|
settings: {
|
|
628
631
|
locale: Locale;
|
|
629
632
|
deanonymize: boolean;
|
|
@@ -656,9 +659,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
656
659
|
enableFeedbackForm: boolean;
|
|
657
660
|
hasKeyboardInput: boolean;
|
|
658
661
|
};
|
|
659
|
-
profile: State$
|
|
660
|
-
search: State$
|
|
661
|
-
summary: State$3;
|
|
662
|
+
profile: State$4;
|
|
663
|
+
search: State$3;
|
|
662
664
|
styleSuggestions: State$2;
|
|
663
665
|
ui: {
|
|
664
666
|
showTabHint: boolean;
|
|
@@ -677,7 +679,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
677
679
|
type RootState = ReturnType<typeof reducers>;
|
|
678
680
|
type Store = ReturnType<typeof createStore>;
|
|
679
681
|
|
|
680
|
-
interface State$
|
|
682
|
+
interface State$e {
|
|
681
683
|
isLoggedIn: boolean | null;
|
|
682
684
|
loginFetchState: FetchState;
|
|
683
685
|
verifyFetchState: FetchState;
|
|
@@ -687,24 +689,24 @@ interface State$f {
|
|
|
687
689
|
type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
|
|
688
690
|
isBusy?: boolean;
|
|
689
691
|
};
|
|
690
|
-
interface State$
|
|
692
|
+
interface State$d {
|
|
691
693
|
list: Autoflow[];
|
|
692
694
|
fetchState: FetchState;
|
|
693
695
|
}
|
|
694
696
|
|
|
695
|
-
interface State$
|
|
697
|
+
interface State$c {
|
|
696
698
|
current: Conversation | null;
|
|
697
699
|
isSupported: boolean | null;
|
|
698
700
|
}
|
|
699
701
|
|
|
700
702
|
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
701
|
-
type State$
|
|
703
|
+
type State$b = {
|
|
702
704
|
data: ContentType[] | null;
|
|
703
705
|
fetchState: FetchState;
|
|
704
706
|
};
|
|
705
707
|
|
|
706
708
|
type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
|
|
707
|
-
interface State$
|
|
709
|
+
interface State$a {
|
|
708
710
|
list: CustomMessage[];
|
|
709
711
|
fetchState: FetchState;
|
|
710
712
|
sentSuggestions: string[];
|
|
@@ -712,17 +714,17 @@ interface State$b {
|
|
|
712
714
|
answeredSuggestions: string[];
|
|
713
715
|
}
|
|
714
716
|
|
|
715
|
-
type State$
|
|
717
|
+
type State$9 = {
|
|
716
718
|
token: string | null;
|
|
717
719
|
interval: NodeJS.Timer | null;
|
|
718
720
|
};
|
|
719
721
|
|
|
720
|
-
type State$
|
|
722
|
+
type State$8 = {
|
|
721
723
|
data: Entity[] | null;
|
|
722
724
|
fetchState: FetchState;
|
|
723
725
|
};
|
|
724
726
|
|
|
725
|
-
type State$
|
|
727
|
+
type State$7 = {
|
|
726
728
|
data: KnowledgeAssistant | null;
|
|
727
729
|
fetchState: FetchState;
|
|
728
730
|
};
|
|
@@ -745,7 +747,7 @@ interface KnowledgeResponse {
|
|
|
745
747
|
question: string;
|
|
746
748
|
answer: KnowledgeAnswer;
|
|
747
749
|
}
|
|
748
|
-
type State$
|
|
750
|
+
type State$6 = {
|
|
749
751
|
data: KnowledgeResponse[];
|
|
750
752
|
fetchState: FetchState;
|
|
751
753
|
};
|
|
@@ -1001,15 +1003,22 @@ declare namespace Server {
|
|
|
1001
1003
|
message: string;
|
|
1002
1004
|
profile_code: string;
|
|
1003
1005
|
}
|
|
1006
|
+
interface CallToAction {
|
|
1007
|
+
label: string;
|
|
1008
|
+
event: string;
|
|
1009
|
+
value: string;
|
|
1010
|
+
}
|
|
1004
1011
|
interface Cue {
|
|
1005
1012
|
text: string;
|
|
1006
1013
|
title: string;
|
|
1007
1014
|
rule: Pick<Rule, 'id' | 'name' | 'label' | 'description'>;
|
|
1015
|
+
call_to_action?: CallToAction;
|
|
1008
1016
|
}
|
|
1009
1017
|
interface EvaluationOutput {
|
|
1010
1018
|
code: string;
|
|
1011
1019
|
name: string;
|
|
1012
1020
|
response: string;
|
|
1021
|
+
call_to_action?: CallToAction;
|
|
1013
1022
|
}
|
|
1014
1023
|
/**
|
|
1015
1024
|
* Handling time event data
|
|
@@ -1092,7 +1101,15 @@ declare namespace Server {
|
|
|
1092
1101
|
summarizer: boolean;
|
|
1093
1102
|
summarizer_prompt_instruction: string;
|
|
1094
1103
|
summarizer_model: string;
|
|
1104
|
+
/**
|
|
1105
|
+
* Old rule group
|
|
1106
|
+
* @deprecated in favor of `summarizer_assistant_new`
|
|
1107
|
+
*/
|
|
1095
1108
|
summarizer_assistant?: string;
|
|
1109
|
+
summarizer_assistant_new?: string;
|
|
1110
|
+
conversation_accepted_assistant?: string;
|
|
1111
|
+
conversation_new_message_assistant?: string;
|
|
1112
|
+
conversation_ended_assistant?: string;
|
|
1096
1113
|
knowledge_assistant: string;
|
|
1097
1114
|
active_config: {
|
|
1098
1115
|
default_locale: string;
|
|
@@ -1233,7 +1250,7 @@ type SendEventV2ArgumentMap = {
|
|
|
1233
1250
|
}>;
|
|
1234
1251
|
'conversation summarized': EventV2<{
|
|
1235
1252
|
summary: string;
|
|
1236
|
-
|
|
1253
|
+
assistant?: string;
|
|
1237
1254
|
}>;
|
|
1238
1255
|
'style suggested': EventV2<{
|
|
1239
1256
|
keywordMatches: {
|
|
@@ -1261,6 +1278,10 @@ type SendEventV2ArgumentMap = {
|
|
|
1261
1278
|
'Assistant response copied': EventV2<RuleEventMeta & {
|
|
1262
1279
|
copiedText: string;
|
|
1263
1280
|
}>;
|
|
1281
|
+
'Assistant call to action': EventV2<RuleEventMeta & {
|
|
1282
|
+
eventName: string;
|
|
1283
|
+
value: string;
|
|
1284
|
+
}>;
|
|
1264
1285
|
'summary feedback': EventV2<{
|
|
1265
1286
|
summary: string;
|
|
1266
1287
|
rating: 'up' | 'down';
|
|
@@ -1351,15 +1372,6 @@ declare class DeepdeskAPI {
|
|
|
1351
1372
|
getEntities(messages: Array<{
|
|
1352
1373
|
text: string;
|
|
1353
1374
|
}>): Promise<Entity[]>;
|
|
1354
|
-
getSummary(messages: Array<{
|
|
1355
|
-
source: string;
|
|
1356
|
-
text: string;
|
|
1357
|
-
}>, options?: {
|
|
1358
|
-
model?: string;
|
|
1359
|
-
promptInstruction?: string;
|
|
1360
|
-
agentId?: string;
|
|
1361
|
-
externalConversationId?: string;
|
|
1362
|
-
}): Promise<CamelCaseKeys<Server.Summary>>;
|
|
1363
1375
|
/**
|
|
1364
1376
|
* Get a temporary exchange / login token
|
|
1365
1377
|
*/
|
|
@@ -1416,9 +1428,27 @@ declare class DeepdeskAPI {
|
|
|
1416
1428
|
evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
|
|
1417
1429
|
raiseForFailingConditions?: boolean;
|
|
1418
1430
|
}): Promise<CamelCaseKeys<Server.Cue[]>>;
|
|
1419
|
-
|
|
1431
|
+
/**
|
|
1432
|
+
* Temporarily restore getSummary for more controlled rollout
|
|
1433
|
+
* @deprecated
|
|
1434
|
+
*/
|
|
1435
|
+
getSummary(messages: Array<{
|
|
1436
|
+
source: string;
|
|
1437
|
+
text: string;
|
|
1438
|
+
}>, options?: {
|
|
1439
|
+
model?: string;
|
|
1440
|
+
promptInstruction?: string;
|
|
1441
|
+
agentId?: string;
|
|
1442
|
+
externalConversationId?: string;
|
|
1443
|
+
}): Promise<CamelCaseKeys<Server.Summary>>;
|
|
1444
|
+
evaluateAssistant<TInput = Record<string, unknown>>(assistantCode: string, options: {
|
|
1445
|
+
input: TInput;
|
|
1446
|
+
transcript?: Array<{
|
|
1447
|
+
source: string;
|
|
1448
|
+
text: string;
|
|
1449
|
+
}>;
|
|
1420
1450
|
conversationId?: string;
|
|
1421
|
-
}): Promise<CamelCaseKeys<Server.EvaluationOutput[]
|
|
1451
|
+
}): Promise<CamelCaseKeys<Server.EvaluationOutput[]> | string>;
|
|
1422
1452
|
getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
|
|
1423
1453
|
translateMessages(params: TranslationRequest): Promise<TranslationResponse>;
|
|
1424
1454
|
private handleDeepdeskVersionHeaders;
|
|
@@ -1590,7 +1620,7 @@ type MetricState = {
|
|
|
1590
1620
|
textSuggestions: SuggestionMetrics[];
|
|
1591
1621
|
cuts: any[];
|
|
1592
1622
|
};
|
|
1593
|
-
type State$
|
|
1623
|
+
type State$5 = {
|
|
1594
1624
|
text: string;
|
|
1595
1625
|
html: string | null;
|
|
1596
1626
|
selection: SelectionRange;
|
|
@@ -1605,7 +1635,7 @@ type State$6 = {
|
|
|
1605
1635
|
selectedSuggestionIndex: number;
|
|
1606
1636
|
};
|
|
1607
1637
|
|
|
1608
|
-
type State$
|
|
1638
|
+
type State$4 = {
|
|
1609
1639
|
data: Profile | null;
|
|
1610
1640
|
fetchState: FetchState;
|
|
1611
1641
|
};
|
|
@@ -1619,7 +1649,7 @@ declare enum SearchResultDefaultType {
|
|
|
1619
1649
|
}
|
|
1620
1650
|
type SearchResultType = string | SearchResultDefaultType;
|
|
1621
1651
|
type SearchResult = SearchSuggestion;
|
|
1622
|
-
interface State$
|
|
1652
|
+
interface State$3 {
|
|
1623
1653
|
list: Array<SearchResult>;
|
|
1624
1654
|
page: string;
|
|
1625
1655
|
fetchState: FetchState;
|
|
@@ -1627,12 +1657,6 @@ interface State$4 {
|
|
|
1627
1657
|
aggregates: Record<string, number>;
|
|
1628
1658
|
}
|
|
1629
1659
|
|
|
1630
|
-
type State$3 = {
|
|
1631
|
-
data: string | null;
|
|
1632
|
-
model?: string;
|
|
1633
|
-
fetchState: FetchState;
|
|
1634
|
-
};
|
|
1635
|
-
|
|
1636
1660
|
type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
|
|
1637
1661
|
interface State$2 {
|
|
1638
1662
|
list: StyleSuggestion;
|
|
@@ -1910,6 +1934,7 @@ declare const styles: {
|
|
|
1910
1934
|
readonly "label": string;
|
|
1911
1935
|
readonly "value": string;
|
|
1912
1936
|
readonly "copyButton": string;
|
|
1937
|
+
readonly "copyButtonText": string;
|
|
1913
1938
|
readonly "isTrue": string;
|
|
1914
1939
|
readonly "isFalse": string;
|
|
1915
1940
|
};
|
|
@@ -2042,6 +2067,9 @@ interface SDKEventMap {
|
|
|
2042
2067
|
name: string;
|
|
2043
2068
|
data: unknown;
|
|
2044
2069
|
};
|
|
2070
|
+
'call-to-action': {
|
|
2071
|
+
cue: Cue;
|
|
2072
|
+
};
|
|
2045
2073
|
logout: undefined;
|
|
2046
2074
|
ready: undefined;
|
|
2047
2075
|
showSearchOverlay: boolean;
|
|
@@ -2099,17 +2127,17 @@ declare class DeepdeskSDK {
|
|
|
2099
2127
|
store: Store;
|
|
2100
2128
|
constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
2101
2129
|
get state(): redux.EmptyObject & {
|
|
2102
|
-
assistants: State$
|
|
2103
|
-
answer: State$
|
|
2104
|
-
auth: State$
|
|
2105
|
-
autoflows: State$
|
|
2106
|
-
conversation: State$
|
|
2107
|
-
contentTypes: State$
|
|
2108
|
-
customMessages: State$
|
|
2109
|
-
passwordlessToken: State$
|
|
2110
|
-
entities: State$
|
|
2111
|
-
knowledgeAssistant: State$
|
|
2112
|
-
handlingTime: State$
|
|
2130
|
+
assistants: State$f;
|
|
2131
|
+
answer: State$6;
|
|
2132
|
+
auth: State$e;
|
|
2133
|
+
autoflows: State$d;
|
|
2134
|
+
conversation: State$c;
|
|
2135
|
+
contentTypes: State$b;
|
|
2136
|
+
customMessages: State$a;
|
|
2137
|
+
passwordlessToken: State$9;
|
|
2138
|
+
entities: State$8;
|
|
2139
|
+
knowledgeAssistant: State$7;
|
|
2140
|
+
handlingTime: State$g;
|
|
2113
2141
|
info: {
|
|
2114
2142
|
agentInfo?: AgentInfo | undefined;
|
|
2115
2143
|
agentSettings: unknown;
|
|
@@ -2118,7 +2146,7 @@ declare class DeepdeskSDK {
|
|
|
2118
2146
|
platformVariables?: VariableMapping | undefined;
|
|
2119
2147
|
fetchState: FetchState;
|
|
2120
2148
|
};
|
|
2121
|
-
input: State$
|
|
2149
|
+
input: State$5;
|
|
2122
2150
|
settings: {
|
|
2123
2151
|
locale: Locale;
|
|
2124
2152
|
deanonymize: boolean;
|
|
@@ -2151,9 +2179,8 @@ declare class DeepdeskSDK {
|
|
|
2151
2179
|
enableFeedbackForm: boolean;
|
|
2152
2180
|
hasKeyboardInput: boolean;
|
|
2153
2181
|
};
|
|
2154
|
-
profile: State$
|
|
2155
|
-
search: State$
|
|
2156
|
-
summary: State$3;
|
|
2182
|
+
profile: State$4;
|
|
2183
|
+
search: State$3;
|
|
2157
2184
|
styleSuggestions: State$2;
|
|
2158
2185
|
ui: {
|
|
2159
2186
|
showTabHint: boolean;
|
|
@@ -2241,10 +2268,6 @@ declare class DeepdeskSDK {
|
|
|
2241
2268
|
* Reset conversation
|
|
2242
2269
|
*/
|
|
2243
2270
|
resetConversation(): void;
|
|
2244
|
-
/**
|
|
2245
|
-
* Get summary from conversation
|
|
2246
|
-
*/
|
|
2247
|
-
getSummary(): Promise<string>;
|
|
2248
2271
|
/**
|
|
2249
2272
|
* Change settings value
|
|
2250
2273
|
*/
|
|
@@ -2275,8 +2298,40 @@ declare class DeepdeskSDK {
|
|
|
2275
2298
|
*/
|
|
2276
2299
|
refresh(): Promise<void>;
|
|
2277
2300
|
notifyExternalSuggestion(suggestion: StageSuggestion): void;
|
|
2301
|
+
/**
|
|
2302
|
+
* @deprecated in favor of `evaluateAssistant`
|
|
2303
|
+
*/
|
|
2278
2304
|
evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<Cue[]>;
|
|
2279
|
-
|
|
2305
|
+
/**
|
|
2306
|
+
* Evaluate assistant
|
|
2307
|
+
* By default will show cues in widget
|
|
2308
|
+
*/
|
|
2309
|
+
evaluateAssistant(assistantCode: string, options?: {
|
|
2310
|
+
input?: Record<string, any>;
|
|
2311
|
+
transcript?: TranscriptOption;
|
|
2312
|
+
includeTags?: boolean;
|
|
2313
|
+
showCuesInWidget?: boolean;
|
|
2314
|
+
}): Promise<EvaluationOutput[] | string>;
|
|
2315
|
+
/**
|
|
2316
|
+
* @deprecated in favor of passing `payload` through `options` argument
|
|
2317
|
+
* TODO: remove when integrations use first call signature
|
|
2318
|
+
*/
|
|
2319
|
+
evaluateAssistant(assistantCode: string, payload?: Record<string, any>): Promise<EvaluationOutput[] | string>;
|
|
2320
|
+
/**
|
|
2321
|
+
* Evaluate conversation lifecycle assistant
|
|
2322
|
+
* Convenient wrapper around `evaluateAssistant`.
|
|
2323
|
+
* By default includes 'stored-transcript' and 'tags'.
|
|
2324
|
+
*/
|
|
2325
|
+
evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
|
|
2326
|
+
input?: Record<string, any>;
|
|
2327
|
+
transcript?: TranscriptOption;
|
|
2328
|
+
includeTags?: boolean;
|
|
2329
|
+
showCuesInWidget?: boolean;
|
|
2330
|
+
}): Promise<void>;
|
|
2331
|
+
/**
|
|
2332
|
+
* Get summary from conversation
|
|
2333
|
+
*/
|
|
2334
|
+
getSummary(): Promise<string | null>;
|
|
2280
2335
|
private handleKeyDown;
|
|
2281
2336
|
private handleAfterSendMessage;
|
|
2282
2337
|
handlingTimeStart(): void;
|