@thoughtspot/visual-embed-sdk 1.28.4 → 1.28.5

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.
Files changed (61) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/authToken.d.ts.map +1 -1
  3. package/cjs/src/authToken.js +8 -1
  4. package/cjs/src/authToken.js.map +1 -1
  5. package/cjs/src/authToken.spec.d.ts +2 -0
  6. package/cjs/src/authToken.spec.d.ts.map +1 -0
  7. package/cjs/src/authToken.spec.js +29 -0
  8. package/cjs/src/authToken.spec.js.map +1 -0
  9. package/cjs/src/types.d.ts +93 -48
  10. package/cjs/src/types.d.ts.map +1 -1
  11. package/cjs/src/types.js +76 -48
  12. package/cjs/src/types.js.map +1 -1
  13. package/dist/src/authToken.d.ts.map +1 -1
  14. package/dist/src/authToken.spec.d.ts +2 -0
  15. package/dist/src/authToken.spec.d.ts.map +1 -0
  16. package/dist/src/types.d.ts +93 -48
  17. package/dist/src/types.d.ts.map +1 -1
  18. package/dist/tsembed-react.es.js +84 -50
  19. package/dist/tsembed-react.js +84 -50
  20. package/dist/tsembed.es.js +84 -50
  21. package/dist/tsembed.js +84 -50
  22. package/dist/visual-embed-sdk-react-full.d.ts +93 -48
  23. package/dist/visual-embed-sdk-react.d.ts +93 -48
  24. package/dist/visual-embed-sdk.d.ts +93 -48
  25. package/lib/package.json +1 -1
  26. package/lib/src/authToken.d.ts.map +1 -1
  27. package/lib/src/authToken.js +8 -1
  28. package/lib/src/authToken.js.map +1 -1
  29. package/lib/src/authToken.spec.d.ts +2 -0
  30. package/lib/src/authToken.spec.d.ts.map +1 -0
  31. package/lib/src/authToken.spec.js +26 -0
  32. package/lib/src/authToken.spec.js.map +1 -0
  33. package/lib/src/types.d.ts +93 -48
  34. package/lib/src/types.d.ts.map +1 -1
  35. package/lib/src/types.js +76 -48
  36. package/lib/src/types.js.map +1 -1
  37. package/lib/src/visual-embed-sdk.d.ts +93 -48
  38. package/package.json +1 -1
  39. package/src/authToken.spec.ts +31 -0
  40. package/src/authToken.ts +8 -1
  41. package/src/types.ts +94 -48
  42. package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  43. package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  44. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +0 -32
  45. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
  46. package/cjs/src/utils/sessionInfoService.d.ts +0 -66
  47. package/cjs/src/utils/sessionInfoService.d.ts.map +0 -1
  48. package/cjs/src/utils/sessionInfoService.js +0 -92
  49. package/cjs/src/utils/sessionInfoService.js.map +0 -1
  50. package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  51. package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  52. package/dist/src/utils/sessionInfoService.d.ts +0 -66
  53. package/dist/src/utils/sessionInfoService.d.ts.map +0 -1
  54. package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
  55. package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
  56. package/lib/src/utils/authService/tokenizedAuthService.spec.js +0 -29
  57. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
  58. package/lib/src/utils/sessionInfoService.d.ts +0 -66
  59. package/lib/src/utils/sessionInfoService.d.ts.map +0 -1
  60. package/lib/src/utils/sessionInfoService.js +0 -85
  61. package/lib/src/utils/sessionInfoService.js.map +0 -1
package/src/types.ts CHANGED
@@ -612,6 +612,24 @@ export interface EmbedConfig {
612
612
  * @version SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw
613
613
  */
614
614
  currencyFormat?: string;
615
+
616
+ /**
617
+ * This flag is used to disable the token verification in the SDK.
618
+ * Enabling this flag will also disable the caching of the token.
619
+ *
620
+ * @hidden
621
+ *
622
+ * @example
623
+ * ```js
624
+ * init({
625
+ * ...embedConfig,
626
+ * disableTokenVerification : true
627
+ * })
628
+ * ```
629
+ *
630
+ * @version SDK: 1.28.5 | Thoughtspot: *
631
+ */
632
+ disableTokenVerification?: boolean;
615
633
  }
616
634
 
617
635
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -1282,6 +1300,8 @@ export enum EmbedEvent {
1282
1300
  /**
1283
1301
  * Authentication has either succeeded or failed.
1284
1302
  *
1303
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1304
+ *
1285
1305
  * @example
1286
1306
  *```js
1287
1307
  * appEmbed.on(EmbedEvent.AuthInit, payload => {
@@ -1295,6 +1315,8 @@ export enum EmbedEvent {
1295
1315
  * The embed object container has loaded.
1296
1316
  *
1297
1317
  * @returns timestamp - The timestamp when the event was generated.
1318
+ *
1319
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1298
1320
  * @example
1299
1321
  *```js
1300
1322
  * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
@@ -1309,6 +1331,8 @@ export enum EmbedEvent {
1309
1331
  * Data pertaining to answer or Liveboard is received
1310
1332
  *
1311
1333
  * @return data - The answer or Liveboard data
1334
+ *
1335
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1312
1336
  * @example
1313
1337
  *```js
1314
1338
  * liveboardEmbed.on(EmbedEvent.Data, payload => {
@@ -1327,6 +1351,7 @@ export enum EmbedEvent {
1327
1351
  /**
1328
1352
  * Search query has been updated by the user.
1329
1353
  *
1354
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
1330
1355
  * @example
1331
1356
  *```js
1332
1357
  * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
@@ -1336,12 +1361,14 @@ export enum EmbedEvent {
1336
1361
  /**
1337
1362
  * A drill-down operation has been performed.
1338
1363
  *
1364
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1365
+ *
1339
1366
  * @returns additionalFilters - Any additional filters applied
1340
1367
  * @returns drillDownColumns - The columns on which drill down was performed
1341
1368
  * @returns nonFilteredColumns - The columns that were not filtered
1342
1369
  * @example
1343
1370
  *```js
1344
- * searchEmbed.trigger(EmbedEvent.DrillDown, {
1371
+ * searchEmbed.on(EmbedEvent.DrillDown, {
1345
1372
  * points: {
1346
1373
  * clickedPoint,
1347
1374
  * selectedPoints: selectedPoint
@@ -1374,6 +1401,8 @@ export enum EmbedEvent {
1374
1401
  * One or more data sources have been selected.
1375
1402
  *
1376
1403
  * @returns dataSourceIds - the list of data sources
1404
+ *
1405
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1377
1406
  * @example
1378
1407
  * ```js
1379
1408
  * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
@@ -1401,6 +1430,8 @@ export enum EmbedEvent {
1401
1430
  * @returns actionId - ID of the custom action
1402
1431
  * @returns payload {@link CustomActionPayload} - Response payload with the
1403
1432
  * Answer or Liveboard data
1433
+ *
1434
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1404
1435
  * @example
1405
1436
  * ```js
1406
1437
  * appEmbed.on(EmbedEvent.customAction, payload => {
@@ -1448,22 +1479,23 @@ export enum EmbedEvent {
1448
1479
  /**
1449
1480
  * An error has occurred. This event is fired for the following error types:
1450
1481
  *
1451
- * API - API call failure error.
1482
+ * `API`: API call failure error.
1452
1483
  *
1453
- * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen
1454
- * mode.
1484
+ * `FULLSCREEN`: Error when presenting a Liveboard or visualization in full screen mode.
1455
1485
  *
1456
- * SINGLE_VALUE_FILTER - Error due to multiple values in the single value filter.
1486
+ * `SINGLE_VALUE_FILTER`: Error due to multiple values in the single value filter.
1457
1487
  *
1458
- * NON_EXIST_FILTER - Error due to a non-existent filter.
1488
+ * `NON_EXIST_FILTER`: Error due to a non-existent filter.
1459
1489
  *
1460
- * INVALID_DATE_VALUE - Invalid date value error.
1490
+ * `INVALID_DATE_VALUE`: Invalid date value error.
1461
1491
  *
1462
- * INVALID_OPERATOR - Use of invalid operator during filter application.
1492
+ * `INVALID_OPERATOR`: Use of invalid operator during filter application.
1463
1493
  *
1464
- * For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
1494
+ * For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType.
1465
1495
  *
1466
1496
  * @returns error - An error object or message
1497
+ *
1498
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1467
1499
  * @example
1468
1500
  * ```js
1469
1501
  * // API error
@@ -1489,6 +1521,9 @@ export enum EmbedEvent {
1489
1521
  * The embedded object has sent an alert.
1490
1522
  *
1491
1523
  * @returns alert - An alert object
1524
+ *
1525
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1526
+ *
1492
1527
  * @example
1493
1528
  * ```js
1494
1529
  * searchEmbed.on(EmbedEvent.Alert)
@@ -1498,6 +1533,8 @@ export enum EmbedEvent {
1498
1533
  /**
1499
1534
  * The ThoughtSpot auth session has expired.
1500
1535
  *
1536
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
1537
+ *
1501
1538
  * @example
1502
1539
  *```js
1503
1540
  * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
@@ -1551,6 +1588,7 @@ export enum EmbedEvent {
1551
1588
  /**
1552
1589
  * Detects the route change.
1553
1590
  *
1591
+ * @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
1554
1592
  * @example
1555
1593
  *```js
1556
1594
  * searchEmbed.on(EmbedEvent.RouteChange, payload =>
@@ -1567,7 +1605,7 @@ export enum EmbedEvent {
1567
1605
  /**
1568
1606
  * Emitted when the embed does not have cookie access. This happens
1569
1607
  * when Safari and other Web browsers block third-party cookies
1570
- * are blocked by default. `NoCookieAccess` can trigger
1608
+ * are blocked by default.
1571
1609
  *
1572
1610
  * @example
1573
1611
  *```js
@@ -1610,7 +1648,7 @@ export enum EmbedEvent {
1610
1648
  /**
1611
1649
  * Emitted when the Liveboard shell loads.
1612
1650
  * You can use this event as a hook to trigger
1613
- * other events on the rendered Liveboard.
1651
+ * actions on the rendered Liveboard.
1614
1652
  *
1615
1653
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1616
1654
  * @example
@@ -1631,8 +1669,7 @@ export enum EmbedEvent {
1631
1669
  */
1632
1670
  LiveboardRendered = 'PinboardRendered',
1633
1671
  /**
1634
- * This can be used to register an event listener which
1635
- * is triggered on all events.
1672
+ * Emits all events.
1636
1673
  *
1637
1674
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1638
1675
  * @example
@@ -1649,13 +1686,13 @@ export enum EmbedEvent {
1649
1686
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1650
1687
  * @example
1651
1688
  *```js
1652
- * //trigger when action starts
1689
+ * //Emit when action starts
1653
1690
  * searchEmbed.on(EmbedEvent.Save, payload => {
1654
1691
  * console.log('Save', payload)
1655
1692
  * }, {
1656
1693
  * start: true
1657
1694
  * })
1658
- * //trigger when action ends
1695
+ * //emit when action ends
1659
1696
  * searchEmbed.on(EmbedEvent.Save, payload => {
1660
1697
  * console.log('Save', payload)
1661
1698
  * })
@@ -1665,7 +1702,7 @@ export enum EmbedEvent {
1665
1702
  /**
1666
1703
  * Emitted when the download action is triggered on an answer
1667
1704
  *
1668
- * **Note**: This event is deprecated in v1.21.0.
1705
+ * **Note**: This event is deprecated in v1.21.0.
1669
1706
  * To fire an event when a download action is initiated on a chart or table,
1670
1707
  * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
1671
1708
  * or `EmbedEvent.DownloadAsXLSX`
@@ -1673,7 +1710,7 @@ export enum EmbedEvent {
1673
1710
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1674
1711
  * @example
1675
1712
  *```js
1676
- * liveboardEmbed.trigger(HostEvent.Download, {
1713
+ * liveboardEmbed.on(EmbedEvent.Download, {
1677
1714
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1678
1715
  * })
1679
1716
  *```
@@ -1685,10 +1722,10 @@ export enum EmbedEvent {
1685
1722
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1686
1723
  * @example
1687
1724
  *```js
1688
- * //trigger when action starts
1725
+ * //emit when action starts
1689
1726
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1690
1727
  * console.log('download PNG', payload)}, {start: true })
1691
- * //trigger when action ends
1728
+ * //emit when action ends
1692
1729
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1693
1730
  * console.log('download PNG', payload)})
1694
1731
  *```
@@ -1700,10 +1737,10 @@ export enum EmbedEvent {
1700
1737
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1701
1738
  * @example
1702
1739
  *```js
1703
- * //trigger when action starts
1740
+ * //emit when action starts
1704
1741
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1705
1742
  * console.log('download PDF', payload)}, {start: true })
1706
- * //trigger when action ends
1743
+ * //emit when action ends
1707
1744
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1708
1745
  * console.log('download PDF', payload)})
1709
1746
  *```
@@ -1715,10 +1752,10 @@ export enum EmbedEvent {
1715
1752
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1716
1753
  * @example
1717
1754
  *```js
1718
- * //trigger when action starts
1755
+ * //emit when action starts
1719
1756
  * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1720
1757
  * console.log('download CSV', payload)}, {start: true })
1721
- * //trigger when action ends
1758
+ * //emit when action ends
1722
1759
  * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1723
1760
  * console.log('download CSV', payload)})
1724
1761
  *```
@@ -1730,10 +1767,10 @@ export enum EmbedEvent {
1730
1767
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1731
1768
  * @example
1732
1769
  *```js
1733
- * //trigger when action starts
1770
+ * //emit when action starts
1734
1771
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1735
1772
  * console.log('download Xlsx', payload)}, { start: true })
1736
- * //trigger when action ends
1773
+ * //emit when action ends
1737
1774
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1738
1775
  * console.log('download Xlsx', payload)})
1739
1776
  *```
@@ -1745,10 +1782,10 @@ export enum EmbedEvent {
1745
1782
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1746
1783
  * @example
1747
1784
  *```js
1748
- * //trigger when action starts
1785
+ * //emit when action starts
1749
1786
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1750
1787
  * console.log('delete answer', payload)}, {start: true })
1751
- * //trigger when action is completed
1788
+ * //emit when action is completed
1752
1789
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1753
1790
  * console.log('delete answer', payload)})
1754
1791
  *```
@@ -1760,13 +1797,13 @@ export enum EmbedEvent {
1760
1797
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1761
1798
  * @example
1762
1799
  *```js
1763
- * //trigger when action starts
1800
+ * //emit when action starts
1764
1801
  * searchEmbed.on(EmbedEvent.Pin, payload => {
1765
1802
  * console.log('pin', payload)
1766
1803
  * }, {
1767
1804
  * start: true
1768
1805
  * })
1769
- * //trigger when action ends
1806
+ * //emit when action ends
1770
1807
  * searchEmbed.on(EmbedEvent.Pin, payload => {
1771
1808
  * console.log('pin', payload)
1772
1809
  * })
@@ -1779,13 +1816,13 @@ export enum EmbedEvent {
1779
1816
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1780
1817
  * @example
1781
1818
  *```js
1782
- * //trigger when action starts
1819
+ * //emit when action starts
1783
1820
  * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1784
1821
  * console.log('SpotIQAnalyze', payload)
1785
1822
  * }, {
1786
1823
  * start: true
1787
1824
  * })
1788
- * //trigger when action ends
1825
+ * //emit when action ends
1789
1826
  * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1790
1827
  * console.log('SpotIQ analyze', payload)
1791
1828
  * })
@@ -1798,13 +1835,13 @@ export enum EmbedEvent {
1798
1835
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1799
1836
  * @example
1800
1837
  *```js
1801
- * //trigger when action starts
1838
+ * //emit when action starts
1802
1839
  * searchEmbed.on(EmbedEvent.Share, payload => {
1803
1840
  * console.log('Share', payload)
1804
1841
  * }, {
1805
1842
  * start: true
1806
1843
  * })
1807
- * //trigger when action ends
1844
+ * //emit when action ends
1808
1845
  * searchEmbed.on(EmbedEvent.Share, payload => {
1809
1846
  * console.log('Share', payload)
1810
1847
  * })
@@ -1879,10 +1916,10 @@ export enum EmbedEvent {
1879
1916
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1880
1917
  * @example
1881
1918
  *```js
1882
- * //trigger when action starts
1919
+ * //emit when action starts
1883
1920
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1884
1921
  * console.log('Export TML', payload)}, { start: true })
1885
- * //trigger when action ends
1922
+ * //emit when action ends
1886
1923
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1887
1924
  * console.log('Export TML', payload)})
1888
1925
  *```
@@ -1906,10 +1943,10 @@ export enum EmbedEvent {
1906
1943
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1907
1944
  * @example
1908
1945
  *```js
1909
- * //trigger when action starts
1946
+ * //emit when action starts
1910
1947
  * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1911
1948
  * console.log('Copy and edit', payload)}, {start: true })
1912
- * //trigger when action ends
1949
+ * //emit when action ends
1913
1950
  * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1914
1951
  * console.log('Copy and edit', payload)})
1915
1952
  *```
@@ -2011,7 +2048,7 @@ export enum EmbedEvent {
2011
2048
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2012
2049
  * @example
2013
2050
  *```js
2014
- * liveboardEmbed.trigger(HostEvent.Present)
2051
+ * liveboardEmbed.on(EmbedEvent.Present)
2015
2052
  *```
2016
2053
  * @example
2017
2054
  *```js
@@ -2027,7 +2064,7 @@ export enum EmbedEvent {
2027
2064
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2028
2065
  * @example
2029
2066
  *```js
2030
- * liveboardEmbed.trigger(EmbedEvent.Delete,
2067
+ * liveboardEmbed.on(EmbedEvent.Delete,
2031
2068
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2032
2069
  *```
2033
2070
  */
@@ -2038,7 +2075,7 @@ export enum EmbedEvent {
2038
2075
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2039
2076
  * @example
2040
2077
  *```js
2041
- * liveboardEmbed.trigger(EmbedEvent.SchedulesList)
2078
+ * liveboardEmbed.on(EmbedEvent.SchedulesList)
2042
2079
  *```
2043
2080
  */
2044
2081
  SchedulesList = 'schedule-list',
@@ -2048,7 +2085,7 @@ export enum EmbedEvent {
2048
2085
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2049
2086
  * @example
2050
2087
  *```js
2051
- * liveboardEmbed.trigger(EmbedEvent.Cancel)
2088
+ * liveboardEmbed.on(EmbedEvent.Cancel)
2052
2089
  *```
2053
2090
  */
2054
2091
  Cancel = 'cancel',
@@ -2058,7 +2095,7 @@ export enum EmbedEvent {
2058
2095
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2059
2096
  * @example
2060
2097
  *```js
2061
- * liveboardEmbed.trigger(EmbedEvent.Explore, {
2098
+ * liveboardEmbed.on(EmbedEvent.Explore, {
2062
2099
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2063
2100
  *```
2064
2101
  */
@@ -2069,7 +2106,7 @@ export enum EmbedEvent {
2069
2106
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2070
2107
  * @example
2071
2108
  *```js
2072
- * liveboardEmbed.trigger(EmbedEvent.CopyLink, {
2109
+ * liveboardEmbed.on(EmbedEvent.CopyLink, {
2073
2110
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2074
2111
  *```
2075
2112
  */
@@ -2080,7 +2117,7 @@ export enum EmbedEvent {
2080
2117
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
2081
2118
  * @example
2082
2119
  *```js
2083
- * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
2120
+ * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
2084
2121
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2085
2122
  *```
2086
2123
  */
@@ -2104,9 +2141,18 @@ export enum EmbedEvent {
2104
2141
  */
2105
2142
  InsertIntoSlide = 'insertInToSlide',
2106
2143
  /**
2107
- * @hidden
2108
2144
  * Emitted when a user changes any filter on a Liveboard.
2145
+ * Returns filter type and name, column name and ID, and runtime
2146
+ * filter details.
2147
+ *
2109
2148
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
2149
+ * @example
2150
+ *
2151
+ *```js
2152
+ * LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
2153
+ * console.log('payload', payload);
2154
+ * })
2155
+ *```
2110
2156
  */
2111
2157
  FilterChanged = 'filterChanged',
2112
2158
  /**
@@ -2643,7 +2689,7 @@ export enum HostEvent {
2643
2689
  * ```js
2644
2690
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
2645
2691
  * console.log(
2646
- * tml.search_query // TML representation of the search query
2692
+ * tml.answer.search_query // TML representation of the search query
2647
2693
  * );
2648
2694
  * })
2649
2695
  * ```
@@ -2886,7 +2932,7 @@ export enum HostEvent {
2886
2932
  *
2887
2933
  * ```js
2888
2934
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2889
- * filter: { column: 'column name', oper: 'IN', values: [1,2,3], is_mandatory: false }
2935
+ * filter: { column: 'column name', oper: 'IN', values: [1,2,3]}
2890
2936
  * })
2891
2937
  * ```
2892
2938
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -4033,7 +4079,7 @@ export enum Action {
4033
4079
  * disabledActions: [Action.TML] // to disable all TML actions
4034
4080
  * ```
4035
4081
  *
4036
- * @version SDK : 1.28.2 | Thoughtspot: 9.10.5.cl
4082
+ * @version SDK : 1.28.3 | Thoughtspot: 9.12.0.cl
4037
4083
  */
4038
4084
  TML = 'tml',
4039
4085
 
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tokenizedAuthService.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenizedAuthService.spec.d.ts","sourceRoot":"","sources":["../../../../src/utils/authService/tokenizedAuthService.spec.ts"],"names":[],"mappings":""}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const tokenizedFetchModule = tslib_1.__importStar(require("../../tokenizedFetch"));
5
- const tokenizedAuthService_1 = require("./tokenizedAuthService");
6
- const logger_1 = require("../logger");
7
- describe('tokenizedAuthService', () => {
8
- test('isActiveService is fetch returns ok', async () => {
9
- jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockResolvedValueOnce({
10
- ok: true,
11
- });
12
- const isActiveResp = await (0, tokenizedAuthService_1.isActiveService)('http://thoughtspotHost');
13
- expect(isActiveResp).toEqual(true);
14
- });
15
- test('isActiveService if fetch returns not ok', async () => {
16
- jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockResolvedValueOnce({
17
- ok: false,
18
- });
19
- const isActiveResp = await (0, tokenizedAuthService_1.isActiveService)('http://thoughtspotHost');
20
- expect(isActiveResp).toEqual(false);
21
- });
22
- test('isActiveService if fetch fails', async () => {
23
- jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockRejectedValueOnce({
24
- ok: false,
25
- });
26
- jest.spyOn(logger_1.logger, 'warn');
27
- const isActiveResp = await (0, tokenizedAuthService_1.isActiveService)('http://thoughtspotHost');
28
- expect(isActiveResp).toEqual(false);
29
- expect(logger_1.logger.warn).toHaveBeenCalled();
30
- });
31
- });
32
- //# sourceMappingURL=tokenizedAuthService.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenizedAuthService.spec.js","sourceRoot":"","sources":["../../../../src/utils/authService/tokenizedAuthService.spec.ts"],"names":[],"mappings":";;;AAAA,mFAA6D;AAC7D,iEAAyD;AACzD,sCAAmC;AAEnC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,qCAAqC,EAAE,KAAK,IAAI,EAAE;QACnD,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,qBAAqB,CAAC;YACrE,EAAE,EAAE,IAAI;SACX,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,MAAM,IAAA,sCAAe,EAAC,wBAAwB,CAAC,CAAC;QAErE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;QACvD,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,qBAAqB,CAAC;YACrE,EAAE,EAAE,KAAK;SACZ,CAAC,CAAC;QAEH,MAAM,YAAY,GAAG,MAAM,IAAA,sCAAe,EAAC,wBAAwB,CAAC,CAAC;QAErE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,gCAAgC,EAAE,KAAK,IAAI,EAAE;QAC9C,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,qBAAqB,CAAC;YACrE,EAAE,EAAE,KAAK;SACZ,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,eAAM,EAAE,MAAM,CAAC,CAAC;QAE3B,MAAM,YAAY,GAAG,MAAM,IAAA,sCAAe,EAAC,wBAAwB,CAAC,CAAC;QAErE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpC,MAAM,CAAC,eAAM,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,66 +0,0 @@
1
- export type SessionInfo = {
2
- releaseVersion: string;
3
- userGUID: string;
4
- currentOrgId: number;
5
- privileges: string[];
6
- mixpanelToken: string;
7
- isPublicUser: boolean;
8
- clusterId: string;
9
- clusterName: string;
10
- [key: string]: any;
11
- };
12
- /**
13
- * Returns the session info object and caches it for future use.
14
- * Once fetched the session info object is cached and returned from the cache on
15
- * subsequent calls.
16
- *
17
- * @example ```js
18
- * const sessionInfo = await getSessionInfo();
19
- * console.log(sessionInfo);
20
- * ```
21
- * @version SDK: 1.28.3 | ThoughtSpot: *
22
- * @returns {Promise<SessionInfo>} The session info object.
23
- */
24
- export declare function getSessionInfo(): Promise<SessionInfo>;
25
- /**
26
- * Returns the cached session info object. If the client is not authenticated the
27
- * function will return null.
28
- *
29
- * @example ```js
30
- * const sessionInfo = getCachedSessionInfo();
31
- * if (sessionInfo) {
32
- * console.log(sessionInfo);
33
- * } else {
34
- * console.log('Not authenticated');
35
- * }
36
- * ```
37
- * @returns {SessionInfo | null} The session info object.
38
- * @version SDK: 1.28.3 | ThoughtSpot: *
39
- */
40
- export declare function getCachedSessionInfo(): SessionInfo | null;
41
- /**
42
- * Processes the session info response and returns the session info object.
43
- *
44
- * @param sessionInfoResp {any} Response from the session info API.
45
- * @returns {SessionInfo} The session info object.
46
- * @example ```js
47
- * const sessionInfoResp = await fetch(sessionInfoPath);
48
- * const sessionInfo = getSessionDetails(sessionInfoResp);
49
- * console.log(sessionInfo);
50
- * ```
51
- * @version SDK: 1.28.3 | ThoughtSpot: *
52
- */
53
- export declare const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
54
- /**
55
- * Resets the cached session info object and forces a new fetch on the next call.
56
- *
57
- * @example ```js
58
- * resetCachedSessionInfo();
59
- * const sessionInfo = await getSessionInfo();
60
- * console.log(sessionInfo);
61
- * ```
62
- * @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
63
- * @returns {void}
64
- */
65
- export declare function resetCachedSessionInfo(): void;
66
- //# sourceMappingURL=sessionInfoService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sessionInfoService.d.ts","sourceRoot":"","sources":["../../../src/utils/sessionInfoService.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;AAIF;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAQ3D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,GAAG,IAAI,CAEzD;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,oBAAqB,GAAG,KAAG,WAexD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C"}
@@ -1,92 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resetCachedSessionInfo = exports.getSessionDetails = exports.getCachedSessionInfo = exports.getSessionInfo = void 0;
4
- const embedConfig_1 = require("../embed/embedConfig");
5
- const authService_1 = require("./authService");
6
- let sessionInfo = null;
7
- /**
8
- * Returns the session info object and caches it for future use.
9
- * Once fetched the session info object is cached and returned from the cache on
10
- * subsequent calls.
11
- *
12
- * @example ```js
13
- * const sessionInfo = await getSessionInfo();
14
- * console.log(sessionInfo);
15
- * ```
16
- * @version SDK: 1.28.3 | ThoughtSpot: *
17
- * @returns {Promise<SessionInfo>} The session info object.
18
- */
19
- async function getSessionInfo() {
20
- if (!sessionInfo) {
21
- const host = (0, embedConfig_1.getEmbedConfig)().thoughtSpotHost;
22
- const sessionResponse = await (0, authService_1.fetchSessionInfoService)(host);
23
- const processedSessionInfo = (0, exports.getSessionDetails)(sessionResponse);
24
- sessionInfo = processedSessionInfo;
25
- }
26
- return sessionInfo;
27
- }
28
- exports.getSessionInfo = getSessionInfo;
29
- /**
30
- * Returns the cached session info object. If the client is not authenticated the
31
- * function will return null.
32
- *
33
- * @example ```js
34
- * const sessionInfo = getCachedSessionInfo();
35
- * if (sessionInfo) {
36
- * console.log(sessionInfo);
37
- * } else {
38
- * console.log('Not authenticated');
39
- * }
40
- * ```
41
- * @returns {SessionInfo | null} The session info object.
42
- * @version SDK: 1.28.3 | ThoughtSpot: *
43
- */
44
- function getCachedSessionInfo() {
45
- return sessionInfo;
46
- }
47
- exports.getCachedSessionInfo = getCachedSessionInfo;
48
- /**
49
- * Processes the session info response and returns the session info object.
50
- *
51
- * @param sessionInfoResp {any} Response from the session info API.
52
- * @returns {SessionInfo} The session info object.
53
- * @example ```js
54
- * const sessionInfoResp = await fetch(sessionInfoPath);
55
- * const sessionInfo = getSessionDetails(sessionInfoResp);
56
- * console.log(sessionInfo);
57
- * ```
58
- * @version SDK: 1.28.3 | ThoughtSpot: *
59
- */
60
- const getSessionDetails = (sessionInfoResp) => {
61
- const devMixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.devSdkKey;
62
- const prodMixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.prodSdkKey;
63
- const mixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.production
64
- ? prodMixpanelToken
65
- : devMixpanelToken;
66
- return {
67
- userGUID: sessionInfoResp.userGUID,
68
- mixpanelToken,
69
- isPublicUser: sessionInfoResp.configInfo.isPublicUser,
70
- releaseVersion: sessionInfoResp.releaseVersion,
71
- clusterId: sessionInfoResp.configInfo.selfClusterId,
72
- clusterName: sessionInfoResp.configInfo.selfClusterName,
73
- ...sessionInfoResp,
74
- };
75
- };
76
- exports.getSessionDetails = getSessionDetails;
77
- /**
78
- * Resets the cached session info object and forces a new fetch on the next call.
79
- *
80
- * @example ```js
81
- * resetCachedSessionInfo();
82
- * const sessionInfo = await getSessionInfo();
83
- * console.log(sessionInfo);
84
- * ```
85
- * @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
86
- * @returns {void}
87
- */
88
- function resetCachedSessionInfo() {
89
- sessionInfo = null;
90
- }
91
- exports.resetCachedSessionInfo = resetCachedSessionInfo;
92
- //# sourceMappingURL=sessionInfoService.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sessionInfoService.js","sourceRoot":"","sources":["../../../src/utils/sessionInfoService.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,+CAAwD;AAcxD,IAAI,WAAW,GAAuB,IAAI,CAAC;AAE3C;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,cAAc;IAChC,IAAI,CAAC,WAAW,EAAE;QACd,MAAM,IAAI,GAAG,IAAA,4BAAc,GAAE,CAAC,eAAe,CAAC;QAC9C,MAAM,eAAe,GAAG,MAAM,IAAA,qCAAuB,EAAC,IAAI,CAAC,CAAC;QAC5D,MAAM,oBAAoB,GAAG,IAAA,yBAAiB,EAAC,eAAe,CAAC,CAAC;QAChE,WAAW,GAAG,oBAAoB,CAAC;KACtC;IACD,OAAO,WAAW,CAAC;AACvB,CAAC;AARD,wCAQC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,oBAAoB;IAChC,OAAO,WAAW,CAAC;AACvB,CAAC;AAFD,oDAEC;AAED;;;;;;;;;;;GAWG;AACI,MAAM,iBAAiB,GAAG,CAAC,eAAoB,EAAe,EAAE;IACnE,MAAM,gBAAgB,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC;IAC7E,MAAM,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC;IAC/E,MAAM,aAAa,GAAG,eAAe,CAAC,UAAU,CAAC,cAAc,CAAC,UAAU;QACtE,CAAC,CAAC,iBAAiB;QACnB,CAAC,CAAC,gBAAgB,CAAC;IACvB,OAAO;QACH,QAAQ,EAAE,eAAe,CAAC,QAAQ;QAClC,aAAa;QACb,YAAY,EAAE,eAAe,CAAC,UAAU,CAAC,YAAY;QACrD,cAAc,EAAE,eAAe,CAAC,cAAc;QAC9C,SAAS,EAAE,eAAe,CAAC,UAAU,CAAC,aAAa;QACnD,WAAW,EAAE,eAAe,CAAC,UAAU,CAAC,eAAe;QACvD,GAAG,eAAe;KACrB,CAAC;AACN,CAAC,CAAC;AAfW,QAAA,iBAAiB,qBAe5B;AAEF;;;;;;;;;;GAUG;AACH,SAAgB,sBAAsB;IAClC,WAAW,GAAG,IAAI,CAAC;AACvB,CAAC;AAFD,wDAEC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tokenizedAuthService.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tokenizedAuthService.spec.d.ts","sourceRoot":"","sources":["tokenizedAuthService.spec.ts"],"names":[],"mappings":""}