@deepdesk/deepdesk-sdk 11.3.0 → 11.3.1-beta.1

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$o: {
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$o;
36
+ type CardStyles = typeof styles$p;
37
37
  declare const Card: FC & CardComposition;
38
38
 
39
- declare const styles$n: {
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$n;
54
+ type KeyboardHintStyles = typeof styles$o;
55
55
  declare const KeyboardHint: React.FC<Props$6>;
56
56
 
57
- declare const styles$m: {
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$m;
62
+ type LabelStyles = typeof styles$n;
63
63
  declare const Label: React.FC<Props$5>;
64
64
 
65
- declare const styles$l: {
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$l;
76
+ type SectionStyles = typeof styles$m;
77
77
  declare const Section: React.FC<Props$4>;
78
78
 
79
- declare const styles$k: {
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$k;
87
+ type SectionListStyles = typeof styles$l;
88
88
  declare const SectionList: React.ForwardRefExoticComponent<Props$3 & React.RefAttributes<HTMLDivElement>>;
89
89
 
90
- declare const styles$j: {
90
+ declare const styles$k: {
91
91
  readonly "root": string;
92
92
  readonly "fadein": string;
93
93
  readonly "isClickable": string;
@@ -138,21 +138,21 @@ interface SuggestionComposition {
138
138
  Labels: FC<LabelProps>;
139
139
  IconButton: FC<IconButtonProps>;
140
140
  }
141
- type SuggestionStyles = typeof styles$j;
141
+ type SuggestionStyles = typeof styles$k;
142
142
  declare const Suggestion: ForwardRefExoticComponent<Props$2 & RefAttributes<any>> & SuggestionComposition;
143
143
 
144
- declare const styles$i: {
144
+ declare const styles$j: {
145
145
  readonly "root": string;
146
146
  readonly "isWithDivider": string;
147
147
  };
148
148
 
149
- type SuggestionListStyles = typeof styles$i;
149
+ type SuggestionListStyles = typeof styles$j;
150
150
  interface Props$1 {
151
151
  withDivider?: boolean;
152
152
  }
153
153
  declare const SuggestionList: React.FC<Props$1>;
154
154
 
155
- declare const styles$h: {
155
+ declare const styles$i: {
156
156
  readonly "root": string;
157
157
  readonly "isCollapsed": string;
158
158
  };
@@ -161,7 +161,7 @@ type Props = HTMLAttributes<HTMLButtonElement> & {
161
161
  isCollapsed: boolean;
162
162
  title: string;
163
163
  };
164
- type ToggleButtonStyles = typeof styles$h;
164
+ type ToggleButtonStyles = typeof styles$i;
165
165
  declare const ToggleButton: React.FC<Props>;
166
166
 
167
167
  declare enum Sources {
@@ -469,6 +469,7 @@ declare const reducers: redux.Reducer<redux.CombinedState<{
469
469
  agentInfo?: AgentInfo | undefined;
470
470
  agentSettings: unknown;
471
471
  visitorInfo?: VisitorInfo | undefined;
472
+ customData?: CustomData | undefined;
472
473
  fetchState: FetchState;
473
474
  };
474
475
  input: State$6;
@@ -531,6 +532,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
531
532
  agentInfo?: AgentInfo | undefined;
532
533
  agentSettings: unknown;
533
534
  visitorInfo?: VisitorInfo | undefined;
535
+ customData?: CustomData | undefined;
534
536
  fetchState: FetchState;
535
537
  };
536
538
  input: State$6;
@@ -592,6 +594,7 @@ declare function createStore(config: StoreConfig): _reduxjs_toolkit_dist_configu
592
594
  agentInfo?: AgentInfo | undefined;
593
595
  agentSettings: unknown;
594
596
  visitorInfo?: VisitorInfo | undefined;
597
+ customData?: CustomData | undefined;
595
598
  fetchState: FetchState;
596
599
  };
597
600
  input: State$6;
@@ -1061,6 +1064,7 @@ declare namespace Server {
1061
1064
  title: string;
1062
1065
  amount: number;
1063
1066
  lines: 'multiple' | 'single';
1067
+ schema?: CustomDataSchema;
1064
1068
  }>;
1065
1069
  };
1066
1070
  search: {
@@ -1471,6 +1475,18 @@ interface Entity {
1471
1475
  text: string;
1472
1476
  label: string;
1473
1477
  }
1478
+ type CustomData = Record<string, unknown>;
1479
+ type CustomDataSchema = Array<{
1480
+ path: string;
1481
+ label: string;
1482
+ type: 'string' | 'number';
1483
+ } | {
1484
+ path: string;
1485
+ label: string;
1486
+ type: 'boolean';
1487
+ trueValue?: string;
1488
+ falseValue?: string;
1489
+ }>;
1474
1490
  /**
1475
1491
  * Utils
1476
1492
  */
@@ -1576,7 +1592,7 @@ interface TextSuggestionState {
1576
1592
  [type: string]: SuggestionState;
1577
1593
  }
1578
1594
 
1579
- declare const styles$g: {
1595
+ declare const styles$h: {
1580
1596
  readonly "isDisabled": string;
1581
1597
  readonly "buttonStart": string;
1582
1598
  readonly "root": string;
@@ -1587,9 +1603,9 @@ declare const styles$g: {
1587
1603
  readonly "isAborted": string;
1588
1604
  };
1589
1605
 
1590
- type AutoflowStyles = typeof styles$g;
1606
+ type AutoflowStyles = typeof styles$h;
1591
1607
 
1592
- declare const styles$f: {
1608
+ declare const styles$g: {
1593
1609
  readonly "root": string;
1594
1610
  readonly "list": string;
1595
1611
  readonly "listWrapper": string;
@@ -1637,23 +1653,23 @@ declare const styles$f: {
1637
1653
  readonly "actionShortcutFixKerning": string;
1638
1654
  };
1639
1655
 
1640
- type CommandPaletteStyles = typeof styles$f;
1656
+ type CommandPaletteStyles = typeof styles$g;
1641
1657
 
1642
- declare const styles$e: {
1658
+ declare const styles$f: {
1643
1659
  readonly "root": string;
1644
1660
  readonly "content": string;
1645
1661
  };
1646
1662
 
1647
- type DialogStyles = typeof styles$e;
1663
+ type DialogStyles = typeof styles$f;
1648
1664
 
1649
- declare const styles$d: {
1665
+ declare const styles$e: {
1650
1666
  readonly "root": string;
1651
1667
  readonly "empty": string;
1652
1668
  };
1653
1669
 
1654
- type EntitiesListStyles = typeof styles$d;
1670
+ type EntitiesListStyles = typeof styles$e;
1655
1671
 
1656
- declare const styles$c: {
1672
+ declare const styles$d: {
1657
1673
  readonly "root": string;
1658
1674
  readonly "entity": string;
1659
1675
  readonly "entityText": string;
@@ -1662,9 +1678,9 @@ declare const styles$c: {
1662
1678
  readonly "iconClicked": string;
1663
1679
  };
1664
1680
 
1665
- type EntitiesWidgetListStyles = typeof styles$c;
1681
+ type EntitiesWidgetListStyles = typeof styles$d;
1666
1682
 
1667
- declare const styles$b: {
1683
+ declare const styles$c: {
1668
1684
  readonly "thumbs": string;
1669
1685
  readonly "fadeup": string;
1670
1686
  readonly "fadedown": string;
@@ -1673,9 +1689,9 @@ declare const styles$b: {
1673
1689
  readonly "thumbsDown": string;
1674
1690
  };
1675
1691
 
1676
- type FeedbackThumbsStyles = typeof styles$b;
1692
+ type FeedbackThumbsStyles = typeof styles$c;
1677
1693
 
1678
- declare const styles$a: {
1694
+ declare const styles$b: {
1679
1695
  readonly "root": string;
1680
1696
  readonly "text": string;
1681
1697
  readonly "isLoggedIn": string;
@@ -1685,16 +1701,16 @@ declare const styles$a: {
1685
1701
  readonly "lock": string;
1686
1702
  };
1687
1703
 
1688
- type FloatingMenuStyles = typeof styles$a;
1704
+ type FloatingMenuStyles = typeof styles$b;
1689
1705
 
1690
- declare const styles$9: {
1706
+ declare const styles$a: {
1691
1707
  readonly "root": string;
1692
1708
  readonly "paper": string;
1693
1709
  };
1694
1710
 
1695
- type InlineSuggestionsOverlayStyles = typeof styles$9;
1711
+ type InlineSuggestionsOverlayStyles = typeof styles$a;
1696
1712
 
1697
- declare const styles$8: {
1713
+ declare const styles$9: {
1698
1714
  readonly "root": string;
1699
1715
  readonly "title": string;
1700
1716
  readonly "empty": string;
@@ -1708,24 +1724,24 @@ declare const styles$8: {
1708
1724
  readonly "listItemFeedback": string;
1709
1725
  };
1710
1726
 
1711
- type KnowledgeSearchStyles = typeof styles$8;
1727
+ type KnowledgeSearchStyles = typeof styles$9;
1712
1728
 
1713
- declare const styles$7: {
1729
+ declare const styles$8: {
1714
1730
  readonly "root": string;
1715
1731
  readonly "content": string;
1716
1732
  };
1717
1733
 
1718
- type LinkSearchStyles = typeof styles$7;
1734
+ type LinkSearchStyles = typeof styles$8;
1719
1735
 
1720
- declare const styles$6: {
1736
+ declare const styles$7: {
1721
1737
  readonly "root": string;
1722
1738
  readonly "anchor": string;
1723
1739
  readonly "anchorButton": string;
1724
1740
  };
1725
1741
 
1726
- type LoginStyles = typeof styles$6;
1742
+ type LoginStyles = typeof styles$7;
1727
1743
 
1728
- declare const styles$5: {
1744
+ declare const styles$6: {
1729
1745
  readonly "root": string;
1730
1746
  readonly "anchorButton": string;
1731
1747
  readonly "errorMessage": string;
@@ -1738,16 +1754,16 @@ declare const styles$5: {
1738
1754
  readonly "primaryButton": string;
1739
1755
  };
1740
1756
 
1741
- type LoginTokenDialogStyles = typeof styles$5;
1757
+ type LoginTokenDialogStyles = typeof styles$6;
1742
1758
 
1743
- declare const styles$4: {
1759
+ declare const styles$5: {
1744
1760
  readonly "root": string;
1745
1761
  readonly "text": string;
1746
1762
  };
1747
1763
 
1748
- type SearchTriggerStyles = typeof styles$4;
1764
+ type SearchTriggerStyles = typeof styles$5;
1749
1765
 
1750
- declare const styles$3: {
1766
+ declare const styles$4: {
1751
1767
  readonly "root": string;
1752
1768
  readonly "isInline": string;
1753
1769
  readonly "toggleButton": string;
@@ -1761,9 +1777,9 @@ declare const styles$3: {
1761
1777
  readonly "triggersRight": string;
1762
1778
  };
1763
1779
 
1764
- type SuggestionsOverlayStyles = typeof styles$3;
1780
+ type SuggestionsOverlayStyles = typeof styles$4;
1765
1781
 
1766
- declare const styles$2: {
1782
+ declare const styles$3: {
1767
1783
  readonly "root": string;
1768
1784
  readonly "container": string;
1769
1785
  readonly "agentText": string;
@@ -1788,18 +1804,18 @@ declare const styles$2: {
1788
1804
  readonly "suggestionsOverlayInputStyles": string;
1789
1805
  };
1790
1806
 
1791
- type TabCompletionStyles = typeof styles$2;
1807
+ type TabCompletionStyles = typeof styles$3;
1792
1808
 
1793
- declare const styles$1: {
1809
+ declare const styles$2: {
1794
1810
  readonly "root": string;
1795
1811
  readonly "actions": string;
1796
1812
  readonly "badge": string;
1797
1813
  readonly "formattedText": string;
1798
1814
  };
1799
1815
 
1800
- type TextSuggestionStyles = typeof styles$1;
1816
+ type TextSuggestionStyles = typeof styles$2;
1801
1817
 
1802
- declare const styles: {
1818
+ declare const styles$1: {
1803
1819
  readonly "root": string;
1804
1820
  readonly "loginText": string;
1805
1821
  readonly "stateText": string;
@@ -1809,7 +1825,17 @@ declare const styles: {
1809
1825
  readonly "link": string;
1810
1826
  };
1811
1827
 
1812
- type WidgetStyles = typeof styles;
1828
+ type WidgetStyles = typeof styles$1;
1829
+
1830
+ declare const styles: {
1831
+ readonly "root": string;
1832
+ readonly "label": string;
1833
+ readonly "value": string;
1834
+ readonly "isTrue": string;
1835
+ readonly "isFalse": string;
1836
+ };
1837
+
1838
+ type WidgetCustomDataStyles = typeof styles;
1813
1839
 
1814
1840
  type WidgetCustomStyles = {
1815
1841
  Autoflow?: Partial<AutoflowStyles>;
@@ -1823,8 +1849,9 @@ type WidgetCustomStyles = {
1823
1849
  SectionList?: Partial<SectionListStyles>;
1824
1850
  Suggestion?: Partial<SuggestionStyles>;
1825
1851
  SuggestionList?: Partial<SuggestionListStyles>;
1826
- Widget?: Partial<WidgetStyles>;
1827
1852
  EntitiesWidgetList?: Partial<EntitiesWidgetListStyles>;
1853
+ Widget?: Partial<WidgetStyles>;
1854
+ WidgetCustomData?: Partial<WidgetCustomDataStyles>;
1828
1855
  };
1829
1856
  type InputOverlayCustomStyles = {
1830
1857
  CommandPalette?: Partial<CommandPaletteStyles>;
@@ -2004,6 +2031,7 @@ declare class DeepdeskSDK {
2004
2031
  agentInfo?: AgentInfo | undefined;
2005
2032
  agentSettings: unknown;
2006
2033
  visitorInfo?: VisitorInfo | undefined;
2034
+ customData?: CustomData | undefined;
2007
2035
  fetchState: FetchState;
2008
2036
  };
2009
2037
  input: State$6;
@@ -2143,6 +2171,10 @@ declare class DeepdeskSDK {
2143
2171
  * Store the visitor information in memory
2144
2172
  */
2145
2173
  setVisitorInfo(visitorInfo: VisitorInfo): void;
2174
+ /**
2175
+ * Set custom data to show in the widget
2176
+ */
2177
+ setCustomData(data: CustomData): void;
2146
2178
  /**
2147
2179
  * Store the agent information in memory
2148
2180
  */