EmbedConfig
- Index
- Properties
- additionalFlags
- authEndpoint
- authTriggerContainer
- authTriggerText
- authType
- autoLogin
- blockNonEmbedFullAppAccess
- callPrefetch
- currencyFormat
- customizations
- dateFormatLocale
- detectCookieAccessSlow
- disableLoginFailurePage
- disableLoginRedirect
- disableSDKTracking
- ignoreNoCookieAccess
- inPopup
- logLevel
- loginFailedMessage
- noRedirect
- numberFormatLocale
- password
- pendoTrackingKey
- queueMultiRenders
- redirectPath
- shouldEncodeUrlQueryParams
- suppressErrorAlerts
- suppressNoCookieAccessAlert
- suppressSageEmbedBetaWarning
- suppressSearchEmbedBetaWarning
- thoughtSpotHost
- useEventForSAMLPopup
- username
- Methods
The configuration object for embedding ThoughtSpot content. It includes the ThoughtSpot hostname or IP address, the type of authentication, and the authentication endpoint if a trusted authentication server is used.
Indexπ
Propertiesπ
additionalFlagsπ
additionalFlags: {[key: string ] : string | number | boolean}
Optional
This is an object (key/val) of override flags which will be applied to the internal embedded object. This can be used to add any URL flag. Warning: This option is for advanced use only and is used internally to control embed behavior in non-regular ways. We do not publish the list of supported keys and values associated with each.
Index Signature Parameters
Version : SDK: 1.33.5 | ThoughtSpot: *
const embed = new LiveboardEmbed('#embed', {
... // other liveboard view config
additionalFlags: {
flag1: 'value1',
flag2: 'value2'
}
});
authEndpointπ
authEndpoint: string
Optional
[AuthServer] The trusted authentication endpoint to use to get the
authentication token. A GET
request is made to the
authentication API endpoint, which returns the token
as a plaintext response. For trusted authentication,
the authEndpoint
or getAuthToken
attribute is required.
authTriggerContainerπ
authTriggerContainer: string | HTMLElement
Optional
For inPopup
SAMLRedirect or OIDCRedirect authentication, we need a
button that the user can click to trigger the flow.
This attribute sets a containing element for that button.
Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
init({
authType: AuthType.SAMLRedirect,
inPopup: true,
authTriggerContainer: '#auth-trigger-container'
})
authTriggerTextπ
authTriggerText: string
Optional
Text to show in the button which triggers the popup auth flow.
Default: Authorize
.
Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
autoLoginπ
autoLogin: boolean
Optional
Re-login a user with the previous login options when a user session expires.
default
: false
blockNonEmbedFullAppAccessπ
blockNonEmbedFullAppAccess: boolean
Optional
Prevent users from accessing the full application or ThoughtSpot application pages access to the embedded application users outside of the iframe.
Version : SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
default
: true
callPrefetchπ
callPrefetch: boolean
Optional
Calls the prefetch method internally when set to true
default
: false
currencyFormatπ
currencyFormat: string
Optional
Format to be used for currency when currency format is set to infer from browser
Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw
customizationsπ
customizations: CustomisationsInterface
Optional
Custom style params for embed Config.
Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
dateFormatLocaleπ
dateFormatLocale: string
Optional
Overrides default/user preffered locale for date formatting
Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw
detectCookieAccessSlowπ
detectCookieAccessSlow: boolean
Optional
[AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
additional call. This is slower and should be avoided. Listen to the
NO_COOKIE_ACCESS
event to handle the situation.
This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
Version : SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
disableLoginFailurePageπ
disableLoginFailurePage: boolean
Optional
This flag is used to disable showing the login failure page in the embedded app.
Version : SDK 1.32.3 | Thoughtspot: *
disableLoginRedirectπ
disableLoginRedirect: boolean
Optional
Disable redirection to the login page when the embedded session expires This flag is typically used alongside the combination of authentication modes such as AuthType and auto-login behavior EmbedConfig.autoLogin
Version : SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
default
: false
disableSDKTrackingπ
disableSDKTracking: boolean
Optional
Disables the Mixpanel tracking from the SDK.
Version : SDK: 1.27.9
ignoreNoCookieAccessπ
ignoreNoCookieAccess: boolean
Optional
Ignore the cookie access alert when third-party cookies are blocked by the
userβs browser. If you set this to true
, the embedded iframe behaviour
persists even in the case of a non-logged-in user.
default
: false
inPopupπ
inPopup: boolean
Optional
[SSO] For SSO Authentication, if inPopup
is set to true, it will open
the SAML auth flow in a popup, instead of redirecting the browser in place.
Need to use this with authTriggerContainer
. Or manually trigger
the AuthEvent.TRIGGER_SSO_POPUP
event on a user interaction.
Version : SDK: 1.18.0
default
: false
logLevelπ
logLevel: LogLevel
Optional
Log level for the SDK.
Version : SDK: 1.26.7 | ThoughtSpot: 9.10.0.cl
default
: LogLevel.ERROR
init({
...embedConfig,
logLevel: LogLevel.SILENT
})
loginFailedMessageπ
loginFailedMessage: string
Optional
This message is displayed in the embedded view when a user login fails.
Version : SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
noRedirectπ
noRedirect: boolean
Optional
[SSO] For SSO Authentication, if noRedirect
is set to true, it will
open the SAML auth flow in a popup, instead of redirecting the browser in
place.
default
: false
numberFormatLocaleπ
numberFormatLocale: string
Optional
Overrides default/user preffered locale for number formatting
Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw
passwordπ
password: string
Optional
[Basic] The ThoughtSpot login password corresponding to the username
Warning: This feature is primarily intended for developer testing. It is strongly advised not to use this authentication method in production.
pendoTrackingKeyπ
pendoTrackingKey: string
Optional
Pendo API key to enable Pendo tracking to your own subscription, the key is added as an additional key to the embed, as per this document.
Version : SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl
queueMultiRendersπ
queueMultiRenders: boolean
Optional
When there are multiple objects embedded, queue the rendering of embedded objects to start after the previous embedβs render is complete. This helps improve performance by decreasing the load on the browser.
Version : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
default
: false
redirectPathπ
redirectPath: string
Optional
[SSO] For SSO Authentication, one can supply an optional path param; This will be the path on the host origin where the SAML flow will be terminated.
Eg: "/dashboard", "#/foo" [Do not include the host]
Version : SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw
shouldEncodeUrlQueryParamsπ
shouldEncodeUrlQueryParams: boolean
Optional
Boolean to define if the query parameters in the ThoughtSpot URL should be encoded in base64. This provides additional security to Thoughtspot clusters against cross-site scripting attacks.
default
: false
suppressErrorAlertsπ
suppressErrorAlerts: boolean
Optional
If passed as true all alerts will be suppressed in the embedded app.
Version : SDK: 1.26.2 | ThoughtSpot: *
suppressNoCookieAccessAlertπ
suppressNoCookieAccessAlert: boolean
Optional
Suppress cookie access alert when third-party cookies are blocked by the
userβs browser. Third-party cookie blocking is the default behaviour on
some web browsers like Safari. If you set this attribute to true
,
you are encouraged to handle noCookieAccess
event, to show your own treatment
in this case.
default
: false
suppressSageEmbedBetaWarningπ
suppressSageEmbedBetaWarning: boolean
Optional
Hide beta
alert warning message for SageEmbed.
suppressSearchEmbedBetaWarningπ
suppressSearchEmbedBetaWarning: boolean
Optional
Hide the beta
alert warning message for SearchEmbed.
Version : SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
thoughtSpotHostπ
thoughtSpotHost: string
The ThoughtSpot cluster hostname or IP address.
useEventForSAMLPopupπ
useEventForSAMLPopup: boolean
Optional
Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP
event to trigger
SAML popup. This is useful when you want to trigger the popup on a custom user
action.
usernameπ
username: string
Optional
[AuthServer / Basic] The user name of the ThoughtSpot user. This attribute is required for trusted authentication.
Methodsπ
getAuthTokenπ
getAuthToken() : Promise< string >
[AuthServer] A function that invokes the trusted authentication endpoint
and returns a Promise that resolves to the auth token
string.
For trusted authentication, the authEndpoint
or getAuthToken
attribute is required.
It is advisable to fetch a new token inside this method and not reuse the old issued token. When auth expires this method is called again and if it is called with an older token, the authentication will not succeed.
Returns
Promise< string >
Defined in : types.ts