@thoughtspot/visual-embed-sdk 1.15.0 → 1.17.0-alpha.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 (80) hide show
  1. package/CHANGELOG.md +4 -8
  2. package/README.md +1 -1
  3. package/dist/src/auth.d.ts +3 -3
  4. package/dist/src/embed/base.d.ts +9 -8
  5. package/dist/src/embed/liveboard.d.ts +4 -1
  6. package/dist/src/embed/pinboard.d.ts +91 -0
  7. package/dist/src/embed/search-bar.d.ts +39 -0
  8. package/dist/src/embed/search.d.ts +1 -6
  9. package/dist/src/embed/ts-embed.d.ts +1 -0
  10. package/dist/src/index.d.ts +3 -2
  11. package/dist/src/react/index.d.ts +4 -0
  12. package/dist/src/types.d.ts +12 -5
  13. package/dist/src/utils/plugin.d.ts +0 -0
  14. package/dist/src/v1/api.d.ts +19 -0
  15. package/dist/tsembed.es.js +17557 -274
  16. package/dist/tsembed.js +17556 -273
  17. package/lib/package.json +2 -1
  18. package/lib/src/auth.d.ts +3 -3
  19. package/lib/src/auth.js +3 -3
  20. package/lib/src/config.spec.js +9 -1
  21. package/lib/src/config.spec.js.map +1 -1
  22. package/lib/src/embed/base.d.ts +9 -8
  23. package/lib/src/embed/base.js +34 -15
  24. package/lib/src/embed/base.js.map +1 -1
  25. package/lib/src/embed/base.spec.js +23 -2
  26. package/lib/src/embed/base.spec.js.map +1 -1
  27. package/lib/src/embed/liveboard.d.ts +4 -1
  28. package/lib/src/embed/liveboard.js.map +1 -1
  29. package/lib/src/embed/liveboard.spec.js +13 -0
  30. package/lib/src/embed/liveboard.spec.js.map +1 -1
  31. package/lib/src/embed/pinboard.d.ts +91 -0
  32. package/lib/src/embed/pinboard.js +110 -0
  33. package/lib/src/embed/pinboard.js.map +1 -0
  34. package/lib/src/embed/pinboard.spec.js.map +1 -1
  35. package/lib/src/embed/search-bar.d.ts +39 -0
  36. package/lib/src/embed/search-bar.js +58 -0
  37. package/lib/src/embed/search-bar.js.map +1 -0
  38. package/lib/src/embed/search.d.ts +1 -6
  39. package/lib/src/embed/search.js +1 -1
  40. package/lib/src/embed/search.js.map +1 -1
  41. package/lib/src/embed/ts-embed.d.ts +1 -0
  42. package/lib/src/embed/ts-embed.js +1 -0
  43. package/lib/src/embed/ts-embed.js.map +1 -1
  44. package/lib/src/index.d.ts +3 -2
  45. package/lib/src/index.js +4 -3
  46. package/lib/src/index.js.map +1 -1
  47. package/lib/src/react/index.d.ts +4 -0
  48. package/lib/src/react/index.js +2 -0
  49. package/lib/src/react/index.js.map +1 -1
  50. package/lib/src/react/index.spec.js +12 -1
  51. package/lib/src/react/index.spec.js.map +1 -1
  52. package/lib/src/types.d.ts +12 -5
  53. package/lib/src/types.js +12 -4
  54. package/lib/src/types.js.map +1 -1
  55. package/lib/src/utils/authService.js.map +1 -1
  56. package/lib/src/utils/plugin.d.ts +0 -0
  57. package/lib/src/utils/plugin.js +1 -0
  58. package/lib/src/utils/plugin.js.map +1 -0
  59. package/lib/src/utils/processData.spec.js +1 -3
  60. package/lib/src/utils/processData.spec.js.map +1 -1
  61. package/lib/src/utils/processTrigger.spec.js +16 -0
  62. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  63. package/lib/src/visual-embed-sdk.d.ts +69 -25
  64. package/package.json +2 -1
  65. package/src/auth.ts +3 -3
  66. package/src/config.spec.ts +10 -1
  67. package/src/embed/base.spec.ts +26 -2
  68. package/src/embed/base.ts +42 -15
  69. package/src/embed/liveboard.spec.ts +16 -2
  70. package/src/embed/liveboard.ts +4 -1
  71. package/src/embed/pinboard.spec.ts +1 -2
  72. package/src/embed/search-bar.tsx +88 -0
  73. package/src/embed/search.ts +1 -6
  74. package/src/embed/ts-embed.ts +1 -0
  75. package/src/index.ts +5 -0
  76. package/src/react/index.spec.tsx +34 -1
  77. package/src/react/index.tsx +12 -0
  78. package/src/types.ts +12 -5
  79. package/src/utils/processData.spec.ts +1 -3
  80. package/src/utils/processTrigger.spec.ts +22 -0
package/CHANGELOG.md CHANGED
@@ -6,14 +6,14 @@ This project follows Semantic Versioning.
6
6
  ## Unreleased
7
7
 
8
8
  ### New Features
9
- - Set of new Host events to drive interactions on the embed programatically
9
+ - Set of new Host events to drive interactions on the embed programatically
10
10
 
11
11
  ## 1.14.1 (08-31-2022)
12
12
  - Fixed "not logged in" message showing up on "SearchEmbed" with AuthType.None.
13
13
 
14
14
  ## 1.14.0 (08-29-2022)
15
15
  - [AuthType.AuthServer] Now uses `POST` call to log the user in using the bearer token.
16
- - `liveboardV2` flag on `LiveboardEmbed` to try out the LiveboardV2 experience.
16
+ - `liveboardV2` flag on `LiveboardEmbed` to try out the LiveboardV2 experience.
17
17
 
18
18
  ## 1.13.0 (07-19-2022)
19
19
  - Release to support TS version 8.5.0.cl
@@ -29,10 +29,6 @@ This project follows Semantic Versioning.
29
29
  ### Fixed
30
30
  - Typescript build that was affecting some Angular project configurations
31
31
 
32
- ## 1.11.2 (06-10-2022)
33
- ### Fixed
34
- - Typescript build that was affecting some Angular project configurations
35
-
36
32
  ## 1.11.1 (05-30-2022)
37
33
  ### Fixed
38
34
  - 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.
@@ -81,12 +77,12 @@ This project follows Semantic Versioning.
81
77
 
82
78
  ## 1.9.3 (03-22-2022)
83
79
 
84
- ### New Features
80
+ ### New Features
85
81
  - `disableLoginRedirect` option in `EmbedConfig`
86
82
 
87
83
  ## 1.9.2 (03-17-2022)
88
84
 
89
- ### New Features
85
+ ### New Features
90
86
  - Ability to trigger events on React components
91
87
  - Added new `useEmbedRef` hook, check README for usage.
92
88
 
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
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
- SDK to embed ThoughtSpot into your web apps. You need to have a ThoughtSpot account to use the SDK, [click here](https://www.thoughtspot.com/trial?tsref=trialtse) to start a trial.
10
+ SDK to embed ThoughtSpot into your web apps. You need a ThoughtSpot account to use the SDK, [click here](https://www.thoughtspot.com/trial?tsref=trialtse) to start a trial.
11
11
 
12
12
  * [Installation](#installation)
13
13
  * [Live Playground](#live-playground)
@@ -23,15 +23,15 @@ export declare enum AuthStatus {
23
23
  */
24
24
  FAILURE = "FAILURE",
25
25
  /**
26
- * Emits when the SDK succeeds to authenticate
26
+ * Emits when the SDK authenticates successfully
27
27
  */
28
28
  SDK_SUCCESS = "SDK_SUCCESS",
29
29
  /**
30
- * Emits when the App sends a auth success
30
+ * Emits when the app sends an authentication success message
31
31
  */
32
32
  SUCCESS = "SUCCESS",
33
33
  /**
34
- * Emits when there is a logout
34
+ * Emits when a user logs out
35
35
  */
36
36
  LOGOUT = "LOGOUT"
37
37
  }
@@ -7,7 +7,7 @@
7
7
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
8
8
  */
9
9
  import EventEmitter from 'eventemitter3';
10
- import { EmbedConfig } from '../types';
10
+ import { EmbedConfig, PrefetchFeatures } from '../types';
11
11
  import { AuthFailureType } from '../auth';
12
12
  export declare let authPromise: Promise<boolean>;
13
13
  export declare const getEmbedConfig: () => EmbedConfig;
@@ -23,23 +23,24 @@ export declare const handleAuth: () => Promise<boolean>;
23
23
  /**
24
24
  * Prefetches static resources from the specified URL. Web browsers can then cache the prefetched resources and serve them from the user's local disk to provide faster access to your app.
25
25
  * @param url The URL provided for prefetch
26
+ * @param prefetchFeatures Specify features which needs to be prefetched.
27
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
26
28
  */
27
- export declare const prefetch: (url?: string) => void;
29
+ export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[]) => void;
28
30
  /**
29
- * Initialize the ThoughtSpot embed SDK globally and perform
31
+ * Initializes the Visual Embed SDK globally and perform
30
32
  * authentication if applicable.
31
33
  * @param embedConfig The configuration object containing ThoughtSpot host,
32
34
  * authentication mechanism and so on.
33
- *
34
- * eg: authStatus = init(config);
35
+ * example: authStatus = init(config);
35
36
  * authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
36
- *
37
- * @returns event emitter which emits events on authentication success, failure and logout. {@link AuthStatus}
37
+ * @returns event emitter which emits events on authentication success, failure and logout. See {@link AuthStatus}
38
+ * @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
38
39
  */
39
40
  export declare const init: (embedConfig: EmbedConfig) => EventEmitter;
40
41
  export declare function disableAutoLogin(): void;
41
42
  /**
42
- * Logout from ThoughtSpot. This also sets the autoLogin flag to false, to prevent
43
+ * Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to prevent
43
44
  * the SDK from automatically logging in again.
44
45
  *
45
46
  * You can call the `init` method again to re login, if autoLogin is set to true in this
@@ -18,6 +18,7 @@ export interface LiveboardViewConfig extends ViewConfig {
18
18
  /**
19
19
  * If set to true, the embedded object container dynamically resizes
20
20
  * according to the height of the Liveboard.
21
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
21
22
  */
22
23
  fullHeight?: boolean;
23
24
  /**
@@ -29,12 +30,13 @@ export interface LiveboardViewConfig extends ViewConfig {
29
30
  */
30
31
  defaultHeight?: number;
31
32
  /**
32
- * If set to true, the context menu in visualizations will be enabled.
33
+ * @Deprecated If set to true, the context menu in visualizations will be enabled.
33
34
  */
34
35
  enableVizTransformations?: boolean;
35
36
  /**
36
37
  * The Liveboard to display in the embedded view.
37
38
  * Use either of liveboardId or pinboardId to reference the Liveboard to embed.
39
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
38
40
  */
39
41
  liveboardId?: string;
40
42
  /**
@@ -49,6 +51,7 @@ export interface LiveboardViewConfig extends ViewConfig {
49
51
  /**
50
52
  * If set to true, all filter chips from a
51
53
  * Liveboard page will be read-only (no X buttons)
54
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
52
55
  */
53
56
  preventLiveboardFilterRemoval?: boolean;
54
57
  /**
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Copyright (c) 2021
3
+ *
4
+ * Embed a ThoughtSpot pinboard or visualization
5
+ * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
6
+ * https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
7
+ *
8
+ * @summary Pinboard & visualization embed
9
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
10
+ */
11
+ import { DOMSelector } from '../types';
12
+ import { V1Embed, ViewConfig } from './ts-embed';
13
+ /**
14
+ * The configuration for the embedded pinboard or visualization page view.
15
+ * @Category Pinboards and Charts
16
+ */
17
+ export interface PinboardViewConfig extends ViewConfig {
18
+ /**
19
+ * If set to true, the embedded object container dynamically resizes
20
+ * according to the height of the pinboard.
21
+ */
22
+ fullHeight?: boolean;
23
+ /**
24
+ * This is the minimum height(in pixels) for a full height pinboard.
25
+ * Setting this height helps resolves issues with empty pinboards and
26
+ * other screens navigable from a pinboard.
27
+ * @default 500
28
+ * * _since 1.5.0_
29
+ */
30
+ defaultHeight?: number;
31
+ /**
32
+ * If set to true, the context menu in visualizations will be enabled.
33
+ */
34
+ enableVizTransformations?: boolean;
35
+ /**
36
+ * The pinboard to display in the embedded view.
37
+ */
38
+ pinboardId: string;
39
+ /**
40
+ * The visualization within the pinboard to display.
41
+ */
42
+ vizId?: string;
43
+ /**
44
+ * If set to true, all filter chips from a
45
+ * pinboard page will be read-only (no X buttons)
46
+ */
47
+ preventPinboardFilterRemoval?: boolean;
48
+ /**
49
+ * An array of vizids which should be visible when this pinboard loads.
50
+ * The ids not in this array are hidden from the pinboard.
51
+ * _since: 1.6.0_
52
+ */
53
+ pinboardVisibleVizs?: string[];
54
+ }
55
+ /**
56
+ * Embed a ThoughtSpot pinboard or visualization
57
+ * @Category Pinboards and Charts
58
+ */
59
+ export declare class PinboardEmbed extends V1Embed {
60
+ protected viewConfig: PinboardViewConfig;
61
+ private defaultHeight;
62
+ constructor(domSelector: DOMSelector, viewConfig: PinboardViewConfig);
63
+ /**
64
+ * Construct a map of params to be passed on to the
65
+ * embedded pinboard or visualization.
66
+ */
67
+ private getEmbedParams;
68
+ /**
69
+ * Construct the URL of the embedded ThoughtSpot pinboard or visualization
70
+ * to be loaded within the iframe.
71
+ * @param pinboardId The GUID of the pinboard.
72
+ * @param vizId The optional GUID of a visualization within the pinboard.
73
+ * @param runtimeFilters A list of runtime filters to be applied to
74
+ * the pinboard or visualization on load.
75
+ */
76
+ private getIFrameSrc;
77
+ /**
78
+ * Set the iframe height as per the computed height received
79
+ * from the ThoughtSpot app.
80
+ * @param data The event payload
81
+ */
82
+ private updateIFrameHeight;
83
+ private embedIframeCenter;
84
+ private handleRouteChangeFullHeightPinboard;
85
+ /**
86
+ * Render an embedded ThoughtSpot pinboard or visualization
87
+ * @param renderOptions An object specifying the pinboard ID,
88
+ * visualization ID and the runtime filters.
89
+ */
90
+ render(): PinboardEmbed;
91
+ }
@@ -0,0 +1,39 @@
1
+ import { TsEmbed, ViewConfig } from './ts-embed';
2
+ import { SearchOptions } from './search';
3
+ export interface SearchBarViewConfig extends ViewConfig {
4
+ /**
5
+ * If set to true, hides the data sources panel.
6
+ */
7
+ hideDataSources?: boolean;
8
+ /**
9
+ * The array of data source GUIDs to set on load.
10
+ */
11
+ dataSources?: string[];
12
+ /**
13
+ * Configuration for search options
14
+ */
15
+ searchOptions?: SearchOptions;
16
+ }
17
+ /**
18
+ * Embed ThoughtSpot search bar
19
+ *
20
+ * @Category Search Embed
21
+ * @version: SDK: 1.17.0 | ThoughtSpot: 8.10.0
22
+ */
23
+ export declare class SearchBarEmbed extends TsEmbed {
24
+ /**
25
+ * The view configuration for the embedded ThoughtSpot search bar.
26
+ */
27
+ protected viewConfig: SearchBarViewConfig;
28
+ constructor(domSelector: string, viewConfig: SearchBarViewConfig);
29
+ /**
30
+ * Construct the URL of the embedded ThoughtSpot search to be
31
+ * loaded in the iframe
32
+ * @param dataSources A list of data source GUIDs
33
+ */
34
+ private getIFrameSrc;
35
+ /**
36
+ * Render the embedded ThoughtSpot search
37
+ */
38
+ render(): SearchBarEmbed;
39
+ }
@@ -11,7 +11,7 @@ import { ViewConfig, TsEmbed } from './ts-embed';
11
11
  /**
12
12
  * Configuration for search options
13
13
  */
14
- interface SearchOptions {
14
+ export interface SearchOptions {
15
15
  /**
16
16
  * The tml string to load the answer
17
17
  */
@@ -44,10 +44,6 @@ 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;
51
47
  /**
52
48
  * If set to true, the Search Assist feature is enabled.
53
49
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
@@ -105,4 +101,3 @@ export declare class SearchEmbed extends TsEmbed {
105
101
  */
106
102
  render(): SearchEmbed;
107
103
  }
108
- export {};
@@ -286,6 +286,7 @@ export declare class TsEmbed {
286
286
  * Get the Post Url Params for THOUGHTSPOT from the current
287
287
  * host app URL.
288
288
  * THOUGHTSPOT URL params starts with a prefix "ts-"
289
+ * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
289
290
  */
290
291
  getThoughtSpotPostUrlParams(): string;
291
292
  }
@@ -11,6 +11,7 @@ import { AppEmbed, Page, AppViewConfig } from './embed/app';
11
11
  import { init, prefetch, logout } from './embed/base';
12
12
  import { PinboardEmbed, LiveboardViewConfig, LiveboardEmbed } from './embed/liveboard';
13
13
  import { SearchEmbed, SearchViewConfig } from './embed/search';
14
+ import { SearchBarEmbed, SearchBarViewConfig } from './embed/search-bar';
14
15
  import { AuthFailureType, AuthStatus } from './auth';
15
- import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig } from './types';
16
- export { init, logout, prefetch, SearchEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, LiveboardViewConfig, AppViewConfig, };
16
+ import { AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, PrefetchFeatures } from './types';
17
+ export { init, logout, prefetch, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { SearchBarViewConfig } from '../embed/search-bar';
2
3
  import { SearchViewConfig } from '../embed/search';
3
4
  import { AppViewConfig } from '../embed/app';
4
5
  import { LiveboardViewConfig } from '../embed/liveboard';
@@ -14,5 +15,8 @@ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
14
15
  }
15
16
  export declare const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
16
17
  export declare const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
18
+ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
19
+ }
20
+ export declare const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
17
21
  export declare const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
18
22
  export {};
@@ -15,10 +15,6 @@ export declare enum AuthType {
15
15
  * No authentication on the SDK. Passthrough to the embedded App. Alias for `Passthrough`.
16
16
  */
17
17
  None = "None",
18
- /**
19
- * No authentication on the SDK. Passthrough to the embedded App.
20
- */
21
- Passthrough = "None",
22
18
  /**
23
19
  * SSO using SAML
24
20
  * @deprecated Use {@link SAML} instead
@@ -777,7 +773,12 @@ export declare enum HostEvent {
777
773
  * vizEmbed.trigger((HostEvent.Present)
778
774
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
779
775
  */
780
- Present = "present"
776
+ Present = "present",
777
+ /**
778
+ * Get TML for the current search.
779
+ * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl
780
+ */
781
+ GetTML = "getTML"
781
782
  }
782
783
  /**
783
784
  * The different visual modes that the data sources panel within
@@ -994,4 +995,10 @@ export declare enum OperationType {
994
995
  export interface AnswerServiceType {
995
996
  getAnswer?: (offset: number, batchSize: number) => any;
996
997
  }
998
+ export declare enum PrefetchFeatures {
999
+ FullApp = "FullApp",
1000
+ SearchEmbed = "SearchEmbed",
1001
+ LiveboardEmbed = "LiveboardEmbed",
1002
+ VizEmbed = "VizEmbed"
1003
+ }
997
1004
  export {};
File without changes
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Copyright: ThoughtSpot Inc. 2012-2016
3
+ * Author: Shashank Singh (sunny@thoughtspot.com)
4
+ *
5
+ * @fileoverview ThoughtSpot Javascript API for use of ThoughtSpot in external webpages.
6
+ */
7
+ import { AuthType } from '../types';
8
+ export declare enum Events {
9
+ THOUGHTSPOT_AUTH_EXPIRED = "ThoughtspotAuthExpired",
10
+ EXPORT_VIZ_DATA_TO_PARENT = "exportVizDataToParent",
11
+ ALERT = "alert",
12
+ EXPORT_VIZ_DATA_TO_CHILD = "exportVizDataToChild",
13
+ GET_DATA = "getData"
14
+ }
15
+ declare type Callback = (...args: any[]) => void;
16
+ declare function checkIfLoggedIn(tsHost: string, callback: Callback): void;
17
+ declare function initialize(onInitialized: Callback, onAuthExpiration: Callback, _thoughtspotHost: string, authType: AuthType): void;
18
+ declare function notifyOnAuthExpiration(): void;
19
+ export { initialize, checkIfLoggedIn, notifyOnAuthExpiration };