@deepdesk/deepdesk-sdk 14.3.1-beta.1 → 14.3.1-beta.11
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/dialogs.css +1 -1
- package/dist/index.cjs.js +8 -8
- package/dist/index.d.mts +172 -302
- package/dist/index.d.ts +172 -302
- package/dist/index.esm.js +8 -8
- package/dist/index.iife.js +20 -20
- package/input.css +1 -1
- package/package.json +6 -7
- package/styles/index.js +1 -1
- package/styles.css +1 -1
- package/widget.css +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import * as redux from 'redux';
|
|
3
|
+
import { Unsubscribe } from 'redux';
|
|
3
4
|
import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
|
|
4
5
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
5
6
|
import { Middleware } from '@reduxjs/toolkit';
|
|
@@ -85,7 +86,7 @@ type Props$3 = {
|
|
|
85
86
|
children?: React.ReactNode;
|
|
86
87
|
};
|
|
87
88
|
type SectionListStyles = typeof styles$m;
|
|
88
|
-
declare const SectionList: React.
|
|
89
|
+
declare const SectionList: React.FC<Props$3>;
|
|
89
90
|
|
|
90
91
|
declare const styles$l: {
|
|
91
92
|
readonly "root": string;
|
|
@@ -287,6 +288,7 @@ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
|
|
|
287
288
|
focus(): void;
|
|
288
289
|
emit<K extends keyof InputEventMap>(type: K, ...args: Parameters<InputHandler<K>>): void;
|
|
289
290
|
on<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
|
|
291
|
+
off<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
|
|
290
292
|
activate(): void;
|
|
291
293
|
deactivate(): void;
|
|
292
294
|
dispose(): void;
|
|
@@ -368,7 +370,7 @@ declare class HTTPClient {
|
|
|
368
370
|
delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
|
|
369
371
|
}
|
|
370
372
|
|
|
371
|
-
declare namespace Server
|
|
373
|
+
declare namespace Server {
|
|
372
374
|
/**
|
|
373
375
|
* API create conversation payload
|
|
374
376
|
*/
|
|
@@ -539,8 +541,6 @@ declare namespace Server$1 {
|
|
|
539
541
|
declare enum EventType {
|
|
540
542
|
SEND_MESSAGE = "Send Message",
|
|
541
543
|
HANDLING_TIME = "Handling Time",
|
|
542
|
-
START_AUTOFLOW = "Start Autoflow",
|
|
543
|
-
ABORT_AUTOFLOW = "Abort Autoflow",
|
|
544
544
|
ADD_TO_PERSONAL_COLLECTION = "Add to personal collection",
|
|
545
545
|
DELETE_FROM_PERSONAL_COLLECTION = "Delete from personal collection"
|
|
546
546
|
}
|
|
@@ -651,14 +651,6 @@ declare namespace Server$1 {
|
|
|
651
651
|
* Send message event data
|
|
652
652
|
*/
|
|
653
653
|
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'>>;
|
|
654
|
-
/**
|
|
655
|
-
* Autoflow event data
|
|
656
|
-
*/
|
|
657
|
-
type AutoflowEventData = Pick<EventData, 'conversation_id' | 'source'> & {
|
|
658
|
-
text_suggestions_v2: {
|
|
659
|
-
source: string;
|
|
660
|
-
}[];
|
|
661
|
-
};
|
|
662
654
|
/**
|
|
663
655
|
* PersonalCollection event data
|
|
664
656
|
*/
|
|
@@ -723,8 +715,6 @@ declare namespace Server$1 {
|
|
|
723
715
|
search: boolean;
|
|
724
716
|
image_search: boolean;
|
|
725
717
|
sticky_messages: boolean;
|
|
726
|
-
custom_messages: boolean;
|
|
727
|
-
autoflows: boolean;
|
|
728
718
|
recommend_text_suggestions: boolean;
|
|
729
719
|
assisted_intake: boolean;
|
|
730
720
|
autocomplete_with_text_suggestions: boolean;
|
|
@@ -816,10 +806,10 @@ declare namespace Server$1 {
|
|
|
816
806
|
};
|
|
817
807
|
};
|
|
818
808
|
}
|
|
819
|
-
type ConversationMessage = CamelCaseKeys<Omit<Server
|
|
809
|
+
type ConversationMessage = CamelCaseKeys<Omit<Server.ConversationMessage, 'tags'>> & {
|
|
820
810
|
tags: Record<string, string> | null;
|
|
821
811
|
};
|
|
822
|
-
type Conversation = CamelCaseKeys<Omit<Server
|
|
812
|
+
type Conversation = CamelCaseKeys<Omit<Server.Conversation, 'tags' | 'messages'>> & {
|
|
823
813
|
tags: Record<string, string> | null;
|
|
824
814
|
} & {
|
|
825
815
|
messages: ConversationMessage[];
|
|
@@ -852,21 +842,17 @@ type CreateConversationOptions = {
|
|
|
852
842
|
/**
|
|
853
843
|
* Send message event data
|
|
854
844
|
*/
|
|
855
|
-
type SendMessageEventData$1 = CamelCaseKeys<Server
|
|
845
|
+
type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
|
|
856
846
|
/**
|
|
857
847
|
* Event v2 payload
|
|
858
848
|
*/
|
|
859
|
-
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server
|
|
849
|
+
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
|
|
860
850
|
data: T;
|
|
861
851
|
};
|
|
862
852
|
/**
|
|
863
853
|
* Handling time event data
|
|
864
854
|
*/
|
|
865
|
-
type HandlingTimeEventData = CamelCaseKeys<Pick<Server
|
|
866
|
-
/**
|
|
867
|
-
* Autoflow event data
|
|
868
|
-
*/
|
|
869
|
-
type AutoflowEventData = CamelCaseKeys<Server$1.AutoflowEventData>;
|
|
855
|
+
type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'>>;
|
|
870
856
|
/**
|
|
871
857
|
* Rule event meta data
|
|
872
858
|
*/
|
|
@@ -882,8 +868,6 @@ type RuleEventMeta = {
|
|
|
882
868
|
type SendEventV1ArgumentMap = {
|
|
883
869
|
'Send Message': SendMessageEventData$1;
|
|
884
870
|
'Handling Time': HandlingTimeEventData;
|
|
885
|
-
'Start Autoflow': AutoflowEventData;
|
|
886
|
-
'Abort Autoflow': AutoflowEventData;
|
|
887
871
|
};
|
|
888
872
|
/**
|
|
889
873
|
* Map the send event name to the data value in the payload. (V2)
|
|
@@ -932,15 +916,11 @@ type SendEventV2ArgumentMap = {
|
|
|
932
916
|
eventName: string;
|
|
933
917
|
value: string;
|
|
934
918
|
}>;
|
|
935
|
-
'summary feedback': EventV2<{
|
|
936
|
-
summary: string;
|
|
937
|
-
rating: 'up' | 'down';
|
|
938
|
-
}>;
|
|
939
919
|
'knowledge assist feedback': EventV2<{
|
|
940
920
|
question: string;
|
|
941
921
|
isFollowUpQuestion: boolean;
|
|
942
922
|
isAgent: boolean;
|
|
943
|
-
answer: Server
|
|
923
|
+
answer: Server.KnowledgeResponse['answer'];
|
|
944
924
|
}>;
|
|
945
925
|
'knowledge assist source viewed': EventV2<{
|
|
946
926
|
question: string;
|
|
@@ -980,22 +960,22 @@ declare class DeepdeskAPI {
|
|
|
980
960
|
static exchangeTokenPromise: Promise<void> | null;
|
|
981
961
|
private preflight;
|
|
982
962
|
constructor(apiUrl: string, options?: DeepdeskAPIOptions);
|
|
983
|
-
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server
|
|
984
|
-
getMe(): Promise<CamelCaseKeys<Server
|
|
985
|
-
postIdentity(identity: CamelCaseKeys<Omit<Server
|
|
986
|
-
patchMe(data: Partial<CamelCaseKeys<Omit<Server
|
|
987
|
-
getProfile(profileCode: string): Promise<CamelCaseKeys<Server
|
|
988
|
-
getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server
|
|
989
|
-
getContentTypes(): Promise<CamelCaseKeys<Server
|
|
990
|
-
getAccount(): Promise<CamelCaseKeys<Server
|
|
963
|
+
createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
964
|
+
getMe(): Promise<CamelCaseKeys<Server.Me>>;
|
|
965
|
+
postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
|
|
966
|
+
patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
|
|
967
|
+
getProfile(profileCode: string): Promise<CamelCaseKeys<Server.Profile>>;
|
|
968
|
+
getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server.KnowledgeAssistant>>;
|
|
969
|
+
getContentTypes(): Promise<CamelCaseKeys<Server.ContentType[]>>;
|
|
970
|
+
getAccount(): Promise<CamelCaseKeys<Server.Account>>;
|
|
991
971
|
/**
|
|
992
972
|
* Fetch a Platform Config
|
|
993
973
|
* Don't provide the `platformConfigId` to get the active platform config.
|
|
994
974
|
* Provide the `platformConfigId` to get a specific platform config.
|
|
995
975
|
*/
|
|
996
|
-
getPlatformConfig(platformConfigId?: number): Promise<CamelCaseKeys<Server
|
|
976
|
+
getPlatformConfig(platformConfigId?: number): Promise<CamelCaseKeys<Server.PlatformConfig['config']>>;
|
|
997
977
|
checkUserExists(externalId: string): Promise<boolean>;
|
|
998
|
-
getConversationBySessionId(sessionId: string, options?: RetryOptions): Promise<CamelCaseKeys<Server
|
|
978
|
+
getConversationBySessionId(sessionId: string, options?: RetryOptions): Promise<CamelCaseKeys<Server.Conversation>>;
|
|
999
979
|
isConversationSupported(sessionId: string, options?: RetryOptions): Promise<boolean>;
|
|
1000
980
|
/**
|
|
1001
981
|
* Update converstation meta data
|
|
@@ -1004,7 +984,7 @@ declare class DeepdeskAPI {
|
|
|
1004
984
|
/**
|
|
1005
985
|
* Post converstation messages
|
|
1006
986
|
*/
|
|
1007
|
-
postMessages(conversationId: string, messages: CamelCaseKeys<Server
|
|
987
|
+
postMessages(conversationId: string, messages: CamelCaseKeys<Server.ConversationMessage>[]): Promise<({
|
|
1008
988
|
text: string;
|
|
1009
989
|
id: string;
|
|
1010
990
|
source: "agent" | "visitor" | "bot" | "system";
|
|
@@ -1035,7 +1015,7 @@ declare class DeepdeskAPI {
|
|
|
1035
1015
|
* Exchange a temporary token for a access token cookie
|
|
1036
1016
|
*/
|
|
1037
1017
|
exchangeTokenForAccessCookie(token: string): Promise<void>;
|
|
1038
|
-
authenticateWithKey(key: string, user: CamelCaseKeys<Server
|
|
1018
|
+
authenticateWithKey(key: string, user: CamelCaseKeys<Server.User>): Promise<void>;
|
|
1039
1019
|
/**
|
|
1040
1020
|
* Request text suggestions based on the current conversation
|
|
1041
1021
|
*/
|
|
@@ -1051,23 +1031,23 @@ declare class DeepdeskAPI {
|
|
|
1051
1031
|
/**
|
|
1052
1032
|
* Request autocomplete suggestions based on the agent text input
|
|
1053
1033
|
*/
|
|
1054
|
-
getAutocompleteSuggestions(conversationId: string, params: CamelCaseKeys<Server
|
|
1034
|
+
getAutocompleteSuggestions(conversationId: string, params: CamelCaseKeys<Server.GetAutocompleteSuggestionsParams>): Promise<TextSuggestion[]>;
|
|
1055
1035
|
/**
|
|
1056
1036
|
* Request pinned messages
|
|
1057
1037
|
*/
|
|
1058
|
-
getPinnedMessages(conversationId: string): Promise<CamelCaseKeys<Server
|
|
1038
|
+
getPinnedMessages(conversationId: string): Promise<CamelCaseKeys<Server.PinnedMessage[]>>;
|
|
1059
1039
|
/**
|
|
1060
1040
|
* Request style suggestions
|
|
1061
1041
|
*/
|
|
1062
|
-
getStyleSuggestions(params: CamelCaseKeys<Server
|
|
1042
|
+
getStyleSuggestions(params: CamelCaseKeys<Server.GetStyleSuggestionsParams>): Promise<CamelCaseKeys<Server.StyleSuggestion>>;
|
|
1063
1043
|
/**
|
|
1064
1044
|
* Search
|
|
1065
1045
|
*/
|
|
1066
|
-
search(params: SearchOptions): Promise<CamelCaseKeys<Server
|
|
1067
|
-
knowledgeAssist(request: CamelCaseKeys<Server
|
|
1046
|
+
search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
|
|
1047
|
+
knowledgeAssist(request: CamelCaseKeys<Server.KnowledgeRequest>, chatHistory: Server.KnowledgeResponse[], assistantCode: string, meta?: {
|
|
1068
1048
|
agentId?: string;
|
|
1069
1049
|
conversationId?: string;
|
|
1070
|
-
}): Promise<CamelCaseKeys<Server
|
|
1050
|
+
}): Promise<CamelCaseKeys<Server.KnowledgeResponse['answer']>>;
|
|
1071
1051
|
requestLoginByEmail(email: string): Promise<{
|
|
1072
1052
|
code: string;
|
|
1073
1053
|
message: string;
|
|
@@ -1082,7 +1062,7 @@ declare class DeepdeskAPI {
|
|
|
1082
1062
|
*/
|
|
1083
1063
|
evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
|
|
1084
1064
|
raiseForFailingConditions?: boolean;
|
|
1085
|
-
}): Promise<CamelCaseKeys<Server
|
|
1065
|
+
}): Promise<CamelCaseKeys<Server.LegacyCue[]>>;
|
|
1086
1066
|
/**
|
|
1087
1067
|
* Temporarily restore getSummary for more controlled rollout
|
|
1088
1068
|
* @deprecated
|
|
@@ -1095,8 +1075,8 @@ declare class DeepdeskAPI {
|
|
|
1095
1075
|
promptInstruction?: string;
|
|
1096
1076
|
agentId?: string;
|
|
1097
1077
|
externalConversationId?: string;
|
|
1098
|
-
}): Promise<CamelCaseKeys<Server
|
|
1099
|
-
evaluateAssistant<TOutput extends Server
|
|
1078
|
+
}): Promise<CamelCaseKeys<Server.Summary>>;
|
|
1079
|
+
evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
|
|
1100
1080
|
expectFormat: TOutput;
|
|
1101
1081
|
threadId?: number;
|
|
1102
1082
|
input: TInput;
|
|
@@ -1105,7 +1085,7 @@ declare class DeepdeskAPI {
|
|
|
1105
1085
|
text: string;
|
|
1106
1086
|
}>;
|
|
1107
1087
|
externalConversationId?: string;
|
|
1108
|
-
}): Promise<CamelCaseKeys<Server
|
|
1088
|
+
}): Promise<CamelCaseKeys<Server.EvaluationOutput<TOutput>>>;
|
|
1109
1089
|
createAssistantThread(init: {
|
|
1110
1090
|
assistantCode: string;
|
|
1111
1091
|
}): Promise<{
|
|
@@ -1118,7 +1098,7 @@ declare class DeepdeskAPI {
|
|
|
1118
1098
|
}): Promise<{
|
|
1119
1099
|
threadId: number;
|
|
1120
1100
|
}>;
|
|
1121
|
-
getRules(): Promise<CamelCaseKeys<Server
|
|
1101
|
+
getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
|
|
1122
1102
|
translateMessages(params: TranslationRequest): Promise<TranslationResponse>;
|
|
1123
1103
|
private handleDeepdeskVersionHeaders;
|
|
1124
1104
|
}
|
|
@@ -1205,10 +1185,10 @@ type AgentInfo = {
|
|
|
1205
1185
|
agentTimeZone?: string;
|
|
1206
1186
|
agentDefaultLocale?: string;
|
|
1207
1187
|
};
|
|
1208
|
-
type KnowledgeAssistant = CamelCaseKeys<Server
|
|
1209
|
-
type User = CamelCaseKeys<Server
|
|
1210
|
-
type SendMessageEventData = CamelCaseKeys<Server
|
|
1211
|
-
type Profile = CamelCaseKeys<Server
|
|
1188
|
+
type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
|
|
1189
|
+
type User = CamelCaseKeys<Server.User>;
|
|
1190
|
+
type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
|
|
1191
|
+
type Profile = CamelCaseKeys<Server.Profile>;
|
|
1212
1192
|
|
|
1213
1193
|
type CreateConversation = {
|
|
1214
1194
|
platform: string;
|
|
@@ -1247,7 +1227,7 @@ type CustomDataSchema = Array<{
|
|
|
1247
1227
|
trueValue?: string;
|
|
1248
1228
|
falseValue?: string;
|
|
1249
1229
|
}>;
|
|
1250
|
-
type PlatformConfig = CamelCaseKeys<Server
|
|
1230
|
+
type PlatformConfig = CamelCaseKeys<Server.PlatformConfig>;
|
|
1251
1231
|
/**
|
|
1252
1232
|
* Utils
|
|
1253
1233
|
*/
|
|
@@ -1289,7 +1269,7 @@ type MetricState = {
|
|
|
1289
1269
|
textSuggestions: SuggestionMetrics[];
|
|
1290
1270
|
cuts: any[];
|
|
1291
1271
|
};
|
|
1292
|
-
type State$
|
|
1272
|
+
type State$d = {
|
|
1293
1273
|
text: string;
|
|
1294
1274
|
html: string | null;
|
|
1295
1275
|
selection: SelectionRange;
|
|
@@ -1304,96 +1284,15 @@ type State$f = {
|
|
|
1304
1284
|
selectedSuggestionIndex: number;
|
|
1305
1285
|
};
|
|
1306
1286
|
|
|
1307
|
-
type
|
|
1308
|
-
|
|
1309
|
-
stopTime: Date | null;
|
|
1287
|
+
type LegacyCue$1 = CamelCaseKeys<Server.LegacyCue> & {
|
|
1288
|
+
isLoading?: boolean;
|
|
1310
1289
|
};
|
|
1311
1290
|
|
|
1312
|
-
type
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
url: string;
|
|
1317
|
-
private eventListeners;
|
|
1318
|
-
private options;
|
|
1319
|
-
private timeoutTimer;
|
|
1320
|
-
eventSource: EventSource | undefined;
|
|
1321
|
-
constructor(url: string, options?: Partial<SSEClientOptions>);
|
|
1322
|
-
private proxyEvent;
|
|
1323
|
-
connect(): void;
|
|
1324
|
-
disconnect(): void;
|
|
1325
|
-
emit(type: keyof TEventMap, eventPayload: any): void;
|
|
1326
|
-
on(type: keyof TEventMap, handler: any): () => void;
|
|
1327
|
-
off(type: keyof TEventMap, handler: any): void;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
declare namespace Server {
|
|
1331
|
-
interface CustomMessageReplyOption {
|
|
1332
|
-
title: string;
|
|
1333
|
-
payload: string;
|
|
1334
|
-
}
|
|
1335
|
-
interface CustomMessage {
|
|
1336
|
-
text: string;
|
|
1337
|
-
reply_options?: CustomMessageReplyOption[];
|
|
1338
|
-
}
|
|
1339
|
-
interface CustomMessagesResponse {
|
|
1340
|
-
suggestions: CustomMessage[];
|
|
1341
|
-
}
|
|
1342
|
-
declare enum AutoflowSessionState {
|
|
1343
|
-
Started = "Started",
|
|
1344
|
-
Aborted = "Aborted",
|
|
1345
|
-
Completed = "Completed"
|
|
1346
|
-
}
|
|
1347
|
-
interface Autoflow {
|
|
1348
|
-
description?: string;
|
|
1349
|
-
display_name?: string;
|
|
1350
|
-
trigger_payload?: string;
|
|
1351
|
-
state: AutoflowSessionState | null;
|
|
1352
|
-
}
|
|
1353
|
-
interface AutoflowsResponse {
|
|
1354
|
-
autoflows: Autoflow[];
|
|
1355
|
-
}
|
|
1356
|
-
interface AutoflowSessionPayload {
|
|
1357
|
-
platform_session_id: string;
|
|
1358
|
-
trigger_payload: string;
|
|
1359
|
-
}
|
|
1360
|
-
interface AutoflowSession {
|
|
1361
|
-
id: string;
|
|
1362
|
-
platform_session_id: string;
|
|
1363
|
-
session_type: string;
|
|
1364
|
-
state: AutoflowSessionState;
|
|
1365
|
-
data: {
|
|
1366
|
-
trigger_payload: string;
|
|
1367
|
-
'trigger-payload': string;
|
|
1368
|
-
};
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
type EventMap = {
|
|
1372
|
-
customMessageSuggestion: (data: CamelCaseKeys<Server.CustomMessage>) => void;
|
|
1373
|
-
sessionAborted: (data: {
|
|
1374
|
-
id: string;
|
|
1375
|
-
}) => void;
|
|
1376
|
-
sessionCompleted: (data: {
|
|
1377
|
-
id: string;
|
|
1378
|
-
}) => void;
|
|
1291
|
+
type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
|
|
1292
|
+
type ArrayItemType<T> = T extends Array<infer I> ? I : never;
|
|
1293
|
+
type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
|
|
1294
|
+
isLoading?: boolean;
|
|
1379
1295
|
};
|
|
1380
|
-
declare class DeepdeskBrokerAPI {
|
|
1381
|
-
apiUrl: string;
|
|
1382
|
-
client: HTTPClient;
|
|
1383
|
-
streams: Record<string, SSEClient<EventMap>>;
|
|
1384
|
-
logger: Logger;
|
|
1385
|
-
constructor(apiUrl: string, options?: HTTPClientOptions);
|
|
1386
|
-
getCustomMessages(platformSessionId: string): Promise<CamelCaseKeys<Server.CustomMessage[]>>;
|
|
1387
|
-
sendCustomMessage(platformSessionId: string, suggestion: CamelCaseKeys<Server.CustomMessage>): Promise<CamelCaseKeys<Server.CustomMessage>>;
|
|
1388
|
-
answerCustomMessage(platformSessionId: string, reply: CamelCaseKeys<Server.CustomMessageReplyOption>): Promise<void>;
|
|
1389
|
-
getAutoflows(platformSessionId: string): Promise<CamelCaseKeys<Server.Autoflow[]>>;
|
|
1390
|
-
startAutoflowSession(autoflowSession: CamelCaseKeys<Server.AutoflowSessionPayload>): Promise<CamelCaseKeys<Server.AutoflowSession>>;
|
|
1391
|
-
stopAutoflowSession(platformSessionId: string): Promise<void>;
|
|
1392
|
-
openStream(platformSessionId: string): SSEClient<EventMap>;
|
|
1393
|
-
closeStream(platformSessionId: string): void;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
type EvaluationOutput<T extends Server$1.ResponseFormat> = CamelCaseKeys<Server$1.EvaluationOutput<T>>;
|
|
1397
1296
|
type AssistantAnswerSource = {
|
|
1398
1297
|
url?: string;
|
|
1399
1298
|
name: string;
|
|
@@ -1405,8 +1304,8 @@ type AssistantInteraction = {
|
|
|
1405
1304
|
sources?: AssistantAnswerSource[];
|
|
1406
1305
|
};
|
|
1407
1306
|
};
|
|
1408
|
-
type State$
|
|
1409
|
-
cues:
|
|
1307
|
+
type State$c = {
|
|
1308
|
+
cues: Cue[];
|
|
1410
1309
|
threads: Record<number, AssistantInteraction[]>;
|
|
1411
1310
|
fetchState: FetchState;
|
|
1412
1311
|
};
|
|
@@ -1416,24 +1315,54 @@ type Transcript = Array<{
|
|
|
1416
1315
|
}>;
|
|
1417
1316
|
type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
|
|
1418
1317
|
|
|
1318
|
+
interface State$b {
|
|
1319
|
+
isLoggedIn: boolean | null;
|
|
1320
|
+
loginFetchState: FetchState;
|
|
1321
|
+
verifyFetchState: FetchState;
|
|
1322
|
+
showLoginOverlay: boolean;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
interface State$a {
|
|
1326
|
+
current: Conversation | null;
|
|
1327
|
+
isSupported: boolean | null;
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
type ContentType = CamelCaseKeys<Server.ContentType>;
|
|
1331
|
+
type State$9 = {
|
|
1332
|
+
data: ContentType[] | null;
|
|
1333
|
+
fetchState: FetchState;
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
type State$8 = {
|
|
1337
|
+
token: string | null;
|
|
1338
|
+
interval: NodeJS.Timer | null;
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
type State$7 = {
|
|
1342
|
+
data: Entity[] | null;
|
|
1343
|
+
fetchState: FetchState;
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
type State$6 = {
|
|
1347
|
+
data: KnowledgeAssistant | null;
|
|
1348
|
+
fetchState: FetchState;
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1419
1351
|
interface StoreConfig {
|
|
1420
1352
|
deepdeskAPI: DeepdeskAPI;
|
|
1421
|
-
deepdeskBrokerAPI?: DeepdeskBrokerAPI;
|
|
1422
1353
|
dynamicThunkObject?: Record<string, unknown>;
|
|
1423
1354
|
middleware?: Middleware[];
|
|
1424
1355
|
preloadedState?: any;
|
|
1425
1356
|
}
|
|
1426
1357
|
declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
1427
|
-
assistants: State$
|
|
1428
|
-
auth: State$
|
|
1429
|
-
autoflows: State$b;
|
|
1358
|
+
assistants: State$c;
|
|
1359
|
+
auth: State$b;
|
|
1430
1360
|
conversation: State$a;
|
|
1431
1361
|
contentTypes: State$9;
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
handlingTime: State$e;
|
|
1362
|
+
passwordlessToken: State$8;
|
|
1363
|
+
entities: State$7;
|
|
1364
|
+
knowledgeAssistant: State$6;
|
|
1365
|
+
handlingTime: State$5;
|
|
1437
1366
|
info: {
|
|
1438
1367
|
agentInfo?: AgentInfo | undefined;
|
|
1439
1368
|
agentSettings: unknown;
|
|
@@ -1442,14 +1371,12 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1442
1371
|
platformVariables?: VariableMapping | undefined;
|
|
1443
1372
|
fetchState: FetchState;
|
|
1444
1373
|
};
|
|
1445
|
-
input: State$
|
|
1374
|
+
input: State$d;
|
|
1446
1375
|
settings: {
|
|
1447
1376
|
locale: Locale;
|
|
1448
1377
|
deanonymize: boolean;
|
|
1449
1378
|
fallbackImage: string | false;
|
|
1450
1379
|
isEmbedded: boolean;
|
|
1451
|
-
showAutoflows: number | boolean;
|
|
1452
|
-
showCustomMessages: number | boolean;
|
|
1453
1380
|
showImages: boolean;
|
|
1454
1381
|
showSearch: boolean;
|
|
1455
1382
|
showImageSearch: boolean;
|
|
@@ -1469,6 +1396,8 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1469
1396
|
insertLink: boolean;
|
|
1470
1397
|
inlineSuggestions: boolean;
|
|
1471
1398
|
floatingMenu: boolean;
|
|
1399
|
+
detectSubmit: boolean;
|
|
1400
|
+
automaticHandlingTime: boolean;
|
|
1472
1401
|
adminUrl?: string | undefined;
|
|
1473
1402
|
productName: string;
|
|
1474
1403
|
enableSuggestionFeedback: boolean;
|
|
@@ -1489,16 +1418,14 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
|
|
|
1489
1418
|
textSuggestions: TextSuggestionState;
|
|
1490
1419
|
}>, redux.AnyAction>;
|
|
1491
1420
|
declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
|
|
1492
|
-
assistants: State$
|
|
1493
|
-
auth: State$
|
|
1494
|
-
autoflows: State$b;
|
|
1421
|
+
assistants: State$c;
|
|
1422
|
+
auth: State$b;
|
|
1495
1423
|
conversation: State$a;
|
|
1496
1424
|
contentTypes: State$9;
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
handlingTime: State$e;
|
|
1425
|
+
passwordlessToken: State$8;
|
|
1426
|
+
entities: State$7;
|
|
1427
|
+
knowledgeAssistant: State$6;
|
|
1428
|
+
handlingTime: State$5;
|
|
1502
1429
|
info: {
|
|
1503
1430
|
agentInfo?: AgentInfo | undefined;
|
|
1504
1431
|
agentSettings: unknown;
|
|
@@ -1507,14 +1434,12 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1507
1434
|
platformVariables?: VariableMapping | undefined;
|
|
1508
1435
|
fetchState: FetchState;
|
|
1509
1436
|
};
|
|
1510
|
-
input: State$
|
|
1437
|
+
input: State$d;
|
|
1511
1438
|
settings: {
|
|
1512
1439
|
locale: Locale;
|
|
1513
1440
|
deanonymize: boolean;
|
|
1514
1441
|
fallbackImage: string | false;
|
|
1515
1442
|
isEmbedded: boolean;
|
|
1516
|
-
showAutoflows: number | boolean;
|
|
1517
|
-
showCustomMessages: number | boolean;
|
|
1518
1443
|
showImages: boolean;
|
|
1519
1444
|
showSearch: boolean;
|
|
1520
1445
|
showImageSearch: boolean;
|
|
@@ -1534,6 +1459,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1534
1459
|
insertLink: boolean;
|
|
1535
1460
|
inlineSuggestions: boolean;
|
|
1536
1461
|
floatingMenu: boolean;
|
|
1462
|
+
detectSubmit: boolean;
|
|
1463
|
+
automaticHandlingTime: boolean;
|
|
1537
1464
|
adminUrl?: string | undefined;
|
|
1538
1465
|
productName: string;
|
|
1539
1466
|
enableSuggestionFeedback: boolean;
|
|
@@ -1553,16 +1480,14 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1553
1480
|
rules: State$1;
|
|
1554
1481
|
textSuggestions: TextSuggestionState;
|
|
1555
1482
|
}, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
|
|
1556
|
-
assistants: State$
|
|
1557
|
-
auth: State$
|
|
1558
|
-
autoflows: State$b;
|
|
1483
|
+
assistants: State$c;
|
|
1484
|
+
auth: State$b;
|
|
1559
1485
|
conversation: State$a;
|
|
1560
1486
|
contentTypes: State$9;
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
handlingTime: State$e;
|
|
1487
|
+
passwordlessToken: State$8;
|
|
1488
|
+
entities: State$7;
|
|
1489
|
+
knowledgeAssistant: State$6;
|
|
1490
|
+
handlingTime: State$5;
|
|
1566
1491
|
info: {
|
|
1567
1492
|
agentInfo?: AgentInfo | undefined;
|
|
1568
1493
|
agentSettings: unknown;
|
|
@@ -1571,14 +1496,12 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1571
1496
|
platformVariables?: VariableMapping | undefined;
|
|
1572
1497
|
fetchState: FetchState;
|
|
1573
1498
|
};
|
|
1574
|
-
input: State$
|
|
1499
|
+
input: State$d;
|
|
1575
1500
|
settings: {
|
|
1576
1501
|
locale: Locale;
|
|
1577
1502
|
deanonymize: boolean;
|
|
1578
1503
|
fallbackImage: string | false;
|
|
1579
1504
|
isEmbedded: boolean;
|
|
1580
|
-
showAutoflows: number | boolean;
|
|
1581
|
-
showCustomMessages: number | boolean;
|
|
1582
1505
|
showImages: boolean;
|
|
1583
1506
|
showSearch: boolean;
|
|
1584
1507
|
showImageSearch: boolean;
|
|
@@ -1598,6 +1521,8 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1598
1521
|
insertLink: boolean;
|
|
1599
1522
|
inlineSuggestions: boolean;
|
|
1600
1523
|
floatingMenu: boolean;
|
|
1524
|
+
detectSubmit: boolean;
|
|
1525
|
+
automaticHandlingTime: boolean;
|
|
1601
1526
|
adminUrl?: string | undefined;
|
|
1602
1527
|
productName: string;
|
|
1603
1528
|
enableSuggestionFeedback: boolean;
|
|
@@ -1619,59 +1544,13 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
|
|
|
1619
1544
|
}>, redux.AnyAction, {
|
|
1620
1545
|
dynamicThunkObject: Record<string, unknown> | undefined;
|
|
1621
1546
|
deepdeskAPI: DeepdeskAPI;
|
|
1622
|
-
deepdeskBrokerAPI: DeepdeskBrokerAPI | undefined;
|
|
1623
1547
|
}>[]>;
|
|
1624
1548
|
type RootState = ReturnType<typeof reducers>;
|
|
1625
1549
|
type Store = ReturnType<typeof createStore>;
|
|
1626
1550
|
|
|
1627
|
-
interface State$c {
|
|
1628
|
-
isLoggedIn: boolean | null;
|
|
1629
|
-
loginFetchState: FetchState;
|
|
1630
|
-
verifyFetchState: FetchState;
|
|
1631
|
-
showLoginOverlay: boolean;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
type Autoflow = CamelCaseKeys<Server.Autoflow> & {
|
|
1635
|
-
isBusy?: boolean;
|
|
1636
|
-
};
|
|
1637
|
-
interface State$b {
|
|
1638
|
-
list: Autoflow[];
|
|
1639
|
-
fetchState: FetchState;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
interface State$a {
|
|
1643
|
-
current: Conversation | null;
|
|
1644
|
-
isSupported: boolean | null;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
type ContentType = CamelCaseKeys<Server$1.ContentType>;
|
|
1648
|
-
type State$9 = {
|
|
1649
|
-
data: ContentType[] | null;
|
|
1650
|
-
fetchState: FetchState;
|
|
1651
|
-
};
|
|
1652
|
-
|
|
1653
|
-
type CustomMessage = CamelCaseKeys<Server.CustomMessage>;
|
|
1654
|
-
interface State$8 {
|
|
1655
|
-
list: CustomMessage[];
|
|
1656
|
-
fetchState: FetchState;
|
|
1657
|
-
sentSuggestions: string[];
|
|
1658
|
-
errorSuggestions: string[];
|
|
1659
|
-
answeredSuggestions: string[];
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
type State$7 = {
|
|
1663
|
-
token: string | null;
|
|
1664
|
-
interval: NodeJS.Timer | null;
|
|
1665
|
-
};
|
|
1666
|
-
|
|
1667
|
-
type State$6 = {
|
|
1668
|
-
data: Entity[] | null;
|
|
1669
|
-
fetchState: FetchState;
|
|
1670
|
-
};
|
|
1671
|
-
|
|
1672
1551
|
type State$5 = {
|
|
1673
|
-
|
|
1674
|
-
|
|
1552
|
+
startTime: Date | null;
|
|
1553
|
+
stopTime: Date | null;
|
|
1675
1554
|
};
|
|
1676
1555
|
|
|
1677
1556
|
type State$4 = {
|
|
@@ -1696,15 +1575,15 @@ interface State$3 {
|
|
|
1696
1575
|
aggregates: Record<string, number>;
|
|
1697
1576
|
}
|
|
1698
1577
|
|
|
1699
|
-
type StyleSuggestion = CamelCaseKeys<Server
|
|
1578
|
+
type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
|
|
1700
1579
|
interface State$2 {
|
|
1701
1580
|
list: StyleSuggestion;
|
|
1702
1581
|
fetchState: FetchState;
|
|
1703
1582
|
}
|
|
1704
1583
|
|
|
1705
|
-
type
|
|
1584
|
+
type LegacyCue = CamelCaseKeys<Server.LegacyCue>;
|
|
1706
1585
|
type State$1 = {
|
|
1707
|
-
cues:
|
|
1586
|
+
cues: LegacyCue[];
|
|
1708
1587
|
fetchState: FetchState;
|
|
1709
1588
|
};
|
|
1710
1589
|
type EvaluateRuleOptions = {
|
|
@@ -1720,19 +1599,6 @@ interface TextSuggestionState {
|
|
|
1720
1599
|
}
|
|
1721
1600
|
|
|
1722
1601
|
declare const styles$i: {
|
|
1723
|
-
readonly "isDisabled": string;
|
|
1724
|
-
readonly "buttonStart": string;
|
|
1725
|
-
readonly "root": string;
|
|
1726
|
-
readonly "buttonStop": string;
|
|
1727
|
-
readonly "stateBadge": string;
|
|
1728
|
-
readonly "isCompleted": string;
|
|
1729
|
-
readonly "isStarted": string;
|
|
1730
|
-
readonly "isAborted": string;
|
|
1731
|
-
};
|
|
1732
|
-
|
|
1733
|
-
type AutoflowStyles = typeof styles$i;
|
|
1734
|
-
|
|
1735
|
-
declare const styles$h: {
|
|
1736
1602
|
readonly "root": string;
|
|
1737
1603
|
readonly "list": string;
|
|
1738
1604
|
readonly "listWrapper": string;
|
|
@@ -1780,23 +1646,23 @@ declare const styles$h: {
|
|
|
1780
1646
|
readonly "actionShortcutFixKerning": string;
|
|
1781
1647
|
};
|
|
1782
1648
|
|
|
1783
|
-
type CommandPaletteStyles = typeof styles$
|
|
1649
|
+
type CommandPaletteStyles = typeof styles$i;
|
|
1784
1650
|
|
|
1785
|
-
declare const styles$
|
|
1651
|
+
declare const styles$h: {
|
|
1786
1652
|
readonly "root": string;
|
|
1787
1653
|
readonly "content": string;
|
|
1788
1654
|
};
|
|
1789
1655
|
|
|
1790
|
-
type DialogStyles = typeof styles$
|
|
1656
|
+
type DialogStyles = typeof styles$h;
|
|
1791
1657
|
|
|
1792
|
-
declare const styles$
|
|
1658
|
+
declare const styles$g: {
|
|
1793
1659
|
readonly "root": string;
|
|
1794
1660
|
readonly "empty": string;
|
|
1795
1661
|
};
|
|
1796
1662
|
|
|
1797
|
-
type EntitiesListStyles = typeof styles$
|
|
1663
|
+
type EntitiesListStyles = typeof styles$g;
|
|
1798
1664
|
|
|
1799
|
-
declare const styles$
|
|
1665
|
+
declare const styles$f: {
|
|
1800
1666
|
readonly "root": string;
|
|
1801
1667
|
readonly "entity": string;
|
|
1802
1668
|
readonly "entityText": string;
|
|
@@ -1805,9 +1671,9 @@ declare const styles$e: {
|
|
|
1805
1671
|
readonly "iconClicked": string;
|
|
1806
1672
|
};
|
|
1807
1673
|
|
|
1808
|
-
type EntitiesWidgetListStyles = typeof styles$
|
|
1674
|
+
type EntitiesWidgetListStyles = typeof styles$f;
|
|
1809
1675
|
|
|
1810
|
-
declare const styles$
|
|
1676
|
+
declare const styles$e: {
|
|
1811
1677
|
readonly "thumbs": string;
|
|
1812
1678
|
readonly "fadeup": string;
|
|
1813
1679
|
readonly "fadedown": string;
|
|
@@ -1816,9 +1682,9 @@ declare const styles$d: {
|
|
|
1816
1682
|
readonly "thumbsDown": string;
|
|
1817
1683
|
};
|
|
1818
1684
|
|
|
1819
|
-
type FeedbackThumbsStyles = typeof styles$
|
|
1685
|
+
type FeedbackThumbsStyles = typeof styles$e;
|
|
1820
1686
|
|
|
1821
|
-
declare const styles$
|
|
1687
|
+
declare const styles$d: {
|
|
1822
1688
|
readonly "root": string;
|
|
1823
1689
|
readonly "text": string;
|
|
1824
1690
|
readonly "isLoggedIn": string;
|
|
@@ -1828,16 +1694,16 @@ declare const styles$c: {
|
|
|
1828
1694
|
readonly "lock": string;
|
|
1829
1695
|
};
|
|
1830
1696
|
|
|
1831
|
-
type FloatingMenuStyles = typeof styles$
|
|
1697
|
+
type FloatingMenuStyles = typeof styles$d;
|
|
1832
1698
|
|
|
1833
|
-
declare const styles$
|
|
1699
|
+
declare const styles$c: {
|
|
1834
1700
|
readonly "root": string;
|
|
1835
1701
|
readonly "paper": string;
|
|
1836
1702
|
};
|
|
1837
1703
|
|
|
1838
|
-
type InlineSuggestionsOverlayStyles = typeof styles$
|
|
1704
|
+
type InlineSuggestionsOverlayStyles = typeof styles$c;
|
|
1839
1705
|
|
|
1840
|
-
declare const styles$
|
|
1706
|
+
declare const styles$b: {
|
|
1841
1707
|
readonly "root": string;
|
|
1842
1708
|
readonly "title": string;
|
|
1843
1709
|
readonly "empty": string;
|
|
@@ -1851,14 +1717,21 @@ declare const styles$a: {
|
|
|
1851
1717
|
readonly "listItemFeedback": string;
|
|
1852
1718
|
};
|
|
1853
1719
|
|
|
1854
|
-
type KnowledgeSearchStyles = typeof styles$
|
|
1720
|
+
type KnowledgeSearchStyles = typeof styles$b;
|
|
1855
1721
|
|
|
1856
|
-
declare const styles$
|
|
1722
|
+
declare const styles$a: {
|
|
1857
1723
|
readonly "root": string;
|
|
1858
1724
|
readonly "content": string;
|
|
1859
1725
|
};
|
|
1860
1726
|
|
|
1861
|
-
type LinkSearchStyles = typeof styles$
|
|
1727
|
+
type LinkSearchStyles = typeof styles$a;
|
|
1728
|
+
|
|
1729
|
+
declare const styles$9: {
|
|
1730
|
+
readonly "loadingBar": string;
|
|
1731
|
+
readonly "placeHolderShimmer": string;
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1734
|
+
type LoadingProgressBarStyles = typeof styles$9;
|
|
1862
1735
|
|
|
1863
1736
|
declare const styles$8: {
|
|
1864
1737
|
readonly "root": string;
|
|
@@ -1960,8 +1833,10 @@ declare const styles$1: {
|
|
|
1960
1833
|
readonly "loginText": string;
|
|
1961
1834
|
readonly "stateText": string;
|
|
1962
1835
|
readonly "sectionList": string;
|
|
1836
|
+
readonly "footer": string;
|
|
1963
1837
|
readonly "shortcutList": string;
|
|
1964
1838
|
readonly "shortcut": string;
|
|
1839
|
+
readonly "footerShortcut": string;
|
|
1965
1840
|
readonly "link": string;
|
|
1966
1841
|
};
|
|
1967
1842
|
|
|
@@ -1980,11 +1855,11 @@ declare const styles: {
|
|
|
1980
1855
|
type WidgetCustomDataStyles = typeof styles;
|
|
1981
1856
|
|
|
1982
1857
|
type WidgetCustomStyles = {
|
|
1983
|
-
Autoflow?: Partial<AutoflowStyles>;
|
|
1984
1858
|
Card?: Partial<CardStyles>;
|
|
1985
1859
|
Dialog?: Partial<DialogStyles>;
|
|
1986
1860
|
KeyboardHint?: Partial<KeyboardHintStyles>;
|
|
1987
1861
|
Label?: Partial<LabelStyles>;
|
|
1862
|
+
LoadingProgressBar?: Partial<LoadingProgressBarStyles>;
|
|
1988
1863
|
LinkSearch?: Partial<LinkSearchStyles>;
|
|
1989
1864
|
Login?: Partial<LoginStyles>;
|
|
1990
1865
|
Markdown?: Partial<MarkdownStyles>;
|
|
@@ -2033,8 +1908,6 @@ type State = {
|
|
|
2033
1908
|
deanonymize: boolean;
|
|
2034
1909
|
fallbackImage: string | false;
|
|
2035
1910
|
isEmbedded: boolean;
|
|
2036
|
-
showAutoflows: boolean | number;
|
|
2037
|
-
showCustomMessages: boolean | number;
|
|
2038
1911
|
showImages: boolean;
|
|
2039
1912
|
showSearch: boolean;
|
|
2040
1913
|
showImageSearch: boolean;
|
|
@@ -2054,12 +1927,15 @@ type State = {
|
|
|
2054
1927
|
insertLink: boolean;
|
|
2055
1928
|
inlineSuggestions: boolean;
|
|
2056
1929
|
floatingMenu: boolean;
|
|
1930
|
+
detectSubmit: boolean;
|
|
1931
|
+
automaticHandlingTime: boolean;
|
|
2057
1932
|
adminUrl?: string;
|
|
2058
1933
|
productName: string;
|
|
2059
1934
|
enableSuggestionFeedback: boolean;
|
|
2060
1935
|
enableFeedbackForm: boolean;
|
|
2061
1936
|
hasKeyboardInput: boolean;
|
|
2062
1937
|
};
|
|
1938
|
+
type Settings = State;
|
|
2063
1939
|
declare const set: _reduxjs_toolkit.ActionCreatorWithPayload<Partial<State>, "settings/set">;
|
|
2064
1940
|
|
|
2065
1941
|
declare global {
|
|
@@ -2070,7 +1946,6 @@ declare global {
|
|
|
2070
1946
|
}
|
|
2071
1947
|
interface SDKOptions {
|
|
2072
1948
|
deepdeskUrl: string;
|
|
2073
|
-
brokerUrl?: string;
|
|
2074
1949
|
version?: string;
|
|
2075
1950
|
locale?: Locale;
|
|
2076
1951
|
token?: string;
|
|
@@ -2090,7 +1965,7 @@ interface SDKEventMap {
|
|
|
2090
1965
|
text: string;
|
|
2091
1966
|
selectionAfter: SelectionRange;
|
|
2092
1967
|
};
|
|
2093
|
-
'cues':
|
|
1968
|
+
'cues': LegacyCue$1[];
|
|
2094
1969
|
'replace': {
|
|
2095
1970
|
text: string;
|
|
2096
1971
|
replace: SelectionRange;
|
|
@@ -2106,42 +1981,30 @@ interface SDKEventMap {
|
|
|
2106
1981
|
data: unknown;
|
|
2107
1982
|
};
|
|
2108
1983
|
'call-to-action': {
|
|
2109
|
-
cue:
|
|
1984
|
+
cue: LegacyCue$1;
|
|
2110
1985
|
};
|
|
2111
1986
|
logout: undefined;
|
|
2112
1987
|
ready: undefined;
|
|
2113
1988
|
showSearchOverlay: boolean;
|
|
2114
1989
|
}
|
|
2115
1990
|
type SDKHandler<K extends keyof SDKEventMap> = (eventPayload: SDKEventMap[K]) => void;
|
|
2116
|
-
interface
|
|
1991
|
+
interface RenderOptions {
|
|
2117
1992
|
customStyles?: InputOverlayCustomStyles & {
|
|
2118
1993
|
rootNode?: string;
|
|
2119
1994
|
suggestionsRootNode?: string;
|
|
2120
1995
|
portalRootNode?: string;
|
|
2121
|
-
|
|
1996
|
+
floatingMenuParent?: string;
|
|
2122
1997
|
};
|
|
2123
1998
|
closestScrollSelector?: string;
|
|
2124
|
-
|
|
2125
|
-
showStyleSuggestions?: boolean;
|
|
2126
|
-
showTabCompletion?: boolean;
|
|
2127
|
-
showTextSuggestions?: boolean;
|
|
2128
|
-
showMidSentenceSuggestions?: boolean;
|
|
2129
|
-
showSuggestionsBeforePattern?: string | false;
|
|
2130
|
-
showSuggestionsAfterPattern?: string | false;
|
|
2131
|
-
textSuggestionsCount?: number;
|
|
2132
|
-
detectSubmit?: boolean;
|
|
2133
|
-
insertLink?: boolean;
|
|
2134
|
-
isEmbedded?: boolean;
|
|
1999
|
+
floatingMenuParent?: HTMLElement;
|
|
2135
2000
|
/**
|
|
2136
2001
|
* By default append overlay to target.parentElement
|
|
2137
2002
|
* Optionally append to different HTMLElement, for example `document.body`
|
|
2138
2003
|
*/
|
|
2139
2004
|
appendOverlayTo?: HTMLElement;
|
|
2140
2005
|
inputMediator?: InputMediator<HTMLElement>;
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
appendOverlayTo?: HTMLElement;
|
|
2144
|
-
};
|
|
2006
|
+
}
|
|
2007
|
+
interface MountOptions extends Partial<Settings>, RenderOptions {
|
|
2145
2008
|
}
|
|
2146
2009
|
interface WidgetOptions {
|
|
2147
2010
|
customStyles?: WidgetCustomStyles;
|
|
@@ -2157,24 +2020,25 @@ declare class DeepdeskSDK {
|
|
|
2157
2020
|
private broadcastEvents;
|
|
2158
2021
|
private eventListeners;
|
|
2159
2022
|
private unmountHandlers;
|
|
2023
|
+
private inlineSuggestions;
|
|
2024
|
+
private aboveSuggestions;
|
|
2025
|
+
private floatingMenu;
|
|
2160
2026
|
private widgetRoot;
|
|
2161
2027
|
private dynamicThunkObject;
|
|
2162
2028
|
isMounted: boolean;
|
|
2163
2029
|
instanceId: number;
|
|
2164
2030
|
private shouldRender;
|
|
2165
2031
|
store: Store;
|
|
2166
|
-
constructor({ deepdeskUrl,
|
|
2032
|
+
constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
|
|
2167
2033
|
get state(): redux.EmptyObject & {
|
|
2168
|
-
assistants: State$
|
|
2169
|
-
auth: State$
|
|
2170
|
-
autoflows: State$b;
|
|
2034
|
+
assistants: State$c;
|
|
2035
|
+
auth: State$b;
|
|
2171
2036
|
conversation: State$a;
|
|
2172
2037
|
contentTypes: State$9;
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
handlingTime: State$e;
|
|
2038
|
+
passwordlessToken: State$8;
|
|
2039
|
+
entities: State$7;
|
|
2040
|
+
knowledgeAssistant: State$6;
|
|
2041
|
+
handlingTime: State$5;
|
|
2178
2042
|
info: {
|
|
2179
2043
|
agentInfo?: AgentInfo | undefined;
|
|
2180
2044
|
agentSettings: unknown;
|
|
@@ -2183,14 +2047,12 @@ declare class DeepdeskSDK {
|
|
|
2183
2047
|
platformVariables?: VariableMapping | undefined;
|
|
2184
2048
|
fetchState: FetchState;
|
|
2185
2049
|
};
|
|
2186
|
-
input: State$
|
|
2050
|
+
input: State$d;
|
|
2187
2051
|
settings: {
|
|
2188
2052
|
locale: Locale;
|
|
2189
2053
|
deanonymize: boolean;
|
|
2190
2054
|
fallbackImage: string | false;
|
|
2191
2055
|
isEmbedded: boolean;
|
|
2192
|
-
showAutoflows: number | boolean;
|
|
2193
|
-
showCustomMessages: number | boolean;
|
|
2194
2056
|
showImages: boolean;
|
|
2195
2057
|
showSearch: boolean;
|
|
2196
2058
|
showImageSearch: boolean;
|
|
@@ -2210,6 +2072,8 @@ declare class DeepdeskSDK {
|
|
|
2210
2072
|
insertLink: boolean;
|
|
2211
2073
|
inlineSuggestions: boolean;
|
|
2212
2074
|
floatingMenu: boolean;
|
|
2075
|
+
detectSubmit: boolean;
|
|
2076
|
+
automaticHandlingTime: boolean;
|
|
2213
2077
|
adminUrl?: string | undefined;
|
|
2214
2078
|
productName: string;
|
|
2215
2079
|
enableSuggestionFeedback: boolean;
|
|
@@ -2234,8 +2098,6 @@ declare class DeepdeskSDK {
|
|
|
2234
2098
|
deanonymize: boolean;
|
|
2235
2099
|
fallbackImage: string | false;
|
|
2236
2100
|
isEmbedded: boolean;
|
|
2237
|
-
showAutoflows: number | boolean;
|
|
2238
|
-
showCustomMessages: number | boolean;
|
|
2239
2101
|
showImages: boolean;
|
|
2240
2102
|
showSearch: boolean;
|
|
2241
2103
|
showImageSearch: boolean;
|
|
@@ -2255,6 +2117,8 @@ declare class DeepdeskSDK {
|
|
|
2255
2117
|
insertLink: boolean;
|
|
2256
2118
|
inlineSuggestions: boolean;
|
|
2257
2119
|
floatingMenu: boolean;
|
|
2120
|
+
detectSubmit: boolean;
|
|
2121
|
+
automaticHandlingTime: boolean;
|
|
2258
2122
|
adminUrl?: string | undefined;
|
|
2259
2123
|
productName: string;
|
|
2260
2124
|
enableSuggestionFeedback: boolean;
|
|
@@ -2341,14 +2205,14 @@ declare class DeepdeskSDK {
|
|
|
2341
2205
|
/**
|
|
2342
2206
|
* @deprecated in favor of `evaluateAssistant`
|
|
2343
2207
|
*/
|
|
2344
|
-
evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<
|
|
2208
|
+
evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<LegacyCue$1[]>;
|
|
2345
2209
|
/**
|
|
2346
2210
|
* Evaluate assistant
|
|
2347
2211
|
* By default will expect cues and show them in the widget.
|
|
2348
2212
|
* Disable cues in widget by providing `showCuesInWidget: false`-option.
|
|
2349
2213
|
* `expectFormat` could be 'text', 'json-object', 'json-schema:cues' or 'json-schema:knowledge-assist'
|
|
2350
2214
|
*/
|
|
2351
|
-
evaluateAssistant<T extends Server
|
|
2215
|
+
evaluateAssistant<T extends Server.ResponseFormat = 'json-schema:cues'>(assistantCode: string, options?: {
|
|
2352
2216
|
expectFormat?: T;
|
|
2353
2217
|
input?: Record<string, any>;
|
|
2354
2218
|
transcript?: TranscriptOption;
|
|
@@ -2417,7 +2281,13 @@ declare class DeepdeskSDK {
|
|
|
2417
2281
|
* @param options - optional mount options
|
|
2418
2282
|
*/
|
|
2419
2283
|
mount(inputElement: HTMLElement, options?: MountOptions): void;
|
|
2284
|
+
subscribe<T>(selector: (state: RootState) => T, callback: (value: T) => void): Unsubscribe;
|
|
2420
2285
|
unmount(): void;
|
|
2286
|
+
private renderSuggestions;
|
|
2287
|
+
private renderInlineSuggestions;
|
|
2288
|
+
private renderAboveSuggestions;
|
|
2289
|
+
private renderFloatingMenu;
|
|
2290
|
+
private renderOverlays;
|
|
2421
2291
|
/**
|
|
2422
2292
|
* Injects the Deepdesk Widget element into the provided DOM element.
|
|
2423
2293
|
* @param containerElement - the element to inject the deepdesk element in
|