@deepdesk/deepdesk-sdk 15.1.1-beta.2 → 15.1.1-beta.3

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.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
3
  import * as redux from 'redux';
3
4
  import { Unsubscribe } from 'redux';
4
5
  import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
@@ -121,7 +122,7 @@ interface ButtonProps<T extends React.ElementType> {
121
122
  icon?: ReactNode;
122
123
  disabled?: boolean;
123
124
  }
124
- declare function Button<T extends React.ElementType = 'button'>({ as, className, icon, title, children, disabled, ...restProps }: ButtonProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof ButtonProps<T>>): JSX.Element;
125
+ declare function Button<T extends React.ElementType = 'button'>({ as, className, icon, title, children, disabled, ...restProps }: ButtonProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof ButtonProps<T>>): react_jsx_runtime.JSX.Element;
125
126
  declare const ButtonsContainer: React.FC<{
126
127
  children: React.ReactNode;
127
128
  }>;
@@ -207,91 +208,21 @@ declare enum InputType {
207
208
  SPACE = "space"
208
209
  }
209
210
 
210
- /**
211
- * A selection range representation for textarea's and contenteditables only using offsets.
212
- */
213
- type SelectionRange = {
214
- start: number;
215
- end: number;
216
- };
217
- /**
218
- * A selection range representation for textarea's and contenteditables only using offsets.
219
- */
220
- type CaretPosition = {
221
- top: number;
222
- left: number;
223
- };
224
- interface InputEventMap {
225
- /**
226
- * User and platform changes (excluding changes by plugin)
227
- */
228
- change: (event: {
229
- plainText: string;
230
- rawHTML: string | null;
231
- }) => void;
232
- /**
233
- * Emits selection changes.
234
- */
235
- selection: (event: SelectionRange | null) => void;
236
- /**
237
- * Emits when the position of the caret on the screen changed
238
- */
239
- caretposition: (event: CaretPosition | null) => void;
240
- keydown: (event: KeyboardEvent) => void;
241
- keyup: (event: KeyboardEvent) => void;
242
- paste: (event: {
243
- pastedText: string;
244
- selectionText: string;
245
- }) => void;
246
- cut: (event: {
247
- selectionText: string;
248
- }) => void;
249
- submit: () => void;
250
- enabled: () => void;
251
- disabled: () => void;
252
- unmounted: () => void;
253
- focus: () => void;
254
- blur: () => void;
211
+ declare enum SearchResultDefaultType {
212
+ default = "DEFAULT",
213
+ url = "URL",
214
+ personal = "PERSONAL",
215
+ pinned = "STICKYMESSAGE",
216
+ image = "IMAGE"
255
217
  }
256
- type InputHandler<K extends keyof InputEventMap> = InputEventMap[K];
257
- type InputEventListeners<K extends keyof InputEventMap> = Record<K, InputHandler<K>[]>;
258
- declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
259
- protected element: HTMLElementType;
260
- isFocused: boolean;
261
- isActive: boolean;
262
- isDisposed: boolean;
263
- protected eventListeners: Partial<InputEventListeners<keyof InputEventMap>>;
264
- protected disposeHandlers: (() => void)[];
265
- protected cachedText: string;
266
- protected cachedCaretPosition: CaretPosition | null;
267
- protected cachedSelection: SelectionRange;
268
- protected cachedHTML: string | null;
269
- protected isSubmitting: boolean;
270
- protected isPossibleClearInputAction: boolean;
271
- constructor(element: HTMLElementType);
272
- protected addEventListener(eventName: string, listener: EventListenerOrEventListenerObject): void;
273
- protected removeEventListener(eventName: string, listener: EventListenerOrEventListenerObject): void;
274
- protected handleInteraction(): void;
275
- abstract getSelectedText(): string;
276
- protected handleClick(): void;
277
- protected handleFocus(): void;
278
- protected handleBlur(): void;
279
- protected handleKeyDown(event: KeyboardEvent): void;
280
- protected handleKeyUp(event: KeyboardEvent): void;
281
- protected handleCut(): void;
282
- protected handlePaste(event: ClipboardEvent): void;
283
- protected listen(): void;
284
- abstract getText(): string;
285
- abstract getHTML(): string | null;
286
- abstract getSelection(): SelectionRange;
287
- abstract getCaretPosition(): CaretPosition | null;
288
- focus(): void;
289
- emit<K extends keyof InputEventMap>(type: K, ...args: Parameters<InputHandler<K>>): void;
290
- on<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
291
- off<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
292
- activate(): void;
293
- deactivate(): void;
294
- dispose(): void;
218
+ type SearchResultType = string | SearchResultDefaultType;
219
+ type SearchResult = SearchSuggestion;
220
+ interface State$c {
221
+ list: Array<SearchResult>;
222
+ page: string;
223
+ fetchState: FetchState;
224
+ isOpen: boolean;
225
+ aggregates: Record<string, number>;
295
226
  }
296
227
 
297
228
  /**
@@ -325,6 +256,146 @@ type CamelCaseKeys<T> = T extends Array<any> ? {
325
256
  [K in keyof T as CamelCase<K & string>]: CamelCaseKeys<T[K]>;
326
257
  } : T;
327
258
 
259
+ declare enum Locale {
260
+ NL_NL = "nl-NL",
261
+ EN_US = "en-US"
262
+ }
263
+ interface SuggestionApiMetrics {
264
+ source?: string;
265
+ score?: number;
266
+ abVariant?: string;
267
+ abTestName?: string;
268
+ sourceText?: string;
269
+ trainingJobs?: string[];
270
+ }
271
+ interface TextSuggestion extends SuggestionApiMetrics {
272
+ id?: string;
273
+ text: string;
274
+ url?: string;
275
+ title?: string;
276
+ sourceLabel?: string;
277
+ searchTerm?: string;
278
+ type?: string;
279
+ searchKeywords?: string[];
280
+ image?: string;
281
+ message?: string;
282
+ imageSizes?: {
283
+ small: string;
284
+ medium: string;
285
+ large: string;
286
+ };
287
+ }
288
+ interface PinnedMessage extends SuggestionApiMetrics {
289
+ title: string;
290
+ message: string;
291
+ image: string;
292
+ imageSizes?: {
293
+ small: string;
294
+ medium: string;
295
+ large: string;
296
+ };
297
+ }
298
+ interface UrlSuggestion extends SuggestionApiMetrics {
299
+ id?: string;
300
+ url: string;
301
+ context?: string;
302
+ image: string;
303
+ summary?: string;
304
+ title?: string;
305
+ imageSizes?: {
306
+ small: string;
307
+ medium: string;
308
+ large: string;
309
+ };
310
+ }
311
+ interface SearchSuggestion extends SuggestionApiMetrics {
312
+ id?: string;
313
+ text: string;
314
+ title?: string;
315
+ source?: string;
316
+ context?: string;
317
+ image?: string;
318
+ type?: SearchResultType;
319
+ }
320
+ interface SuggestionEventMetrics {
321
+ inputType: InputType;
322
+ }
323
+ interface SuggestionMetrics extends SuggestionApiMetrics, SuggestionEventMetrics {
324
+ text: string;
325
+ searchTerm?: string | null;
326
+ }
327
+ type VisitorInfo = {
328
+ visitorId?: string;
329
+ visitorName?: string;
330
+ visitorTimeZone?: string;
331
+ psid?: string;
332
+ };
333
+ type AgentInfo = {
334
+ agentId: string;
335
+ agentNickname: string;
336
+ agentName?: string;
337
+ agentEmail?: string;
338
+ agentTimeZone?: string;
339
+ agentDefaultLocale?: string;
340
+ };
341
+ type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
342
+ type User = CamelCaseKeys<Server.User>;
343
+ type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
344
+ type Profile = CamelCaseKeys<Server.Profile>;
345
+
346
+ type CreateConversation = {
347
+ platform: string;
348
+ sessionId: string;
349
+ profileCode?: string;
350
+ agentId: string;
351
+ agentName?: string;
352
+ agentNickname?: string;
353
+ agentEmail?: string;
354
+ tags?: Record<string, string> | null;
355
+ };
356
+ type TranslationRequest = {
357
+ targetLanguage: string;
358
+ messages: Array<string>;
359
+ };
360
+ type Translation = {
361
+ originalLanguage: string;
362
+ targetLanguage: string;
363
+ translation: string;
364
+ };
365
+ type TranslationResponse = Translation[];
366
+ interface Entity {
367
+ text: string;
368
+ label: string;
369
+ }
370
+ type CustomData = Record<string, unknown>;
371
+ type VariableMapping = Record<string, string>;
372
+ type CustomDataSchema = Array<{
373
+ path: string;
374
+ label: string;
375
+ type: 'string' | 'number';
376
+ } | {
377
+ path: string;
378
+ label: string;
379
+ type: 'boolean';
380
+ trueValue?: string;
381
+ falseValue?: string;
382
+ }>;
383
+ type PlatformConfig = CamelCaseKeys<Server.PlatformConfig>;
384
+ /**
385
+ * Utils
386
+ */
387
+ type Logger = {
388
+ info(...args: any[]): void;
389
+ warn(...args: any[]): void;
390
+ error(...args: any[]): void;
391
+ };
392
+ declare enum FetchState {
393
+ IDLE = "idle",
394
+ LOADING = "loading",
395
+ DONE = "done",
396
+ ERROR = "error"
397
+ }
398
+
328
399
  type Fetch = typeof window.fetch;
329
400
  type HTTPClientOptions = {
330
401
  fetch?: typeof window.fetch;
@@ -350,7 +421,7 @@ declare class HTTPClient {
350
421
  options: HTTPClientOptions;
351
422
  private latestRequestByUrl;
352
423
  csrfToken?: string;
353
- fetch: ((input: RequestInfo | URL, init?: RequestInit | undefined) => Promise<Response>) & typeof fetch;
424
+ fetch: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) & typeof fetch;
354
425
  private static refreshingToken;
355
426
  constructor(baseUrl?: string, options?: HTTPClientOptions);
356
427
  patchFetch(patch: (fetchFn: Fetch) => Fetch): void;
@@ -537,7 +608,7 @@ declare namespace Server {
537
608
  suggestion: string;
538
609
  }[];
539
610
  };
540
- declare enum EventType {
611
+ enum EventType {
541
612
  SEND_MESSAGE = "Send Message",
542
613
  HANDLING_TIME = "Handling Time",
543
614
  ADD_TO_PERSONAL_COLLECTION = "Add to personal collection",
@@ -841,7 +912,7 @@ type CreateConversationOptions = {
841
912
  /**
842
913
  * Send message event data
843
914
  */
844
- type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
915
+ type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
845
916
  /**
846
917
  * Event v2 payload
847
918
  */
@@ -865,7 +936,7 @@ type RuleEventMeta = {
865
936
  * @deprecated
866
937
  */
867
938
  type SendEventV1ArgumentMap = {
868
- 'Send Message': SendMessageEventData$1;
939
+ 'Send Message': SendMessageEventData;
869
940
  'Handling Time': HandlingTimeEventData;
870
941
  };
871
942
  /**
@@ -1027,11 +1098,7 @@ declare class DeepdeskAPI {
1027
1098
  /**
1028
1099
  * Request text suggestions based on the current conversation
1029
1100
  */
1030
- getTextSuggestions(conversationId: string, params: {
1031
- timezone?: string | undefined;
1032
- agentName?: string | undefined;
1033
- visitorName?: string | undefined;
1034
- } | undefined, contentType: string): Promise<TextSuggestion[]>;
1101
+ getTextSuggestions(conversationId: string, params: CamelCaseKeys<Server.GetTextSuggestionsParams> | undefined, contentType: string): Promise<TextSuggestion[]>;
1035
1102
  /**
1036
1103
  * Validate authentication
1037
1104
  */
@@ -1104,144 +1171,102 @@ declare class DeepdeskAPI {
1104
1171
  private handleDeepdeskVersionHeaders;
1105
1172
  }
1106
1173
 
1107
- declare enum Locale {
1108
- NL_NL = "nl-NL",
1109
- EN_US = "en-US"
1110
- }
1111
- interface SuggestionApiMetrics {
1112
- source?: string;
1113
- score?: number;
1114
- abVariant?: string;
1115
- abTestName?: string;
1116
- sourceText?: string;
1117
- trainingJobs?: string[];
1174
+ type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1175
+ interface State$b {
1176
+ list: StyleSuggestion;
1177
+ fetchState: FetchState;
1118
1178
  }
1119
- interface TextSuggestion extends SuggestionApiMetrics {
1120
- id?: string;
1121
- text: string;
1122
- url?: string;
1123
- title?: string;
1124
- sourceLabel?: string;
1125
- searchTerm?: string;
1126
- type?: string;
1127
- searchKeywords?: string[];
1128
- image?: string;
1129
- message?: string;
1130
- imageSizes?: {
1131
- small: string;
1132
- medium: string;
1133
- large: string;
1134
- };
1135
- }
1136
- interface PinnedMessage extends SuggestionApiMetrics {
1137
- title: string;
1138
- message: string;
1139
- image: string;
1140
- imageSizes?: {
1141
- small: string;
1142
- medium: string;
1143
- large: string;
1144
- };
1145
- }
1146
- interface UrlSuggestion extends SuggestionApiMetrics {
1147
- id?: string;
1148
- url: string;
1149
- context?: string;
1150
- image: string;
1151
- summary?: string;
1152
- title?: string;
1153
- imageSizes?: {
1154
- small: string;
1155
- medium: string;
1156
- large: string;
1157
- };
1158
- }
1159
- interface SearchSuggestion extends SuggestionApiMetrics {
1160
- id?: string;
1161
- text: string;
1162
- title?: string;
1163
- source?: string;
1164
- context?: string;
1165
- image?: string;
1166
- type?: SearchResultType;
1167
- }
1168
- interface SuggestionEventMetrics {
1169
- inputType: InputType;
1170
- }
1171
- interface SuggestionMetrics extends SuggestionApiMetrics, SuggestionEventMetrics {
1172
- text: string;
1173
- searchTerm?: string | null;
1174
- }
1175
- type VisitorInfo = {
1176
- visitorId?: string;
1177
- visitorName?: string;
1178
- visitorTimeZone?: string;
1179
- psid?: string;
1180
- };
1181
- type AgentInfo = {
1182
- agentId: string;
1183
- agentNickname: string;
1184
- agentName?: string;
1185
- agentEmail?: string;
1186
- agentTimeZone?: string;
1187
- agentDefaultLocale?: string;
1188
- };
1189
- type KnowledgeAssistant = CamelCaseKeys<Server.KnowledgeAssistant>;
1190
- type User = CamelCaseKeys<Server.User>;
1191
- type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
1192
- type Profile = CamelCaseKeys<Server.Profile>;
1193
1179
 
1194
- type CreateConversation = {
1195
- platform: string;
1196
- sessionId: string;
1197
- profileCode?: string;
1198
- agentId: string;
1199
- agentName?: string;
1200
- agentNickname?: string;
1201
- agentEmail?: string;
1202
- tags?: Record<string, string> | null;
1203
- };
1204
- type TranslationRequest = {
1205
- targetLanguage: string;
1206
- messages: Array<string>;
1180
+ type State$a = {
1181
+ data: Profile | null;
1182
+ fetchState: FetchState;
1207
1183
  };
1208
- type Translation = {
1209
- originalLanguage: string;
1210
- targetLanguage: string;
1211
- translation: string;
1184
+
1185
+ /**
1186
+ * A selection range representation for textarea's and contenteditables only using offsets.
1187
+ */
1188
+ type SelectionRange = {
1189
+ start: number;
1190
+ end: number;
1212
1191
  };
1213
- type TranslationResponse = Translation[];
1214
- interface Entity {
1215
- text: string;
1216
- label: string;
1217
- }
1218
- type CustomData = Record<string, unknown>;
1219
- type VariableMapping = Record<string, string>;
1220
- type CustomDataSchema = Array<{
1221
- path: string;
1222
- label: string;
1223
- type: 'string' | 'number';
1224
- } | {
1225
- path: string;
1226
- label: string;
1227
- type: 'boolean';
1228
- trueValue?: string;
1229
- falseValue?: string;
1230
- }>;
1231
- type PlatformConfig = CamelCaseKeys<Server.PlatformConfig>;
1232
1192
  /**
1233
- * Utils
1193
+ * A selection range representation for textarea's and contenteditables only using offsets.
1234
1194
  */
1235
- type Logger = {
1236
- info(...args: any[]): void;
1237
- warn(...args: any[]): void;
1238
- error(...args: any[]): void;
1195
+ type CaretPosition = {
1196
+ top: number;
1197
+ left: number;
1239
1198
  };
1240
- declare enum FetchState {
1241
- IDLE = "idle",
1242
- LOADING = "loading",
1243
- DONE = "done",
1244
- ERROR = "error"
1199
+ interface InputEventMap {
1200
+ /**
1201
+ * User and platform changes (excluding changes by plugin)
1202
+ */
1203
+ change: (event: {
1204
+ plainText: string;
1205
+ rawHTML: string | null;
1206
+ }) => void;
1207
+ /**
1208
+ * Emits selection changes.
1209
+ */
1210
+ selection: (event: SelectionRange | null) => void;
1211
+ /**
1212
+ * Emits when the position of the caret on the screen changed
1213
+ */
1214
+ caretposition: (event: CaretPosition | null) => void;
1215
+ keydown: (event: KeyboardEvent) => void;
1216
+ keyup: (event: KeyboardEvent) => void;
1217
+ paste: (event: {
1218
+ pastedText: string;
1219
+ selectionText: string;
1220
+ }) => void;
1221
+ cut: (event: {
1222
+ selectionText: string;
1223
+ }) => void;
1224
+ submit: () => void;
1225
+ enabled: () => void;
1226
+ disabled: () => void;
1227
+ unmounted: () => void;
1228
+ focus: () => void;
1229
+ blur: () => void;
1230
+ }
1231
+ type InputHandler<K extends keyof InputEventMap> = InputEventMap[K];
1232
+ type InputEventListeners<K extends keyof InputEventMap> = Record<K, InputHandler<K>[]>;
1233
+ declare abstract class InputMediator<HTMLElementType extends HTMLElement> {
1234
+ protected element: HTMLElementType;
1235
+ isFocused: boolean;
1236
+ isActive: boolean;
1237
+ isDisposed: boolean;
1238
+ protected eventListeners: Partial<InputEventListeners<keyof InputEventMap>>;
1239
+ protected disposeHandlers: (() => void)[];
1240
+ protected cachedText: string;
1241
+ protected cachedCaretPosition: CaretPosition | null;
1242
+ protected cachedSelection: SelectionRange;
1243
+ protected cachedHTML: string | null;
1244
+ protected isSubmitting: boolean;
1245
+ protected isPossibleClearInputAction: boolean;
1246
+ constructor(element: HTMLElementType);
1247
+ protected addEventListener(eventName: string, listener: EventListenerOrEventListenerObject): void;
1248
+ protected removeEventListener(eventName: string, listener: EventListenerOrEventListenerObject): void;
1249
+ protected handleInteraction(): void;
1250
+ abstract getSelectedText(): string;
1251
+ protected handleClick(): void;
1252
+ protected handleFocus(): void;
1253
+ protected handleBlur(): void;
1254
+ protected handleKeyDown(event: KeyboardEvent): void;
1255
+ protected handleKeyUp(event: KeyboardEvent): void;
1256
+ protected handleCut(): void;
1257
+ protected handlePaste(event: ClipboardEvent): void;
1258
+ protected listen(): void;
1259
+ abstract getText(): string;
1260
+ abstract getHTML(): string | null;
1261
+ abstract getSelection(): SelectionRange;
1262
+ abstract getCaretPosition(): CaretPosition | null;
1263
+ focus(): void;
1264
+ emit<K extends keyof InputEventMap>(type: K, ...args: Parameters<InputHandler<K>>): void;
1265
+ on<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
1266
+ off<K extends keyof InputEventMap>(type: K, handler: InputHandler<K>): void;
1267
+ activate(): void;
1268
+ deactivate(): void;
1269
+ dispose(): void;
1245
1270
  }
1246
1271
 
1247
1272
  type KeyboardMetric = Pick<KeyboardEvent, 'key' | 'shiftKey' | 'ctrlKey' | 'altKey' | 'metaKey'>;
@@ -1270,7 +1295,7 @@ type MetricState = {
1270
1295
  textSuggestions: SuggestionMetrics[];
1271
1296
  cuts: any[];
1272
1297
  };
1273
- type State$c = {
1298
+ type State$9 = {
1274
1299
  text: string;
1275
1300
  html: string | null;
1276
1301
  selection: SelectionRange;
@@ -1285,6 +1310,39 @@ type State$c = {
1285
1310
  selectedSuggestionIndex: number;
1286
1311
  };
1287
1312
 
1313
+ type State$8 = {
1314
+ startTime: Date | null;
1315
+ stopTime: Date | null;
1316
+ };
1317
+
1318
+ type State$7 = {
1319
+ data: KnowledgeAssistant | null;
1320
+ fetchState: FetchState;
1321
+ };
1322
+
1323
+ type State$6 = {
1324
+ token: string | null;
1325
+ interval: NodeJS.Timer | null;
1326
+ };
1327
+
1328
+ type ContentType = CamelCaseKeys<Server.ContentType>;
1329
+ type State$5 = {
1330
+ data: ContentType[] | null;
1331
+ fetchState: FetchState;
1332
+ };
1333
+
1334
+ interface State$4 {
1335
+ current: Conversation | null;
1336
+ isSupported: boolean | null;
1337
+ }
1338
+
1339
+ interface State$3 {
1340
+ isLoggedIn: boolean | null;
1341
+ loginFetchState: FetchState;
1342
+ verifyFetchState: FetchState;
1343
+ showLoginOverlay: boolean;
1344
+ }
1345
+
1288
1346
  type LegacyCue = CamelCaseKeys<Server.LegacyCue> & {
1289
1347
  isLoading?: boolean;
1290
1348
  specialType?: 'summary';
@@ -1307,7 +1365,7 @@ type AssistantInteraction = {
1307
1365
  sources?: AssistantAnswerSource[];
1308
1366
  };
1309
1367
  };
1310
- type State$b = {
1368
+ type State$2 = {
1311
1369
  cues: Cue[];
1312
1370
  threads: Record<number, AssistantInteraction[]>;
1313
1371
  fetchState: FetchState;
@@ -1318,39 +1376,11 @@ type Transcript = Array<{
1318
1376
  }>;
1319
1377
  type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1320
1378
 
1321
- interface State$a {
1322
- isLoggedIn: boolean | null;
1323
- loginFetchState: FetchState;
1324
- verifyFetchState: FetchState;
1325
- showLoginOverlay: boolean;
1326
- }
1327
-
1328
- interface State$9 {
1329
- current: Conversation | null;
1330
- isSupported: boolean | null;
1331
- }
1332
-
1333
- type ContentType = CamelCaseKeys<Server.ContentType>;
1334
- type State$8 = {
1335
- data: ContentType[] | null;
1336
- fetchState: FetchState;
1337
- };
1338
-
1339
- type State$7 = {
1340
- token: string | null;
1341
- interval: NodeJS.Timer | null;
1342
- };
1343
-
1344
- type State$6 = {
1379
+ type State$1 = {
1345
1380
  data: Entity[] | null;
1346
1381
  fetchState: FetchState;
1347
1382
  };
1348
1383
 
1349
- type State$5 = {
1350
- data: KnowledgeAssistant | null;
1351
- fetchState: FetchState;
1352
- };
1353
-
1354
1384
  interface StoreConfig {
1355
1385
  deepdeskAPI: DeepdeskAPI;
1356
1386
  dynamicThunkObject?: Record<string, unknown>;
@@ -1358,23 +1388,23 @@ interface StoreConfig {
1358
1388
  preloadedState?: any;
1359
1389
  }
1360
1390
  declare const reducers: redux.Reducer<redux.CombinedState<{
1361
- assistants: State$b;
1362
- auth: State$a;
1363
- conversation: State$9;
1364
- contentTypes: State$8;
1365
- passwordlessToken: State$7;
1366
- entities: State$6;
1367
- knowledgeAssistant: State$5;
1368
- handlingTime: State$4;
1391
+ assistants: State$2;
1392
+ auth: State$3;
1393
+ conversation: State$4;
1394
+ contentTypes: State$5;
1395
+ passwordlessToken: State$6;
1396
+ entities: State$1;
1397
+ knowledgeAssistant: State$7;
1398
+ handlingTime: State$8;
1369
1399
  info: {
1370
- agentInfo?: AgentInfo | undefined;
1400
+ agentInfo?: AgentInfo;
1371
1401
  agentSettings: unknown;
1372
- visitorInfo?: VisitorInfo | undefined;
1373
- customData?: CustomData | undefined;
1374
- platformVariables?: VariableMapping | undefined;
1402
+ visitorInfo?: VisitorInfo;
1403
+ customData?: CustomData;
1404
+ platformVariables?: VariableMapping;
1375
1405
  fetchState: FetchState;
1376
1406
  };
1377
- input: State$c;
1407
+ input: State$9;
1378
1408
  settings: {
1379
1409
  locale: Locale;
1380
1410
  deanonymize: boolean;
@@ -1383,7 +1413,7 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1383
1413
  showImages: boolean;
1384
1414
  showSearch: boolean;
1385
1415
  showImageSearch: boolean;
1386
- showStyleSuggestions: number | boolean;
1416
+ showStyleSuggestions: boolean | number;
1387
1417
  showMidSentenceSuggestions: boolean;
1388
1418
  showSuggestionsBeforePattern: string | false;
1389
1419
  showSuggestionsAfterPattern: string | false;
@@ -1401,15 +1431,15 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1401
1431
  floatingMenu: boolean;
1402
1432
  detectSubmit: boolean;
1403
1433
  automaticHandlingTime: boolean;
1404
- adminUrl?: string | undefined;
1434
+ adminUrl?: string;
1405
1435
  productName: string;
1406
1436
  enableSuggestionFeedback: boolean;
1407
1437
  enableFeedbackForm: boolean;
1408
1438
  hasKeyboardInput: boolean;
1409
1439
  };
1410
- profile: State$3;
1411
- search: State$2;
1412
- styleSuggestions: State$1;
1440
+ profile: State$a;
1441
+ search: State$c;
1442
+ styleSuggestions: State$b;
1413
1443
  ui: {
1414
1444
  showTabHint: boolean;
1415
1445
  inputHasFocus: boolean;
@@ -1420,23 +1450,23 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1420
1450
  textSuggestions: TextSuggestionState;
1421
1451
  }>, redux.AnyAction>;
1422
1452
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
1423
- assistants: State$b;
1424
- auth: State$a;
1425
- conversation: State$9;
1426
- contentTypes: State$8;
1427
- passwordlessToken: State$7;
1428
- entities: State$6;
1429
- knowledgeAssistant: State$5;
1430
- handlingTime: State$4;
1453
+ assistants: State$2;
1454
+ auth: State$3;
1455
+ conversation: State$4;
1456
+ contentTypes: State$5;
1457
+ passwordlessToken: State$6;
1458
+ entities: State$1;
1459
+ knowledgeAssistant: State$7;
1460
+ handlingTime: State$8;
1431
1461
  info: {
1432
- agentInfo?: AgentInfo | undefined;
1462
+ agentInfo?: AgentInfo;
1433
1463
  agentSettings: unknown;
1434
- visitorInfo?: VisitorInfo | undefined;
1435
- customData?: CustomData | undefined;
1436
- platformVariables?: VariableMapping | undefined;
1464
+ visitorInfo?: VisitorInfo;
1465
+ customData?: CustomData;
1466
+ platformVariables?: VariableMapping;
1437
1467
  fetchState: FetchState;
1438
1468
  };
1439
- input: State$c;
1469
+ input: State$9;
1440
1470
  settings: {
1441
1471
  locale: Locale;
1442
1472
  deanonymize: boolean;
@@ -1445,7 +1475,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1445
1475
  showImages: boolean;
1446
1476
  showSearch: boolean;
1447
1477
  showImageSearch: boolean;
1448
- showStyleSuggestions: number | boolean;
1478
+ showStyleSuggestions: boolean | number;
1449
1479
  showMidSentenceSuggestions: boolean;
1450
1480
  showSuggestionsBeforePattern: string | false;
1451
1481
  showSuggestionsAfterPattern: string | false;
@@ -1463,15 +1493,15 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1463
1493
  floatingMenu: boolean;
1464
1494
  detectSubmit: boolean;
1465
1495
  automaticHandlingTime: boolean;
1466
- adminUrl?: string | undefined;
1496
+ adminUrl?: string;
1467
1497
  productName: string;
1468
1498
  enableSuggestionFeedback: boolean;
1469
1499
  enableFeedbackForm: boolean;
1470
1500
  hasKeyboardInput: boolean;
1471
1501
  };
1472
- profile: State$3;
1473
- search: State$2;
1474
- styleSuggestions: State$1;
1502
+ profile: State$a;
1503
+ search: State$c;
1504
+ styleSuggestions: State$b;
1475
1505
  ui: {
1476
1506
  showTabHint: boolean;
1477
1507
  inputHasFocus: boolean;
@@ -1481,23 +1511,23 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1481
1511
  };
1482
1512
  textSuggestions: TextSuggestionState;
1483
1513
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
1484
- assistants: State$b;
1485
- auth: State$a;
1486
- conversation: State$9;
1487
- contentTypes: State$8;
1488
- passwordlessToken: State$7;
1489
- entities: State$6;
1490
- knowledgeAssistant: State$5;
1491
- handlingTime: State$4;
1514
+ assistants: State$2;
1515
+ auth: State$3;
1516
+ conversation: State$4;
1517
+ contentTypes: State$5;
1518
+ passwordlessToken: State$6;
1519
+ entities: State$1;
1520
+ knowledgeAssistant: State$7;
1521
+ handlingTime: State$8;
1492
1522
  info: {
1493
- agentInfo?: AgentInfo | undefined;
1523
+ agentInfo?: AgentInfo;
1494
1524
  agentSettings: unknown;
1495
- visitorInfo?: VisitorInfo | undefined;
1496
- customData?: CustomData | undefined;
1497
- platformVariables?: VariableMapping | undefined;
1525
+ visitorInfo?: VisitorInfo;
1526
+ customData?: CustomData;
1527
+ platformVariables?: VariableMapping;
1498
1528
  fetchState: FetchState;
1499
1529
  };
1500
- input: State$c;
1530
+ input: State$9;
1501
1531
  settings: {
1502
1532
  locale: Locale;
1503
1533
  deanonymize: boolean;
@@ -1506,7 +1536,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1506
1536
  showImages: boolean;
1507
1537
  showSearch: boolean;
1508
1538
  showImageSearch: boolean;
1509
- showStyleSuggestions: number | boolean;
1539
+ showStyleSuggestions: boolean | number;
1510
1540
  showMidSentenceSuggestions: boolean;
1511
1541
  showSuggestionsBeforePattern: string | false;
1512
1542
  showSuggestionsAfterPattern: string | false;
@@ -1524,15 +1554,15 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1524
1554
  floatingMenu: boolean;
1525
1555
  detectSubmit: boolean;
1526
1556
  automaticHandlingTime: boolean;
1527
- adminUrl?: string | undefined;
1557
+ adminUrl?: string;
1528
1558
  productName: string;
1529
1559
  enableSuggestionFeedback: boolean;
1530
1560
  enableFeedbackForm: boolean;
1531
1561
  hasKeyboardInput: boolean;
1532
1562
  };
1533
- profile: State$3;
1534
- search: State$2;
1535
- styleSuggestions: State$1;
1563
+ profile: State$a;
1564
+ search: State$c;
1565
+ styleSuggestions: State$b;
1536
1566
  ui: {
1537
1567
  showTabHint: boolean;
1538
1568
  inputHasFocus: boolean;
@@ -1548,39 +1578,6 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1548
1578
  type RootState = ReturnType<typeof reducers>;
1549
1579
  type Store = ReturnType<typeof createStore>;
1550
1580
 
1551
- type State$4 = {
1552
- startTime: Date | null;
1553
- stopTime: Date | null;
1554
- };
1555
-
1556
- type State$3 = {
1557
- data: Profile | null;
1558
- fetchState: FetchState;
1559
- };
1560
-
1561
- declare enum SearchResultDefaultType {
1562
- default = "DEFAULT",
1563
- url = "URL",
1564
- personal = "PERSONAL",
1565
- pinned = "STICKYMESSAGE",
1566
- image = "IMAGE"
1567
- }
1568
- type SearchResultType = string | SearchResultDefaultType;
1569
- type SearchResult = SearchSuggestion;
1570
- interface State$2 {
1571
- list: Array<SearchResult>;
1572
- page: string;
1573
- fetchState: FetchState;
1574
- isOpen: boolean;
1575
- aggregates: Record<string, number>;
1576
- }
1577
-
1578
- type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1579
- interface State$1 {
1580
- list: StyleSuggestion;
1581
- fetchState: FetchState;
1582
- }
1583
-
1584
1581
  type SuggestionState = {
1585
1582
  suggestions: TextSuggestion[];
1586
1583
  fetchState: FetchState;
@@ -1966,7 +1963,7 @@ interface SDKEventMap {
1966
1963
  };
1967
1964
  'edit-suggestion': EditTextSuggestionPayload;
1968
1965
  'send-message': string;
1969
- 'send-message-event': SendMessageEventData;
1966
+ 'send-message-event': SendMessageEventData$1;
1970
1967
  'event': {
1971
1968
  name: string;
1972
1969
  data: unknown;
@@ -2022,23 +2019,23 @@ declare class DeepdeskSDK {
2022
2019
  store: Store;
2023
2020
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2024
2021
  get state(): redux.EmptyObject & {
2025
- assistants: State$b;
2026
- auth: State$a;
2027
- conversation: State$9;
2028
- contentTypes: State$8;
2029
- passwordlessToken: State$7;
2030
- entities: State$6;
2031
- knowledgeAssistant: State$5;
2032
- handlingTime: State$4;
2022
+ assistants: State$2;
2023
+ auth: State$3;
2024
+ conversation: State$4;
2025
+ contentTypes: State$5;
2026
+ passwordlessToken: State$6;
2027
+ entities: State$1;
2028
+ knowledgeAssistant: State$7;
2029
+ handlingTime: State$8;
2033
2030
  info: {
2034
- agentInfo?: AgentInfo | undefined;
2031
+ agentInfo?: AgentInfo;
2035
2032
  agentSettings: unknown;
2036
- visitorInfo?: VisitorInfo | undefined;
2037
- customData?: CustomData | undefined;
2038
- platformVariables?: VariableMapping | undefined;
2033
+ visitorInfo?: VisitorInfo;
2034
+ customData?: CustomData;
2035
+ platformVariables?: VariableMapping;
2039
2036
  fetchState: FetchState;
2040
2037
  };
2041
- input: State$c;
2038
+ input: State$9;
2042
2039
  settings: {
2043
2040
  locale: Locale;
2044
2041
  deanonymize: boolean;
@@ -2047,7 +2044,7 @@ declare class DeepdeskSDK {
2047
2044
  showImages: boolean;
2048
2045
  showSearch: boolean;
2049
2046
  showImageSearch: boolean;
2050
- showStyleSuggestions: number | boolean;
2047
+ showStyleSuggestions: boolean | number;
2051
2048
  showMidSentenceSuggestions: boolean;
2052
2049
  showSuggestionsBeforePattern: string | false;
2053
2050
  showSuggestionsAfterPattern: string | false;
@@ -2065,15 +2062,15 @@ declare class DeepdeskSDK {
2065
2062
  floatingMenu: boolean;
2066
2063
  detectSubmit: boolean;
2067
2064
  automaticHandlingTime: boolean;
2068
- adminUrl?: string | undefined;
2065
+ adminUrl?: string;
2069
2066
  productName: string;
2070
2067
  enableSuggestionFeedback: boolean;
2071
2068
  enableFeedbackForm: boolean;
2072
2069
  hasKeyboardInput: boolean;
2073
2070
  };
2074
- profile: State$3;
2075
- search: State$2;
2076
- styleSuggestions: State$1;
2071
+ profile: State$a;
2072
+ search: State$c;
2073
+ styleSuggestions: State$b;
2077
2074
  ui: {
2078
2075
  showTabHint: boolean;
2079
2076
  inputHasFocus: boolean;
@@ -2091,7 +2088,7 @@ declare class DeepdeskSDK {
2091
2088
  showImages: boolean;
2092
2089
  showSearch: boolean;
2093
2090
  showImageSearch: boolean;
2094
- showStyleSuggestions: number | boolean;
2091
+ showStyleSuggestions: boolean | number;
2095
2092
  showMidSentenceSuggestions: boolean;
2096
2093
  showSuggestionsBeforePattern: string | false;
2097
2094
  showSuggestionsAfterPattern: string | false;
@@ -2109,7 +2106,7 @@ declare class DeepdeskSDK {
2109
2106
  floatingMenu: boolean;
2110
2107
  detectSubmit: boolean;
2111
2108
  automaticHandlingTime: boolean;
2112
- adminUrl?: string | undefined;
2109
+ adminUrl?: string;
2113
2110
  productName: string;
2114
2111
  enableSuggestionFeedback: boolean;
2115
2112
  enableFeedbackForm: boolean;