@deepdesk/deepdesk-sdk 10.1.15 → 10.1.16-beta.0

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
@@ -455,9 +455,9 @@ interface StoreConfig {
455
455
  }
456
456
  declare const reducers: redux.Reducer<redux.CombinedState<{
457
457
  activeSuggestion: State$e;
458
- answer: State$c;
458
+ answer: State$6;
459
459
  auth: State$d;
460
- autoflows: State$6;
460
+ autoflows: State$c;
461
461
  conversation: State$b;
462
462
  contentTypes: State$a;
463
463
  customMessages: State$9;
@@ -516,9 +516,9 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
516
516
  }>, redux.AnyAction>;
517
517
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
518
518
  activeSuggestion: State$e;
519
- answer: State$c;
519
+ answer: State$6;
520
520
  auth: State$d;
521
- autoflows: State$6;
521
+ autoflows: State$c;
522
522
  conversation: State$b;
523
523
  contentTypes: State$a;
524
524
  customMessages: State$9;
@@ -576,9 +576,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
576
576
  textSuggestions: TextSuggestionState;
577
577
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
578
578
  activeSuggestion: State$e;
579
- answer: State$c;
579
+ answer: State$6;
580
580
  auth: State$d;
581
- autoflows: State$6;
581
+ autoflows: State$c;
582
582
  conversation: State$b;
583
583
  contentTypes: State$a;
584
584
  customMessages: State$9;
@@ -649,6 +649,47 @@ interface State$d {
649
649
  showLoginOverlay: boolean;
650
650
  }
651
651
 
652
+ type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
653
+ isBusy?: boolean;
654
+ };
655
+ interface State$c {
656
+ list: Autoflow[];
657
+ fetchState: FetchState;
658
+ isInitialRequest: null | boolean;
659
+ }
660
+
661
+ interface State$b {
662
+ current: Conversation | null;
663
+ isSupported: boolean | null;
664
+ }
665
+
666
+ type ContentType = CamelCaseKeys<Server.ContentType>;
667
+ type State$a = {
668
+ data: ContentType[] | null;
669
+ fetchState: FetchState;
670
+ };
671
+
672
+ type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
673
+ interface State$9 {
674
+ list: CustomMessage[];
675
+ fetchState: FetchState;
676
+ isInitialRequest: null | boolean;
677
+ sentSuggestions: string[];
678
+ errorSuggestions: string[];
679
+ answeredSuggestions: string[];
680
+ }
681
+
682
+ type State$8 = {
683
+ jwt: string | null;
684
+ accountUrl: string | null;
685
+ interval: NodeJS.Timer | null;
686
+ };
687
+
688
+ type State$7 = {
689
+ data: Entity[] | null;
690
+ fetchState: FetchState;
691
+ };
692
+
652
693
  interface ListItemSource {
653
694
  url?: string;
654
695
  name: string;
@@ -666,7 +707,7 @@ interface KnowledgeResponse {
666
707
  question: string;
667
708
  answer: KnowledgeAnswer;
668
709
  }
669
- type State$c = {
710
+ type State$6 = {
670
711
  data: KnowledgeResponse[];
671
712
  fetchState: FetchState;
672
713
  };
@@ -1195,45 +1236,201 @@ declare class DeepdeskAPI {
1195
1236
  private handleDeepdeskVersionHeaders;
1196
1237
  }
1197
1238
 
1198
- interface State$b {
1199
- current: Conversation | null;
1200
- isSupported: boolean | null;
1239
+ declare enum Locale {
1240
+ NL_NL = "nl-NL",
1241
+ EN_US = "en-US"
1242
+ }
1243
+ interface SuggestionApiMetrics {
1244
+ source?: string;
1245
+ score?: number;
1246
+ abVariant?: string;
1247
+ abTestName?: string;
1248
+ sourceText?: string;
1249
+ trainingJobs?: string[];
1201
1250
  }
1251
+ interface TextSuggestion extends SuggestionApiMetrics {
1252
+ id?: string;
1253
+ text: string;
1254
+ url?: string;
1255
+ title?: string;
1256
+ sourceLabel?: string;
1257
+ searchTerm?: string;
1258
+ type?: string;
1259
+ searchKeywords?: string[];
1260
+ image?: string;
1261
+ message?: string;
1262
+ imageSizes?: {
1263
+ small: string;
1264
+ medium: string;
1265
+ large: string;
1266
+ };
1267
+ }
1268
+ interface PinnedMessage extends SuggestionApiMetrics {
1269
+ title: string;
1270
+ message: string;
1271
+ image: string;
1272
+ imageSizes?: {
1273
+ small: string;
1274
+ medium: string;
1275
+ large: string;
1276
+ };
1277
+ }
1278
+ interface UrlSuggestion extends SuggestionApiMetrics {
1279
+ id?: string;
1280
+ url: string;
1281
+ context?: string;
1282
+ image: string;
1283
+ summary?: string;
1284
+ title?: string;
1285
+ imageSizes?: {
1286
+ small: string;
1287
+ medium: string;
1288
+ large: string;
1289
+ };
1290
+ }
1291
+ interface SearchSuggestion extends SuggestionApiMetrics {
1292
+ id?: string;
1293
+ text: string;
1294
+ title?: string;
1295
+ source?: string;
1296
+ context?: string;
1297
+ image?: string;
1298
+ type?: SearchResultType;
1299
+ }
1300
+ interface SuggestionEventMetrics {
1301
+ inputType: InputType;
1302
+ }
1303
+ interface SuggestionMetrics extends SuggestionApiMetrics, SuggestionEventMetrics {
1304
+ text: string;
1305
+ searchTerm?: string | null;
1306
+ }
1307
+ type VisitorInfo = {
1308
+ visitorId?: string;
1309
+ visitorName?: string;
1310
+ visitorTimeZone?: string;
1311
+ psid?: string;
1312
+ };
1313
+ type AgentInfo = {
1314
+ agentId: string;
1315
+ agentNickname: string;
1316
+ agentName?: string;
1317
+ agentEmail?: string;
1318
+ agentTimeZone?: string;
1319
+ };
1320
+ type User = CamelCaseKeys<Server.User>;
1321
+ type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
1322
+ type Profile = CamelCaseKeys<Server.Profile>;
1202
1323
 
1203
- type ContentType = CamelCaseKeys<Server.ContentType>;
1204
- type State$a = {
1205
- data: ContentType[] | null;
1324
+ type CreateConversation = {
1325
+ platform: string;
1326
+ sessionId: string;
1327
+ profileCode?: string;
1328
+ agentId: string;
1329
+ agentName?: string;
1330
+ agentNickname?: string;
1331
+ agentEmail?: string;
1332
+ tags?: Record<string, string> | null;
1333
+ };
1334
+ interface Entity {
1335
+ text: string;
1336
+ label: string;
1337
+ }
1338
+ /**
1339
+ * Utils
1340
+ */
1341
+ type Logger = {
1342
+ info(...args: any[]): void;
1343
+ warn(...args: any[]): void;
1344
+ error(...args: any[]): void;
1345
+ };
1346
+ declare enum FetchState {
1347
+ IDLE = "idle",
1348
+ LOADING = "loading",
1349
+ DONE = "done",
1350
+ ERROR = "error"
1351
+ }
1352
+
1353
+ type KeyboardMetric = Pick<KeyboardEvent, 'key' | 'shiftKey' | 'ctrlKey' | 'altKey' | 'metaKey'>;
1354
+ type StageSuggestion = {
1355
+ text: string;
1356
+ suggestion: TextSuggestion;
1357
+ eventMetrics: SuggestionEventMetrics;
1358
+ replace: 'selection' | 'until-selection-end';
1359
+ };
1360
+ type EditTextSuggestionPayload = {
1361
+ contentType: string;
1362
+ index: number | null;
1363
+ suggestions: TextSuggestion[];
1364
+ };
1365
+ type MetricState = {
1366
+ numCharsTyped: number;
1367
+ numCharsPasted: number;
1368
+ numCharsCut: number;
1369
+ numCharsDeleted: number;
1370
+ numPaste: number;
1371
+ agentStartedTypingTimestamp: number | null;
1372
+ externalTimeTotalSeconds: number | null;
1373
+ pastes: any[];
1374
+ deletions: any[];
1375
+ offeredTextSuggestions: TextSuggestion[];
1376
+ textSuggestions: SuggestionMetrics[];
1377
+ cuts: any[];
1378
+ };
1379
+ type State$5 = {
1380
+ text: string;
1381
+ html: string | null;
1382
+ selection: SelectionRange;
1383
+ stagedSuggestion: StageSuggestion | null;
1384
+ userCommitted: {
1385
+ text: string;
1386
+ selection: SelectionRange;
1387
+ };
1388
+ tabCompletionSuggestion?: TextSuggestion;
1389
+ metrics: MetricState;
1390
+ previousKeyDownEvent: KeyboardMetric | null;
1391
+ textSuggestions: TextSuggestion[];
1392
+ selectedSuggestionIndex: number;
1393
+ };
1394
+
1395
+ type State$4 = {
1396
+ data: Profile | null;
1206
1397
  fetchState: FetchState;
1207
1398
  };
1208
1399
 
1209
- type CustomMessage = CamelCaseKeys<Server$1.CustomMessage>;
1210
- interface State$9 {
1211
- list: CustomMessage[];
1400
+ type SearchResultType = string | SearchResultDefaultType;
1401
+ declare enum SearchResultDefaultType {
1402
+ url = "URL",
1403
+ personal = "PERSONAL",
1404
+ pinned = "STICKYMESSAGE",
1405
+ image = "IMAGE"
1406
+ }
1407
+ type SearchResult = SearchSuggestion;
1408
+ interface State$3 {
1409
+ list: Array<SearchResult>;
1410
+ page: string;
1212
1411
  fetchState: FetchState;
1213
- isInitialRequest: null | boolean;
1214
- sentSuggestions: string[];
1215
- errorSuggestions: string[];
1216
- answeredSuggestions: string[];
1412
+ isOpen: boolean;
1217
1413
  }
1218
1414
 
1219
- type State$8 = {
1220
- jwt: string | null;
1221
- accountUrl: string | null;
1222
- interval: NodeJS.Timer | null;
1415
+ type State$2 = {
1416
+ data: string | null;
1417
+ fetchState: FetchState;
1223
1418
  };
1224
1419
 
1225
- type State$7 = {
1226
- data: Entity[] | null;
1420
+ type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1421
+ interface State$1 {
1422
+ list: StyleSuggestion;
1227
1423
  fetchState: FetchState;
1228
- };
1424
+ isInitialRequest: null | boolean;
1425
+ }
1229
1426
 
1230
- type Autoflow = CamelCaseKeys<Server$1.Autoflow> & {
1231
- isBusy?: boolean;
1232
- };
1233
- interface State$6 {
1234
- list: Autoflow[];
1427
+ type SuggestionState = {
1428
+ suggestions: TextSuggestion[];
1235
1429
  fetchState: FetchState;
1236
1430
  isInitialRequest: null | boolean;
1431
+ };
1432
+ interface TextSuggestionState {
1433
+ [type: string]: SuggestionState;
1237
1434
  }
1238
1435
 
1239
1436
  declare const styles$d: {
@@ -1465,202 +1662,6 @@ type InputOverlayCustomStyles = {
1465
1662
  EditSuggestionTextInput?: Partial<EditSuggestionTextInputStyles>;
1466
1663
  EditSuggestionForm?: Partial<EditSuggestionFormStyles>;
1467
1664
  };
1468
- declare enum Locale {
1469
- NL_NL = "nl-NL",
1470
- EN_US = "en-US"
1471
- }
1472
- interface SuggestionApiMetrics {
1473
- source?: string;
1474
- score?: number;
1475
- abVariant?: string;
1476
- abTestName?: string;
1477
- sourceText?: string;
1478
- trainingJobs?: string[];
1479
- }
1480
- interface TextSuggestion extends SuggestionApiMetrics {
1481
- id?: string;
1482
- text: string;
1483
- url?: string;
1484
- title?: string;
1485
- sourceLabel?: string;
1486
- searchTerm?: string;
1487
- type?: string;
1488
- searchKeywords?: string[];
1489
- image?: string;
1490
- message?: string;
1491
- imageSizes?: {
1492
- small: string;
1493
- medium: string;
1494
- large: string;
1495
- };
1496
- }
1497
- interface PinnedMessage extends SuggestionApiMetrics {
1498
- title: string;
1499
- message: string;
1500
- image: string;
1501
- imageSizes?: {
1502
- small: string;
1503
- medium: string;
1504
- large: string;
1505
- };
1506
- }
1507
- interface UrlSuggestion extends SuggestionApiMetrics {
1508
- id?: string;
1509
- url: string;
1510
- context?: string;
1511
- image: string;
1512
- summary?: string;
1513
- title?: string;
1514
- imageSizes?: {
1515
- small: string;
1516
- medium: string;
1517
- large: string;
1518
- };
1519
- }
1520
- interface SearchSuggestion extends SuggestionApiMetrics {
1521
- id?: string;
1522
- text: string;
1523
- title?: string;
1524
- source?: string;
1525
- context?: string;
1526
- image?: string;
1527
- type?: SearchResultType;
1528
- }
1529
- interface SuggestionEventMetrics {
1530
- inputType: InputType;
1531
- }
1532
- interface SuggestionMetrics extends SuggestionApiMetrics, SuggestionEventMetrics {
1533
- text: string;
1534
- searchTerm?: string | null;
1535
- }
1536
- type VisitorInfo = {
1537
- visitorId?: string;
1538
- visitorName?: string;
1539
- visitorTimeZone?: string;
1540
- psid?: string;
1541
- };
1542
- type AgentInfo = {
1543
- agentId: string;
1544
- agentNickname: string;
1545
- agentName?: string;
1546
- agentEmail?: string;
1547
- agentTimeZone?: string;
1548
- };
1549
- type User = CamelCaseKeys<Server.User>;
1550
- type SendMessageEventData = CamelCaseKeys<Server.SendMessageEventData>;
1551
- type Profile = CamelCaseKeys<Server.Profile>;
1552
-
1553
- type CreateConversation = {
1554
- platform: string;
1555
- sessionId: string;
1556
- profileCode?: string;
1557
- agentId: string;
1558
- agentName?: string;
1559
- agentNickname?: string;
1560
- agentEmail?: string;
1561
- tags?: Record<string, string> | null;
1562
- };
1563
- interface Entity {
1564
- text: string;
1565
- label: string;
1566
- }
1567
- /**
1568
- * Utils
1569
- */
1570
- type Logger = {
1571
- info(...args: any[]): void;
1572
- warn(...args: any[]): void;
1573
- error(...args: any[]): void;
1574
- };
1575
- declare enum FetchState {
1576
- IDLE = "idle",
1577
- LOADING = "loading",
1578
- DONE = "done",
1579
- ERROR = "error"
1580
- }
1581
-
1582
- type KeyboardMetric = Pick<KeyboardEvent, 'key' | 'shiftKey' | 'ctrlKey' | 'altKey' | 'metaKey'>;
1583
- type StageSuggestion = {
1584
- text: string;
1585
- suggestion: TextSuggestion;
1586
- eventMetrics: SuggestionEventMetrics;
1587
- replace: 'selection' | 'until-selection-end';
1588
- };
1589
- type EditTextSuggestionPayload = {
1590
- contentType: string;
1591
- index: number | null;
1592
- suggestions: TextSuggestion[];
1593
- };
1594
- type MetricState = {
1595
- numCharsTyped: number;
1596
- numCharsPasted: number;
1597
- numCharsCut: number;
1598
- numCharsDeleted: number;
1599
- numPaste: number;
1600
- agentStartedTypingTimestamp: number | null;
1601
- externalTimeTotalSeconds: number | null;
1602
- pastes: any[];
1603
- deletions: any[];
1604
- offeredTextSuggestions: TextSuggestion[];
1605
- textSuggestions: SuggestionMetrics[];
1606
- cuts: any[];
1607
- };
1608
- type State$5 = {
1609
- text: string;
1610
- html: string | null;
1611
- selection: SelectionRange;
1612
- stagedSuggestion: StageSuggestion | null;
1613
- userCommitted: {
1614
- text: string;
1615
- selection: SelectionRange;
1616
- };
1617
- tabCompletionSuggestion?: TextSuggestion;
1618
- metrics: MetricState;
1619
- previousKeyDownEvent: KeyboardMetric | null;
1620
- textSuggestions: TextSuggestion[];
1621
- selectedSuggestionIndex: number;
1622
- };
1623
-
1624
- type State$4 = {
1625
- data: Profile | null;
1626
- fetchState: FetchState;
1627
- };
1628
-
1629
- type SearchResultType = string | SearchResultDefaultType;
1630
- declare enum SearchResultDefaultType {
1631
- url = "URL",
1632
- personal = "PERSONAL",
1633
- pinned = "STICKYMESSAGE",
1634
- image = "IMAGE"
1635
- }
1636
- type SearchResult = SearchSuggestion;
1637
- interface State$3 {
1638
- list: Array<SearchResult>;
1639
- page: string;
1640
- fetchState: FetchState;
1641
- isOpen: boolean;
1642
- }
1643
-
1644
- type State$2 = {
1645
- data: string | null;
1646
- fetchState: FetchState;
1647
- };
1648
-
1649
- type StyleSuggestion = CamelCaseKeys<Server.StyleSuggestion>;
1650
- interface State$1 {
1651
- list: StyleSuggestion;
1652
- fetchState: FetchState;
1653
- isInitialRequest: null | boolean;
1654
- }
1655
-
1656
- type SuggestionState = {
1657
- suggestions: TextSuggestion[];
1658
- fetchState: FetchState;
1659
- isInitialRequest: null | boolean;
1660
- };
1661
- interface TextSuggestionState {
1662
- [type: string]: SuggestionState;
1663
- }
1664
1665
 
1665
1666
  interface MessagePayload {
1666
1667
  name: string;
@@ -1798,9 +1799,9 @@ declare class DeepdeskSDK {
1798
1799
  constructor({ deepdeskUrl, brokerUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
1799
1800
  get state(): redux.EmptyObject & {
1800
1801
  activeSuggestion: State$e;
1801
- answer: State$c;
1802
+ answer: State$6;
1802
1803
  auth: State$d;
1803
- autoflows: State$6;
1804
+ autoflows: State$c;
1804
1805
  conversation: State$b;
1805
1806
  contentTypes: State$a;
1806
1807
  customMessages: State$9;