@thoughtspot/visual-embed-sdk 1.35.5-hostEvent.6 → 1.35.5-hostEvent.8
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/embed/app.d.ts +1 -1
- package/cjs/src/embed/base.d.ts +1 -1
- package/cjs/src/embed/base.js +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +26 -30
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +10 -10
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +21 -7
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +62 -28
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +43 -39
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +8 -7
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +2 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +4 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +14 -9
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +23 -15
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +4 -4
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.js +2 -2
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.js +2 -2
- package/cjs/src/types.d.ts +26 -21
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +20 -19
- package/cjs/src/types.js.map +1 -1
- package/dist/index-DaLHJaLd.js +7370 -0
- package/dist/index-nWevLycs.js +7370 -0
- package/dist/src/embed/app.d.ts +1 -1
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +26 -30
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +21 -7
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +8 -7
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +14 -9
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/types.d.ts +26 -21
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +118 -76
- package/dist/tsembed-react.js +117 -75
- package/dist/tsembed.es.js +120 -78
- package/dist/tsembed.js +118 -76
- package/dist/visual-embed-sdk-react-full.d.ts +96 -75
- package/dist/visual-embed-sdk-react.d.ts +96 -75
- package/dist/visual-embed-sdk.d.ts +96 -75
- package/lib/package.json +1 -1
- package/lib/src/embed/app.d.ts +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +26 -30
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +9 -9
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +21 -7
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +64 -30
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +43 -40
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +8 -7
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +2 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +4 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +14 -9
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +23 -15
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +5 -5
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.js +2 -2
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/types.d.ts +26 -21
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +20 -19
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +99 -78
- package/package.json +1 -1
- package/src/embed/app.ts +1 -1
- package/src/embed/base.ts +1 -1
- package/src/embed/hostEventClient/contracts.ts +43 -32
- package/src/embed/hostEventClient/host-event-client.spec.ts +58 -54
- package/src/embed/hostEventClient/host-event-client.ts +105 -48
- package/src/embed/liveboard.spec.ts +4 -2
- package/src/embed/liveboard.ts +8 -7
- package/src/embed/ts-embed.spec.ts +6 -6
- package/src/embed/ts-embed.ts +39 -28
- package/src/index.ts +2 -2
- package/src/react/all-types-export.ts +1 -1
- package/src/types.ts +26 -21
|
@@ -259,7 +259,7 @@ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<
|
|
|
259
259
|
* @summary ThoughtSpot Visual Embed SDK
|
|
260
260
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
261
261
|
*/
|
|
262
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload,
|
|
262
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, UIPassthroughEvent, };
|
|
263
263
|
|
|
264
264
|
/**
|
|
265
265
|
* @group Embed components
|
|
@@ -1170,7 +1170,7 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1170
1170
|
*/
|
|
1171
1171
|
showLiveboardVerifiedBadge?: boolean;
|
|
1172
1172
|
/**
|
|
1173
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
1173
|
+
* This flag is used to enable/disable hide irrelevant filters in Liveboard tab
|
|
1174
1174
|
* @type {boolean}
|
|
1175
1175
|
* @default false
|
|
1176
1176
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -1484,7 +1484,7 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1484
1484
|
*/
|
|
1485
1485
|
enableAskSage?: boolean;
|
|
1486
1486
|
/**
|
|
1487
|
-
* This flag is used to enable the 2 column layout
|
|
1487
|
+
* This flag is used to enable the 2 column layout on a Liveboard
|
|
1488
1488
|
* @type {boolean}
|
|
1489
1489
|
* @default false
|
|
1490
1490
|
* @version SDK: 1.32.0 | ThoughtSpot:10.1.0.cl
|
|
@@ -1519,7 +1519,7 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1519
1519
|
*/
|
|
1520
1520
|
showPreviewLoader?: boolean;
|
|
1521
1521
|
/**
|
|
1522
|
-
* This flag is used to enable the compact header
|
|
1522
|
+
* This flag is used to enable the compact header on a Liveboard
|
|
1523
1523
|
* @type {boolean}
|
|
1524
1524
|
* @default false
|
|
1525
1525
|
* @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
|
|
@@ -1533,7 +1533,7 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1533
1533
|
*/
|
|
1534
1534
|
isLiveboardCompactHeaderEnabled?: boolean;
|
|
1535
1535
|
/**
|
|
1536
|
-
* This flag is used to show/hide verified
|
|
1536
|
+
* This flag is used to show/hide verified icon in the Liveboard compact header
|
|
1537
1537
|
* @type {boolean}
|
|
1538
1538
|
* @default true
|
|
1539
1539
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1547,7 +1547,8 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1547
1547
|
*/
|
|
1548
1548
|
showLiveboardVerifiedBadge?: boolean;
|
|
1549
1549
|
/**
|
|
1550
|
-
* This flag is used to show/hide re-verify banner
|
|
1550
|
+
* This flag is used to show/hide the re-verify banner
|
|
1551
|
+
* in Liveboard compact header
|
|
1551
1552
|
* @type {boolean}
|
|
1552
1553
|
* @default true
|
|
1553
1554
|
* @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
|
|
@@ -1561,7 +1562,7 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
|
|
|
1561
1562
|
*/
|
|
1562
1563
|
showLiveboardReverifyBanner?: boolean;
|
|
1563
1564
|
/**
|
|
1564
|
-
* This flag is used to enable/disable hide irrelevant filters in
|
|
1565
|
+
* This flag is used to enable/disable hide irrelevant filters in a Liveboard tab
|
|
1565
1566
|
* @type {boolean}
|
|
1566
1567
|
* @default false
|
|
1567
1568
|
* @version SDK: 1.36.0 | ThoughtSpot:10.6.0.cl
|
|
@@ -1650,8 +1651,8 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
1650
1651
|
render(): Promise<LiveboardEmbed>;
|
|
1651
1652
|
navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
|
|
1652
1653
|
/**
|
|
1653
|
-
* Returns the full url of the
|
|
1654
|
-
* this
|
|
1654
|
+
* Returns the full url of the Liveboard/visualization which can be used to open
|
|
1655
|
+
* this Liveboard inside the full Thoughtspot application in a new tab.
|
|
1655
1656
|
* @returns url string
|
|
1656
1657
|
*/
|
|
1657
1658
|
getLiveboardUrl(): string;
|
|
@@ -1783,7 +1784,7 @@ export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeature
|
|
|
1783
1784
|
/**
|
|
1784
1785
|
* Initializes the Visual Embed SDK globally and perform
|
|
1785
1786
|
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
1786
|
-
* component like
|
|
1787
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
|
|
1787
1788
|
* to actually embed. That is handled internally.
|
|
1788
1789
|
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
1789
1790
|
* authentication mechanism and so on.
|
|
@@ -3212,8 +3213,12 @@ export interface ViewConfig {
|
|
|
3212
3213
|
*/
|
|
3213
3214
|
enableCustomColumnGroups?: boolean;
|
|
3214
3215
|
/**
|
|
3215
|
-
*
|
|
3216
|
-
* This
|
|
3216
|
+
* Overrides an Org context for embedding application users.
|
|
3217
|
+
* This parameter allows a user authenticated to one Org to view the
|
|
3218
|
+
* objects from another Org.
|
|
3219
|
+
* The `overrideOrgId` setting is honoured only if the
|
|
3220
|
+
* Per Org URL feature is enabled on your ThoughtSpot instance.
|
|
3221
|
+
*
|
|
3217
3222
|
* @example
|
|
3218
3223
|
* ```js
|
|
3219
3224
|
* const embed = new LiveboardEmbed('#embed', {
|
|
@@ -4470,7 +4475,7 @@ export declare enum HostEvent {
|
|
|
4470
4475
|
* @param - autoDrillDown - Optional. If true, the drill down will be
|
|
4471
4476
|
* done automatically on the most popular column.
|
|
4472
4477
|
* @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
|
|
4473
|
-
* in case of a
|
|
4478
|
+
* in case of a Liveboard.
|
|
4474
4479
|
* @example
|
|
4475
4480
|
* ```js
|
|
4476
4481
|
* searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
|
|
@@ -4557,26 +4562,26 @@ export declare enum HostEvent {
|
|
|
4557
4562
|
*/
|
|
4558
4563
|
SetActiveTab = "SetActiveTab",
|
|
4559
4564
|
/**
|
|
4560
|
-
*
|
|
4561
|
-
*
|
|
4562
|
-
* filters.
|
|
4565
|
+
* Updates the runtime filters applied on a Liveboard. The filter
|
|
4566
|
+
* attributes passed with this event are appended to the existing runtime
|
|
4567
|
+
* filters applied on a Liveboard.
|
|
4568
|
+
*
|
|
4563
4569
|
* Pass an array of runtime filters with the following attributes:
|
|
4564
4570
|
*
|
|
4565
|
-
* `columnName`
|
|
4566
|
-
* _String_. The name of the column to filter on.
|
|
4571
|
+
* `columnName` - _String_. The name of the column to filter on.
|
|
4567
4572
|
*
|
|
4568
|
-
* `operator`
|
|
4569
|
-
* Runtime filter operator to apply. For information,
|
|
4573
|
+
* `operator` - Runtime filter operator to apply. For more information,
|
|
4570
4574
|
* see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
|
|
4571
4575
|
*
|
|
4572
|
-
* `values`
|
|
4573
|
-
*
|
|
4574
|
-
*
|
|
4576
|
+
* `values` - List of operands. Some operators such as EQ and LE allow a
|
|
4577
|
+
* single value, whereas BW and IN accept multiple values.
|
|
4578
|
+
*
|
|
4579
|
+
* **Note**: `HostEvent.UpdateRuntimeFilters` is supported in `LiveboardEmbed`
|
|
4580
|
+
* and `AppEmbed` only. In full application embedding, this event updates
|
|
4581
|
+
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
4575
4582
|
*
|
|
4576
|
-
* **Note**: `HostEvent.UpdateRuntimeFilters` is not supported in
|
|
4577
|
-
* Search embedding (SearchEmbed) and Natural Language Search
|
|
4578
|
-
* embedding (SageEmbed).
|
|
4579
4583
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
4584
|
+
*
|
|
4580
4585
|
* @example
|
|
4581
4586
|
* ```js
|
|
4582
4587
|
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
@@ -5275,7 +5280,7 @@ export declare enum HostEvent {
|
|
|
5275
5280
|
*/
|
|
5276
5281
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
5277
5282
|
/**
|
|
5278
|
-
* Triggers Update
|
|
5283
|
+
* Triggers an event to Update Parameter values for Answers and Liveboard
|
|
5279
5284
|
* @example
|
|
5280
5285
|
* ```js
|
|
5281
5286
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
@@ -5297,7 +5302,7 @@ export declare enum HostEvent {
|
|
|
5297
5302
|
*/
|
|
5298
5303
|
GetParameters = "GetParameters",
|
|
5299
5304
|
/**
|
|
5300
|
-
* Triggers update
|
|
5305
|
+
* Triggers an event to update a persoanlised view of a Liveboard
|
|
5301
5306
|
* ```js
|
|
5302
5307
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
5303
5308
|
* ```
|
|
@@ -5313,7 +5318,7 @@ export declare enum HostEvent {
|
|
|
5313
5318
|
* EmbedApi
|
|
5314
5319
|
* @hidden
|
|
5315
5320
|
*/
|
|
5316
|
-
|
|
5321
|
+
UIPassthrough = "UiPassthrough"
|
|
5317
5322
|
}
|
|
5318
5323
|
/**
|
|
5319
5324
|
* The different visual modes that the data sources panel within
|
|
@@ -6286,7 +6291,7 @@ export declare enum Action {
|
|
|
6286
6291
|
*/
|
|
6287
6292
|
ModifySageAnswer = "modifySageAnswer",
|
|
6288
6293
|
/**
|
|
6289
|
-
* The **Move to Tab** menu action on visualizations in
|
|
6294
|
+
* The **Move to Tab** menu action on visualizations in Liveboard edit mode.
|
|
6290
6295
|
* Allows moving a visualization to a different tab.
|
|
6291
6296
|
* @example
|
|
6292
6297
|
* ```js
|
|
@@ -6339,7 +6344,8 @@ export declare enum Action {
|
|
|
6339
6344
|
*/
|
|
6340
6345
|
TML = "tml",
|
|
6341
6346
|
/**
|
|
6342
|
-
* Action
|
|
6347
|
+
* Action ID for the create Liveboard option on the Liveboard list page
|
|
6348
|
+
* and Pin modal
|
|
6343
6349
|
* @example
|
|
6344
6350
|
* ```js
|
|
6345
6351
|
* hiddenAction: [Action.CreateLiveboard]
|
|
@@ -7326,16 +7332,16 @@ export declare const getAnswerFromQuery: (query: string, worksheetId: string) =>
|
|
|
7326
7332
|
*/
|
|
7327
7333
|
export declare const createLiveboardWithAnswers: (answers: AnswerService[], name: string) => Promise<any>;
|
|
7328
7334
|
|
|
7329
|
-
export declare enum
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7335
|
+
export declare enum UIPassthroughEvent {
|
|
7336
|
+
PinAnswerToLiveboard = "addVizToPinboard",
|
|
7337
|
+
SaveAnswer = "saveAnswer",
|
|
7338
|
+
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
7339
|
+
GetAvailableUIPassthroughs = "getAvailableUIPassthroughs",
|
|
7340
|
+
GetAnswerConfig = "getAnswerPageConfig",
|
|
7341
|
+
GetLiveboardConfig = "getPinboardPageConfig"
|
|
7336
7342
|
}
|
|
7337
|
-
export type
|
|
7338
|
-
[
|
|
7343
|
+
export type UIPassthroughContractBase = {
|
|
7344
|
+
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
7339
7345
|
request: {
|
|
7340
7346
|
vizId?: string;
|
|
7341
7347
|
newVizName: string;
|
|
@@ -7351,7 +7357,7 @@ export type UiPassthroughContractBase = {
|
|
|
7351
7357
|
vizId: string;
|
|
7352
7358
|
};
|
|
7353
7359
|
};
|
|
7354
|
-
[
|
|
7360
|
+
[UIPassthroughEvent.SaveAnswer]: {
|
|
7355
7361
|
request: {
|
|
7356
7362
|
name: string;
|
|
7357
7363
|
description: string;
|
|
@@ -7360,53 +7366,49 @@ export type UiPassthroughContractBase = {
|
|
|
7360
7366
|
};
|
|
7361
7367
|
response: {
|
|
7362
7368
|
answerId: string;
|
|
7363
|
-
saveResponse
|
|
7369
|
+
saveResponse?: any;
|
|
7364
7370
|
shareResponse?: any;
|
|
7365
|
-
errors?: any;
|
|
7366
7371
|
};
|
|
7367
7372
|
};
|
|
7368
|
-
[
|
|
7373
|
+
[UIPassthroughEvent.GetDiscoverabilityStatus]: {
|
|
7369
7374
|
request: any;
|
|
7370
7375
|
response: {
|
|
7371
7376
|
shouldShowDiscoverability: boolean;
|
|
7372
7377
|
isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
|
|
7373
7378
|
};
|
|
7374
7379
|
};
|
|
7375
|
-
[
|
|
7380
|
+
[UIPassthroughEvent.GetAvailableUIPassthroughs]: {
|
|
7376
7381
|
request: any;
|
|
7377
7382
|
response: {
|
|
7378
7383
|
keys: string[];
|
|
7379
7384
|
};
|
|
7380
7385
|
};
|
|
7381
|
-
[
|
|
7386
|
+
[UIPassthroughEvent.GetAnswerConfig]: {
|
|
7382
7387
|
request: {
|
|
7383
7388
|
vizId?: string;
|
|
7384
7389
|
};
|
|
7385
7390
|
response: any;
|
|
7386
7391
|
};
|
|
7387
|
-
[
|
|
7392
|
+
[UIPassthroughEvent.GetLiveboardConfig]: {
|
|
7388
7393
|
request: any;
|
|
7389
7394
|
response: any;
|
|
7390
7395
|
};
|
|
7391
7396
|
};
|
|
7392
|
-
export type
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['request']>;
|
|
7396
|
-
export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = FlattenType<UiPassthroughContractBase[T]['response']>;
|
|
7397
|
-
export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
|
|
7397
|
+
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]['request'];
|
|
7398
|
+
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]['response'];
|
|
7399
|
+
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
7398
7400
|
redId?: string;
|
|
7399
|
-
value?:
|
|
7401
|
+
value?: UIPassthroughResponse<ApiName>;
|
|
7400
7402
|
error?: any;
|
|
7401
|
-
}
|
|
7403
|
+
}>;
|
|
7402
7404
|
export type EmbedApiHostEventMapping = {
|
|
7403
|
-
[HostEvent.Pin]:
|
|
7404
|
-
[HostEvent.SaveAnswer]:
|
|
7405
|
+
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
7406
|
+
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
7405
7407
|
};
|
|
7406
|
-
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ?
|
|
7407
|
-
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ?
|
|
7408
|
-
|
|
7409
|
-
|
|
7408
|
+
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
7409
|
+
export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
7410
|
+
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
7411
|
+
export type TriggerResponse<PayloadT, HostEventT extends HostEvent> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT> : any;
|
|
7410
7412
|
|
|
7411
7413
|
/**
|
|
7412
7414
|
*
|
|
@@ -7462,6 +7464,11 @@ export declare class TsEmbed {
|
|
|
7462
7464
|
* will be rendered.
|
|
7463
7465
|
*/
|
|
7464
7466
|
protected iFrame: HTMLIFrameElement;
|
|
7467
|
+
/**
|
|
7468
|
+
* Setter for the iframe element
|
|
7469
|
+
* @param {HTMLIFrameElement} iFrame HTMLIFrameElement
|
|
7470
|
+
*/
|
|
7471
|
+
protected setIframeElement(iFrame: HTMLIFrameElement): void;
|
|
7465
7472
|
protected viewConfig: ViewConfig;
|
|
7466
7473
|
protected embedConfig: EmbedConfig;
|
|
7467
7474
|
/**
|
|
@@ -7593,19 +7600,19 @@ export declare class TsEmbed {
|
|
|
7593
7600
|
off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
|
|
7594
7601
|
/**
|
|
7595
7602
|
* Triggers an event to the embedded app
|
|
7596
|
-
* @param messageType The event type
|
|
7597
|
-
* @param data The payload to send with the message
|
|
7603
|
+
* @param {HostEvent} messageType The event type
|
|
7604
|
+
* @param {any} data The payload to send with the message
|
|
7598
7605
|
* @returns A promise that resolves with the response from the embedded app
|
|
7599
7606
|
*/
|
|
7600
|
-
trigger<HostEventT extends HostEvent>(messageType: HostEventT, data?:
|
|
7607
|
+
trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
7601
7608
|
/**
|
|
7602
7609
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
7603
|
-
* @param {
|
|
7604
|
-
* @param {
|
|
7605
|
-
* @returns {Promise<
|
|
7610
|
+
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
7611
|
+
* @param {UIPassthroughRequest} parameters - The parameters to be passed to the API.
|
|
7612
|
+
* @returns {Promise<UIPassthroughRequest>} - A promise that resolves with the response
|
|
7606
7613
|
* from the embedded app.
|
|
7607
7614
|
*/
|
|
7608
|
-
|
|
7615
|
+
triggerUIPassThrough<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
|
|
7609
7616
|
/**
|
|
7610
7617
|
* Marks the ThoughtSpot object to have been rendered
|
|
7611
7618
|
* Needs to be overridden by subclasses to do the actual
|
|
@@ -7679,7 +7686,7 @@ export declare class TsEmbed {
|
|
|
7679
7686
|
/**
|
|
7680
7687
|
* Returns the answerService which can be used to make arbitrary graphql calls on top
|
|
7681
7688
|
* session.
|
|
7682
|
-
* @param vizId [Optional] to get for a specific viz in case of a
|
|
7689
|
+
* @param vizId [Optional] to get for a specific viz in case of a Liveboard.
|
|
7683
7690
|
* @version SDK: 1.25.0 / ThoughtSpot 9.10.0
|
|
7684
7691
|
*/
|
|
7685
7692
|
getAnswerService(vizId?: string): Promise<AnswerService>;
|
|
@@ -7725,11 +7732,25 @@ export declare class V1Embed extends TsEmbed {
|
|
|
7725
7732
|
}
|
|
7726
7733
|
|
|
7727
7734
|
export declare class HostEventClient {
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7735
|
+
iFrame: HTMLIFrameElement;
|
|
7736
|
+
constructor(iFrame?: HTMLIFrameElement);
|
|
7737
|
+
/**
|
|
7738
|
+
* A wrapper over process trigger to
|
|
7739
|
+
* @param {HostEvent} message Host event to send
|
|
7740
|
+
* @param {any} data Data to send with the host event
|
|
7741
|
+
* @returns {Promise<any>} - the response from the process trigger
|
|
7742
|
+
*/
|
|
7743
|
+
protected processTrigger(message: HostEvent, data: any): Promise<any>;
|
|
7744
|
+
handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
|
|
7745
|
+
hostEventFallback(hostEvent: HostEvent, data: any): Promise<any>;
|
|
7746
|
+
/**
|
|
7747
|
+
* Setter for the iframe element used for host events
|
|
7748
|
+
* @param {HTMLIFrameElement} iFrame - the iframe element to set
|
|
7749
|
+
*/
|
|
7750
|
+
setIframeElement(iFrame: HTMLIFrameElement): void;
|
|
7751
|
+
triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
|
|
7752
|
+
protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin>): Promise<HostEventResponse<HostEvent.Pin>>;
|
|
7753
|
+
protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer>): Promise<any>;
|
|
7754
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
|
|
7734
7755
|
}
|
|
7735
7756
|
|