Options
All
  • Public
  • Public/Protected
  • All
Menu

@thoughtspot/visual-embed-sdk

Index

Other

Const init

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

    Parameters

    • 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.

    version

    SDK: 1.10.1 | ThoughtSpot: *

    Parameters

    • 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.

    Parameters

    • Optional url: string

      The URL provided for prefetch

    Returns void