@thoughtspot/visual-embed-sdk 1.43.0 → 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 +244 -88
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +181 -70
- 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-HZ94j9Ey.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 +244 -88
- 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 +435 -118
- package/dist/tsembed-react.js +434 -117
- package/dist/tsembed.es.js +3577 -3260
- package/dist/tsembed.js +3575 -3258
- package/dist/visual-embed-sdk-react-full.d.ts +271 -103
- package/dist/visual-embed-sdk-react.d.ts +268 -103
- package/dist/visual-embed-sdk.d.ts +271 -103
- 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 +244 -88
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +180 -69
- 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 +327 -165
- 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.
|
|
@@ -2743,21 +2748,24 @@ export enum EmbedEvent {
|
|
|
2743
2748
|
|
|
2744
2749
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
2745
2750
|
* for this embed event to get emitted.
|
|
2746
|
-
* @param: payload
|
|
2747
|
-
* @param:
|
|
2751
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
2752
|
+
* @param:responder
|
|
2748
2753
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
2749
2754
|
* should run the search, and if not, what error message
|
|
2750
2755
|
* should be shown to the user.
|
|
2751
2756
|
*
|
|
2752
|
-
* execute
|
|
2757
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
2753
2758
|
* When execute returns `false`, the search will not be executed.
|
|
2754
2759
|
*
|
|
2755
|
-
* error
|
|
2756
|
-
*
|
|
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.
|
|
2757
2765
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
2758
2766
|
* @example
|
|
2759
2767
|
*```js
|
|
2760
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2768
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2761
2769
|
* (payload, responder) => {
|
|
2762
2770
|
* responder({
|
|
2763
2771
|
* data: {
|
|
@@ -2773,7 +2781,7 @@ export enum EmbedEvent {
|
|
|
2773
2781
|
* ```
|
|
2774
2782
|
*
|
|
2775
2783
|
*```js
|
|
2776
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2784
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
2777
2785
|
* (payload, responder) => {
|
|
2778
2786
|
* const query = payload.data.data.answer.search_query
|
|
2779
2787
|
* responder({
|
|
@@ -2784,7 +2792,8 @@ export enum EmbedEvent {
|
|
|
2784
2792
|
* error: {
|
|
2785
2793
|
* //Provide a custom error message to explain to your end user
|
|
2786
2794
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
2787
|
-
* errorText: "
|
|
2795
|
+
* errorText: "Error Occurred",
|
|
2796
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
2788
2797
|
* The 'sales' measures can never be used at the 'county' level.
|
|
2789
2798
|
* Please try another measure, or remove 'county' from your search."
|
|
2790
2799
|
* }
|
|
@@ -2848,17 +2857,17 @@ export enum EmbedEvent {
|
|
|
2848
2857
|
*/
|
|
2849
2858
|
TableVizRendered = 'TableVizRendered',
|
|
2850
2859
|
/**
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
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
|
+
*/
|
|
2862
2871
|
CreateLiveboard = 'createLiveboard',
|
|
2863
2872
|
/**
|
|
2864
2873
|
* Emitted when a user creates a Model.
|
|
@@ -2954,6 +2963,17 @@ export enum EmbedEvent {
|
|
|
2954
2963
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2955
2964
|
*/
|
|
2956
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',
|
|
2957
2977
|
/**
|
|
2958
2978
|
* @hidden
|
|
2959
2979
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -2977,6 +2997,72 @@ export enum EmbedEvent {
|
|
|
2977
2997
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
2978
2998
|
*/
|
|
2979
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',
|
|
2980
3066
|
}
|
|
2981
3067
|
|
|
2982
3068
|
/**
|
|
@@ -3032,7 +3118,7 @@ export enum EmbedEvent {
|
|
|
3032
3118
|
* ```
|
|
3033
3119
|
* @group Events
|
|
3034
3120
|
*/
|
|
3035
|
-
|
|
3121
|
+
|
|
3036
3122
|
export enum HostEvent {
|
|
3037
3123
|
/**
|
|
3038
3124
|
* Triggers a search operation with the search tokens specified in
|
|
@@ -3445,14 +3531,14 @@ export enum HostEvent {
|
|
|
3445
3531
|
* ```
|
|
3446
3532
|
* @example
|
|
3447
3533
|
* ```js
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
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 });
|
|
3541
|
+
* ```
|
|
3456
3542
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3457
3543
|
*/
|
|
3458
3544
|
MakeACopy = 'makeACopy',
|
|
@@ -3526,7 +3612,7 @@ export enum HostEvent {
|
|
|
3526
3612
|
* @param - object - To trigger the action for a specific visualization
|
|
3527
3613
|
* in Liveboard embed, pass in `vizId` as a key.
|
|
3528
3614
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
3529
|
-
*
|
|
3615
|
+
*
|
|
3530
3616
|
* @example
|
|
3531
3617
|
* ```js
|
|
3532
3618
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
@@ -3676,14 +3762,14 @@ export enum HostEvent {
|
|
|
3676
3762
|
* embed.trigger(HostEvent.Download)
|
|
3677
3763
|
* ```
|
|
3678
3764
|
* ```js
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
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 });
|
|
3772
|
+
* ```
|
|
3687
3773
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
3688
3774
|
* Use {@link DownloadAsPng}
|
|
3689
3775
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
@@ -3700,16 +3786,16 @@ export enum HostEvent {
|
|
|
3700
3786
|
* vizEmbed.trigger(HostEvent.DownloadAsPng)
|
|
3701
3787
|
*
|
|
3702
3788
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
3703
|
-
*
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
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 });
|
|
3711
3797
|
* ```
|
|
3712
|
-
*
|
|
3798
|
+
*
|
|
3713
3799
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
3714
3800
|
*/
|
|
3715
3801
|
DownloadAsPng = 'downloadAsPng',
|
|
@@ -3729,13 +3815,13 @@ export enum HostEvent {
|
|
|
3729
3815
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
3730
3816
|
* ```
|
|
3731
3817
|
* ```js
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
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 });
|
|
3739
3825
|
* ```
|
|
3740
3826
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3741
3827
|
*/
|
|
@@ -3756,13 +3842,13 @@ export enum HostEvent {
|
|
|
3756
3842
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
3757
3843
|
* ```
|
|
3758
3844
|
* ```js
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
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 });
|
|
3766
3852
|
* ```
|
|
3767
3853
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3768
3854
|
*/
|
|
@@ -3780,45 +3866,45 @@ export enum HostEvent {
|
|
|
3780
3866
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
3781
3867
|
*/
|
|
3782
3868
|
Share = 'share',
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
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
|
+
*/
|
|
3822
3908
|
Save = 'save',
|
|
3823
3909
|
/**
|
|
3824
3910
|
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
@@ -4127,13 +4213,13 @@ export enum HostEvent {
|
|
|
4127
4213
|
* });
|
|
4128
4214
|
*```
|
|
4129
4215
|
*```js
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
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;
|
|
4220
|
+
* });
|
|
4221
|
+
*
|
|
4222
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4137
4223
|
*```
|
|
4138
4224
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4139
4225
|
*/
|
|
@@ -4182,8 +4268,8 @@ export enum HostEvent {
|
|
|
4182
4268
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4183
4269
|
* latestSpotterVizId = payload.data.id;
|
|
4184
4270
|
* });
|
|
4185
|
-
|
|
4186
|
-
|
|
4271
|
+
*
|
|
4272
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4187
4273
|
* ```
|
|
4188
4274
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4189
4275
|
*/
|
|
@@ -4274,8 +4360,8 @@ export enum HostEvent {
|
|
|
4274
4360
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4275
4361
|
* latestSpotterVizId = payload.data.id;
|
|
4276
4362
|
* });
|
|
4277
|
-
|
|
4278
|
-
|
|
4363
|
+
*
|
|
4364
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
4279
4365
|
*```
|
|
4280
4366
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4281
4367
|
*/
|
|
@@ -4312,8 +4398,8 @@ export enum HostEvent {
|
|
|
4312
4398
|
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4313
4399
|
* latestSpotterVizId = payload.data.id;
|
|
4314
4400
|
* });
|
|
4315
|
-
|
|
4316
|
-
|
|
4401
|
+
*
|
|
4402
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
4317
4403
|
* ```
|
|
4318
4404
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4319
4405
|
*/
|
|
@@ -4322,7 +4408,7 @@ export enum HostEvent {
|
|
|
4322
4408
|
/**
|
|
4323
4409
|
* @hidden
|
|
4324
4410
|
* Triggers the update of the embed params.
|
|
4325
|
-
*
|
|
4411
|
+
*
|
|
4326
4412
|
* @example
|
|
4327
4413
|
* ```js
|
|
4328
4414
|
* liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig);
|
|
@@ -4338,13 +4424,25 @@ export enum HostEvent {
|
|
|
4338
4424
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4339
4425
|
*/
|
|
4340
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',
|
|
4341
4439
|
}
|
|
4342
4440
|
|
|
4343
4441
|
/**
|
|
4344
4442
|
* The different visual modes that the data sources panel within
|
|
4345
4443
|
* search could appear in, such as hidden, collapsed, or expanded.
|
|
4346
4444
|
*/
|
|
4347
|
-
|
|
4445
|
+
|
|
4348
4446
|
export enum DataSourceVisualMode {
|
|
4349
4447
|
/**
|
|
4350
4448
|
* The data source panel is hidden.
|
|
@@ -4364,7 +4462,7 @@ export enum DataSourceVisualMode {
|
|
|
4364
4462
|
* The query params passed down to the embedded ThoughtSpot app
|
|
4365
4463
|
* containing configuration and/or visual information.
|
|
4366
4464
|
*/
|
|
4367
|
-
|
|
4465
|
+
|
|
4368
4466
|
export enum Param {
|
|
4369
4467
|
EmbedApp = 'embedApp',
|
|
4370
4468
|
DataSources = 'dataSources',
|
|
@@ -4521,7 +4619,7 @@ export enum Param {
|
|
|
4521
4619
|
* ```
|
|
4522
4620
|
* See also link:https://developers.thoughtspot.com/docs/actions[Action IDs in the SDK]
|
|
4523
4621
|
*/
|
|
4524
|
-
|
|
4622
|
+
|
|
4525
4623
|
export enum Action {
|
|
4526
4624
|
/**
|
|
4527
4625
|
* The **Save** action on an Answer or Liveboard.
|
|
@@ -5855,15 +5953,15 @@ export interface ColumnValue {
|
|
|
5855
5953
|
[key: string]: any;
|
|
5856
5954
|
};
|
|
5857
5955
|
value:
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5956
|
+
| string
|
|
5957
|
+
| number
|
|
5958
|
+
| boolean
|
|
5959
|
+
| {
|
|
5960
|
+
v: {
|
|
5961
|
+
s: number;
|
|
5962
|
+
e: number;
|
|
5963
|
+
};
|
|
5964
|
+
};
|
|
5867
5965
|
}
|
|
5868
5966
|
|
|
5869
5967
|
export interface VizPoint {
|
|
@@ -5908,7 +6006,7 @@ export interface CustomAction {
|
|
|
5908
6006
|
dataModelIds?: {
|
|
5909
6007
|
modelIds?: string[];
|
|
5910
6008
|
modelColumnNames?: string[];
|
|
5911
|
-
}
|
|
6009
|
+
};
|
|
5912
6010
|
orgIds?: string[];
|
|
5913
6011
|
groupIds?: string[];
|
|
5914
6012
|
}
|
|
@@ -6031,4 +6129,68 @@ export interface DefaultAppInitData {
|
|
|
6031
6129
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6032
6130
|
hiddenListColumns: ListPageColumns[];
|
|
6033
6131
|
customActions: CustomAction[];
|
|
6132
|
+
interceptTimeout: number | undefined;
|
|
6133
|
+
interceptUrls: (string | InterceptedApiType)[];
|
|
6034
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',
|
|
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
|
+
};
|