@thoughtspot/visual-embed-sdk 1.28.5-alpha-1 → 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.
- package/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -2
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts +1 -1
- package/cjs/src/authToken.js +1 -1
- package/cjs/src/authToken.spec.d.ts +2 -0
- package/cjs/src/authToken.spec.d.ts.map +1 -0
- package/cjs/src/authToken.spec.js +29 -0
- package/cjs/src/authToken.spec.js.map +1 -0
- package/cjs/src/embed/app.d.ts +6 -12
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +2 -2
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +6 -6
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -8
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/search.d.ts +5 -11
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -4
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +6 -6
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +18 -9
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/react/index.spec.js +12 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +84 -57
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +77 -47
- package/cjs/src/types.js.map +1 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +1 -1
- package/dist/src/authToken.spec.d.ts +2 -0
- package/dist/src/authToken.spec.d.ts.map +1 -0
- package/dist/src/embed/app.d.ts +6 -12
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -8
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +5 -11
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/types.d.ts +84 -57
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1507 -1477
- package/dist/tsembed-react.js +2294 -2264
- package/dist/tsembed.es.js +1893 -1863
- package/dist/tsembed.js +15477 -15447
- package/dist/visual-embed-sdk-react-full.d.ts +96 -87
- package/dist/visual-embed-sdk-react.d.ts +96 -87
- package/dist/visual-embed-sdk.d.ts +96 -87
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +3 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts +1 -1
- package/lib/src/authToken.js +1 -1
- package/lib/src/authToken.spec.d.ts +2 -0
- package/lib/src/authToken.spec.d.ts.map +1 -0
- package/lib/src/authToken.spec.js +26 -0
- package/lib/src/authToken.spec.js.map +1 -0
- package/lib/src/embed/app.d.ts +6 -12
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +2 -2
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +5 -5
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +2 -2
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -8
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +1 -1
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/search.d.ts +5 -11
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +5 -5
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +9 -9
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +18 -9
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/react/index.spec.js +12 -0
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +84 -57
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +77 -47
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/authService.spec.js +1 -1
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +100 -91
- package/package.json +1 -1
- package/src/auth.ts +6 -6
- package/src/authToken.spec.ts +31 -0
- package/src/authToken.ts +1 -1
- package/src/embed/app.ts +8 -19
- package/src/embed/base.spec.ts +3 -3
- package/src/embed/base.ts +14 -14
- package/src/embed/liveboard.ts +3 -16
- package/src/embed/search.ts +10 -19
- package/src/embed/ts-embed.spec.ts +34 -26
- package/src/embed/ts-embed.ts +39 -43
- package/src/react/index.spec.tsx +29 -0
- package/src/types.ts +85 -57
- package/src/utils/authService/authService.spec.ts +4 -4
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +0 -32
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/cjs/src/utils/sessionInfoService.d.ts +0 -66
- package/cjs/src/utils/sessionInfoService.d.ts.map +0 -1
- package/cjs/src/utils/sessionInfoService.js +0 -92
- package/cjs/src/utils/sessionInfoService.js.map +0 -1
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/dist/src/utils/sessionInfoService.d.ts +0 -66
- package/dist/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +0 -2
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +0 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +0 -29
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +0 -1
- package/lib/src/utils/sessionInfoService.d.ts +0 -66
- package/lib/src/utils/sessionInfoService.d.ts.map +0 -1
- package/lib/src/utils/sessionInfoService.js +0 -85
- package/lib/src/utils/sessionInfoService.js.map +0 -1
package/src/types.ts
CHANGED
|
@@ -146,6 +146,7 @@ export enum AuthType {
|
|
|
146
146
|
* .then((data) => data.token);
|
|
147
147
|
* }
|
|
148
148
|
* });
|
|
149
|
+
* });
|
|
149
150
|
* ```
|
|
150
151
|
*/
|
|
151
152
|
TrustedAuthToken = 'AuthServer',
|
|
@@ -495,6 +496,7 @@ export interface EmbedConfig {
|
|
|
495
496
|
* @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
|
|
496
497
|
*/
|
|
497
498
|
suppressSearchEmbedBetaWarning?: boolean;
|
|
499
|
+
|
|
498
500
|
/**
|
|
499
501
|
* Hide `beta` alert warning message for SageEmbed.
|
|
500
502
|
*
|
|
@@ -673,7 +675,6 @@ export interface ViewConfig {
|
|
|
673
675
|
* object inside your app. Specify the values in pixels or percentage.
|
|
674
676
|
*
|
|
675
677
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
676
|
-
*
|
|
677
678
|
* @example
|
|
678
679
|
* ```js
|
|
679
680
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -713,6 +714,7 @@ export interface ViewConfig {
|
|
|
713
714
|
disabledActions?: Action[];
|
|
714
715
|
/**
|
|
715
716
|
* The tooltip to display for disabled actions.
|
|
717
|
+
*
|
|
716
718
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
717
719
|
* @example
|
|
718
720
|
* ```js
|
|
@@ -730,7 +732,6 @@ export interface ViewConfig {
|
|
|
730
732
|
* Use this to hide an action.
|
|
731
733
|
*
|
|
732
734
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
733
|
-
*
|
|
734
735
|
* @example
|
|
735
736
|
* ```js
|
|
736
737
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -751,7 +752,6 @@ export interface ViewConfig {
|
|
|
751
752
|
*
|
|
752
753
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
753
754
|
* @important
|
|
754
|
-
*
|
|
755
755
|
* @example
|
|
756
756
|
* ```js
|
|
757
757
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -765,7 +765,6 @@ export interface ViewConfig {
|
|
|
765
765
|
* Show alert messages and toast messages in the embedded view.
|
|
766
766
|
*
|
|
767
767
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
768
|
-
*
|
|
769
768
|
* @example
|
|
770
769
|
* ```js
|
|
771
770
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -780,7 +779,6 @@ export interface ViewConfig {
|
|
|
780
779
|
* visualization, or Liveboard.
|
|
781
780
|
*
|
|
782
781
|
* @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
|
|
783
|
-
*
|
|
784
782
|
* @example
|
|
785
783
|
* ```js
|
|
786
784
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -801,7 +799,6 @@ export interface ViewConfig {
|
|
|
801
799
|
* visualization, or Liveboard.
|
|
802
800
|
*
|
|
803
801
|
* @version SDK : 1.25.0 | Thoughtspot: 9.2.0.cl, 9.5.0.sw
|
|
804
|
-
*
|
|
805
802
|
* @example
|
|
806
803
|
* ```js
|
|
807
804
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -836,6 +833,7 @@ export interface ViewConfig {
|
|
|
836
833
|
* Warning: This option is for advanced use only and is used internally
|
|
837
834
|
* to control embed behavior in non-regular ways. We do not publish the
|
|
838
835
|
* list of supported keys and values associated with each.
|
|
836
|
+
*
|
|
839
837
|
* @example
|
|
840
838
|
* ```js
|
|
841
839
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -862,7 +860,6 @@ export interface ViewConfig {
|
|
|
862
860
|
* child inside it.
|
|
863
861
|
*
|
|
864
862
|
* @version SDK: 1.2.0 | Thoughtspot: 9.0.0.cl, 9.0.0.sw
|
|
865
|
-
*
|
|
866
863
|
* @example
|
|
867
864
|
* ```js
|
|
868
865
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -948,6 +945,8 @@ export interface ViewConfig {
|
|
|
948
945
|
* Hide the home page modules
|
|
949
946
|
* For example: hiddenHomepageModules = [HomepageModule.MyLibrary]
|
|
950
947
|
*
|
|
948
|
+
*
|
|
949
|
+
*
|
|
951
950
|
* **Note**: This option does not apply to the classic homepage.
|
|
952
951
|
* To access the updated modular homepage, set
|
|
953
952
|
* `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
|
|
@@ -960,13 +959,13 @@ export interface ViewConfig {
|
|
|
960
959
|
* hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning],
|
|
961
960
|
* })
|
|
962
961
|
* ```
|
|
963
|
-
*
|
|
964
962
|
*/
|
|
965
963
|
hiddenHomepageModules?: HomepageModule[];
|
|
966
964
|
/**
|
|
967
965
|
* reordering the home page modules
|
|
968
966
|
* eg: reorderedHomepageModules = [HomepageModule.MyLibrary, HomepageModule.Watchlist]
|
|
969
967
|
*
|
|
968
|
+
*
|
|
970
969
|
* **Note**: This option does not apply to the classic homepage.
|
|
971
970
|
* To access the updated modular homepage, set
|
|
972
971
|
* `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
|
|
@@ -989,7 +988,6 @@ export interface ViewConfig {
|
|
|
989
988
|
* Use either `visibleTabs` or `hiddenTabs`.
|
|
990
989
|
*
|
|
991
990
|
* @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
|
|
992
|
-
*
|
|
993
991
|
* @example
|
|
994
992
|
* ```js
|
|
995
993
|
* const embed = new LiveboardEmbed('#embed-container', {
|
|
@@ -1015,6 +1013,8 @@ export interface ViewConfig {
|
|
|
1015
1013
|
* })
|
|
1016
1014
|
* ```
|
|
1017
1015
|
*
|
|
1016
|
+
*
|
|
1017
|
+
*
|
|
1018
1018
|
* **Note**: This option does not apply to the classic homepage.
|
|
1019
1019
|
* To access the updated modular homepage, set
|
|
1020
1020
|
* `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
|
|
@@ -1048,7 +1048,6 @@ export interface ViewConfig {
|
|
|
1048
1048
|
* @type {boolean}
|
|
1049
1049
|
* @default false
|
|
1050
1050
|
* @version SDK: 1.24.0 | ThoughtSpot:9.4.0.cl, 9.4.0.sw
|
|
1051
|
-
*
|
|
1052
1051
|
* @example
|
|
1053
1052
|
* ```js
|
|
1054
1053
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -1301,6 +1300,8 @@ export enum EmbedEvent {
|
|
|
1301
1300
|
/**
|
|
1302
1301
|
* Authentication has either succeeded or failed.
|
|
1303
1302
|
*
|
|
1303
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1304
|
+
*
|
|
1304
1305
|
* @example
|
|
1305
1306
|
*```js
|
|
1306
1307
|
* appEmbed.on(EmbedEvent.AuthInit, payload => {
|
|
@@ -1314,6 +1315,8 @@ export enum EmbedEvent {
|
|
|
1314
1315
|
* The embed object container has loaded.
|
|
1315
1316
|
*
|
|
1316
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
|
|
1317
1320
|
* @example
|
|
1318
1321
|
*```js
|
|
1319
1322
|
* liveboardEmbed.on(EmbedEvent.Load, hideLoader)
|
|
@@ -1328,6 +1331,8 @@ export enum EmbedEvent {
|
|
|
1328
1331
|
* Data pertaining to answer or Liveboard is received
|
|
1329
1332
|
*
|
|
1330
1333
|
* @return data - The answer or Liveboard data
|
|
1334
|
+
*
|
|
1335
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1331
1336
|
* @example
|
|
1332
1337
|
*```js
|
|
1333
1338
|
* liveboardEmbed.on(EmbedEvent.Data, payload => {
|
|
@@ -1346,6 +1351,7 @@ export enum EmbedEvent {
|
|
|
1346
1351
|
/**
|
|
1347
1352
|
* Search query has been updated by the user.
|
|
1348
1353
|
*
|
|
1354
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
1349
1355
|
* @example
|
|
1350
1356
|
*```js
|
|
1351
1357
|
* searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
|
|
@@ -1355,12 +1361,14 @@ export enum EmbedEvent {
|
|
|
1355
1361
|
/**
|
|
1356
1362
|
* A drill-down operation has been performed.
|
|
1357
1363
|
*
|
|
1364
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1365
|
+
*
|
|
1358
1366
|
* @returns additionalFilters - Any additional filters applied
|
|
1359
1367
|
* @returns drillDownColumns - The columns on which drill down was performed
|
|
1360
1368
|
* @returns nonFilteredColumns - The columns that were not filtered
|
|
1361
1369
|
* @example
|
|
1362
1370
|
*```js
|
|
1363
|
-
* searchEmbed.
|
|
1371
|
+
* searchEmbed.on(EmbedEvent.DrillDown, {
|
|
1364
1372
|
* points: {
|
|
1365
1373
|
* clickedPoint,
|
|
1366
1374
|
* selectedPoints: selectedPoint
|
|
@@ -1393,6 +1401,8 @@ export enum EmbedEvent {
|
|
|
1393
1401
|
* One or more data sources have been selected.
|
|
1394
1402
|
*
|
|
1395
1403
|
* @returns dataSourceIds - the list of data sources
|
|
1404
|
+
*
|
|
1405
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1396
1406
|
* @example
|
|
1397
1407
|
* ```js
|
|
1398
1408
|
* searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
|
|
@@ -1420,6 +1430,8 @@ export enum EmbedEvent {
|
|
|
1420
1430
|
* @returns actionId - ID of the custom action
|
|
1421
1431
|
* @returns payload {@link CustomActionPayload} - Response payload with the
|
|
1422
1432
|
* Answer or Liveboard data
|
|
1433
|
+
*
|
|
1434
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1423
1435
|
* @example
|
|
1424
1436
|
* ```js
|
|
1425
1437
|
* appEmbed.on(EmbedEvent.customAction, payload => {
|
|
@@ -1467,21 +1479,23 @@ export enum EmbedEvent {
|
|
|
1467
1479
|
/**
|
|
1468
1480
|
* An error has occurred. This event is fired for the following error types:
|
|
1469
1481
|
*
|
|
1470
|
-
*
|
|
1482
|
+
* `API`: API call failure error.
|
|
1471
1483
|
*
|
|
1472
|
-
*
|
|
1484
|
+
* `FULLSCREEN`: Error when presenting a Liveboard or visualization in full screen mode.
|
|
1473
1485
|
*
|
|
1474
|
-
*
|
|
1486
|
+
* `SINGLE_VALUE_FILTER`: Error due to multiple values in the single value filter.
|
|
1475
1487
|
*
|
|
1476
|
-
*
|
|
1488
|
+
* `NON_EXIST_FILTER`: Error due to a non-existent filter.
|
|
1477
1489
|
*
|
|
1478
|
-
*
|
|
1490
|
+
* `INVALID_DATE_VALUE`: Invalid date value error.
|
|
1479
1491
|
*
|
|
1480
|
-
*
|
|
1492
|
+
* `INVALID_OPERATOR`: Use of invalid operator during filter application.
|
|
1481
1493
|
*
|
|
1482
|
-
* For more information, see
|
|
1494
|
+
* For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType.
|
|
1483
1495
|
*
|
|
1484
1496
|
* @returns error - An error object or message
|
|
1497
|
+
*
|
|
1498
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1485
1499
|
* @example
|
|
1486
1500
|
* ```js
|
|
1487
1501
|
* // API error
|
|
@@ -1507,6 +1521,9 @@ export enum EmbedEvent {
|
|
|
1507
1521
|
* The embedded object has sent an alert.
|
|
1508
1522
|
*
|
|
1509
1523
|
* @returns alert - An alert object
|
|
1524
|
+
*
|
|
1525
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
1526
|
+
*
|
|
1510
1527
|
* @example
|
|
1511
1528
|
* ```js
|
|
1512
1529
|
* searchEmbed.on(EmbedEvent.Alert)
|
|
@@ -1516,6 +1533,8 @@ export enum EmbedEvent {
|
|
|
1516
1533
|
/**
|
|
1517
1534
|
* The ThoughtSpot auth session has expired.
|
|
1518
1535
|
*
|
|
1536
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
|
|
1537
|
+
*
|
|
1519
1538
|
* @example
|
|
1520
1539
|
*```js
|
|
1521
1540
|
* appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
|
|
@@ -1569,6 +1588,7 @@ export enum EmbedEvent {
|
|
|
1569
1588
|
/**
|
|
1570
1589
|
* Detects the route change.
|
|
1571
1590
|
*
|
|
1591
|
+
* @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
|
|
1572
1592
|
* @example
|
|
1573
1593
|
*```js
|
|
1574
1594
|
* searchEmbed.on(EmbedEvent.RouteChange, payload =>
|
|
@@ -1585,7 +1605,7 @@ export enum EmbedEvent {
|
|
|
1585
1605
|
/**
|
|
1586
1606
|
* Emitted when the embed does not have cookie access. This happens
|
|
1587
1607
|
* when Safari and other Web browsers block third-party cookies
|
|
1588
|
-
* are blocked by default.
|
|
1608
|
+
* are blocked by default.
|
|
1589
1609
|
*
|
|
1590
1610
|
* @example
|
|
1591
1611
|
*```js
|
|
@@ -1628,7 +1648,7 @@ export enum EmbedEvent {
|
|
|
1628
1648
|
/**
|
|
1629
1649
|
* Emitted when the Liveboard shell loads.
|
|
1630
1650
|
* You can use this event as a hook to trigger
|
|
1631
|
-
*
|
|
1651
|
+
* actions on the rendered Liveboard.
|
|
1632
1652
|
*
|
|
1633
1653
|
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
1634
1654
|
* @example
|
|
@@ -1649,8 +1669,7 @@ export enum EmbedEvent {
|
|
|
1649
1669
|
*/
|
|
1650
1670
|
LiveboardRendered = 'PinboardRendered',
|
|
1651
1671
|
/**
|
|
1652
|
-
*
|
|
1653
|
-
* is triggered on all events.
|
|
1672
|
+
* Emits all events.
|
|
1654
1673
|
*
|
|
1655
1674
|
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
|
|
1656
1675
|
* @example
|
|
@@ -1667,13 +1686,13 @@ export enum EmbedEvent {
|
|
|
1667
1686
|
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1668
1687
|
* @example
|
|
1669
1688
|
*```js
|
|
1670
|
-
* //
|
|
1689
|
+
* //Emit when action starts
|
|
1671
1690
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1672
1691
|
* console.log('Save', payload)
|
|
1673
1692
|
* }, {
|
|
1674
1693
|
* start: true
|
|
1675
1694
|
* })
|
|
1676
|
-
* //
|
|
1695
|
+
* //emit when action ends
|
|
1677
1696
|
* searchEmbed.on(EmbedEvent.Save, payload => {
|
|
1678
1697
|
* console.log('Save', payload)
|
|
1679
1698
|
* })
|
|
@@ -1683,7 +1702,7 @@ export enum EmbedEvent {
|
|
|
1683
1702
|
/**
|
|
1684
1703
|
* Emitted when the download action is triggered on an answer
|
|
1685
1704
|
*
|
|
1686
|
-
*
|
|
1705
|
+
* **Note**: This event is deprecated in v1.21.0.
|
|
1687
1706
|
* To fire an event when a download action is initiated on a chart or table,
|
|
1688
1707
|
* use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
|
|
1689
1708
|
* or `EmbedEvent.DownloadAsXLSX`
|
|
@@ -1691,7 +1710,7 @@ export enum EmbedEvent {
|
|
|
1691
1710
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1692
1711
|
* @example
|
|
1693
1712
|
*```js
|
|
1694
|
-
* liveboardEmbed.
|
|
1713
|
+
* liveboardEmbed.on(EmbedEvent.Download, {
|
|
1695
1714
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
1696
1715
|
* })
|
|
1697
1716
|
*```
|
|
@@ -1703,10 +1722,10 @@ export enum EmbedEvent {
|
|
|
1703
1722
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
1704
1723
|
* @example
|
|
1705
1724
|
*```js
|
|
1706
|
-
* //
|
|
1725
|
+
* //emit when action starts
|
|
1707
1726
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1708
1727
|
* console.log('download PNG', payload)}, {start: true })
|
|
1709
|
-
* //
|
|
1728
|
+
* //emit when action ends
|
|
1710
1729
|
* searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
|
|
1711
1730
|
* console.log('download PNG', payload)})
|
|
1712
1731
|
*```
|
|
@@ -1718,10 +1737,10 @@ export enum EmbedEvent {
|
|
|
1718
1737
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1719
1738
|
* @example
|
|
1720
1739
|
*```js
|
|
1721
|
-
* //
|
|
1740
|
+
* //emit when action starts
|
|
1722
1741
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1723
1742
|
* console.log('download PDF', payload)}, {start: true })
|
|
1724
|
-
* //
|
|
1743
|
+
* //emit when action ends
|
|
1725
1744
|
* searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
|
|
1726
1745
|
* console.log('download PDF', payload)})
|
|
1727
1746
|
*```
|
|
@@ -1733,10 +1752,10 @@ export enum EmbedEvent {
|
|
|
1733
1752
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1734
1753
|
* @example
|
|
1735
1754
|
*```js
|
|
1736
|
-
* //
|
|
1755
|
+
* //emit when action starts
|
|
1737
1756
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1738
1757
|
* console.log('download CSV', payload)}, {start: true })
|
|
1739
|
-
* //
|
|
1758
|
+
* //emit when action ends
|
|
1740
1759
|
* searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
|
|
1741
1760
|
* console.log('download CSV', payload)})
|
|
1742
1761
|
*```
|
|
@@ -1748,10 +1767,10 @@ export enum EmbedEvent {
|
|
|
1748
1767
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1749
1768
|
* @example
|
|
1750
1769
|
*```js
|
|
1751
|
-
* //
|
|
1770
|
+
* //emit when action starts
|
|
1752
1771
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1753
1772
|
* console.log('download Xlsx', payload)}, { start: true })
|
|
1754
|
-
* //
|
|
1773
|
+
* //emit when action ends
|
|
1755
1774
|
* searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
|
|
1756
1775
|
* console.log('download Xlsx', payload)})
|
|
1757
1776
|
*```
|
|
@@ -1763,10 +1782,10 @@ export enum EmbedEvent {
|
|
|
1763
1782
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1764
1783
|
* @example
|
|
1765
1784
|
*```js
|
|
1766
|
-
* //
|
|
1785
|
+
* //emit when action starts
|
|
1767
1786
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1768
1787
|
* console.log('delete answer', payload)}, {start: true })
|
|
1769
|
-
* //
|
|
1788
|
+
* //emit when action is completed
|
|
1770
1789
|
* appEmbed.on(EmbedEvent.AnswerDelete, payload => {
|
|
1771
1790
|
* console.log('delete answer', payload)})
|
|
1772
1791
|
*```
|
|
@@ -1778,13 +1797,13 @@ export enum EmbedEvent {
|
|
|
1778
1797
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1779
1798
|
* @example
|
|
1780
1799
|
*```js
|
|
1781
|
-
* //
|
|
1800
|
+
* //emit when action starts
|
|
1782
1801
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1783
1802
|
* console.log('pin', payload)
|
|
1784
1803
|
* }, {
|
|
1785
1804
|
* start: true
|
|
1786
1805
|
* })
|
|
1787
|
-
* //
|
|
1806
|
+
* //emit when action ends
|
|
1788
1807
|
* searchEmbed.on(EmbedEvent.Pin, payload => {
|
|
1789
1808
|
* console.log('pin', payload)
|
|
1790
1809
|
* })
|
|
@@ -1797,13 +1816,13 @@ export enum EmbedEvent {
|
|
|
1797
1816
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1798
1817
|
* @example
|
|
1799
1818
|
*```js
|
|
1800
|
-
* //
|
|
1819
|
+
* //emit when action starts
|
|
1801
1820
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1802
1821
|
* console.log('SpotIQAnalyze', payload)
|
|
1803
1822
|
* }, {
|
|
1804
1823
|
* start: true
|
|
1805
1824
|
* })
|
|
1806
|
-
* //
|
|
1825
|
+
* //emit when action ends
|
|
1807
1826
|
* searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
|
|
1808
1827
|
* console.log('SpotIQ analyze', payload)
|
|
1809
1828
|
* })
|
|
@@ -1816,13 +1835,13 @@ export enum EmbedEvent {
|
|
|
1816
1835
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1817
1836
|
* @example
|
|
1818
1837
|
*```js
|
|
1819
|
-
* //
|
|
1838
|
+
* //emit when action starts
|
|
1820
1839
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1821
1840
|
* console.log('Share', payload)
|
|
1822
1841
|
* }, {
|
|
1823
1842
|
* start: true
|
|
1824
1843
|
* })
|
|
1825
|
-
* //
|
|
1844
|
+
* //emit when action ends
|
|
1826
1845
|
* searchEmbed.on(EmbedEvent.Share, payload => {
|
|
1827
1846
|
* console.log('Share', payload)
|
|
1828
1847
|
* })
|
|
@@ -1897,10 +1916,10 @@ export enum EmbedEvent {
|
|
|
1897
1916
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1898
1917
|
* @example
|
|
1899
1918
|
*```js
|
|
1900
|
-
* //
|
|
1919
|
+
* //emit when action starts
|
|
1901
1920
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1902
1921
|
* console.log('Export TML', payload)}, { start: true })
|
|
1903
|
-
* //
|
|
1922
|
+
* //emit when action ends
|
|
1904
1923
|
* searchEmbed.on(EmbedEvent.ExportTML, payload => {
|
|
1905
1924
|
* console.log('Export TML', payload)})
|
|
1906
1925
|
*```
|
|
@@ -1924,10 +1943,10 @@ export enum EmbedEvent {
|
|
|
1924
1943
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1925
1944
|
* @example
|
|
1926
1945
|
*```js
|
|
1927
|
-
* //
|
|
1946
|
+
* //emit when action starts
|
|
1928
1947
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1929
1948
|
* console.log('Copy and edit', payload)}, {start: true })
|
|
1930
|
-
* //
|
|
1949
|
+
* //emit when action ends
|
|
1931
1950
|
* appEmbed.on(EmbedEvent.CopyAEdit, payload => {
|
|
1932
1951
|
* console.log('Copy and edit', payload)})
|
|
1933
1952
|
*```
|
|
@@ -2029,7 +2048,7 @@ export enum EmbedEvent {
|
|
|
2029
2048
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2030
2049
|
* @example
|
|
2031
2050
|
*```js
|
|
2032
|
-
* liveboardEmbed.
|
|
2051
|
+
* liveboardEmbed.on(EmbedEvent.Present)
|
|
2033
2052
|
*```
|
|
2034
2053
|
* @example
|
|
2035
2054
|
*```js
|
|
@@ -2045,7 +2064,7 @@ export enum EmbedEvent {
|
|
|
2045
2064
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2046
2065
|
* @example
|
|
2047
2066
|
*```js
|
|
2048
|
-
* liveboardEmbed.
|
|
2067
|
+
* liveboardEmbed.on(EmbedEvent.Delete,
|
|
2049
2068
|
* {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2050
2069
|
*```
|
|
2051
2070
|
*/
|
|
@@ -2056,7 +2075,7 @@ export enum EmbedEvent {
|
|
|
2056
2075
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2057
2076
|
* @example
|
|
2058
2077
|
*```js
|
|
2059
|
-
* liveboardEmbed.
|
|
2078
|
+
* liveboardEmbed.on(EmbedEvent.SchedulesList)
|
|
2060
2079
|
*```
|
|
2061
2080
|
*/
|
|
2062
2081
|
SchedulesList = 'schedule-list',
|
|
@@ -2066,7 +2085,7 @@ export enum EmbedEvent {
|
|
|
2066
2085
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2067
2086
|
* @example
|
|
2068
2087
|
*```js
|
|
2069
|
-
* liveboardEmbed.
|
|
2088
|
+
* liveboardEmbed.on(EmbedEvent.Cancel)
|
|
2070
2089
|
*```
|
|
2071
2090
|
*/
|
|
2072
2091
|
Cancel = 'cancel',
|
|
@@ -2076,7 +2095,7 @@ export enum EmbedEvent {
|
|
|
2076
2095
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2077
2096
|
* @example
|
|
2078
2097
|
*```js
|
|
2079
|
-
* liveboardEmbed.
|
|
2098
|
+
* liveboardEmbed.on(EmbedEvent.Explore, {
|
|
2080
2099
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2081
2100
|
*```
|
|
2082
2101
|
*/
|
|
@@ -2087,7 +2106,7 @@ export enum EmbedEvent {
|
|
|
2087
2106
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
2088
2107
|
* @example
|
|
2089
2108
|
*```js
|
|
2090
|
-
* liveboardEmbed.
|
|
2109
|
+
* liveboardEmbed.on(EmbedEvent.CopyLink, {
|
|
2091
2110
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2092
2111
|
*```
|
|
2093
2112
|
*/
|
|
@@ -2098,7 +2117,7 @@ export enum EmbedEvent {
|
|
|
2098
2117
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
|
|
2099
2118
|
* @example
|
|
2100
2119
|
*```js
|
|
2101
|
-
* liveboardEmbed.
|
|
2120
|
+
* liveboardEmbed.on(EmbedEvent.CrossFilterChanged, {
|
|
2102
2121
|
* vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
2103
2122
|
*```
|
|
2104
2123
|
*/
|
|
@@ -2122,9 +2141,18 @@ export enum EmbedEvent {
|
|
|
2122
2141
|
*/
|
|
2123
2142
|
InsertIntoSlide = 'insertInToSlide',
|
|
2124
2143
|
/**
|
|
2125
|
-
* @hidden
|
|
2126
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
|
+
*
|
|
2127
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
|
+
*```
|
|
2128
2156
|
*/
|
|
2129
2157
|
FilterChanged = 'filterChanged',
|
|
2130
2158
|
/**
|
|
@@ -2661,7 +2689,7 @@ export enum HostEvent {
|
|
|
2661
2689
|
* ```js
|
|
2662
2690
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
2663
2691
|
* console.log(
|
|
2664
|
-
* tml.search_query // TML representation of the search query
|
|
2692
|
+
* tml.answer.search_query // TML representation of the search query
|
|
2665
2693
|
* );
|
|
2666
2694
|
* })
|
|
2667
2695
|
* ```
|
|
@@ -2904,7 +2932,7 @@ export enum HostEvent {
|
|
|
2904
2932
|
*
|
|
2905
2933
|
* ```js
|
|
2906
2934
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
2907
|
-
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]
|
|
2935
|
+
* filter: { column: 'column name', oper: 'IN', values: [1,2,3]}
|
|
2908
2936
|
* })
|
|
2909
2937
|
* ```
|
|
2910
2938
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
@@ -4051,7 +4079,7 @@ export enum Action {
|
|
|
4051
4079
|
* disabledActions: [Action.TML] // to disable all TML actions
|
|
4052
4080
|
* ```
|
|
4053
4081
|
*
|
|
4054
|
-
* @version SDK : 1.28.
|
|
4082
|
+
* @version SDK : 1.28.3 | Thoughtspot: 9.12.0.cl
|
|
4055
4083
|
*/
|
|
4056
4084
|
TML = 'tml',
|
|
4057
4085
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
EndPoints,
|
|
3
|
+
fetchAuthPostService,
|
|
4
4
|
fetchAuthService,
|
|
5
|
+
fetchAuthTokenService,
|
|
5
6
|
fetchBasicAuthService,
|
|
6
|
-
|
|
7
|
+
fetchSessionInfoService,
|
|
7
8
|
verifyTokenService,
|
|
8
|
-
EndPoints,
|
|
9
9
|
} from '.';
|
|
10
10
|
import { logger } from '../logger';
|
|
11
11
|
|
|
@@ -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"}
|