• Public
  • Public/Protected
  • All




Const init

  • init(embedConfig: EmbedConfig): EventEmitter<string | symbol, any>
  • Initialize the ThoughtSpot embed SDK globally and perform authentication if applicable.


    • embedConfig: EmbedConfig

      The configuration object containing ThoughtSpot host, authentication mechanism and so on.

      eg: authStatus = init(config); authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });

    Returns EventEmitter<string | symbol, any>

    event emitter which emits events on authentication success, failure and logout. AuthStatus

Const logout

  • logout(doNotDisableAutoLogin?: boolean): Promise<boolean>
  • Logout from ThoughtSpot. This also sets the autoLogin flag to false, to prevent the SDK from automatically logging in again.

    You can call the init method again to re login, if autoLogin is set to true in this second call it will be honored.


    SDK: 1.10.1 | ThoughtSpot: *


    • doNotDisableAutoLogin: boolean = false

      This flag when passed will not disable autoLogin

    Returns Promise<boolean>

    Promise which resolves when logout completes.

Const prefetch

  • prefetch(url?: string): void
  • 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.


    • Optional url: string

      The URL provided for prefetch

    Returns void