@thoughtspot/visual-embed-sdk 1.13.0-alpha.2 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +31 -6
  2. package/README.md +1 -1
  3. package/dist/src/auth.d.ts +4 -1
  4. package/dist/src/auth.spec.d.ts +1 -0
  5. package/dist/src/embed/app.d.ts +5 -0
  6. package/dist/src/embed/liveboard.d.ts +12 -1
  7. package/dist/src/embed/search.d.ts +5 -0
  8. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +1 -0
  9. package/dist/src/embed/ts-embed.d.ts +12 -3
  10. package/dist/src/errors.d.ts +2 -0
  11. package/dist/src/test/test-utils.d.ts +6 -0
  12. package/dist/src/types.d.ts +211 -4
  13. package/dist/src/utils/processTrigger.d.ts +1 -1
  14. package/dist/src/utils.d.ts +3 -1
  15. package/dist/tsembed.es.js +292 -24
  16. package/dist/tsembed.js +292 -24
  17. package/lib/package.json +4 -2
  18. package/lib/src/auth.d.ts +4 -1
  19. package/lib/src/auth.js +11 -2
  20. package/lib/src/auth.js.map +1 -1
  21. package/lib/src/auth.spec.d.ts +1 -0
  22. package/lib/src/auth.spec.js +13 -1
  23. package/lib/src/auth.spec.js.map +1 -1
  24. package/lib/src/config.spec.js +7 -0
  25. package/lib/src/config.spec.js.map +1 -1
  26. package/lib/src/embed/app.d.ts +5 -0
  27. package/lib/src/embed/app.js +1 -1
  28. package/lib/src/embed/app.js.map +1 -1
  29. package/lib/src/embed/app.spec.js +18 -6
  30. package/lib/src/embed/app.spec.js.map +1 -1
  31. package/lib/src/embed/embed.spec.js +2 -0
  32. package/lib/src/embed/embed.spec.js.map +1 -1
  33. package/lib/src/embed/events.spec.js +3 -1
  34. package/lib/src/embed/events.spec.js.map +1 -1
  35. package/lib/src/embed/liveboard.d.ts +12 -1
  36. package/lib/src/embed/liveboard.js +22 -4
  37. package/lib/src/embed/liveboard.js.map +1 -1
  38. package/lib/src/embed/liveboard.spec.js +33 -6
  39. package/lib/src/embed/liveboard.spec.js.map +1 -1
  40. package/lib/src/embed/pinboard.spec.js +7 -5
  41. package/lib/src/embed/pinboard.spec.js.map +1 -1
  42. package/lib/src/embed/search.d.ts +5 -0
  43. package/lib/src/embed/search.js +10 -2
  44. package/lib/src/embed/search.js.map +1 -1
  45. package/lib/src/embed/search.spec.js +9 -1
  46. package/lib/src/embed/search.spec.js.map +1 -1
  47. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +1 -0
  48. package/lib/src/embed/searchEmbed-basic-auth.spec.js +96 -0
  49. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  50. package/lib/src/embed/ts-embed.d.ts +12 -3
  51. package/lib/src/embed/ts-embed.js +29 -10
  52. package/lib/src/embed/ts-embed.js.map +1 -1
  53. package/lib/src/embed/ts-embed.spec.js +38 -5
  54. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  55. package/lib/src/errors.d.ts +2 -0
  56. package/lib/src/errors.js +2 -0
  57. package/lib/src/errors.js.map +1 -1
  58. package/lib/src/react/index.js +3 -2
  59. package/lib/src/react/index.js.map +1 -1
  60. package/lib/src/react/index.spec.js +6 -4
  61. package/lib/src/react/index.spec.js.map +1 -1
  62. package/lib/src/test/test-utils.d.ts +6 -0
  63. package/lib/src/test/test-utils.js +15 -0
  64. package/lib/src/test/test-utils.js.map +1 -1
  65. package/lib/src/types.d.ts +211 -4
  66. package/lib/src/types.js +176 -0
  67. package/lib/src/types.js.map +1 -1
  68. package/lib/src/utils/processTrigger.d.ts +1 -1
  69. package/lib/src/utils/processTrigger.js +28 -8
  70. package/lib/src/utils/processTrigger.js.map +1 -1
  71. package/lib/src/utils/processTrigger.spec.js +11 -1
  72. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  73. package/lib/src/utils.d.ts +3 -1
  74. package/lib/src/utils.js +20 -0
  75. package/lib/src/utils.js.map +1 -1
  76. package/lib/src/utils.spec.js +22 -1
  77. package/lib/src/utils.spec.js.map +1 -1
  78. package/lib/src/visual-embed-sdk.d.ts +240 -9
  79. package/package.json +4 -2
  80. package/src/auth.spec.ts +20 -1
  81. package/src/auth.ts +12 -2
  82. package/src/config.spec.ts +11 -0
  83. package/src/embed/app.spec.ts +22 -3
  84. package/src/embed/app.ts +6 -0
  85. package/src/embed/embed.spec.ts +2 -0
  86. package/src/embed/events.spec.ts +3 -0
  87. package/src/embed/liveboard.spec.ts +46 -6
  88. package/src/embed/liveboard.ts +34 -2
  89. package/src/embed/pinboard.spec.ts +8 -6
  90. package/src/embed/search.spec.ts +11 -1
  91. package/src/embed/search.ts +20 -1
  92. package/src/embed/searchEmbed-basic-auth.spec.ts +115 -0
  93. package/src/embed/ts-embed.spec.ts +51 -5
  94. package/src/embed/ts-embed.ts +40 -12
  95. package/src/errors.ts +3 -0
  96. package/src/react/index.spec.tsx +7 -2
  97. package/src/react/index.tsx +3 -2
  98. package/src/test/test-utils.ts +16 -0
  99. package/src/types.ts +209 -0
  100. package/src/utils/processTrigger.spec.ts +11 -1
  101. package/src/utils/processTrigger.ts +36 -12
  102. package/src/utils.spec.ts +29 -0
  103. package/src/utils.ts +34 -1
package/CHANGELOG.md CHANGED
@@ -6,7 +6,32 @@ This project follows Semantic Versioning.
6
6
  ## Unreleased
7
7
 
8
8
  ### New Features
9
- - Events for all actions on Search Embed
9
+ - Event for navigating to a specific page in App embed without any reload
10
+ - Ability to turn on search assist in Search embed
11
+ - Set of new Host events to drive interactions on the embed programatically
12
+
13
+ ## 1.12.1 (06-21-2022)
14
+ ### Fixed
15
+ - Search embed beta warning check for TS cloud releases
16
+ ## 1.12.0 (06-21-2022)
17
+ - Release to support TS version 8.4.0.cl
18
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
19
+
20
+ ## 1.11.2 (06-10-2022)
21
+ ### Fixed
22
+ - Typescript build that was affecting some Angular project configurations
23
+
24
+ ## 1.11.2 (06-10-2022)
25
+ ### Fixed
26
+ - Typescript build that was affecting some Angular project configurations
27
+
28
+ ## 1.11.1 (05-30-2022)
29
+ ### Fixed
30
+ - Whitelabeling - new [action](https://developers.thoughtspot.com/docs/typedoc/enums/Action.html#ReportError) for the ability to turn off TS specific error reporting by end users.
31
+
32
+ ## 1.11.0 (05-20-2022)
33
+ - Release to support TS version 8.3.0.cl
34
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
10
35
 
11
36
  ## 1.10.4 (05-06-2022)
12
37
  ### New Features
@@ -32,7 +57,7 @@ This project follows Semantic Versioning.
32
57
  ## 1.10.0 (04-22-2022)
33
58
 
34
59
  - Release to support TS version 8.2.0.cl
35
- - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
60
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
36
61
 
37
62
  ## 1.9.5 (04-06-2022)
38
63
 
@@ -48,12 +73,12 @@ This project follows Semantic Versioning.
48
73
 
49
74
  ## 1.9.3 (03-22-2022)
50
75
 
51
- ### New Features
76
+ ### New Features
52
77
  - `disableLoginRedirect` option in `EmbedConfig`
53
78
 
54
79
  ## 1.9.2 (03-17-2022)
55
80
 
56
- ### New Features
81
+ ### New Features
57
82
  - Ability to trigger events on React components
58
83
  - Added new `useEmbedRef` hook, check README for usage.
59
84
 
@@ -73,7 +98,7 @@ This project follows Semantic Versioning.
73
98
  ## 1.9.0
74
99
 
75
100
  - Release to support TS version 8.1.0.cl
76
- - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
101
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
77
102
 
78
103
 
79
104
  ## 1.8.1
@@ -94,4 +119,4 @@ This project follows Semantic Versioning.
94
119
 
95
120
  ## 1.7.0 (and earlier)
96
121
 
97
- - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=whats-new)
122
+ - Please check the full list of changes [here](https://developers.thoughtspot.com/docs/?pageid=embed-sdk-changelog)
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <br/>
6
6
 
7
- # ThoughtSpot Visual Embed SDK <br/> [![Coverage Status](https://coveralls.io/repos/github/ts-blink/embed-sdk/badge.svg?branch=main)](https://coveralls.io/github/ts-blink/embed-sdk?branch=main) ![npm (scoped with tag)](https://img.shields.io/npm/v/@thoughtspot/visual-embed-sdk) [![](https://data.jsdelivr.com/v1/package/npm/@thoughtspot/visual-embed-sdk/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@thoughtspot/visual-embed-sdk) ![npm](https://img.shields.io/npm/dm/@thoughtspot/visual-embed-sdk?label=npm%20downloads&style=flat-square) [![Featured on Openbase](https://badges.openbase.com/js/featured/@thoughtspot/visual-embed-sdk.svg?token=IoqZUwE8aX7LYNedeuBLM2w5Wt52hu+Dh0eyKjlpC0E=)](https://openbase.com/js/@thoughtspot/visual-embed-sdk?utm_source=embedded&amp;utm_medium=badge&amp;utm_campaign=rate-badge)
7
+ # ThoughtSpot Visual Embed SDK <br/> [![Coverage Status](https://coveralls.io/repos/github/ts-blink/embed-sdk/badge.svg?branch=main)](https://coveralls.io/github/ts-blink/embed-sdk?branch=main) ![npm (scoped with tag)](https://img.shields.io/npm/v/@thoughtspot/visual-embed-sdk) [![](https://data.jsdelivr.com/v1/package/npm/@thoughtspot/visual-embed-sdk/badge?style=rounded)](https://www.jsdelivr.com/package/npm/@thoughtspot/visual-embed-sdk) ![npm](https://img.shields.io/npm/dm/@thoughtspot/visual-embed-sdk?label=npm%20downloads&style=flat-square) [![Featured on Openbase](https://badges.openbase.com/js/featured/@thoughtspot/visual-embed-sdk.svg?token=IoqZUwE8aX7LYNedeuBLM2w5Wt52hu+Dh0eyKjlpC0E=)](https://openbase.com/js/@thoughtspot/visual-embed-sdk?utm_source=embedded&amp;utm_medium=badge&amp;utm_campaign=rate-badge) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@thoughtspot/visual-embed-sdk?style=flat-square)
8
8
 
9
9
 
10
10
  SDK to embed ThoughtSpot into your web apps.
@@ -2,7 +2,6 @@ import { EmbedConfig } from './types';
2
2
  export declare let loggedInStatus: boolean;
3
3
  export declare let samlAuthWindow: Window;
4
4
  export declare let samlCompletionPromise: Promise<void>;
5
- export declare let sessionInfo: any;
6
5
  export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
7
6
  export declare const EndPoints: {
8
7
  AUTH_VERIFICATION: string;
@@ -36,6 +35,10 @@ export declare enum AuthStatus {
36
35
  */
37
36
  LOGOUT = "LOGOUT"
38
37
  }
38
+ /**
39
+ * Return releaseVersion if available
40
+ */
41
+ export declare function getReleaseVersion(): string;
39
42
  /**
40
43
  * Return sessionInfo if available else make a loggedIn check to fetch the sessionInfo
41
44
  */
@@ -1,3 +1,4 @@
1
+ export declare const embedConfig: any;
1
2
  export declare const mockSessionInfo: {
2
3
  sessionId: string;
3
4
  genNo: number;
@@ -86,6 +86,11 @@ export interface AppViewConfig extends ViewConfig {
86
86
  * @hidden
87
87
  */
88
88
  liveboardV2?: boolean;
89
+ /**
90
+ * If set to true, the Search Assist feature is enabled.
91
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
92
+ */
93
+ enableSearchAssist?: boolean;
89
94
  }
90
95
  /**
91
96
  * Embeds full ThoughtSpot experience in a host application.
@@ -8,7 +8,7 @@
8
8
  * @summary Liveboard & visualization embed
9
9
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
10
10
  */
11
- import { DOMSelector } from '../types';
11
+ import { DOMSelector, HostEvent } from '../types';
12
12
  import { V1Embed, ViewConfig } from './ts-embed';
13
13
  /**
14
14
  * The configuration for the embedded Liveboard or visualization page view.
@@ -71,6 +71,11 @@ export interface LiveboardViewConfig extends ViewConfig {
71
71
  * @hidden
72
72
  */
73
73
  liveboardV2?: boolean;
74
+ /**
75
+ * Tab Id of the Liveboard that is supposed to be active
76
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
77
+ */
78
+ activeTabId?: string;
74
79
  }
75
80
  /**
76
81
  * Embed a ThoughtSpot Liveboard or visualization
@@ -102,6 +107,12 @@ export declare class LiveboardEmbed extends V1Embed {
102
107
  private updateIFrameHeight;
103
108
  private embedIframeCenter;
104
109
  private setIframeHeightForNonEmbedLiveboard;
110
+ /**
111
+ * Triggers an event to the embedded app
112
+ * @param messageType The event type
113
+ * @param data The payload to send with the message
114
+ */
115
+ trigger(messageType: HostEvent, data?: any): Promise<any>;
105
116
  /**
106
117
  * Render an embedded ThoughtSpot Liveboard or visualization
107
118
  * @param renderOptions An object specifying the Liveboard ID,
@@ -44,8 +44,13 @@ export interface SearchViewConfig extends ViewConfig {
44
44
  * using raw answer data.
45
45
  */
46
46
  hideResults?: boolean;
47
+ /**
48
+ * If set to true, expands all the data sources panel.
49
+ */
50
+ expandAllDataSource?: boolean;
47
51
  /**
48
52
  * If set to true, the Search Assist feature is enabled.
53
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
49
54
  */
50
55
  enableSearchAssist?: boolean;
51
56
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -29,7 +29,7 @@ export interface FrameParams {
29
29
  * This parameters will be passed on the iframe
30
30
  * as is.
31
31
  */
32
- [key: string]: string | number | boolean;
32
+ [key: string]: string | number | boolean | undefined;
33
33
  }
34
34
  /**
35
35
  * The configuration object for an embedded view.
@@ -142,6 +142,7 @@ export declare class TsEmbed {
142
142
  * @default false
143
143
  */
144
144
  private shouldEncodeUrlQueryParams;
145
+ private defaultHiddenActions;
145
146
  constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
146
147
  /**
147
148
  * Gets a reference to the root DOM node where
@@ -182,6 +183,14 @@ export declare class TsEmbed {
182
183
  * and executes the registered callbacks accordingly.
183
184
  */
184
185
  private subscribeToEvents;
186
+ /**
187
+ * Send Custom style as part of payload of APP_INIT
188
+ */
189
+ private appInitCb;
190
+ /**
191
+ * Register APP_INIT event and sendback init payload
192
+ */
193
+ private registerAppInit;
185
194
  /**
186
195
  * Constructs the base URL string to load the ThoughtSpot app.
187
196
  */
@@ -198,7 +207,7 @@ export declare class TsEmbed {
198
207
  * @param isAppEmbed A Boolean parameter to specify if you are embedding
199
208
  * the full application.
200
209
  */
201
- protected getV1EmbedBasePath(queryString: string, showPrimaryNavbar?: boolean, disableProfileAndHelp?: boolean, isAppEmbed?: boolean): string;
210
+ protected getV1EmbedBasePath(queryString: string, showPrimaryNavbar?: boolean, disableProfileAndHelp?: boolean, isAppEmbed?: boolean, enableSearchAssist?: boolean): string;
202
211
  /**
203
212
  * Renders the embedded ThoughtSpot app in an iframe and sets up
204
213
  * event listeners.
@@ -265,7 +274,7 @@ export declare class TsEmbed {
265
274
  * @param messageType The event type
266
275
  * @param data The payload to send with the message
267
276
  */
268
- trigger(messageType: HostEvent, data: any): typeof TsEmbed.prototype;
277
+ trigger(messageType: HostEvent, data: any): Promise<any>;
269
278
  /**
270
279
  * Marks the ThoughtSpot object to have been rendered
271
280
  * Needs to be overridden by subclasses to do the actual
@@ -1,4 +1,6 @@
1
1
  export declare const ERROR_MESSAGE: {
2
2
  INVALID_THOUGHTSPOT_HOST: string;
3
3
  LIVEBOARD_VIZ_ID_VALIDATION: string;
4
+ TRIGGER_TIMED_OUT: string;
5
+ SEARCHEMBED_BETA_WRANING_MESSAGE: string;
4
6
  };
@@ -25,4 +25,10 @@ export declare const executeAfterWait: (fn: (...args: any[]) => void, waitTime?:
25
25
  */
26
26
  export declare const EVENT_WAIT_TIME = 1000;
27
27
  export declare function fixedEncodeURI(str: string): string;
28
+ /**
29
+ * MessageChannel is available in Node > 15.0.0. Since the current node environment's
30
+ * used for github actions is not above 14, we are mocking this for the current unit tests.
31
+ */
32
+ export declare const messageChannelMock: any;
33
+ export declare const mockMessageChannel: () => void;
28
34
  export {};
@@ -17,8 +17,13 @@ export declare enum AuthType {
17
17
  None = "None",
18
18
  /**
19
19
  * SSO using SAML
20
+ * @deprecated Use {@link SAML} instead
20
21
  */
21
22
  SSO = "SSO_SAML",
23
+ /**
24
+ * SSO using SAML
25
+ */
26
+ SAML = "SSO_SAML",
22
27
  /**
23
28
  * SSO using OIDC
24
29
  */
@@ -36,6 +41,26 @@ export declare enum AuthType {
36
41
  Basic = "Basic"
37
42
  }
38
43
  export declare type DOMSelector = string | HTMLElement;
44
+ interface customCssInterface {
45
+ variables?: {
46
+ [variableName: string]: string;
47
+ };
48
+ rules_UNSTABLE?: {
49
+ [selector: string]: {
50
+ [declaration: string]: string;
51
+ };
52
+ };
53
+ }
54
+ interface CustomStyles {
55
+ customCSSUrl?: string;
56
+ customCss?: customCssInterface;
57
+ }
58
+ export interface CustomisationsInterface {
59
+ style: CustomStyles;
60
+ content: {
61
+ [key: string]: string;
62
+ };
63
+ }
39
64
  /**
40
65
  * The configuration object for embedding ThoughtSpot content.
41
66
  * It includes the ThoughtSpot hostname or IP address,
@@ -161,6 +186,16 @@ export interface EmbedConfig {
161
186
  * @version SDK: 1.10.4 | ThoughtSpot: *
162
187
  */
163
188
  detectCookieAccessSlow?: boolean;
189
+ /**
190
+ * Hide beta alert warning message for SearchEmbed.
191
+ *
192
+ * @version SDK: 1.12.0 | ThoughtSpot: *
193
+ */
194
+ suppressSearchEmbedBetaWarning?: boolean;
195
+ /**
196
+ * Custom style params for embed Config
197
+ */
198
+ customisations?: CustomisationsInterface;
164
199
  }
165
200
  /**
166
201
  * MessagePayload: Embed event payload: message type, data and status (start/end)
@@ -515,7 +550,66 @@ export declare enum EmbedEvent {
515
550
  * Emitted when an answer is switched to a chart or table view
516
551
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
517
552
  */
518
- AnswerChartSwitcher = "answerChartSwitcher"
553
+ AnswerChartSwitcher = "answerChartSwitcher",
554
+ /**
555
+ *
556
+ */
557
+ APP_INIT = "appInit",
558
+ /**
559
+ * Emitted when a user clicks Show Liveboard details on a Liveboard
560
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
561
+ */
562
+ LiveboardInfo = "pinboardInfo",
563
+ /**
564
+ * Emitted when a user clicks on the Favorite icon on a Liveboard
565
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
566
+ */
567
+ AddToFavorites = "addToFavorites",
568
+ /**
569
+ * Emitted when a user clicks Schedule on a Liveboard
570
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
571
+ */
572
+ Schedule = "subscription",
573
+ /**
574
+ * Emitted when a user clicks Edit on a Liveboard or visualization
575
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
576
+ */
577
+ Edit = "edit",
578
+ /**
579
+ * Emitted when a user clicks Make a copy on a Liveboard
580
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
581
+ */
582
+ MakeACopy = "makeACopy",
583
+ /**
584
+ * Emitted when a user clicks Present on a Liveboard or visualization
585
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
586
+ */
587
+ Present = "present",
588
+ /**
589
+ * Emitted when a user clicks Delete on a Liveboard
590
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
591
+ */
592
+ Delete = "delete",
593
+ /**
594
+ * Emitted when a user clicks Manage schedules on a Liveboard
595
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
596
+ */
597
+ SchedulesList = "schedule-list",
598
+ /**
599
+ * Emitted when a user clicks Cancel in edit mode on a Liveboard
600
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
601
+ */
602
+ Cancel = "cancel",
603
+ /**
604
+ * Emitted when a user clicks Explore on a visualization
605
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
606
+ */
607
+ Explore = "explore",
608
+ /**
609
+ * Emitted when a user clicks Copy link action on a visualization
610
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
611
+ */
612
+ CopyLink = "embedDocument"
519
613
  }
520
614
  /**
521
615
  * Event types that can be triggered by the host application
@@ -570,7 +664,113 @@ export declare enum HostEvent {
570
664
  * @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
571
665
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl
572
666
  */
573
- Navigate = "Navigate"
667
+ Navigate = "Navigate",
668
+ /**
669
+ * Gets the current pinboard content.
670
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
671
+ */
672
+ getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
673
+ /**
674
+ * Triggers the Pin action on an embedded object
675
+ * @param - incase of Liveboard embed, takes in an object with vizId as a key
676
+ * can be left empty for search and visualization embeds
677
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
678
+ */
679
+ Pin = "pin",
680
+ /**
681
+ * Triggers the Show Liveboard details action on a Liveboard
682
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
683
+ */
684
+ LiveboardInfo = "pinboardInfo",
685
+ /**
686
+ * Triggers the Schedule action on a Liveboard
687
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
688
+ */
689
+ Schedule = "subscription",
690
+ /**
691
+ * Triggers the Manage schedule action on a Liveboard
692
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
693
+ */
694
+ SchedulesList = "schedule-list",
695
+ /**
696
+ * Triggers the Export TML action on a Liveboard
697
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
698
+ */
699
+ ExportTML = "exportTSL",
700
+ /**
701
+ * Triggers the Edit TML action on a Liveboard
702
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
703
+ */
704
+ EditTML = "editTSL",
705
+ /**
706
+ * Triggers the Update TML action on a Liveboard
707
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
708
+ */
709
+ UpdateTML = "updateTSL",
710
+ /**
711
+ * Triggers the Download PDF action on a Liveboard
712
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
713
+ */
714
+ DownloadAsPdf = "downloadAsPdf",
715
+ /**
716
+ * Triggers the Make a copy action on a Liveboard
717
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
718
+ */
719
+ MakeACopy = "makeACopy",
720
+ /**
721
+ * Triggers the Delete action on a Liveboard
722
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
723
+ */
724
+ Remove = "delete",
725
+ /**
726
+ * Triggers the Explore action on a visualization
727
+ * @param - an object with vizId as a key
728
+ * eg: {vizId: '730496d6-6903-4601-937e-2c691821af3c'}
729
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
730
+ */
731
+ Explore = "explore",
732
+ /**
733
+ * Triggers the Create alert action on a visualization
734
+ * @param - an object with vizId as a key
735
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
736
+ */
737
+ CreateMonitor = "createMonitor",
738
+ /**
739
+ * Triggers the Manage alert action on a visualization
740
+ * @param - an object with vizId as a key
741
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
742
+ */
743
+ ManageMonitor = "manageMonitor",
744
+ /**
745
+ * Triggers the Edit action on a Liveboard or visualization
746
+ * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
747
+ * @example
748
+ * liveboardEmbed.trigger(HostEvent.Edit)
749
+ * liveboardEmbed.trigger(HostEvent.Edit, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
750
+ * vizEmbed.trigger((HostEvent.Edit)
751
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
752
+ */
753
+ Edit = "edit",
754
+ /**
755
+ * Triggers the Copy link action on a Liveboard or visualization
756
+ * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
757
+ * @example
758
+ * liveboardEmbed.trigger(HostEvent.CopyLink)
759
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
760
+ * vizEmbed.trigger((HostEvent.CopyLink)
761
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
762
+ */
763
+ CopyLink = "embedDocument",
764
+ /**
765
+ * Triggers the Present action on a Liveboard or visualization
766
+ * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
767
+ * @example
768
+ * liveboardEmbed.trigger(HostEvent.Present)
769
+ * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
770
+ * vizEmbed.trigger((HostEvent.Present)
771
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
772
+ */
773
+ Present = "present"
574
774
  }
575
775
  /**
576
776
  * The different visual modes that the data sources panel within
@@ -615,6 +815,7 @@ export declare enum Param {
615
815
  fullHeight = "isFullHeightPinboard",
616
816
  livedBoardEmbed = "isLiveboardEmbed",
617
817
  searchEmbed = "isSearchEmbed",
818
+ vizEmbed = "isVizEmbed",
618
819
  Version = "sdkVersion",
619
820
  ViewPortHeight = "viewPortHeight",
620
821
  ViewPortWidth = "viewPortWidth",
@@ -624,7 +825,8 @@ export declare enum Param {
624
825
  visibleVizs = "pinboardVisibleVizs",
625
826
  LiveboardV2Enabled = "isPinboardV2Enabled",
626
827
  ShowAlerts = "showAlerts",
627
- Locale = "locale"
828
+ Locale = "locale",
829
+ CustomStyle = "customStyle"
628
830
  }
629
831
  /**
630
832
  * The list of actions that can be performed on visual ThoughtSpot
@@ -764,7 +966,11 @@ export declare enum Action {
764
966
  /**
765
967
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
766
968
  */
767
- CreateMonitor = "createMonitor"
969
+ CreateMonitor = "createMonitor",
970
+ /**
971
+ * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl
972
+ */
973
+ ReportError = "reportError"
768
974
  }
769
975
  export interface SessionInterface {
770
976
  sessionId: string;
@@ -781,3 +987,4 @@ export declare enum OperationType {
781
987
  export interface AnswerServiceType {
782
988
  getAnswer?: (offset: number, batchSize: number) => any;
783
989
  }
990
+ export {};
@@ -1,2 +1,2 @@
1
1
  import { HostEvent } from '../types';
2
- export declare function processTrigger(iFrame: HTMLIFrameElement, messageType: HostEvent, thoughtSpotHost: string, data: any): void;
2
+ export declare function processTrigger(iFrame: HTMLIFrameElement, messageType: HostEvent, thoughtSpotHost: string, data: any): Promise<any>;
@@ -6,7 +6,7 @@
6
6
  * @summary Utils
7
7
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8
8
  */
9
- import { QueryParams, RuntimeFilter } from './types';
9
+ import { EmbedConfig, QueryParams, RuntimeFilter, CustomisationsInterface } from './types';
10
10
  /**
11
11
  * Construct a runtime filters query string from the given filters.
12
12
  * Refer to the following docs for more details on runtime filter syntax:
@@ -42,3 +42,5 @@ export declare const embedEventStatus: {
42
42
  export declare const setAttributes: (element: HTMLElement, attributes: {
43
43
  [key: string]: string | number | boolean;
44
44
  }) => void;
45
+ export declare const checkReleaseVersionInBeta: (releaseVersion: string, suppressBetaWarning: boolean) => boolean;
46
+ export declare const getCustomisations: (embedConfig: EmbedConfig) => CustomisationsInterface;