@deepdesk/deepdesk-sdk 14.3.1-beta.0 → 14.3.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.d.mts CHANGED
@@ -4,7 +4,7 @@ import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/con
4
4
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
5
5
  import { Middleware } from '@reduxjs/toolkit';
6
6
 
7
- declare const styles$q: {
7
+ declare const styles$p: {
8
8
  readonly "root": string;
9
9
  readonly "imageWrapper": string;
10
10
  readonly "image": string;
@@ -33,10 +33,10 @@ interface CardComposition {
33
33
  Content: FC<ContentProps>;
34
34
  Title: FC<TitleProps>;
35
35
  }
36
- type CardStyles = typeof styles$q;
36
+ type CardStyles = typeof styles$p;
37
37
  declare const Card: FC & CardComposition;
38
38
 
39
- declare const styles$p: {
39
+ declare const styles$o: {
40
40
  readonly "root": string;
41
41
  };
42
42
 
@@ -51,18 +51,18 @@ type Props$6 = HTMLAttributes<HTMLSpanElement> & {
51
51
  className?: string;
52
52
  keyCode: KeyboardHintKey;
53
53
  };
54
- type KeyboardHintStyles = typeof styles$p;
54
+ type KeyboardHintStyles = typeof styles$o;
55
55
  declare const KeyboardHint: React.FC<Props$6>;
56
56
 
57
- declare const styles$o: {
57
+ declare const styles$n: {
58
58
  readonly "root": string;
59
59
  };
60
60
 
61
61
  type Props$5 = HTMLAttributes<HTMLSpanElement>;
62
- type LabelStyles = typeof styles$o;
62
+ type LabelStyles = typeof styles$n;
63
63
  declare const Label: React.FC<Props$5>;
64
64
 
65
- declare const styles$n: {
65
+ declare const styles$m: {
66
66
  readonly "root": string;
67
67
  readonly "subTitleContainer": string;
68
68
  readonly "subtitle": string;
@@ -73,10 +73,10 @@ type Props$4 = HTMLAttributes<HTMLElement> & {
73
73
  type: string;
74
74
  title?: string;
75
75
  };
76
- type SectionStyles = typeof styles$n;
76
+ type SectionStyles = typeof styles$m;
77
77
  declare const Section: React.FC<Props$4>;
78
78
 
79
- declare const styles$m: {
79
+ declare const styles$l: {
80
80
  readonly "root": string;
81
81
  };
82
82
 
@@ -84,10 +84,10 @@ type Props$3 = {
84
84
  className?: string;
85
85
  children?: React.ReactNode;
86
86
  };
87
- type SectionListStyles = typeof styles$m;
87
+ type SectionListStyles = typeof styles$l;
88
88
  declare const SectionList: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLDivElement>>;
89
89
 
90
- declare const styles$l: {
90
+ declare const styles$k: {
91
91
  readonly "root": string;
92
92
  readonly "fadein": string;
93
93
  readonly "isClickable": string;
@@ -154,21 +154,21 @@ interface SuggestionComposition {
154
154
  Button: typeof Button;
155
155
  ButtonsContainer: typeof ButtonsContainer;
156
156
  }
157
- type SuggestionStyles = typeof styles$l;
157
+ type SuggestionStyles = typeof styles$k;
158
158
  declare const Suggestion: ForwardRefExoticComponent<Props$2 & RefAttributes<any>> & SuggestionComposition;
159
159
 
160
- declare const styles$k: {
160
+ declare const styles$j: {
161
161
  readonly "root": string;
162
162
  readonly "isWithDivider": string;
163
163
  };
164
164
 
165
- type SuggestionListStyles = typeof styles$k;
165
+ type SuggestionListStyles = typeof styles$j;
166
166
  interface Props$1 {
167
167
  withDivider?: boolean;
168
168
  }
169
169
  declare const SuggestionList: React.FC<Props$1>;
170
170
 
171
- declare const styles$j: {
171
+ declare const styles$i: {
172
172
  readonly "root": string;
173
173
  readonly "isCollapsed": string;
174
174
  };
@@ -177,7 +177,7 @@ type Props = HTMLAttributes<HTMLButtonElement> & {
177
177
  isCollapsed: boolean;
178
178
  title: string;
179
179
  };
180
- type ToggleButtonStyles = typeof styles$j;
180
+ type ToggleButtonStyles = typeof styles$i;
181
181
  declare const ToggleButton: React.FC<Props>;
182
182
 
183
183
  declare enum Sources {
@@ -368,7 +368,7 @@ declare class HTTPClient {
368
368
  delete<TResponse>(path: string, init?: ExtendedRequestInit): Promise<TResponse>;
369
369
  }
370
370
 
371
- declare namespace Server$1 {
371
+ declare namespace Server {
372
372
  /**
373
373
  * API create conversation payload
374
374
  */
@@ -539,8 +539,6 @@ declare namespace Server$1 {
539
539
  declare enum EventType {
540
540
  SEND_MESSAGE = "Send Message",
541
541
  HANDLING_TIME = "Handling Time",
542
- START_AUTOFLOW = "Start Autoflow",
543
- ABORT_AUTOFLOW = "Abort Autoflow",
544
542
  ADD_TO_PERSONAL_COLLECTION = "Add to personal collection",
545
543
  DELETE_FROM_PERSONAL_COLLECTION = "Delete from personal collection"
546
544
  }
@@ -651,14 +649,6 @@ declare namespace Server$1 {
651
649
  * Send message event data
652
650
  */
653
651
  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
652
  /**
663
653
  * PersonalCollection event data
664
654
  */
@@ -723,8 +713,6 @@ declare namespace Server$1 {
723
713
  search: boolean;
724
714
  image_search: boolean;
725
715
  sticky_messages: boolean;
726
- custom_messages: boolean;
727
- autoflows: boolean;
728
716
  recommend_text_suggestions: boolean;
729
717
  assisted_intake: boolean;
730
718
  autocomplete_with_text_suggestions: boolean;
@@ -816,10 +804,10 @@ declare namespace Server$1 {
816
804
  };
817
805
  };
818
806
  }
819
- type ConversationMessage = CamelCaseKeys<Omit<Server$1.ConversationMessage, 'tags'>> & {
807
+ type ConversationMessage = CamelCaseKeys<Omit<Server.ConversationMessage, 'tags'>> & {
820
808
  tags: Record<string, string> | null;
821
809
  };
822
- type Conversation = CamelCaseKeys<Omit<Server$1.Conversation, 'tags' | 'messages'>> & {
810
+ type Conversation = CamelCaseKeys<Omit<Server.Conversation, 'tags' | 'messages'>> & {
823
811
  tags: Record<string, string> | null;
824
812
  } & {
825
813
  messages: ConversationMessage[];
@@ -852,21 +840,17 @@ type CreateConversationOptions = {
852
840
  /**
853
841
  * Send message event data
854
842
  */
855
- type SendMessageEventData$1 = CamelCaseKeys<Server$1.SendMessageEventData>;
843
+ type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
856
844
  /**
857
845
  * Event v2 payload
858
846
  */
859
- type EventV2<T = unknown> = CamelCaseKeys<Omit<Server$1.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
847
+ type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
860
848
  data: T;
861
849
  };
862
850
  /**
863
851
  * Handling time event data
864
852
  */
865
- type HandlingTimeEventData = CamelCaseKeys<Pick<Server$1.HandlingTimeEventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'>>;
866
- /**
867
- * Autoflow event data
868
- */
869
- type AutoflowEventData = CamelCaseKeys<Server$1.AutoflowEventData>;
853
+ type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'conversation_id' | 'client_version' | 'time_start' | 'time_stop'>>;
870
854
  /**
871
855
  * Rule event meta data
872
856
  */
@@ -882,8 +866,6 @@ type RuleEventMeta = {
882
866
  type SendEventV1ArgumentMap = {
883
867
  'Send Message': SendMessageEventData$1;
884
868
  'Handling Time': HandlingTimeEventData;
885
- 'Start Autoflow': AutoflowEventData;
886
- 'Abort Autoflow': AutoflowEventData;
887
869
  };
888
870
  /**
889
871
  * Map the send event name to the data value in the payload. (V2)
@@ -940,7 +922,7 @@ type SendEventV2ArgumentMap = {
940
922
  question: string;
941
923
  isFollowUpQuestion: boolean;
942
924
  isAgent: boolean;
943
- answer: Server$1.KnowledgeResponse['answer'];
925
+ answer: Server.KnowledgeResponse['answer'];
944
926
  }>;
945
927
  'knowledge assist source viewed': EventV2<{
946
928
  question: string;
@@ -980,22 +962,22 @@ declare class DeepdeskAPI {
980
962
  static exchangeTokenPromise: Promise<void> | null;
981
963
  private preflight;
982
964
  constructor(apiUrl: string, options?: DeepdeskAPIOptions);
983
- createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server$1.Conversation>>;
984
- getMe(): Promise<CamelCaseKeys<Server$1.Me>>;
985
- postIdentity(identity: CamelCaseKeys<Omit<Server$1.Identity, 'id'>>): Promise<void>;
986
- patchMe(data: Partial<CamelCaseKeys<Omit<Server$1.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server$1.Me>>;
987
- getProfile(profileCode: string): Promise<CamelCaseKeys<Server$1.Profile>>;
988
- getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server$1.KnowledgeAssistant>>;
989
- getContentTypes(): Promise<CamelCaseKeys<Server$1.ContentType[]>>;
990
- getAccount(): Promise<CamelCaseKeys<Server$1.Account>>;
965
+ createConversation(options: CreateConversationOptions): Promise<CamelCaseKeys<Server.Conversation>>;
966
+ getMe(): Promise<CamelCaseKeys<Server.Me>>;
967
+ postIdentity(identity: CamelCaseKeys<Omit<Server.Identity, 'id'>>): Promise<void>;
968
+ patchMe(data: Partial<CamelCaseKeys<Omit<Server.Me, 'permissions'>>>): Promise<CamelCaseKeys<Server.Me>>;
969
+ getProfile(profileCode: string): Promise<CamelCaseKeys<Server.Profile>>;
970
+ getKnowledgeAssistant(code: string): Promise<CamelCaseKeys<Server.KnowledgeAssistant>>;
971
+ getContentTypes(): Promise<CamelCaseKeys<Server.ContentType[]>>;
972
+ getAccount(): Promise<CamelCaseKeys<Server.Account>>;
991
973
  /**
992
974
  * Fetch a Platform Config
993
975
  * Don't provide the `platformConfigId` to get the active platform config.
994
976
  * Provide the `platformConfigId` to get a specific platform config.
995
977
  */
996
- getPlatformConfig(platformConfigId?: number): Promise<CamelCaseKeys<Server$1.PlatformConfig['config']>>;
978
+ getPlatformConfig(platformConfigId?: number): Promise<CamelCaseKeys<Server.PlatformConfig['config']>>;
997
979
  checkUserExists(externalId: string): Promise<boolean>;
998
- getConversationBySessionId(sessionId: string, options?: RetryOptions): Promise<CamelCaseKeys<Server$1.Conversation>>;
980
+ getConversationBySessionId(sessionId: string, options?: RetryOptions): Promise<CamelCaseKeys<Server.Conversation>>;
999
981
  isConversationSupported(sessionId: string, options?: RetryOptions): Promise<boolean>;
1000
982
  /**
1001
983
  * Update converstation meta data
@@ -1004,7 +986,7 @@ declare class DeepdeskAPI {
1004
986
  /**
1005
987
  * Post converstation messages
1006
988
  */
1007
- postMessages(conversationId: string, messages: CamelCaseKeys<Server$1.ConversationMessage>[]): Promise<({
989
+ postMessages(conversationId: string, messages: CamelCaseKeys<Server.ConversationMessage>[]): Promise<({
1008
990
  text: string;
1009
991
  id: string;
1010
992
  source: "agent" | "visitor" | "bot" | "system";
@@ -1035,7 +1017,7 @@ declare class DeepdeskAPI {
1035
1017
  * Exchange a temporary token for a access token cookie
1036
1018
  */
1037
1019
  exchangeTokenForAccessCookie(token: string): Promise<void>;
1038
- authenticateWithKey(key: string, user: CamelCaseKeys<Server$1.User>): Promise<void>;
1020
+ authenticateWithKey(key: string, user: CamelCaseKeys<Server.User>): Promise<void>;
1039
1021
  /**
1040
1022
  * Request text suggestions based on the current conversation
1041
1023
  */
@@ -1051,23 +1033,23 @@ declare class DeepdeskAPI {
1051
1033
  /**
1052
1034
  * Request autocomplete suggestions based on the agent text input
1053
1035
  */
1054
- getAutocompleteSuggestions(conversationId: string, params: CamelCaseKeys<Server$1.GetAutocompleteSuggestionsParams>): Promise<TextSuggestion[]>;
1036
+ getAutocompleteSuggestions(conversationId: string, params: CamelCaseKeys<Server.GetAutocompleteSuggestionsParams>): Promise<TextSuggestion[]>;
1055
1037
  /**
1056
1038
  * Request pinned messages
1057
1039
  */
1058
- getPinnedMessages(conversationId: string): Promise<CamelCaseKeys<Server$1.PinnedMessage[]>>;
1040
+ getPinnedMessages(conversationId: string): Promise<CamelCaseKeys<Server.PinnedMessage[]>>;
1059
1041
  /**
1060
1042
  * Request style suggestions
1061
1043
  */
1062
- getStyleSuggestions(params: CamelCaseKeys<Server$1.GetStyleSuggestionsParams>): Promise<CamelCaseKeys<Server$1.StyleSuggestion>>;
1044
+ getStyleSuggestions(params: CamelCaseKeys<Server.GetStyleSuggestionsParams>): Promise<CamelCaseKeys<Server.StyleSuggestion>>;
1063
1045
  /**
1064
1046
  * Search
1065
1047
  */
1066
- search(params: SearchOptions): Promise<CamelCaseKeys<Server$1.SearchResultsData>>;
1067
- knowledgeAssist(request: CamelCaseKeys<Server$1.KnowledgeRequest>, chatHistory: Server$1.KnowledgeResponse[], assistantCode: string, meta?: {
1048
+ search(params: SearchOptions): Promise<CamelCaseKeys<Server.SearchResultsData>>;
1049
+ knowledgeAssist(request: CamelCaseKeys<Server.KnowledgeRequest>, chatHistory: Server.KnowledgeResponse[], assistantCode: string, meta?: {
1068
1050
  agentId?: string;
1069
1051
  conversationId?: string;
1070
- }): Promise<CamelCaseKeys<Server$1.KnowledgeResponse['answer']>>;
1052
+ }): Promise<CamelCaseKeys<Server.KnowledgeResponse['answer']>>;
1071
1053
  requestLoginByEmail(email: string): Promise<{
1072
1054
  code: string;
1073
1055
  message: string;
@@ -1082,7 +1064,7 @@ declare class DeepdeskAPI {
1082
1064
  */
1083
1065
  evaluateRule<Payload = unknown>(label: string, conversationId: string, payload: Payload, opts?: {
1084
1066
  raiseForFailingConditions?: boolean;
1085
- }): Promise<CamelCaseKeys<Server$1.LegacyCue[]>>;
1067
+ }): Promise<CamelCaseKeys<Server.LegacyCue[]>>;
1086
1068
  /**
1087
1069
  * Temporarily restore getSummary for more controlled rollout
1088
1070
  * @deprecated
@@ -1095,8 +1077,8 @@ declare class DeepdeskAPI {
1095
1077
  promptInstruction?: string;
1096
1078
  agentId?: string;
1097
1079
  externalConversationId?: string;
1098
- }): Promise<CamelCaseKeys<Server$1.Summary>>;
1099
- evaluateAssistant<TOutput extends Server$1.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1080
+ }): Promise<CamelCaseKeys<Server.Summary>>;
1081
+ evaluateAssistant<TOutput extends Server.ResponseFormat = 'text', TInput = Record<string, unknown>>(assistantCode: string, options?: {
1100
1082
  expectFormat: TOutput;
1101
1083
  threadId?: number;
1102
1084
  input: TInput;
@@ -1105,7 +1087,7 @@ declare class DeepdeskAPI {
1105
1087
  text: string;
1106
1088
  }>;
1107
1089
  externalConversationId?: string;
1108
- }): Promise<CamelCaseKeys<Server$1.EvaluationOutput<TOutput>>>;
1090
+ }): Promise<CamelCaseKeys<Server.EvaluationOutput<TOutput>>>;
1109
1091
  createAssistantThread(init: {
1110
1092
  assistantCode: string;
1111
1093
  }): Promise<{
@@ -1118,7 +1100,7 @@ declare class DeepdeskAPI {
1118
1100
  }): Promise<{
1119
1101
  threadId: number;
1120
1102
  }>;
1121
- getRules(): Promise<CamelCaseKeys<Server$1.Rule[]>>;
1103
+ getRules(): Promise<CamelCaseKeys<Server.Rule[]>>;
1122
1104
  translateMessages(params: TranslationRequest): Promise<TranslationResponse>;
1123
1105
  private handleDeepdeskVersionHeaders;
1124
1106
  }
@@ -1205,10 +1187,10 @@ type AgentInfo = {
1205
1187
  agentTimeZone?: string;
1206
1188
  agentDefaultLocale?: string;
1207
1189
  };
1208
- type KnowledgeAssistant = CamelCaseKeys<Server$1.KnowledgeAssistant>;
1209
- type User = CamelCaseKeys<Server$1.User>;
1210
- type SendMessageEventData = CamelCaseKeys<Server$1.SendMessageEventData>;
1211
- type Profile = CamelCaseKeys<Server$1.Profile>;
1190
+ type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
1191
+ type User = CamelCaseKeys<Server.User>;
1192
+ type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
1193
+ type Profile = CamelCaseKeys<Server.Profile>;
1212
1194
 
1213
1195
  type CreateConversation = {
1214
1196
  platform: string;
@@ -1247,7 +1229,7 @@ type CustomDataSchema = Array<{
1247
1229
  trueValue?: string;
1248
1230
  falseValue?: string;
1249
1231
  }>;
1250
- type PlatformConfig = CamelCaseKeys<Server$1.PlatformConfig>;
1232
+ type PlatformConfig = CamelCaseKeys<Server.PlatformConfig>;
1251
1233
  /**
1252
1234
  * Utils
1253
1235
  */
@@ -1289,7 +1271,7 @@ type MetricState = {
1289
1271
  textSuggestions: SuggestionMetrics[];
1290
1272
  cuts: any[];
1291
1273
  };
1292
- type State$f = {
1274
+ type State$d = {
1293
1275
  text: string;
1294
1276
  html: string | null;
1295
1277
  selection: SelectionRange;
@@ -1304,96 +1286,12 @@ type State$f = {
1304
1286
  selectedSuggestionIndex: number;
1305
1287
  };
1306
1288
 
1307
- type State$e = {
1289
+ type State$c = {
1308
1290
  startTime: Date | null;
1309
1291
  stopTime: Date | null;
1310
1292
  };
1311
1293
 
1312
- type SSEClientOptions = {
1313
- timeout: number;
1314
- };
1315
- declare class SSEClient<TEventMap extends Record<string, (data?: any) => void>> {
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;
1379
- };
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>>;
1294
+ type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
1397
1295
  type AssistantAnswerSource = {
1398
1296
  url?: string;
1399
1297
  name: string;
@@ -1405,7 +1303,7 @@ type AssistantInteraction = {
1405
1303
  sources?: AssistantAnswerSource[];
1406
1304
  };
1407
1305
  };
1408
- type State$d = {
1306
+ type State$b = {
1409
1307
  cues: EvaluationOutput<'json-schema:cues'>;
1410
1308
  threads: Record<number, AssistantInteraction[]>;
1411
1309
  fetchState: FetchState;
@@ -1418,22 +1316,19 @@ type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcrip
1418
1316
 
1419
1317
  interface StoreConfig {
1420
1318
  deepdeskAPI: DeepdeskAPI;
1421
- deepdeskBrokerAPI?: DeepdeskBrokerAPI;
1422
1319
  dynamicThunkObject?: Record<string, unknown>;
1423
1320
  middleware?: Middleware[];
1424
1321
  preloadedState?: any;
1425
1322
  }
1426
1323
  declare const reducers: redux.Reducer<redux.CombinedState<{
1427
- assistants: State$d;
1428
- auth: State$c;
1429
- autoflows: State$b;
1430
- conversation: State$a;
1431
- contentTypes: State$9;
1432
- customMessages: State$8;
1324
+ assistants: State$b;
1325
+ auth: State$a;
1326
+ conversation: State$9;
1327
+ contentTypes: State$8;
1433
1328
  passwordlessToken: State$7;
1434
1329
  entities: State$6;
1435
1330
  knowledgeAssistant: State$5;
1436
- handlingTime: State$e;
1331
+ handlingTime: State$c;
1437
1332
  info: {
1438
1333
  agentInfo?: AgentInfo | undefined;
1439
1334
  agentSettings: unknown;
@@ -1442,14 +1337,12 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1442
1337
  platformVariables?: VariableMapping | undefined;
1443
1338
  fetchState: FetchState;
1444
1339
  };
1445
- input: State$f;
1340
+ input: State$d;
1446
1341
  settings: {
1447
1342
  locale: Locale;
1448
1343
  deanonymize: boolean;
1449
1344
  fallbackImage: string | false;
1450
1345
  isEmbedded: boolean;
1451
- showAutoflows: number | boolean;
1452
- showCustomMessages: number | boolean;
1453
1346
  showImages: boolean;
1454
1347
  showSearch: boolean;
1455
1348
  showImageSearch: boolean;
@@ -1489,16 +1382,14 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1489
1382
  textSuggestions: TextSuggestionState;
1490
1383
  }>, redux.AnyAction>;
1491
1384
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
1492
- assistants: State$d;
1493
- auth: State$c;
1494
- autoflows: State$b;
1495
- conversation: State$a;
1496
- contentTypes: State$9;
1497
- customMessages: State$8;
1385
+ assistants: State$b;
1386
+ auth: State$a;
1387
+ conversation: State$9;
1388
+ contentTypes: State$8;
1498
1389
  passwordlessToken: State$7;
1499
1390
  entities: State$6;
1500
1391
  knowledgeAssistant: State$5;
1501
- handlingTime: State$e;
1392
+ handlingTime: State$c;
1502
1393
  info: {
1503
1394
  agentInfo?: AgentInfo | undefined;
1504
1395
  agentSettings: unknown;
@@ -1507,14 +1398,12 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1507
1398
  platformVariables?: VariableMapping | undefined;
1508
1399
  fetchState: FetchState;
1509
1400
  };
1510
- input: State$f;
1401
+ input: State$d;
1511
1402
  settings: {
1512
1403
  locale: Locale;
1513
1404
  deanonymize: boolean;
1514
1405
  fallbackImage: string | false;
1515
1406
  isEmbedded: boolean;
1516
- showAutoflows: number | boolean;
1517
- showCustomMessages: number | boolean;
1518
1407
  showImages: boolean;
1519
1408
  showSearch: boolean;
1520
1409
  showImageSearch: boolean;
@@ -1553,16 +1442,14 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1553
1442
  rules: State$1;
1554
1443
  textSuggestions: TextSuggestionState;
1555
1444
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
1556
- assistants: State$d;
1557
- auth: State$c;
1558
- autoflows: State$b;
1559
- conversation: State$a;
1560
- contentTypes: State$9;
1561
- customMessages: State$8;
1445
+ assistants: State$b;
1446
+ auth: State$a;
1447
+ conversation: State$9;
1448
+ contentTypes: State$8;
1562
1449
  passwordlessToken: State$7;
1563
1450
  entities: State$6;
1564
1451
  knowledgeAssistant: State$5;
1565
- handlingTime: State$e;
1452
+ handlingTime: State$c;
1566
1453
  info: {
1567
1454
  agentInfo?: AgentInfo | undefined;
1568
1455
  agentSettings: unknown;
@@ -1571,14 +1458,12 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1571
1458
  platformVariables?: VariableMapping | undefined;
1572
1459
  fetchState: FetchState;
1573
1460
  };
1574
- input: State$f;
1461
+ input: State$d;
1575
1462
  settings: {
1576
1463
  locale: Locale;
1577
1464
  deanonymize: boolean;
1578
1465
  fallbackImage: string | false;
1579
1466
  isEmbedded: boolean;
1580
- showAutoflows: number | boolean;
1581
- showCustomMessages: number | boolean;
1582
1467
  showImages: boolean;
1583
1468
  showSearch: boolean;
1584
1469
  showImageSearch: boolean;
@@ -1619,46 +1504,28 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1619
1504
  }>, redux.AnyAction, {
1620
1505
  dynamicThunkObject: Record<string, unknown> | undefined;
1621
1506
  deepdeskAPI: DeepdeskAPI;
1622
- deepdeskBrokerAPI: DeepdeskBrokerAPI | undefined;
1623
1507
  }>[]>;
1624
1508
  type RootState = ReturnType<typeof reducers>;
1625
1509
  type Store = ReturnType<typeof createStore>;
1626
1510
 
1627
- interface State$c {
1511
+ interface State$a {
1628
1512
  isLoggedIn: boolean | null;
1629
1513
  loginFetchState: FetchState;
1630
1514
  verifyFetchState: FetchState;
1631
1515
  showLoginOverlay: boolean;
1632
1516
  }
1633
1517
 
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 {
1518
+ interface State$9 {
1643
1519
  current: Conversation | null;
1644
1520
  isSupported: boolean | null;
1645
1521
  }
1646
1522
 
1647
- type ContentType = CamelCaseKeys<Server$1.ContentType>;
1648
- type State$9 = {
1523
+ type ContentType = CamelCaseKeys<Server.ContentType>;
1524
+ type State$8 = {
1649
1525
  data: ContentType[] | null;
1650
1526
  fetchState: FetchState;
1651
1527
  };
1652
1528
 
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
1529
  type State$7 = {
1663
1530
  token: string | null;
1664
1531
  interval: NodeJS.Timer | null;
@@ -1696,13 +1563,13 @@ interface State$3 {
1696
1563
  aggregates: Record<string, number>;
1697
1564
  }
1698
1565
 
1699
- type StyleSuggestion = CamelCaseKeys<Server$1.StyleSuggestion>;
1566
+ type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1700
1567
  interface State$2 {
1701
1568
  list: StyleSuggestion;
1702
1569
  fetchState: FetchState;
1703
1570
  }
1704
1571
 
1705
- type Cue = CamelCaseKeys<Server$1.LegacyCue>;
1572
+ type Cue = CamelCaseKeys<Server.LegacyCue>;
1706
1573
  type State$1 = {
1707
1574
  cues: Cue[];
1708
1575
  fetchState: FetchState;
@@ -1719,19 +1586,6 @@ interface TextSuggestionState {
1719
1586
  [type: string]: SuggestionState;
1720
1587
  }
1721
1588
 
1722
- 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
1589
  declare const styles$h: {
1736
1590
  readonly "root": string;
1737
1591
  readonly "list": string;
@@ -1980,7 +1834,6 @@ declare const styles: {
1980
1834
  type WidgetCustomDataStyles = typeof styles;
1981
1835
 
1982
1836
  type WidgetCustomStyles = {
1983
- Autoflow?: Partial<AutoflowStyles>;
1984
1837
  Card?: Partial<CardStyles>;
1985
1838
  Dialog?: Partial<DialogStyles>;
1986
1839
  KeyboardHint?: Partial<KeyboardHintStyles>;
@@ -2033,8 +1886,6 @@ type State = {
2033
1886
  deanonymize: boolean;
2034
1887
  fallbackImage: string | false;
2035
1888
  isEmbedded: boolean;
2036
- showAutoflows: boolean | number;
2037
- showCustomMessages: boolean | number;
2038
1889
  showImages: boolean;
2039
1890
  showSearch: boolean;
2040
1891
  showImageSearch: boolean;
@@ -2070,7 +1921,6 @@ declare global {
2070
1921
  }
2071
1922
  interface SDKOptions {
2072
1923
  deepdeskUrl: string;
2073
- brokerUrl?: string;
2074
1924
  version?: string;
2075
1925
  locale?: Locale;
2076
1926
  token?: string;
@@ -2163,18 +2013,16 @@ declare class DeepdeskSDK {
2163
2013
  instanceId: number;
2164
2014
  private shouldRender;
2165
2015
  store: Store;
2166
- constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2016
+ constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2167
2017
  get state(): redux.EmptyObject & {
2168
- assistants: State$d;
2169
- auth: State$c;
2170
- autoflows: State$b;
2171
- conversation: State$a;
2172
- contentTypes: State$9;
2173
- customMessages: State$8;
2018
+ assistants: State$b;
2019
+ auth: State$a;
2020
+ conversation: State$9;
2021
+ contentTypes: State$8;
2174
2022
  passwordlessToken: State$7;
2175
2023
  entities: State$6;
2176
2024
  knowledgeAssistant: State$5;
2177
- handlingTime: State$e;
2025
+ handlingTime: State$c;
2178
2026
  info: {
2179
2027
  agentInfo?: AgentInfo | undefined;
2180
2028
  agentSettings: unknown;
@@ -2183,14 +2031,12 @@ declare class DeepdeskSDK {
2183
2031
  platformVariables?: VariableMapping | undefined;
2184
2032
  fetchState: FetchState;
2185
2033
  };
2186
- input: State$f;
2034
+ input: State$d;
2187
2035
  settings: {
2188
2036
  locale: Locale;
2189
2037
  deanonymize: boolean;
2190
2038
  fallbackImage: string | false;
2191
2039
  isEmbedded: boolean;
2192
- showAutoflows: number | boolean;
2193
- showCustomMessages: number | boolean;
2194
2040
  showImages: boolean;
2195
2041
  showSearch: boolean;
2196
2042
  showImageSearch: boolean;
@@ -2234,8 +2080,6 @@ declare class DeepdeskSDK {
2234
2080
  deanonymize: boolean;
2235
2081
  fallbackImage: string | false;
2236
2082
  isEmbedded: boolean;
2237
- showAutoflows: number | boolean;
2238
- showCustomMessages: number | boolean;
2239
2083
  showImages: boolean;
2240
2084
  showSearch: boolean;
2241
2085
  showImageSearch: boolean;
@@ -2348,7 +2192,7 @@ declare class DeepdeskSDK {
2348
2192
  * Disable cues in widget by providing `showCuesInWidget: false`-option.
2349
2193
  * `expectFormat` could be 'text', 'json-object', 'json-schema:cues' or 'json-schema:knowledge-assist'
2350
2194
  */
2351
- evaluateAssistant<T extends Server$1.ResponseFormat = 'json-schema:cues'>(assistantCode: string, options?: {
2195
+ evaluateAssistant<T extends Server.ResponseFormat = 'json-schema:cues'>(assistantCode: string, options?: {
2352
2196
  expectFormat?: T;
2353
2197
  input?: Record<string, any>;
2354
2198
  transcript?: TranscriptOption;