@deepdesk/deepdesk-sdk 14.3.1-beta.2 → 14.3.1-beta.4

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$p: {
7
+ declare const styles$q: {
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$p;
36
+ type CardStyles = typeof styles$q;
37
37
  declare const Card: FC & CardComposition;
38
38
 
39
- declare const styles$o: {
39
+ declare const styles$p: {
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$o;
54
+ type KeyboardHintStyles = typeof styles$p;
55
55
  declare const KeyboardHint: React.FC<Props$6>;
56
56
 
57
- declare const styles$n: {
57
+ declare const styles$o: {
58
58
  readonly "root": string;
59
59
  };
60
60
 
61
61
  type Props$5 = HTMLAttributes<HTMLSpanElement>;
62
- type LabelStyles = typeof styles$n;
62
+ type LabelStyles = typeof styles$o;
63
63
  declare const Label: React.FC<Props$5>;
64
64
 
65
- declare const styles$m: {
65
+ declare const styles$n: {
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$m;
76
+ type SectionStyles = typeof styles$n;
77
77
  declare const Section: React.FC<Props$4>;
78
78
 
79
- declare const styles$l: {
79
+ declare const styles$m: {
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$l;
87
+ type SectionListStyles = typeof styles$m;
88
88
  declare const SectionList: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLDivElement>>;
89
89
 
90
- declare const styles$k: {
90
+ declare const styles$l: {
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$k;
157
+ type SuggestionStyles = typeof styles$l;
158
158
  declare const Suggestion: ForwardRefExoticComponent<Props$2 & RefAttributes<any>> & SuggestionComposition;
159
159
 
160
- declare const styles$j: {
160
+ declare const styles$k: {
161
161
  readonly "root": string;
162
162
  readonly "isWithDivider": string;
163
163
  };
164
164
 
165
- type SuggestionListStyles = typeof styles$j;
165
+ type SuggestionListStyles = typeof styles$k;
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$i: {
171
+ declare const styles$j: {
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$i;
180
+ type ToggleButtonStyles = typeof styles$j;
181
181
  declare const ToggleButton: React.FC<Props>;
182
182
 
183
183
  declare enum Sources {
@@ -914,10 +914,6 @@ type SendEventV2ArgumentMap = {
914
914
  eventName: string;
915
915
  value: string;
916
916
  }>;
917
- 'summary feedback': EventV2<{
918
- summary: string;
919
- rating: 'up' | 'down';
920
- }>;
921
917
  'knowledge assist feedback': EventV2<{
922
918
  question: string;
923
919
  isFollowUpQuestion: boolean;
@@ -1286,12 +1282,15 @@ type State$d = {
1286
1282
  selectedSuggestionIndex: number;
1287
1283
  };
1288
1284
 
1289
- type State$c = {
1290
- startTime: Date | null;
1291
- stopTime: Date | null;
1285
+ type LegacyCue$1 = CamelCaseKeys<Server.LegacyCue> & {
1286
+ isLoading?: boolean;
1292
1287
  };
1293
1288
 
1294
1289
  type EvaluationOutput<T extends Server.ResponseFormat> = CamelCaseKeys<Server.EvaluationOutput<T>>;
1290
+ type ArrayItemType<T> = T extends Array<infer I> ? I : never;
1291
+ type Cue = ArrayItemType<EvaluationOutput<'json-schema:cues'>> & {
1292
+ isLoading?: boolean;
1293
+ };
1295
1294
  type AssistantAnswerSource = {
1296
1295
  url?: string;
1297
1296
  name: string;
@@ -1303,8 +1302,8 @@ type AssistantInteraction = {
1303
1302
  sources?: AssistantAnswerSource[];
1304
1303
  };
1305
1304
  };
1306
- type State$b = {
1307
- cues: EvaluationOutput<'json-schema:cues'>;
1305
+ type State$c = {
1306
+ cues: Cue[];
1308
1307
  threads: Record<number, AssistantInteraction[]>;
1309
1308
  fetchState: FetchState;
1310
1309
  };
@@ -1314,6 +1313,39 @@ type Transcript = Array<{
1314
1313
  }>;
1315
1314
  type TranscriptOption = 'in-memory-transcript' | 'stored-transcript' | Transcript;
1316
1315
 
1316
+ interface State$b {
1317
+ isLoggedIn: boolean | null;
1318
+ loginFetchState: FetchState;
1319
+ verifyFetchState: FetchState;
1320
+ showLoginOverlay: boolean;
1321
+ }
1322
+
1323
+ interface State$a {
1324
+ current: Conversation | null;
1325
+ isSupported: boolean | null;
1326
+ }
1327
+
1328
+ type ContentType = CamelCaseKeys<Server.ContentType>;
1329
+ type State$9 = {
1330
+ data: ContentType[] | null;
1331
+ fetchState: FetchState;
1332
+ };
1333
+
1334
+ type State$8 = {
1335
+ token: string | null;
1336
+ interval: NodeJS.Timer | null;
1337
+ };
1338
+
1339
+ type State$7 = {
1340
+ data: Entity[] | null;
1341
+ fetchState: FetchState;
1342
+ };
1343
+
1344
+ type State$6 = {
1345
+ data: KnowledgeAssistant | null;
1346
+ fetchState: FetchState;
1347
+ };
1348
+
1317
1349
  interface StoreConfig {
1318
1350
  deepdeskAPI: DeepdeskAPI;
1319
1351
  dynamicThunkObject?: Record<string, unknown>;
@@ -1321,14 +1353,14 @@ interface StoreConfig {
1321
1353
  preloadedState?: any;
1322
1354
  }
1323
1355
  declare const reducers: redux.Reducer<redux.CombinedState<{
1324
- assistants: State$b;
1325
- auth: State$a;
1326
- conversation: State$9;
1327
- contentTypes: State$8;
1328
- passwordlessToken: State$7;
1329
- entities: State$6;
1330
- knowledgeAssistant: State$5;
1331
- handlingTime: State$c;
1356
+ assistants: State$c;
1357
+ auth: State$b;
1358
+ conversation: State$a;
1359
+ contentTypes: State$9;
1360
+ passwordlessToken: State$8;
1361
+ entities: State$7;
1362
+ knowledgeAssistant: State$6;
1363
+ handlingTime: State$5;
1332
1364
  info: {
1333
1365
  agentInfo?: AgentInfo | undefined;
1334
1366
  agentSettings: unknown;
@@ -1382,14 +1414,14 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
1382
1414
  textSuggestions: TextSuggestionState;
1383
1415
  }>, redux.AnyAction>;
1384
1416
  declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configureStore.ToolkitStore<redux.EmptyObject & {
1385
- assistants: State$b;
1386
- auth: State$a;
1387
- conversation: State$9;
1388
- contentTypes: State$8;
1389
- passwordlessToken: State$7;
1390
- entities: State$6;
1391
- knowledgeAssistant: State$5;
1392
- handlingTime: State$c;
1417
+ assistants: State$c;
1418
+ auth: State$b;
1419
+ conversation: State$a;
1420
+ contentTypes: State$9;
1421
+ passwordlessToken: State$8;
1422
+ entities: State$7;
1423
+ knowledgeAssistant: State$6;
1424
+ handlingTime: State$5;
1393
1425
  info: {
1394
1426
  agentInfo?: AgentInfo | undefined;
1395
1427
  agentSettings: unknown;
@@ -1442,14 +1474,14 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1442
1474
  rules: State$1;
1443
1475
  textSuggestions: TextSuggestionState;
1444
1476
  }, redux.AnyAction, _reduxjs_toolkit.ThunkMiddleware<redux.CombinedState<{
1445
- assistants: State$b;
1446
- auth: State$a;
1447
- conversation: State$9;
1448
- contentTypes: State$8;
1449
- passwordlessToken: State$7;
1450
- entities: State$6;
1451
- knowledgeAssistant: State$5;
1452
- handlingTime: State$c;
1477
+ assistants: State$c;
1478
+ auth: State$b;
1479
+ conversation: State$a;
1480
+ contentTypes: State$9;
1481
+ passwordlessToken: State$8;
1482
+ entities: State$7;
1483
+ knowledgeAssistant: State$6;
1484
+ handlingTime: State$5;
1453
1485
  info: {
1454
1486
  agentInfo?: AgentInfo | undefined;
1455
1487
  agentSettings: unknown;
@@ -1508,37 +1540,9 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
1508
1540
  type RootState = ReturnType<typeof reducers>;
1509
1541
  type Store = ReturnType<typeof createStore>;
1510
1542
 
1511
- interface State$a {
1512
- isLoggedIn: boolean | null;
1513
- loginFetchState: FetchState;
1514
- verifyFetchState: FetchState;
1515
- showLoginOverlay: boolean;
1516
- }
1517
-
1518
- interface State$9 {
1519
- current: Conversation | null;
1520
- isSupported: boolean | null;
1521
- }
1522
-
1523
- type ContentType = CamelCaseKeys<Server.ContentType>;
1524
- type State$8 = {
1525
- data: ContentType[] | null;
1526
- fetchState: FetchState;
1527
- };
1528
-
1529
- type State$7 = {
1530
- token: string | null;
1531
- interval: NodeJS.Timer | null;
1532
- };
1533
-
1534
- type State$6 = {
1535
- data: Entity[] | null;
1536
- fetchState: FetchState;
1537
- };
1538
-
1539
1543
  type State$5 = {
1540
- data: KnowledgeAssistant | null;
1541
- fetchState: FetchState;
1544
+ startTime: Date | null;
1545
+ stopTime: Date | null;
1542
1546
  };
1543
1547
 
1544
1548
  type State$4 = {
@@ -1569,9 +1573,9 @@ interface State$2 {
1569
1573
  fetchState: FetchState;
1570
1574
  }
1571
1575
 
1572
- type Cue = CamelCaseKeys<Server.LegacyCue>;
1576
+ type LegacyCue = CamelCaseKeys<Server.LegacyCue>;
1573
1577
  type State$1 = {
1574
- cues: Cue[];
1578
+ cues: LegacyCue[];
1575
1579
  fetchState: FetchState;
1576
1580
  };
1577
1581
  type EvaluateRuleOptions = {
@@ -1586,7 +1590,7 @@ interface TextSuggestionState {
1586
1590
  [type: string]: SuggestionState;
1587
1591
  }
1588
1592
 
1589
- declare const styles$h: {
1593
+ declare const styles$i: {
1590
1594
  readonly "root": string;
1591
1595
  readonly "list": string;
1592
1596
  readonly "listWrapper": string;
@@ -1634,23 +1638,23 @@ declare const styles$h: {
1634
1638
  readonly "actionShortcutFixKerning": string;
1635
1639
  };
1636
1640
 
1637
- type CommandPaletteStyles = typeof styles$h;
1641
+ type CommandPaletteStyles = typeof styles$i;
1638
1642
 
1639
- declare const styles$g: {
1643
+ declare const styles$h: {
1640
1644
  readonly "root": string;
1641
1645
  readonly "content": string;
1642
1646
  };
1643
1647
 
1644
- type DialogStyles = typeof styles$g;
1648
+ type DialogStyles = typeof styles$h;
1645
1649
 
1646
- declare const styles$f: {
1650
+ declare const styles$g: {
1647
1651
  readonly "root": string;
1648
1652
  readonly "empty": string;
1649
1653
  };
1650
1654
 
1651
- type EntitiesListStyles = typeof styles$f;
1655
+ type EntitiesListStyles = typeof styles$g;
1652
1656
 
1653
- declare const styles$e: {
1657
+ declare const styles$f: {
1654
1658
  readonly "root": string;
1655
1659
  readonly "entity": string;
1656
1660
  readonly "entityText": string;
@@ -1659,9 +1663,9 @@ declare const styles$e: {
1659
1663
  readonly "iconClicked": string;
1660
1664
  };
1661
1665
 
1662
- type EntitiesWidgetListStyles = typeof styles$e;
1666
+ type EntitiesWidgetListStyles = typeof styles$f;
1663
1667
 
1664
- declare const styles$d: {
1668
+ declare const styles$e: {
1665
1669
  readonly "thumbs": string;
1666
1670
  readonly "fadeup": string;
1667
1671
  readonly "fadedown": string;
@@ -1670,9 +1674,9 @@ declare const styles$d: {
1670
1674
  readonly "thumbsDown": string;
1671
1675
  };
1672
1676
 
1673
- type FeedbackThumbsStyles = typeof styles$d;
1677
+ type FeedbackThumbsStyles = typeof styles$e;
1674
1678
 
1675
- declare const styles$c: {
1679
+ declare const styles$d: {
1676
1680
  readonly "root": string;
1677
1681
  readonly "text": string;
1678
1682
  readonly "isLoggedIn": string;
@@ -1682,16 +1686,16 @@ declare const styles$c: {
1682
1686
  readonly "lock": string;
1683
1687
  };
1684
1688
 
1685
- type FloatingMenuStyles = typeof styles$c;
1689
+ type FloatingMenuStyles = typeof styles$d;
1686
1690
 
1687
- declare const styles$b: {
1691
+ declare const styles$c: {
1688
1692
  readonly "root": string;
1689
1693
  readonly "paper": string;
1690
1694
  };
1691
1695
 
1692
- type InlineSuggestionsOverlayStyles = typeof styles$b;
1696
+ type InlineSuggestionsOverlayStyles = typeof styles$c;
1693
1697
 
1694
- declare const styles$a: {
1698
+ declare const styles$b: {
1695
1699
  readonly "root": string;
1696
1700
  readonly "title": string;
1697
1701
  readonly "empty": string;
@@ -1705,14 +1709,21 @@ declare const styles$a: {
1705
1709
  readonly "listItemFeedback": string;
1706
1710
  };
1707
1711
 
1708
- type KnowledgeSearchStyles = typeof styles$a;
1712
+ type KnowledgeSearchStyles = typeof styles$b;
1709
1713
 
1710
- declare const styles$9: {
1714
+ declare const styles$a: {
1711
1715
  readonly "root": string;
1712
1716
  readonly "content": string;
1713
1717
  };
1714
1718
 
1715
- type LinkSearchStyles = typeof styles$9;
1719
+ type LinkSearchStyles = typeof styles$a;
1720
+
1721
+ declare const styles$9: {
1722
+ readonly "loadingBar": string;
1723
+ readonly "placeHolderShimmer": string;
1724
+ };
1725
+
1726
+ type LoadingProgressBarStyles = typeof styles$9;
1716
1727
 
1717
1728
  declare const styles$8: {
1718
1729
  readonly "root": string;
@@ -1814,8 +1825,10 @@ declare const styles$1: {
1814
1825
  readonly "loginText": string;
1815
1826
  readonly "stateText": string;
1816
1827
  readonly "sectionList": string;
1828
+ readonly "footer": string;
1817
1829
  readonly "shortcutList": string;
1818
1830
  readonly "shortcut": string;
1831
+ readonly "footerShortcut": string;
1819
1832
  readonly "link": string;
1820
1833
  };
1821
1834
 
@@ -1838,6 +1851,7 @@ type WidgetCustomStyles = {
1838
1851
  Dialog?: Partial<DialogStyles>;
1839
1852
  KeyboardHint?: Partial<KeyboardHintStyles>;
1840
1853
  Label?: Partial<LabelStyles>;
1854
+ LoadingProgressBar?: Partial<LoadingProgressBarStyles>;
1841
1855
  LinkSearch?: Partial<LinkSearchStyles>;
1842
1856
  Login?: Partial<LoginStyles>;
1843
1857
  Markdown?: Partial<MarkdownStyles>;
@@ -1940,7 +1954,7 @@ interface SDKEventMap {
1940
1954
  text: string;
1941
1955
  selectionAfter: SelectionRange;
1942
1956
  };
1943
- 'cues': Cue[];
1957
+ 'cues': LegacyCue$1[];
1944
1958
  'replace': {
1945
1959
  text: string;
1946
1960
  replace: SelectionRange;
@@ -1956,7 +1970,7 @@ interface SDKEventMap {
1956
1970
  data: unknown;
1957
1971
  };
1958
1972
  'call-to-action': {
1959
- cue: Cue;
1973
+ cue: LegacyCue$1;
1960
1974
  };
1961
1975
  logout: undefined;
1962
1976
  ready: undefined;
@@ -2015,14 +2029,14 @@ declare class DeepdeskSDK {
2015
2029
  store: Store;
2016
2030
  constructor({ deepdeskUrl, version, locale, token, fetch, productName, createCustomChannel, }: SDKOptions);
2017
2031
  get state(): redux.EmptyObject & {
2018
- assistants: State$b;
2019
- auth: State$a;
2020
- conversation: State$9;
2021
- contentTypes: State$8;
2022
- passwordlessToken: State$7;
2023
- entities: State$6;
2024
- knowledgeAssistant: State$5;
2025
- handlingTime: State$c;
2032
+ assistants: State$c;
2033
+ auth: State$b;
2034
+ conversation: State$a;
2035
+ contentTypes: State$9;
2036
+ passwordlessToken: State$8;
2037
+ entities: State$7;
2038
+ knowledgeAssistant: State$6;
2039
+ handlingTime: State$5;
2026
2040
  info: {
2027
2041
  agentInfo?: AgentInfo | undefined;
2028
2042
  agentSettings: unknown;
@@ -2185,7 +2199,7 @@ declare class DeepdeskSDK {
2185
2199
  /**
2186
2200
  * @deprecated in favor of `evaluateAssistant`
2187
2201
  */
2188
- evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<Cue[]>;
2202
+ evaluateRule(label: string, params?: Record<string, any>, options?: EvaluateRuleOptions): Promise<LegacyCue$1[]>;
2189
2203
  /**
2190
2204
  * Evaluate assistant
2191
2205
  * By default will expect cues and show them in the widget.