@thoughtspot/visual-embed-sdk 1.42.3 → 1.43.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/cjs/package.json +1 -1
- package/cjs/src/api-intercept.d.ts +51 -0
- package/cjs/src/api-intercept.d.ts.map +1 -0
- package/cjs/src/api-intercept.js +180 -0
- package/cjs/src/api-intercept.js.map +1 -0
- package/cjs/src/api-intercept.spec.d.ts +2 -0
- package/cjs/src/api-intercept.spec.d.ts.map +1 -0
- package/cjs/src/api-intercept.spec.js +672 -0
- package/cjs/src/api-intercept.spec.js.map +1 -0
- package/cjs/src/css-variables.d.ts +4 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +0 -5
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -5
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -2
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +17 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +11 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -7
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -4
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +10 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +56 -15
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +412 -238
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +328 -103
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +265 -85
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/logger.d.ts.map +1 -1
- package/cjs/src/utils/logger.js +1 -2
- package/cjs/src/utils/logger.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/{index-SVcLgSqi.js → index-CpkMygsc.js} +1 -1
- package/dist/src/api-intercept.d.ts +51 -0
- package/dist/src/api-intercept.d.ts.map +1 -0
- package/dist/src/api-intercept.spec.d.ts +2 -0
- package/dist/src/api-intercept.spec.d.ts.map +1 -0
- package/dist/src/css-variables.d.ts +4 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +0 -5
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -2
- package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -7
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +10 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +328 -103
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +519 -133
- package/dist/tsembed-react.js +518 -132
- package/dist/tsembed.es.js +2642 -2256
- package/dist/tsembed.js +2640 -2254
- package/dist/visual-embed-sdk-react-full.d.ts +355 -118
- package/dist/visual-embed-sdk-react.d.ts +352 -118
- package/dist/visual-embed-sdk.d.ts +355 -118
- package/lib/package.json +1 -1
- package/lib/src/api-intercept.d.ts +51 -0
- package/lib/src/api-intercept.d.ts.map +1 -0
- package/lib/src/api-intercept.js +173 -0
- package/lib/src/api-intercept.js.map +1 -0
- package/lib/src/api-intercept.spec.d.ts +2 -0
- package/lib/src/api-intercept.spec.d.ts.map +1 -0
- package/lib/src/api-intercept.spec.js +669 -0
- package/lib/src/api-intercept.spec.js.map +1 -0
- package/lib/src/css-variables.d.ts +4 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +0 -5
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -5
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -2
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +17 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -7
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -4
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +10 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +56 -15
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +412 -238
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +328 -103
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +264 -84
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/logger.d.ts.map +1 -1
- package/lib/src/utils/logger.js +1 -2
- package/lib/src/utils/logger.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/package.json +1 -1
- package/src/api-intercept.spec.ts +856 -0
- package/src/api-intercept.ts +204 -0
- package/src/css-variables.ts +5 -0
- package/src/embed/app.spec.ts +11 -0
- package/src/embed/app.ts +5 -16
- package/src/embed/conversation.spec.ts +22 -0
- package/src/embed/conversation.ts +3 -3
- package/src/embed/hostEventClient/contracts.ts +10 -0
- package/src/embed/liveboard.spec.ts +12 -0
- package/src/embed/liveboard.ts +6 -2
- package/src/embed/search.ts +1 -14
- package/src/embed/ts-embed.spec.ts +498 -250
- package/src/embed/ts-embed.ts +80 -32
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +410 -179
- package/src/utils/logger.ts +1 -2
- package/src/utils/processData.spec.ts +0 -1
- package/src/utils/processData.ts +10 -11
package/src/types.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { SessionInterface } from './utils/graphql/answerService/answerServi
|
|
|
14
14
|
* the embedded app
|
|
15
15
|
* @group Authentication / Init
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
export enum AuthType {
|
|
19
19
|
/**
|
|
20
20
|
* No authentication on the SDK. Pass-through to the embedded App. Alias for
|
|
@@ -262,7 +262,7 @@ export interface customCssInterface {
|
|
|
262
262
|
* };
|
|
263
263
|
* ```
|
|
264
264
|
*/
|
|
265
|
-
|
|
265
|
+
|
|
266
266
|
rules_UNSTABLE?: {
|
|
267
267
|
[selector: string]: {
|
|
268
268
|
[declaration: string]: string;
|
|
@@ -681,12 +681,12 @@ export interface EmbedConfig {
|
|
|
681
681
|
* ... // other embed config options
|
|
682
682
|
* customActions: [
|
|
683
683
|
* {
|
|
684
|
-
* name: 'customAction',
|
|
684
|
+
* name: 'customAction',
|
|
685
685
|
* id: 'customAction',
|
|
686
686
|
* target: CustomActionTarget.VISUALIZATION,
|
|
687
687
|
* position: CustomActionPosition.PRIMARY,
|
|
688
688
|
* }
|
|
689
|
-
* }
|
|
689
|
+
* }
|
|
690
690
|
* ]
|
|
691
691
|
* })
|
|
692
692
|
* ```
|
|
@@ -708,7 +708,7 @@ export interface EmbedConfig {
|
|
|
708
708
|
}
|
|
709
709
|
|
|
710
710
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
711
|
-
export interface LayoutConfig {
|
|
711
|
+
export interface LayoutConfig {}
|
|
712
712
|
|
|
713
713
|
/**
|
|
714
714
|
* Embedded iframe configuration
|
|
@@ -739,7 +739,7 @@ export interface FrameParams {
|
|
|
739
739
|
/**
|
|
740
740
|
* The common configuration object for an embedded view.
|
|
741
741
|
*/
|
|
742
|
-
export interface BaseViewConfig {
|
|
742
|
+
export interface BaseViewConfig extends ApiInterceptFlags {
|
|
743
743
|
/**
|
|
744
744
|
* @hidden
|
|
745
745
|
*/
|
|
@@ -770,7 +770,7 @@ export interface BaseViewConfig {
|
|
|
770
770
|
/**
|
|
771
771
|
* @hidden
|
|
772
772
|
*/
|
|
773
|
-
|
|
773
|
+
|
|
774
774
|
styleSheet__unstable?: string;
|
|
775
775
|
/**
|
|
776
776
|
* The list of actions to disable from the primary menu, more menu
|
|
@@ -970,7 +970,7 @@ export interface BaseViewConfig {
|
|
|
970
970
|
* ```
|
|
971
971
|
* @version SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl
|
|
972
972
|
*/
|
|
973
|
-
|
|
973
|
+
|
|
974
974
|
enableV2Shell_experimental?: boolean;
|
|
975
975
|
/**
|
|
976
976
|
* For internal tracking of the embed component type.
|
|
@@ -1058,7 +1058,7 @@ export interface BaseViewConfig {
|
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Show alert messages and toast messages in the embed.
|
|
1060
1060
|
* Supported embed in all embed types.
|
|
1061
|
-
*
|
|
1061
|
+
*
|
|
1062
1062
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
1063
1063
|
* @example
|
|
1064
1064
|
* ```js
|
|
@@ -1075,7 +1075,7 @@ export interface BaseViewConfig {
|
|
|
1075
1075
|
* actions enable users to trigger custom workflows — such as navigating to an
|
|
1076
1076
|
* external app, calling an API, or opening a modal — based on the data context of
|
|
1077
1077
|
* what they clicked can be used to trigger custom logic when the action is clicked.
|
|
1078
|
-
*
|
|
1078
|
+
*
|
|
1079
1079
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SageEmbed`, `SearchEmbed`, `SpotterEmbed`
|
|
1080
1080
|
* @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
|
|
1081
1081
|
* @example
|
|
@@ -1086,12 +1086,12 @@ export interface BaseViewConfig {
|
|
|
1086
1086
|
* ... // other embed config options
|
|
1087
1087
|
* customActions: [
|
|
1088
1088
|
* {
|
|
1089
|
-
* name: 'customAction',
|
|
1089
|
+
* name: 'customAction',
|
|
1090
1090
|
* id: 'customAction',
|
|
1091
1091
|
* target: CustomActionTarget.VISUALIZATION,
|
|
1092
1092
|
* position: CustomActionPosition.PRIMARY,
|
|
1093
1093
|
* }
|
|
1094
|
-
* }
|
|
1094
|
+
* }
|
|
1095
1095
|
* ]
|
|
1096
1096
|
* })
|
|
1097
1097
|
* ```
|
|
@@ -1107,7 +1107,7 @@ export interface HomePageConfig {
|
|
|
1107
1107
|
* Hide list page columns
|
|
1108
1108
|
* For example: hiddenListColumns = [ListPageColumns.Author]
|
|
1109
1109
|
*
|
|
1110
|
-
* **Note**: This option is currently available only in full app embedding and requires importing the ListPageColumns enum.
|
|
1110
|
+
* **Note**: This option is currently available only in full app embedding and requires importing the ListPageColumns enum.
|
|
1111
1111
|
* At present, it can be used with Liveboard and Answer list pages, and starting with version 10.14.0.cl, it will also be supported for the Home page.
|
|
1112
1112
|
*
|
|
1113
1113
|
* Supported embed types: `AppEmbed`
|
|
@@ -1115,7 +1115,7 @@ export interface HomePageConfig {
|
|
|
1115
1115
|
* @example
|
|
1116
1116
|
* ```js
|
|
1117
1117
|
* import { ListPageColumns } from '@thoughtspot/visual-embed-sdk';
|
|
1118
|
-
*
|
|
1118
|
+
*
|
|
1119
1119
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
1120
1120
|
* ... //other embed view config
|
|
1121
1121
|
* hiddenListColumns : [ListPageColumns.Favorite,ListPageColumns.Author],
|
|
@@ -1137,7 +1137,7 @@ export interface HomePageConfig {
|
|
|
1137
1137
|
* @example
|
|
1138
1138
|
* ```js
|
|
1139
1139
|
* import { HomepageModule } from '@thoughtspot/visual-embed-sdk';
|
|
1140
|
-
*
|
|
1140
|
+
*
|
|
1141
1141
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
1142
1142
|
* ... //other embed view config
|
|
1143
1143
|
* hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning],
|
|
@@ -1159,7 +1159,7 @@ export interface HomePageConfig {
|
|
|
1159
1159
|
* @example
|
|
1160
1160
|
* ```js
|
|
1161
1161
|
* import { HomepageModule } from '@thoughtspot/visual-embed-sdk';
|
|
1162
|
-
*
|
|
1162
|
+
*
|
|
1163
1163
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
1164
1164
|
* ... //other embed view config
|
|
1165
1165
|
* reorderedHomepageModules:[HomepageModule.Favorite,HomepageModule.MyLibrary],
|
|
@@ -1176,7 +1176,7 @@ export interface HomePageConfig {
|
|
|
1176
1176
|
* @example
|
|
1177
1177
|
* ```js
|
|
1178
1178
|
* import { HomeLeftNavItem } from '@thoughtspot/visual-embed-sdk';
|
|
1179
|
-
*
|
|
1179
|
+
*
|
|
1180
1180
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
1181
1181
|
* ... //other embed view config
|
|
1182
1182
|
* hiddenHomeLeftNavItems : [HomeLeftNavItem.Home,HomeLeftNavItem.Answers],
|
|
@@ -1295,7 +1295,7 @@ export interface SearchLiveboardCommonViewConfig {
|
|
|
1295
1295
|
*
|
|
1296
1296
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
1297
1297
|
* @default true
|
|
1298
|
-
* @version SDK: 1.
|
|
1298
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
1299
1299
|
* @example
|
|
1300
1300
|
* ```js
|
|
1301
1301
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -1444,7 +1444,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1444
1444
|
showLiveboardVerifiedBadge?: boolean;
|
|
1445
1445
|
/**
|
|
1446
1446
|
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
1447
|
-
*
|
|
1447
|
+
*
|
|
1448
1448
|
* **Note**: This feature is supported only if compact header is enabled on your Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled` attribute.
|
|
1449
1449
|
*
|
|
1450
1450
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
@@ -1495,26 +1495,27 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1495
1495
|
*/
|
|
1496
1496
|
enableAskSage?: boolean;
|
|
1497
1497
|
/**
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1498
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
1499
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
1500
|
+
*
|
|
1501
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1502
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
1503
|
+
* @example
|
|
1504
|
+
* ```js
|
|
1505
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
1506
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
1507
|
+
* ... // other embed view config
|
|
1508
|
+
* coverAndFilterOptionInPDF: false,
|
|
1509
|
+
* })
|
|
1510
|
+
* ```
|
|
1511
|
+
*/
|
|
1512
1512
|
coverAndFilterOptionInPDF?: boolean;
|
|
1513
1513
|
/**
|
|
1514
1514
|
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
1515
|
+
* To enable this feature on your instance, contact ThoughtSpot Support.
|
|
1515
1516
|
*
|
|
1516
1517
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
1517
|
-
* @version SDK: 1.41.0 | ThoughtSpot:
|
|
1518
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 26.3.0.cl
|
|
1518
1519
|
* @example
|
|
1519
1520
|
* ```js
|
|
1520
1521
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -1576,7 +1577,11 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
1576
1577
|
isEnhancedFilterInteractivityEnabled?: boolean;
|
|
1577
1578
|
}
|
|
1578
1579
|
|
|
1579
|
-
export interface AllEmbedViewConfig
|
|
1580
|
+
export interface AllEmbedViewConfig
|
|
1581
|
+
extends BaseViewConfig,
|
|
1582
|
+
SearchLiveboardCommonViewConfig,
|
|
1583
|
+
HomePageConfig,
|
|
1584
|
+
LiveboardAppEmbedViewConfig {}
|
|
1580
1585
|
|
|
1581
1586
|
/**
|
|
1582
1587
|
* MessagePayload: Embed event payload: message type, data and status (start/end)
|
|
@@ -1637,7 +1642,7 @@ export type QueryParams = {
|
|
|
1637
1642
|
/**
|
|
1638
1643
|
* A map of the supported runtime filter operations
|
|
1639
1644
|
*/
|
|
1640
|
-
|
|
1645
|
+
|
|
1641
1646
|
export enum RuntimeFilterOp {
|
|
1642
1647
|
/**
|
|
1643
1648
|
* Equals
|
|
@@ -1708,7 +1713,7 @@ export enum RuntimeFilterOp {
|
|
|
1708
1713
|
* `modularHomeExperience` to `true` (available as Early Access feature in 9.12.5.cl).
|
|
1709
1714
|
* @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
|
|
1710
1715
|
*/
|
|
1711
|
-
|
|
1716
|
+
|
|
1712
1717
|
export enum HomepageModule {
|
|
1713
1718
|
/**
|
|
1714
1719
|
* Search bar
|
|
@@ -1741,7 +1746,7 @@ export enum HomepageModule {
|
|
|
1741
1746
|
* **Note**: This option is applicable to full app embedding only.
|
|
1742
1747
|
* @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
|
|
1743
1748
|
*/
|
|
1744
|
-
|
|
1749
|
+
|
|
1745
1750
|
export enum ListPageColumns {
|
|
1746
1751
|
/**
|
|
1747
1752
|
* Favourite
|
|
@@ -1839,7 +1844,7 @@ export interface RuntimeParameter {
|
|
|
1839
1844
|
* ```
|
|
1840
1845
|
* @group Events
|
|
1841
1846
|
*/
|
|
1842
|
-
|
|
1847
|
+
|
|
1843
1848
|
export enum EmbedEvent {
|
|
1844
1849
|
/**
|
|
1845
1850
|
* Rendering has initialized.
|
|
@@ -1881,7 +1886,7 @@ export enum EmbedEvent {
|
|
|
1881
1886
|
*/
|
|
1882
1887
|
Load = 'load',
|
|
1883
1888
|
/**
|
|
1884
|
-
* Data pertaining to an Answer or
|
|
1889
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
1885
1890
|
* The event payload includes the raw data of the object.
|
|
1886
1891
|
* @return data - Answer of Liveboard data
|
|
1887
1892
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -2302,6 +2307,17 @@ export enum EmbedEvent {
|
|
|
2302
2307
|
*```
|
|
2303
2308
|
*/
|
|
2304
2309
|
AnswerDelete = 'answerDelete',
|
|
2310
|
+
/**
|
|
2311
|
+
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
2312
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
2313
|
+
* @example
|
|
2314
|
+
*```js
|
|
2315
|
+
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
2316
|
+
* console.log('AI Highlights', payload);
|
|
2317
|
+
* })
|
|
2318
|
+
*```
|
|
2319
|
+
*/
|
|
2320
|
+
AIHighlights = 'AIHighlights',
|
|
2305
2321
|
/**
|
|
2306
2322
|
* Emitted when a user initiates the Pin action to
|
|
2307
2323
|
* add an Answer to a Liveboard.
|
|
@@ -2732,21 +2748,24 @@ export enum EmbedEvent {
|
|
|
2732
2748
|
|
|
2733
2749
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
2734
2750
|
* for this embed event to get emitted.
|
|
2735
|
-
* @param: payload
|
|
2736
|
-
* @param:
|
|
2751
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
2752
|
+
* @param:responder
|
|
2737
2753
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
2738
2754
|
* should run the search, and if not, what error message
|
|
2739
2755
|
* should be shown to the user.
|
|
2740
2756
|
*
|
|
2741
|
-
* execute
|
|
2757
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
2742
2758
|
* When execute returns `false`, the search will not be executed.
|
|
2743
2759
|
*
|
|
2744
|
-
* error
|
|
2745
|
-
*
|
|
2760
|
+
* `error` - Developers can customize the error message text when `execute`
|
|
2761
|
+
* is `false` using the `errorText` and `errorDescription` parameters in responder.
|
|
2762
|
+
*
|
|
2763
|
+
* `errorText` - The error message text to be shown to the user.
|
|
2764
|
+
* `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
|
|
2746
2765
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
2747
2766
|
* @example
|
|
2748
2767
|
*```js
|
|
2749
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2768
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2750
2769
|
* (payload, responder) => {
|
|
2751
2770
|
* responder({
|
|
2752
2771
|
* data: {
|
|
@@ -2762,7 +2781,7 @@ export enum EmbedEvent {
|
|
|
2762
2781
|
* ```
|
|
2763
2782
|
*
|
|
2764
2783
|
*```js
|
|
2765
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2784
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2766
2785
|
* (payload, responder) => {
|
|
2767
2786
|
* const query = payload.data.data.answer.search_query
|
|
2768
2787
|
* responder({
|
|
@@ -2773,7 +2792,8 @@ export enum EmbedEvent {
|
|
|
2773
2792
|
* error: {
|
|
2774
2793
|
* //Provide a custom error message to explain to your end user
|
|
2775
2794
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
2776
|
-
* errorText: "
|
|
2795
|
+
* errorText: "Error Occurred",
|
|
2796
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
2777
2797
|
* The 'sales' measures can never be used at the 'county' level.
|
|
2778
2798
|
* Please try another measure, or remove 'county' from your search."
|
|
2779
2799
|
* }
|
|
@@ -2837,17 +2857,17 @@ export enum EmbedEvent {
|
|
|
2837
2857
|
*/
|
|
2838
2858
|
TableVizRendered = 'TableVizRendered',
|
|
2839
2859
|
/**
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2860
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
2861
|
+
* You can use this event as a hook to trigger
|
|
2862
|
+
* other events on liveboard creation.
|
|
2863
|
+
*
|
|
2864
|
+
* ```js
|
|
2865
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
2866
|
+
* console.log('payload', payload);
|
|
2867
|
+
* })
|
|
2868
|
+
*```
|
|
2869
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
2870
|
+
*/
|
|
2851
2871
|
CreateLiveboard = 'createLiveboard',
|
|
2852
2872
|
/**
|
|
2853
2873
|
* Emitted when a user creates a Model.
|
|
@@ -2943,6 +2963,17 @@ export enum EmbedEvent {
|
|
|
2943
2963
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2944
2964
|
*/
|
|
2945
2965
|
SpotterInit = 'spotterInit',
|
|
2966
|
+
/**
|
|
2967
|
+
* Emitted when a *Spotter* conversation has been successfully created.
|
|
2968
|
+
* @example
|
|
2969
|
+
* ```js
|
|
2970
|
+
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
2971
|
+
* console.log('payload', payload);
|
|
2972
|
+
* })
|
|
2973
|
+
*```
|
|
2974
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
2975
|
+
*/
|
|
2976
|
+
SpotterLoadComplete = 'spotterLoadComplete',
|
|
2946
2977
|
/**
|
|
2947
2978
|
* @hidden
|
|
2948
2979
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -2966,6 +2997,72 @@ export enum EmbedEvent {
|
|
|
2966
2997
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2967
2998
|
*/
|
|
2968
2999
|
OrgSwitched = 'orgSwitched',
|
|
3000
|
+
/**
|
|
3001
|
+
* Emitted when the user intercepts a URL.
|
|
3002
|
+
*
|
|
3003
|
+
* Supported on all embed types.
|
|
3004
|
+
*
|
|
3005
|
+
* @example
|
|
3006
|
+
*
|
|
3007
|
+
* ```js
|
|
3008
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3009
|
+
* console.log('payload', payload);
|
|
3010
|
+
* responder({
|
|
3011
|
+
* data: {
|
|
3012
|
+
* execute: false,
|
|
3013
|
+
* error: {
|
|
3014
|
+
* errorText: 'Error Occurred',
|
|
3015
|
+
* }
|
|
3016
|
+
* }
|
|
3017
|
+
* })
|
|
3018
|
+
* })
|
|
3019
|
+
* ```
|
|
3020
|
+
*
|
|
3021
|
+
* ```js
|
|
3022
|
+
* // We can also send a response for the intercepted api
|
|
3023
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3024
|
+
* console.log('payload', payload);
|
|
3025
|
+
* responder({
|
|
3026
|
+
* data: {
|
|
3027
|
+
* execute: false,
|
|
3028
|
+
* response: {
|
|
3029
|
+
* body: {
|
|
3030
|
+
* data: {
|
|
3031
|
+
* // Some api response
|
|
3032
|
+
* },
|
|
3033
|
+
* }
|
|
3034
|
+
* }
|
|
3035
|
+
* }
|
|
3036
|
+
* })
|
|
3037
|
+
* })
|
|
3038
|
+
*
|
|
3039
|
+
* // here embed will use the response from the responder as the response for the api
|
|
3040
|
+
* ```
|
|
3041
|
+
*
|
|
3042
|
+
* ```js
|
|
3043
|
+
* // We can also send error in response for the intercepted api
|
|
3044
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3045
|
+
* console.log('payload', payload);
|
|
3046
|
+
* responder({
|
|
3047
|
+
* data: {
|
|
3048
|
+
* execute: false,
|
|
3049
|
+
* response: {
|
|
3050
|
+
* body: {
|
|
3051
|
+
* errors: [{
|
|
3052
|
+
* title: 'Error Occurred',
|
|
3053
|
+
* description: 'Error Description',
|
|
3054
|
+
* isUserError: true,
|
|
3055
|
+
* }],
|
|
3056
|
+
* data: {},
|
|
3057
|
+
* },
|
|
3058
|
+
* }
|
|
3059
|
+
* }
|
|
3060
|
+
* })
|
|
3061
|
+
* })
|
|
3062
|
+
* ```
|
|
3063
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
3064
|
+
*/
|
|
3065
|
+
ApiIntercept = 'ApiIntercept',
|
|
2969
3066
|
}
|
|
2970
3067
|
|
|
2971
3068
|
/**
|
|
@@ -3021,7 +3118,7 @@ export enum EmbedEvent {
|
|
|
3021
3118
|
* ```
|
|
3022
3119
|
* @group Events
|
|
3023
3120
|
*/
|
|
3024
|
-
|
|
3121
|
+
|
|
3025
3122
|
export enum HostEvent {
|
|
3026
3123
|
/**
|
|
3027
3124
|
* Triggers a search operation with the search tokens specified in
|
|
@@ -3253,7 +3350,7 @@ export enum HostEvent {
|
|
|
3253
3350
|
* the following parameters:
|
|
3254
3351
|
*
|
|
3255
3352
|
* @param
|
|
3256
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
3353
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
3257
3354
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
3258
3355
|
* **Required** in Spotter Embed.
|
|
3259
3356
|
* @param
|
|
@@ -3305,10 +3402,16 @@ export enum HostEvent {
|
|
|
3305
3402
|
* ```
|
|
3306
3403
|
* @example
|
|
3307
3404
|
* ```js
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3405
|
+
|
|
3406
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
3407
|
+
* let latestSpotterVizId = '';
|
|
3408
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3409
|
+
* latestSpotterVizId = payload.data.id;
|
|
3410
|
+
* });
|
|
3411
|
+
*
|
|
3412
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
3413
|
+
* ```
|
|
3414
|
+
*
|
|
3312
3415
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3313
3416
|
*/
|
|
3314
3417
|
Pin = 'pin',
|
|
@@ -3383,14 +3486,29 @@ export enum HostEvent {
|
|
|
3383
3486
|
* ```
|
|
3384
3487
|
* @example
|
|
3385
3488
|
* ```js
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3489
|
+
|
|
3490
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
3491
|
+
* let latestSpotterVizId = '';
|
|
3492
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3493
|
+
* latestSpotterVizId = payload.data.id;
|
|
3494
|
+
* });
|
|
3495
|
+
*
|
|
3496
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
3497
|
+
* ```
|
|
3390
3498
|
*
|
|
3391
3499
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3392
3500
|
*/
|
|
3393
3501
|
DownloadAsPdf = 'downloadAsPdf',
|
|
3502
|
+
/**
|
|
3503
|
+
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
3504
|
+
*
|
|
3505
|
+
* @example
|
|
3506
|
+
* ```js
|
|
3507
|
+
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
3508
|
+
* ```
|
|
3509
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
3510
|
+
*/
|
|
3511
|
+
AIHighlights = 'AIHighlights',
|
|
3394
3512
|
/**
|
|
3395
3513
|
* Trigger the **Make a copy** action on a Liveboard,
|
|
3396
3514
|
* visualization, or Answer page.
|
|
@@ -3413,9 +3531,13 @@ export enum HostEvent {
|
|
|
3413
3531
|
* ```
|
|
3414
3532
|
* @example
|
|
3415
3533
|
* ```js
|
|
3416
|
-
*
|
|
3417
|
-
*
|
|
3418
|
-
*
|
|
3534
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
3535
|
+
* let latestSpotterVizId = '';
|
|
3536
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3537
|
+
* latestSpotterVizId = payload.data.id;
|
|
3538
|
+
* });
|
|
3539
|
+
*
|
|
3540
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
3419
3541
|
* ```
|
|
3420
3542
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3421
3543
|
*/
|
|
@@ -3490,7 +3612,7 @@ export enum HostEvent {
|
|
|
3490
3612
|
* @param - object - To trigger the action for a specific visualization
|
|
3491
3613
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
3492
3614
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3493
|
-
*
|
|
3615
|
+
*
|
|
3494
3616
|
* @example
|
|
3495
3617
|
* ```js
|
|
3496
3618
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -3501,15 +3623,7 @@ export enum HostEvent {
|
|
|
3501
3623
|
* ```
|
|
3502
3624
|
* @example
|
|
3503
3625
|
* ```js
|
|
3504
|
-
*
|
|
3505
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
3506
|
-
* });
|
|
3507
|
-
* ```
|
|
3508
|
-
* @example
|
|
3509
|
-
* ```js
|
|
3510
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
3511
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
3512
|
-
* });
|
|
3626
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
3513
3627
|
* ```
|
|
3514
3628
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3515
3629
|
*/
|
|
@@ -3558,16 +3672,23 @@ export enum HostEvent {
|
|
|
3558
3672
|
* );
|
|
3559
3673
|
* })
|
|
3560
3674
|
* ```
|
|
3561
|
-
* @example
|
|
3675
|
+
* * @example
|
|
3562
3676
|
* ```js
|
|
3563
|
-
|
|
3564
|
-
|
|
3677
|
+
|
|
3678
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
3679
|
+
* let latestSpotterVizId = '';
|
|
3680
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3681
|
+
* latestSpotterVizId = payload.data.id;
|
|
3682
|
+
* });
|
|
3683
|
+
*
|
|
3684
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
3685
|
+
* vizId: latestSpotterVizId
|
|
3565
3686
|
* }).then((tml) => {
|
|
3566
3687
|
* console.log(
|
|
3567
3688
|
* tml.answer.search_query // TML representation of the search query
|
|
3568
3689
|
* );
|
|
3569
3690
|
* })
|
|
3570
|
-
|
|
3691
|
+
* ```
|
|
3571
3692
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
3572
3693
|
* @important
|
|
3573
3694
|
*/
|
|
@@ -3631,7 +3752,7 @@ export enum HostEvent {
|
|
|
3631
3752
|
/**
|
|
3632
3753
|
* Trigger the **Download** action on charts in
|
|
3633
3754
|
* the embedded view.
|
|
3634
|
-
* @param - `vizId` refers to the
|
|
3755
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
3635
3756
|
* @example
|
|
3636
3757
|
* ```js
|
|
3637
3758
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -3641,9 +3762,13 @@ export enum HostEvent {
|
|
|
3641
3762
|
* embed.trigger(HostEvent.Download)
|
|
3642
3763
|
* ```
|
|
3643
3764
|
* ```js
|
|
3644
|
-
*
|
|
3645
|
-
*
|
|
3646
|
-
*
|
|
3765
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
3766
|
+
* let latestSpotterVizId = '';
|
|
3767
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3768
|
+
* latestSpotterVizId = payload.data.id;
|
|
3769
|
+
* });
|
|
3770
|
+
*
|
|
3771
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
3647
3772
|
* ```
|
|
3648
3773
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
3649
3774
|
* Use {@link DownloadAsPng}
|
|
@@ -3661,19 +3786,23 @@ export enum HostEvent {
|
|
|
3661
3786
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
3662
3787
|
*
|
|
3663
3788
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
3664
|
-
*
|
|
3665
|
-
*
|
|
3666
|
-
*
|
|
3667
|
-
*
|
|
3789
|
+
*
|
|
3790
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
3791
|
+
* let latestSpotterVizId = '';
|
|
3792
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3793
|
+
* latestSpotterVizId = payload.data.id;
|
|
3794
|
+
* });
|
|
3795
|
+
*
|
|
3796
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
3668
3797
|
* ```
|
|
3669
|
-
*
|
|
3798
|
+
*
|
|
3670
3799
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
3671
3800
|
*/
|
|
3672
3801
|
DownloadAsPng = 'downloadAsPng',
|
|
3673
3802
|
/**
|
|
3674
3803
|
* Trigger the **Download** > **CSV** action on tables in
|
|
3675
3804
|
* the embedded view.
|
|
3676
|
-
* @param - `vizId` refers to the
|
|
3805
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
3677
3806
|
* @example
|
|
3678
3807
|
* ```js
|
|
3679
3808
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -3686,9 +3815,13 @@ export enum HostEvent {
|
|
|
3686
3815
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
3687
3816
|
* ```
|
|
3688
3817
|
* ```js
|
|
3689
|
-
*
|
|
3690
|
-
*
|
|
3691
|
-
*
|
|
3818
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
3819
|
+
* let latestSpotterVizId = '';
|
|
3820
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3821
|
+
* latestSpotterVizId = payload.data.id;
|
|
3822
|
+
* });
|
|
3823
|
+
*
|
|
3824
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
3692
3825
|
* ```
|
|
3693
3826
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3694
3827
|
*/
|
|
@@ -3696,7 +3829,7 @@ export enum HostEvent {
|
|
|
3696
3829
|
/**
|
|
3697
3830
|
* Trigger the **Download** > **XLSX** action on tables
|
|
3698
3831
|
* in the embedded view.
|
|
3699
|
-
* @param - `vizId` refers to the
|
|
3832
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
3700
3833
|
* @example
|
|
3701
3834
|
* ```js
|
|
3702
3835
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -3709,9 +3842,13 @@ export enum HostEvent {
|
|
|
3709
3842
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
3710
3843
|
* ```
|
|
3711
3844
|
* ```js
|
|
3712
|
-
*
|
|
3713
|
-
*
|
|
3714
|
-
*
|
|
3845
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
3846
|
+
* let latestSpotterVizId = '';
|
|
3847
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3848
|
+
* latestSpotterVizId = payload.data.id;
|
|
3849
|
+
* });
|
|
3850
|
+
*
|
|
3851
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
3715
3852
|
* ```
|
|
3716
3853
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3717
3854
|
*/
|
|
@@ -3729,45 +3866,45 @@ export enum HostEvent {
|
|
|
3729
3866
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3730
3867
|
*/
|
|
3731
3868
|
Share = 'share',
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3869
|
+
/**
|
|
3870
|
+
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
3871
|
+
* Saves the changes.
|
|
3872
|
+
*
|
|
3873
|
+
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
3874
|
+
* It is required and can be retrieved from the data embed event.
|
|
3875
|
+
*
|
|
3876
|
+
* @example
|
|
3877
|
+
* ```js
|
|
3878
|
+
* // Save changes in a Liveboard
|
|
3879
|
+
* liveboardEmbed.trigger(HostEvent.Save)
|
|
3880
|
+
* ```
|
|
3881
|
+
*
|
|
3882
|
+
* ```js
|
|
3883
|
+
* // Save the current Answer in Search embed
|
|
3884
|
+
* searchEmbed.trigger(HostEvent.Save)
|
|
3885
|
+
* ```
|
|
3886
|
+
*
|
|
3887
|
+
* ```js
|
|
3888
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
3889
|
+
* spotterEmbed.trigger(HostEvent.Save, {
|
|
3890
|
+
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
3891
|
+
* })
|
|
3892
|
+
* ```
|
|
3893
|
+
*
|
|
3894
|
+
* ```js
|
|
3895
|
+
* // How to get the vizId in Spotter?
|
|
3896
|
+
*
|
|
3897
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId.
|
|
3898
|
+
* let latestSpotterVizId = '';
|
|
3899
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
3900
|
+
* latestSpotterVizId = payload.data.id;
|
|
3901
|
+
* });
|
|
3902
|
+
*
|
|
3903
|
+
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
3904
|
+
* ```
|
|
3905
|
+
*
|
|
3906
|
+
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3907
|
+
*/
|
|
3771
3908
|
Save = 'save',
|
|
3772
3909
|
/**
|
|
3773
3910
|
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
@@ -4049,15 +4186,21 @@ export enum HostEvent {
|
|
|
4049
4186
|
ResetLiveboardPersonalisedView = 'ResetLiveboardPersonalisedView',
|
|
4050
4187
|
/**
|
|
4051
4188
|
* Triggers an action to update Parameter values on embedded
|
|
4052
|
-
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
4189
|
+
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
4190
|
+
* @param - `name` - Name of the Parameter
|
|
4191
|
+
* @param - `value` - The value to set for the Parameter.
|
|
4192
|
+
*
|
|
4193
|
+
* Optionally, to control the visibility of the Parameter chip,
|
|
4194
|
+
* use the `isVisibleToUser` attribute when applying an override.
|
|
4053
4195
|
*
|
|
4054
4196
|
* @example
|
|
4055
4197
|
* ```js
|
|
4056
4198
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
4057
|
-
*
|
|
4058
|
-
*
|
|
4199
|
+
* name: "Integer Range Param",
|
|
4200
|
+
* value: 10,
|
|
4201
|
+
* isVisibleToUser: false
|
|
4059
4202
|
* }])
|
|
4060
|
-
*
|
|
4203
|
+
* ```
|
|
4061
4204
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4062
4205
|
*/
|
|
4063
4206
|
UpdateParameters = 'UpdateParameters',
|
|
@@ -4070,11 +4213,13 @@ export enum HostEvent {
|
|
|
4070
4213
|
* });
|
|
4071
4214
|
*```
|
|
4072
4215
|
*```js
|
|
4073
|
-
*
|
|
4074
|
-
*
|
|
4075
|
-
*
|
|
4076
|
-
*
|
|
4216
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
4217
|
+
* let latestSpotterVizId = '';
|
|
4218
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4219
|
+
* latestSpotterVizId = payload.data.id;
|
|
4077
4220
|
* });
|
|
4221
|
+
*
|
|
4222
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4078
4223
|
*```
|
|
4079
4224
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4080
4225
|
*/
|
|
@@ -4104,10 +4249,11 @@ export enum HostEvent {
|
|
|
4104
4249
|
* If no parameters are specified, the save action is
|
|
4105
4250
|
* triggered with a modal to prompt users to
|
|
4106
4251
|
* add a name and description for the Answer.
|
|
4107
|
-
* @param -
|
|
4108
|
-
*
|
|
4109
|
-
*
|
|
4110
|
-
* @param - `
|
|
4252
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed
|
|
4253
|
+
* and is required in Spotter embed.
|
|
4254
|
+
* Optional attributes to set Answer properties include:
|
|
4255
|
+
* @param - `name` - Name string for the Answer.
|
|
4256
|
+
* @param - `description` - Description text for the Answer.
|
|
4111
4257
|
* @example
|
|
4112
4258
|
* ```js
|
|
4113
4259
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -4117,11 +4263,13 @@ export enum HostEvent {
|
|
|
4117
4263
|
* ```
|
|
4118
4264
|
* @example
|
|
4119
4265
|
* ```js
|
|
4120
|
-
*
|
|
4121
|
-
*
|
|
4122
|
-
*
|
|
4123
|
-
*
|
|
4266
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
4267
|
+
* let latestSpotterVizId = '';
|
|
4268
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4269
|
+
* latestSpotterVizId = payload.data.id;
|
|
4124
4270
|
* });
|
|
4271
|
+
*
|
|
4272
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4125
4273
|
* ```
|
|
4126
4274
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4127
4275
|
*/
|
|
@@ -4205,12 +4353,15 @@ export enum HostEvent {
|
|
|
4205
4353
|
DeleteLastPrompt = 'DeleteLastPrompt',
|
|
4206
4354
|
/**
|
|
4207
4355
|
* Toggle the visualization to chart or table view.
|
|
4208
|
-
* @param - `vizId ` refers to the
|
|
4356
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
4209
4357
|
* @example
|
|
4210
4358
|
* ```js
|
|
4211
|
-
*
|
|
4212
|
-
*
|
|
4359
|
+
* let latestSpotterVizId = '';
|
|
4360
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4361
|
+
* latestSpotterVizId = payload.data.id;
|
|
4213
4362
|
* });
|
|
4363
|
+
*
|
|
4364
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
4214
4365
|
*```
|
|
4215
4366
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4216
4367
|
*/
|
|
@@ -4239,12 +4390,16 @@ export enum HostEvent {
|
|
|
4239
4390
|
*/
|
|
4240
4391
|
VisibleEmbedCoordinates = 'visibleEmbedCoordinates',
|
|
4241
4392
|
/**
|
|
4242
|
-
* Trigger the *
|
|
4243
|
-
* @param - `vizId` refers to the
|
|
4393
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
4394
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
4244
4395
|
* @example
|
|
4245
4396
|
* ```js
|
|
4246
|
-
*
|
|
4247
|
-
* {
|
|
4397
|
+
* let latestSpotterVizId = '';
|
|
4398
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4399
|
+
* latestSpotterVizId = payload.data.id;
|
|
4400
|
+
* });
|
|
4401
|
+
*
|
|
4402
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
4248
4403
|
* ```
|
|
4249
4404
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4250
4405
|
*/
|
|
@@ -4253,7 +4408,7 @@ export enum HostEvent {
|
|
|
4253
4408
|
/**
|
|
4254
4409
|
* @hidden
|
|
4255
4410
|
* Triggers the update of the embed params.
|
|
4256
|
-
*
|
|
4411
|
+
*
|
|
4257
4412
|
* @example
|
|
4258
4413
|
* ```js
|
|
4259
4414
|
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
@@ -4269,13 +4424,25 @@ export enum HostEvent {
|
|
|
4269
4424
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4270
4425
|
*/
|
|
4271
4426
|
DestroyEmbed = 'EmbedDestroyed',
|
|
4427
|
+
/** Triggers a create new conversation operation in spotter embed.
|
|
4428
|
+
* @example
|
|
4429
|
+
* ```js
|
|
4430
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot instance.
|
|
4431
|
+
* Contact your admin or ThoughtSpot Support to enable chat history on your instance.
|
|
4432
|
+
* @example
|
|
4433
|
+
* ```js
|
|
4434
|
+
* spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
|
|
4435
|
+
* ```
|
|
4436
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
4437
|
+
*/
|
|
4438
|
+
StartNewSpotterConversation = 'StartNewSpotterConversation',
|
|
4272
4439
|
}
|
|
4273
4440
|
|
|
4274
4441
|
/**
|
|
4275
4442
|
* The different visual modes that the data sources panel within
|
|
4276
4443
|
* search could appear in, such as hidden, collapsed, or expanded.
|
|
4277
4444
|
*/
|
|
4278
|
-
|
|
4445
|
+
|
|
4279
4446
|
export enum DataSourceVisualMode {
|
|
4280
4447
|
/**
|
|
4281
4448
|
* The data source panel is hidden.
|
|
@@ -4295,7 +4462,7 @@ export enum DataSourceVisualMode {
|
|
|
4295
4462
|
* The query params passed down to the embedded ThoughtSpot app
|
|
4296
4463
|
* containing configuration and/or visual information.
|
|
4297
4464
|
*/
|
|
4298
|
-
|
|
4465
|
+
|
|
4299
4466
|
export enum Param {
|
|
4300
4467
|
EmbedApp = 'embedApp',
|
|
4301
4468
|
DataSources = 'dataSources',
|
|
@@ -4452,7 +4619,7 @@ export enum Param {
|
|
|
4452
4619
|
* ```
|
|
4453
4620
|
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
4454
4621
|
*/
|
|
4455
|
-
|
|
4622
|
+
|
|
4456
4623
|
export enum Action {
|
|
4457
4624
|
/**
|
|
4458
4625
|
* The **Save** action on an Answer or Liveboard.
|
|
@@ -5786,15 +5953,15 @@ export interface ColumnValue {
|
|
|
5786
5953
|
[key: string]: any;
|
|
5787
5954
|
};
|
|
5788
5955
|
value:
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5956
|
+
| string
|
|
5957
|
+
| number
|
|
5958
|
+
| boolean
|
|
5959
|
+
| {
|
|
5960
|
+
v: {
|
|
5961
|
+
s: number;
|
|
5962
|
+
e: number;
|
|
5963
|
+
};
|
|
5964
|
+
};
|
|
5798
5965
|
}
|
|
5799
5966
|
|
|
5800
5967
|
export interface VizPoint {
|
|
@@ -5839,7 +6006,7 @@ export interface CustomAction {
|
|
|
5839
6006
|
dataModelIds?: {
|
|
5840
6007
|
modelIds?: string[];
|
|
5841
6008
|
modelColumnNames?: string[];
|
|
5842
|
-
}
|
|
6009
|
+
};
|
|
5843
6010
|
orgIds?: string[];
|
|
5844
6011
|
groupIds?: string[];
|
|
5845
6012
|
}
|
|
@@ -5962,4 +6129,68 @@ export interface DefaultAppInitData {
|
|
|
5962
6129
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
5963
6130
|
hiddenListColumns: ListPageColumns[];
|
|
5964
6131
|
customActions: CustomAction[];
|
|
6132
|
+
interceptTimeout: number | undefined;
|
|
6133
|
+
interceptUrls: (string | InterceptedApiType)[];
|
|
6134
|
+
}
|
|
6135
|
+
|
|
6136
|
+
/**
|
|
6137
|
+
* Enum for the type of API intercepted
|
|
6138
|
+
*/
|
|
6139
|
+
export enum InterceptedApiType {
|
|
6140
|
+
/**
|
|
6141
|
+
* The apis that are use to get the data for the embed
|
|
6142
|
+
*/
|
|
6143
|
+
AnswerData = 'AnswerData',
|
|
6144
|
+
/**
|
|
6145
|
+
* This will intercept all the apis
|
|
6146
|
+
*/
|
|
6147
|
+
ALL = 'ALL',
|
|
6148
|
+
/**
|
|
6149
|
+
* The apis that are use to get the data for the liveboard
|
|
6150
|
+
*/
|
|
6151
|
+
LiveboardData = 'LiveboardData',
|
|
5965
6152
|
}
|
|
6153
|
+
|
|
6154
|
+
export type ApiInterceptFlags = {
|
|
6155
|
+
/**
|
|
6156
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
6157
|
+
*
|
|
6158
|
+
* Can be used for Serach and App Embed from SDK 1.29.0
|
|
6159
|
+
*
|
|
6160
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6161
|
+
*/
|
|
6162
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
6163
|
+
/**
|
|
6164
|
+
* This allows to intercept the urls passed, once intercepted the api will only
|
|
6165
|
+
* run based on the reponse from the responder of ApiIntercept event.
|
|
6166
|
+
*
|
|
6167
|
+
* @example
|
|
6168
|
+
* ```js
|
|
6169
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6170
|
+
* ...viewConfig,
|
|
6171
|
+
* enableApiIntercept: true,
|
|
6172
|
+
* interceptUrls: [InterceptedApiType.DATA],
|
|
6173
|
+
* })
|
|
6174
|
+
* ```
|
|
6175
|
+
*
|
|
6176
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6177
|
+
*/
|
|
6178
|
+
interceptUrls?: (string | InterceptedApiType)[];
|
|
6179
|
+
/**
|
|
6180
|
+
* The timeout for the intercept, default is 30000ms
|
|
6181
|
+
* the api will error out if the timeout is reached
|
|
6182
|
+
*
|
|
6183
|
+
* @example
|
|
6184
|
+
* ```js
|
|
6185
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6186
|
+
* ...viewConfig,
|
|
6187
|
+
* enableApiIntercept: true,
|
|
6188
|
+
* interceptUrls: [InterceptedApiType.ALL],
|
|
6189
|
+
* interceptTimeout: 1000,
|
|
6190
|
+
* })
|
|
6191
|
+
* ```
|
|
6192
|
+
*
|
|
6193
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6194
|
+
*/
|
|
6195
|
+
interceptTimeout?: number;
|
|
6196
|
+
};
|