@deepdesk/deepdesk-sdk 14.1.1-beta.0 → 14.1.1-beta.2
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 +8 -8
- package/dist/index.d.mts +111 -96
- package/dist/index.d.ts +111 -96
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +18 -18
- package/package.json +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,7 +458,7 @@ 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
|
};
|
|
@@ -471,17 +471,17 @@ interface StoreConfig {
|
|
|
471
471
|
preloadedState?: any;
|
|
472
472
|
}
|
|
473
473
|
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$
|
|
474
|
+
assistants: State$f;
|
|
475
|
+
answer: State$6;
|
|
476
|
+
auth: State$e;
|
|
477
|
+
autoflows: State$d;
|
|
478
|
+
conversation: State$c;
|
|
479
|
+
contentTypes: State$b;
|
|
480
|
+
customMessages: State$a;
|
|
481
|
+
passwordlessToken: State$9;
|
|
482
|
+
entities: State$8;
|
|
483
|
+
knowledgeAssistant: State$7;
|
|
484
|
+
handlingTime: State$g;
|
|
485
485
|
info: {
|
|
486
486
|
agentInfo?: AgentInfo | undefined;
|
|
487
487
|
agentSettings: unknown;
|
|
@@ -490,7 +490,7 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
490
490
|
platformVariables?: VariableMapping | undefined;
|
|
491
491
|
fetchState: FetchState;
|
|
492
492
|
};
|
|
493
|
-
input: State$
|
|
493
|
+
input: State$5;
|
|
494
494
|
settings: {
|
|
495
495
|
locale: Locale;
|
|
496
496
|
deanonymize: boolean;
|
|
@@ -523,9 +523,8 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
523
523
|
enableFeedbackForm: boolean;
|
|
524
524
|
hasKeyboardInput: boolean;
|
|
525
525
|
};
|
|
526
|
-
profile: State$
|
|
527
|
-
search: State$
|
|
528
|
-
summary: State$3;
|
|
526
|
+
profile: State$4;
|
|
527
|
+
search: State$3;
|
|
529
528
|
styleSuggestions: State$2;
|
|
530
529
|
ui: {
|
|
531
530
|
showTabHint: boolean;
|
|
@@ -538,17 +537,17 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
538
537
|
textSuggestions: TextSuggestionState;
|
|
539
538
|
}>, redux.AnyAction>;
|
|
540
539
|
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$
|
|
540
|
+
assistants: State$f;
|
|
541
|
+
answer: State$6;
|
|
542
|
+
auth: State$e;
|
|
543
|
+
autoflows: State$d;
|
|
544
|
+
conversation: State$c;
|
|
545
|
+
contentTypes: State$b;
|
|
546
|
+
customMessages: State$a;
|
|
547
|
+
passwordlessToken: State$9;
|
|
548
|
+
entities: State$8;
|
|
549
|
+
knowledgeAssistant: State$7;
|
|
550
|
+
handlingTime: State$g;
|
|
552
551
|
info: {
|
|
553
552
|
agentInfo?: AgentInfo | undefined;
|
|
554
553
|
agentSettings: unknown;
|
|
@@ -557,7 +556,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
557
556
|
platformVariables?: VariableMapping | undefined;
|
|
558
557
|
fetchState: FetchState;
|
|
559
558
|
};
|
|
560
|
-
input: State$
|
|
559
|
+
input: State$5;
|
|
561
560
|
settings: {
|
|
562
561
|
locale: Locale;
|
|
563
562
|
deanonymize: boolean;
|
|
@@ -590,9 +589,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
590
589
|
enableFeedbackForm: boolean;
|
|
591
590
|
hasKeyboardInput: boolean;
|
|
592
591
|
};
|
|
593
|
-
profile: State$
|
|
594
|
-
search: State$
|
|
595
|
-
summary: State$3;
|
|
592
|
+
profile: State$4;
|
|
593
|
+
search: State$3;
|
|
596
594
|
styleSuggestions: State$2;
|
|
597
595
|
ui: {
|
|
598
596
|
showTabHint: boolean;
|
|
@@ -604,17 +602,17 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
604
602
|
rules: State$1;
|
|
605
603
|
textSuggestions: TextSuggestionState;
|
|
606
604
|
}, 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$
|
|
605
|
+
assistants: State$f;
|
|
606
|
+
answer: State$6;
|
|
607
|
+
auth: State$e;
|
|
608
|
+
autoflows: State$d;
|
|
609
|
+
conversation: State$c;
|
|
610
|
+
contentTypes: State$b;
|
|
611
|
+
customMessages: State$a;
|
|
612
|
+
passwordlessToken: State$9;
|
|
613
|
+
entities: State$8;
|
|
614
|
+
knowledgeAssistant: State$7;
|
|
615
|
+
handlingTime: State$g;
|
|
618
616
|
info: {
|
|
619
617
|
agentInfo?: AgentInfo | undefined;
|
|
620
618
|
agentSettings: unknown;
|
|
@@ -623,7 +621,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
623
621
|
platformVariables?: VariableMapping | undefined;
|
|
624
622
|
fetchState: FetchState;
|
|
625
623
|
};
|
|
626
|
-
input: State$
|
|
624
|
+
input: State$5;
|
|
627
625
|
settings: {
|
|
628
626
|
locale: Locale;
|
|
629
627
|
deanonymize: boolean;
|
|
@@ -656,9 +654,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
656
654
|
enableFeedbackForm: boolean;
|
|
657
655
|
hasKeyboardInput: boolean;
|
|
658
656
|
};
|
|
659
|
-
profile: State$
|
|
660
|
-
search: State$
|
|
661
|
-
summary: State$3;
|
|
657
|
+
profile: State$4;
|
|
658
|
+
search: State$3;
|
|
662
659
|
styleSuggestions: State$2;
|
|
663
660
|
ui: {
|
|
664
661
|
showTabHint: boolean;
|
|
@@ -677,7 +674,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
677
674
|
type RootState = ReturnType<typeof reducers>;
|
|
678
675
|
type Store = ReturnType<typeof createStore>;
|
|
679
676
|
|
|
680
|
-
interface State$
|
|
677
|
+
interface State$e {
|
|
681
678
|
isLoggedIn: boolean | null;
|
|
682
679
|
loginFetchState: FetchState;
|
|
683
680
|
verifyFetchState: FetchState;
|
|
@@ -687,24 +684,24 @@ interface State$f {
|
|
|
687
684
|
type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
|
|
688
685
|
isBusy?: boolean;
|
|
689
686
|
};
|
|
690
|
-
interface State$
|
|
687
|
+
interface State$d {
|
|
691
688
|
list: Autoflow[];
|
|
692
689
|
fetchState: FetchState;
|
|
693
690
|
}
|
|
694
691
|
|
|
695
|
-
interface State$
|
|
692
|
+
interface State$c {
|
|
696
693
|
current: Conversation | null;
|
|
697
694
|
isSupported: boolean | null;
|
|
698
695
|
}
|
|
699
696
|
|
|
700
697
|
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
701
|
-
type State$
|
|
698
|
+
type State$b = {
|
|
702
699
|
data: ContentType[] | null;
|
|
703
700
|
fetchState: FetchState;
|
|
704
701
|
};
|
|
705
702
|
|
|
706
703
|
type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
|
|
707
|
-
interface State$
|
|
704
|
+
interface State$a {
|
|
708
705
|
list: CustomMessage[];
|
|
709
706
|
fetchState: FetchState;
|
|
710
707
|
sentSuggestions: string[];
|
|
@@ -712,17 +709,17 @@ interface State$b {
|
|
|
712
709
|
answeredSuggestions: string[];
|
|
713
710
|
}
|
|
714
711
|
|
|
715
|
-
type State$
|
|
712
|
+
type State$9 = {
|
|
716
713
|
token: string | null;
|
|
717
714
|
interval: NodeJS.Timer | null;
|
|
718
715
|
};
|
|
719
716
|
|
|
720
|
-
type State$
|
|
717
|
+
type State$8 = {
|
|
721
718
|
data: Entity[] | null;
|
|
722
719
|
fetchState: FetchState;
|
|
723
720
|
};
|
|
724
721
|
|
|
725
|
-
type State$
|
|
722
|
+
type State$7 = {
|
|
726
723
|
data: KnowledgeAssistant | null;
|
|
727
724
|
fetchState: FetchState;
|
|
728
725
|
};
|
|
@@ -745,7 +742,7 @@ interface KnowledgeResponse {
|
|
|
745
742
|
question: string;
|
|
746
743
|
answer: KnowledgeAnswer;
|
|
747
744
|
}
|
|
748
|
-
type State$
|
|
745
|
+
type State$6 = {
|
|
749
746
|
data: KnowledgeResponse[];
|
|
750
747
|
fetchState: FetchState;
|
|
751
748
|
};
|
|
@@ -1092,7 +1089,15 @@ declare namespace Server {
|
|
|
1092
1089
|
summarizer: boolean;
|
|
1093
1090
|
summarizer_prompt_instruction: string;
|
|
1094
1091
|
summarizer_model: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* Old rule group
|
|
1094
|
+
* @deprecated in favor of `summarizer_assistant_new`
|
|
1095
|
+
*/
|
|
1095
1096
|
summarizer_assistant?: string;
|
|
1097
|
+
summarizer_assistant_new?: string;
|
|
1098
|
+
conversation_accepted_assistant?: string;
|
|
1099
|
+
conversation_new_message_assistant?: string;
|
|
1100
|
+
conversation_ended_assistant?: string;
|
|
1096
1101
|
knowledge_assistant: string;
|
|
1097
1102
|
active_config: {
|
|
1098
1103
|
default_locale: string;
|
|
@@ -1233,7 +1238,7 @@ type SendEventV2ArgumentMap = {
|
|
|
1233
1238
|
}>;
|
|
1234
1239
|
'conversation summarized': EventV2<{
|
|
1235
1240
|
summary: string;
|
|
1236
|
-
|
|
1241
|
+
assistant?: string;
|
|
1237
1242
|
}>;
|
|
1238
1243
|
'style suggested': EventV2<{
|
|
1239
1244
|
keywordMatches: {
|
|
@@ -1351,15 +1356,6 @@ declare class DeepdeskAPI {
|
|
|
1351
1356
|
getEntities(messages: Array<{
|
|
1352
1357
|
text: string;
|
|
1353
1358
|
}>): 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
1359
|
/**
|
|
1364
1360
|
* Get a temporary exchange / login token
|
|
1365
1361
|
*/
|
|
@@ -1418,7 +1414,7 @@ declare class DeepdeskAPI {
|
|
|
1418
1414
|
}): Promise<CamelCaseKeys<Server.Cue[]>>;
|
|
1419
1415
|
evaluateAssistant<TPayload = unknown>(assistantCode: string, payload: TPayload, options?: {
|
|
1420
1416
|
conversationId?: string;
|
|
1421
|
-
}): Promise<CamelCaseKeys<Server.EvaluationOutput[]
|
|
1417
|
+
}): Promise<CamelCaseKeys<Server.EvaluationOutput[]> | string>;
|
|
1422
1418
|
getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
|
|
1423
1419
|
translateMessages(params: TranslationRequest): Promise<TranslationResponse>;
|
|
1424
1420
|
private handleDeepdeskVersionHeaders;
|
|
@@ -1590,7 +1586,7 @@ type MetricState = {
|
|
|
1590
1586
|
textSuggestions: SuggestionMetrics[];
|
|
1591
1587
|
cuts: any[];
|
|
1592
1588
|
};
|
|
1593
|
-
type State$
|
|
1589
|
+
type State$5 = {
|
|
1594
1590
|
text: string;
|
|
1595
1591
|
html: string | null;
|
|
1596
1592
|
selection: SelectionRange;
|
|
@@ -1605,7 +1601,7 @@ type State$6 = {
|
|
|
1605
1601
|
selectedSuggestionIndex: number;
|
|
1606
1602
|
};
|
|
1607
1603
|
|
|
1608
|
-
type State$
|
|
1604
|
+
type State$4 = {
|
|
1609
1605
|
data: Profile | null;
|
|
1610
1606
|
fetchState: FetchState;
|
|
1611
1607
|
};
|
|
@@ -1619,7 +1615,7 @@ declare enum SearchResultDefaultType {
|
|
|
1619
1615
|
}
|
|
1620
1616
|
type SearchResultType = string | SearchResultDefaultType;
|
|
1621
1617
|
type SearchResult = SearchSuggestion;
|
|
1622
|
-
interface State$
|
|
1618
|
+
interface State$3 {
|
|
1623
1619
|
list: Array<SearchResult>;
|
|
1624
1620
|
page: string;
|
|
1625
1621
|
fetchState: FetchState;
|
|
@@ -1627,12 +1623,6 @@ interface State$4 {
|
|
|
1627
1623
|
aggregates: Record<string, number>;
|
|
1628
1624
|
}
|
|
1629
1625
|
|
|
1630
|
-
type State$3 = {
|
|
1631
|
-
data: string | null;
|
|
1632
|
-
model?: string;
|
|
1633
|
-
fetchState: FetchState;
|
|
1634
|
-
};
|
|
1635
|
-
|
|
1636
1626
|
type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
|
|
1637
1627
|
interface State$2 {
|
|
1638
1628
|
list: StyleSuggestion;
|
|
@@ -2099,17 +2089,17 @@ declare class DeepdeskSDK {
|
|
|
2099
2089
|
store: Store;
|
|
2100
2090
|
constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
2101
2091
|
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$
|
|
2092
|
+
assistants: State$f;
|
|
2093
|
+
answer: State$6;
|
|
2094
|
+
auth: State$e;
|
|
2095
|
+
autoflows: State$d;
|
|
2096
|
+
conversation: State$c;
|
|
2097
|
+
contentTypes: State$b;
|
|
2098
|
+
customMessages: State$a;
|
|
2099
|
+
passwordlessToken: State$9;
|
|
2100
|
+
entities: State$8;
|
|
2101
|
+
knowledgeAssistant: State$7;
|
|
2102
|
+
handlingTime: State$g;
|
|
2113
2103
|
info: {
|
|
2114
2104
|
agentInfo?: AgentInfo | undefined;
|
|
2115
2105
|
agentSettings: unknown;
|
|
@@ -2118,7 +2108,7 @@ declare class DeepdeskSDK {
|
|
|
2118
2108
|
platformVariables?: VariableMapping | undefined;
|
|
2119
2109
|
fetchState: FetchState;
|
|
2120
2110
|
};
|
|
2121
|
-
input: State$
|
|
2111
|
+
input: State$5;
|
|
2122
2112
|
settings: {
|
|
2123
2113
|
locale: Locale;
|
|
2124
2114
|
deanonymize: boolean;
|
|
@@ -2151,9 +2141,8 @@ declare class DeepdeskSDK {
|
|
|
2151
2141
|
enableFeedbackForm: boolean;
|
|
2152
2142
|
hasKeyboardInput: boolean;
|
|
2153
2143
|
};
|
|
2154
|
-
profile: State$
|
|
2155
|
-
search: State$
|
|
2156
|
-
summary: State$3;
|
|
2144
|
+
profile: State$4;
|
|
2145
|
+
search: State$3;
|
|
2157
2146
|
styleSuggestions: State$2;
|
|
2158
2147
|
ui: {
|
|
2159
2148
|
showTabHint: boolean;
|
|
@@ -2241,10 +2230,6 @@ declare class DeepdeskSDK {
|
|
|
2241
2230
|
* Reset conversation
|
|
2242
2231
|
*/
|
|
2243
2232
|
resetConversation(): void;
|
|
2244
|
-
/**
|
|
2245
|
-
* Get summary from conversation
|
|
2246
|
-
*/
|
|
2247
|
-
getSummary(): Promise<string>;
|
|
2248
2233
|
/**
|
|
2249
2234
|
* Change settings value
|
|
2250
2235
|
*/
|
|
@@ -2275,8 +2260,38 @@ declare class DeepdeskSDK {
|
|
|
2275
2260
|
*/
|
|
2276
2261
|
refresh(): Promise<void>;
|
|
2277
2262
|
notifyExternalSuggestion(suggestion: StageSuggestion): void;
|
|
2263
|
+
/**
|
|
2264
|
+
* @deprecated in favor of `evaluateAssistant`
|
|
2265
|
+
*/
|
|
2278
2266
|
evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<Cue[]>;
|
|
2279
|
-
|
|
2267
|
+
/**
|
|
2268
|
+
* Evaluate assistant
|
|
2269
|
+
* By default will show cues in widget
|
|
2270
|
+
*/
|
|
2271
|
+
evaluateAssistant(assistantCode: string, options?: {
|
|
2272
|
+
payload?: Record<string, any>;
|
|
2273
|
+
include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
|
|
2274
|
+
showCuesInWidget?: boolean;
|
|
2275
|
+
}): Promise<EvaluationOutput[] | string>;
|
|
2276
|
+
/**
|
|
2277
|
+
* @deprecated in favor of passing `payload` through `options` argument
|
|
2278
|
+
* TODO: remove when integrations use first call signature
|
|
2279
|
+
*/
|
|
2280
|
+
evaluateAssistant(assistantCode: string, payload?: Record<string, any>): Promise<EvaluationOutput[] | string>;
|
|
2281
|
+
/**
|
|
2282
|
+
* Evaluate conversation lifecycle assistant
|
|
2283
|
+
* Convenient wrapper around `evaluateAssistant`.
|
|
2284
|
+
* By default includes 'stored-transcript' and 'tags'.
|
|
2285
|
+
*/
|
|
2286
|
+
evaluateConversationAssistant(event: 'accepted' | 'new-message' | 'ended', options?: {
|
|
2287
|
+
payload?: Record<string, any>;
|
|
2288
|
+
include?: Array<'in-memory-transcript' | 'stored-transcript' | 'tags'>;
|
|
2289
|
+
showCuesInWidget?: boolean;
|
|
2290
|
+
}): Promise<void>;
|
|
2291
|
+
/**
|
|
2292
|
+
* Get summary from conversation
|
|
2293
|
+
*/
|
|
2294
|
+
getSummary(): Promise<string | null>;
|
|
2280
2295
|
private handleKeyDown;
|
|
2281
2296
|
private handleAfterSendMessage;
|
|
2282
2297
|
handlingTimeStart(): void;
|