@thoughtspot/visual-embed-sdk 1.36.3 → 1.36.5
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.
- package/cjs/package.json +1 -1
- package/cjs/src/css-variables.d.ts +1 -1
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/base.d.ts +4 -0
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +27 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/embedConfig.d.ts.map +1 -1
- package/cjs/src/embed/embedConfig.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -2
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -5
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +11 -11
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search-bar.d.ts.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +4 -3
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +25 -16
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +71 -5
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.d.ts +1 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +1 -0
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +16 -0
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +25 -2
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +43 -19
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +43 -19
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/with-resolvers-polyfill.d.ts +1 -0
- package/cjs/src/utils/with-resolvers-polyfill.d.ts.map +1 -0
- package/cjs/src/utils/with-resolvers-polyfill.js +12 -0
- package/cjs/src/utils/with-resolvers-polyfill.js.map +1 -0
- package/cjs/src/utils.d.ts +17 -2
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +27 -3
- package/cjs/src/utils.js.map +1 -1
- package/dist/{index-BJx3m5_V.js → index-Cyvfex-A.js} +1 -1
- package/dist/src/css-variables.d.ts +1 -1
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts +4 -0
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/embedConfig.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/search-bar.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +4 -3
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/errors.d.ts +1 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +16 -0
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +43 -19
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/with-resolvers-polyfill.d.ts +1 -0
- package/dist/src/utils/with-resolvers-polyfill.d.ts.map +1 -0
- package/dist/src/utils.d.ts +17 -2
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +392 -64
- package/dist/tsembed-react.js +390 -61
- package/dist/tsembed.es.js +128 -51
- package/dist/tsembed.js +127 -50
- package/dist/visual-embed-sdk-react-full.d.ts +1277 -1234
- package/dist/visual-embed-sdk-react.d.ts +711 -668
- package/dist/visual-embed-sdk.d.ts +53 -24
- package/lib/package.json +1 -1
- package/lib/src/css-variables.d.ts +1 -1
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +4 -0
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +24 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/embedConfig.d.ts.map +1 -1
- package/lib/src/embed/embedConfig.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -5
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -11
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search-bar.d.ts.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +4 -3
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +26 -17
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +71 -5
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.d.ts +1 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +1 -0
- package/lib/src/errors.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +16 -0
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +23 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +43 -19
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +43 -19
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/with-resolvers-polyfill.d.ts +1 -0
- package/lib/src/utils/with-resolvers-polyfill.d.ts.map +1 -0
- package/lib/src/utils/with-resolvers-polyfill.js +12 -0
- package/lib/src/utils/with-resolvers-polyfill.js.map +1 -0
- package/lib/src/utils.d.ts +17 -2
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +25 -2
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +54 -25
- package/package.json +1 -1
- package/src/css-variables.ts +1 -1
- package/src/embed/app.ts +2 -1
- package/src/embed/base.ts +41 -1
- package/src/embed/bodyless-conversation.ts +2 -1
- package/src/embed/conversation.ts +2 -1
- package/src/embed/embedConfig.ts +1 -1
- package/src/embed/liveboard.spec.ts +11 -11
- package/src/embed/liveboard.ts +5 -6
- package/src/embed/sage.ts +1 -2
- package/src/embed/search-bar.tsx +1 -2
- package/src/embed/search.ts +1 -2
- package/src/embed/ts-embed.spec.ts +83 -5
- package/src/embed/ts-embed.ts +33 -17
- package/src/errors.ts +1 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.tsx +27 -2
- package/src/types.ts +43 -19
- package/src/utils/with-resolvers-polyfill.ts +11 -0
- package/src/utils.ts +35 -4
|
@@ -250,6 +250,195 @@ type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmb
|
|
|
250
250
|
* @returns {React.MutableRefObject<T extends TsEmbed>} ref
|
|
251
251
|
*/
|
|
252
252
|
export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<React.ComponentRef<T>>;
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @param config - EmbedConfig
|
|
256
|
+
* @returns AuthEventEmitter
|
|
257
|
+
* @example
|
|
258
|
+
* ```
|
|
259
|
+
* function Component() {
|
|
260
|
+
* const authEE = useInit({ ...initConfig });
|
|
261
|
+
* return <LiveboardEmbed ref={ref} liveboardId={<id>} />
|
|
262
|
+
* }
|
|
263
|
+
* ```
|
|
264
|
+
* @version SDK: 1.36.2 | ThoughtSpot: *
|
|
265
|
+
*/
|
|
266
|
+
export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEmitter>;
|
|
267
|
+
|
|
268
|
+
export declare let loggedInStatus: boolean;
|
|
269
|
+
export declare let samlAuthWindow: Window;
|
|
270
|
+
export declare let samlCompletionPromise: Promise<void>;
|
|
271
|
+
export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
|
|
272
|
+
/**
|
|
273
|
+
* Enum for auth failure types. This is the parameter passed to the listner
|
|
274
|
+
* of {@link AuthStatus.FAILURE}.
|
|
275
|
+
* @group Authentication / Init
|
|
276
|
+
*/
|
|
277
|
+
export declare enum AuthFailureType {
|
|
278
|
+
SDK = "SDK",
|
|
279
|
+
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
280
|
+
EXPIRY = "EXPIRY",
|
|
281
|
+
OTHER = "OTHER",
|
|
282
|
+
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
286
|
+
* @group Authentication / Init
|
|
287
|
+
*/
|
|
288
|
+
export declare enum AuthStatus {
|
|
289
|
+
/**
|
|
290
|
+
* Emits when the SDK fails to authenticate
|
|
291
|
+
*/
|
|
292
|
+
FAILURE = "FAILURE",
|
|
293
|
+
/**
|
|
294
|
+
* Emits when the SDK authenticates successfully
|
|
295
|
+
*/
|
|
296
|
+
SDK_SUCCESS = "SDK_SUCCESS",
|
|
297
|
+
/**
|
|
298
|
+
* @hidden
|
|
299
|
+
* Emits when iframe is loaded and session info is available
|
|
300
|
+
*/
|
|
301
|
+
SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS",
|
|
302
|
+
/**
|
|
303
|
+
* Emits when the app sends an authentication success message
|
|
304
|
+
*/
|
|
305
|
+
SUCCESS = "SUCCESS",
|
|
306
|
+
/**
|
|
307
|
+
* Emits when a user logs out
|
|
308
|
+
*/
|
|
309
|
+
LOGOUT = "LOGOUT",
|
|
310
|
+
/**
|
|
311
|
+
* Emitted when inPopup is true in the SAMLRedirect flow and the
|
|
312
|
+
* popup is waiting to be triggered either programmatically
|
|
313
|
+
* or by the trigger button.
|
|
314
|
+
* @version SDK: 1.19.0
|
|
315
|
+
*/
|
|
316
|
+
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Event emitter returned from {@link init}.
|
|
320
|
+
* @group Authentication / Init
|
|
321
|
+
*/
|
|
322
|
+
export interface AuthEventEmitter {
|
|
323
|
+
/**
|
|
324
|
+
* Register a listener on Auth failure.
|
|
325
|
+
* @param event
|
|
326
|
+
* @param listener
|
|
327
|
+
*/
|
|
328
|
+
on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
329
|
+
/**
|
|
330
|
+
* Register a listener on Auth SDK success.
|
|
331
|
+
* @param event
|
|
332
|
+
* @param listener
|
|
333
|
+
*/
|
|
334
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
335
|
+
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
336
|
+
once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
337
|
+
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
338
|
+
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
339
|
+
/**
|
|
340
|
+
* Trigger an event on the emitter returned from init.
|
|
341
|
+
* @param {@link AuthEvent}
|
|
342
|
+
*/
|
|
343
|
+
emit(event: AuthEvent, ...args: any[]): boolean;
|
|
344
|
+
/**
|
|
345
|
+
* Remove listener from the emitter returned from init.
|
|
346
|
+
* @param event
|
|
347
|
+
* @param listener
|
|
348
|
+
* @param context
|
|
349
|
+
* @param once
|
|
350
|
+
*/
|
|
351
|
+
off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
|
|
352
|
+
/**
|
|
353
|
+
* Remove all the event listeners
|
|
354
|
+
* @param event
|
|
355
|
+
*/
|
|
356
|
+
removeAllListeners(event: AuthStatus): this;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Events which can be triggered on the emitter returned from {@link init}.
|
|
360
|
+
* @group Authentication / Init
|
|
361
|
+
*/
|
|
362
|
+
export declare enum AuthEvent {
|
|
363
|
+
/**
|
|
364
|
+
* Manually trigger the SSO popup. This is useful when
|
|
365
|
+
* authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
|
|
366
|
+
*/
|
|
367
|
+
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
*
|
|
371
|
+
*/
|
|
372
|
+
export declare function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @param eventEmitter
|
|
376
|
+
*/
|
|
377
|
+
export declare function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
|
|
378
|
+
/**
|
|
379
|
+
*
|
|
380
|
+
*/
|
|
381
|
+
export declare function notifyAuthSDKSuccess(): void;
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
export declare function notifyAuthSuccess(): Promise<void>;
|
|
386
|
+
/**
|
|
387
|
+
*
|
|
388
|
+
* @param failureType
|
|
389
|
+
*/
|
|
390
|
+
export declare function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
391
|
+
/**
|
|
392
|
+
*
|
|
393
|
+
*/
|
|
394
|
+
export declare function notifyLogout(): void;
|
|
395
|
+
/**
|
|
396
|
+
* Services to be called after the login is successful,
|
|
397
|
+
* This should be called after the cookie is set for cookie auth or
|
|
398
|
+
* after the token is set for cookieless.
|
|
399
|
+
* @return {Promise<void>}
|
|
400
|
+
* @example
|
|
401
|
+
* ```js
|
|
402
|
+
* await postLoginService();
|
|
403
|
+
* ```
|
|
404
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
405
|
+
*/
|
|
406
|
+
export declare function postLoginService(): Promise<void>;
|
|
407
|
+
/**
|
|
408
|
+
* Return releaseVersion if available
|
|
409
|
+
*/
|
|
410
|
+
export declare function getReleaseVersion(): string;
|
|
411
|
+
/**
|
|
412
|
+
* Perform token based authentication
|
|
413
|
+
* @param embedConfig The embed configuration
|
|
414
|
+
*/
|
|
415
|
+
export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
416
|
+
/**
|
|
417
|
+
* Validate embedConfig parameters required for cookielessTokenAuth
|
|
418
|
+
* @param embedConfig The embed configuration
|
|
419
|
+
*/
|
|
420
|
+
export declare const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
421
|
+
/**
|
|
422
|
+
* Perform basic authentication to the ThoughtSpot cluster using the cluster
|
|
423
|
+
* credentials.
|
|
424
|
+
*
|
|
425
|
+
* Warning: This feature is primarily intended for developer testing. It is
|
|
426
|
+
* strongly advised not to use this authentication method in production.
|
|
427
|
+
* @param embedConfig The embed configuration
|
|
428
|
+
*/
|
|
429
|
+
export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
430
|
+
export declare const doSamlAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
431
|
+
export declare const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
432
|
+
export declare const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
433
|
+
/**
|
|
434
|
+
* Perform authentication on the ThoughtSpot cluster
|
|
435
|
+
* @param embedConfig The embed configuration
|
|
436
|
+
*/
|
|
437
|
+
export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
438
|
+
/**
|
|
439
|
+
* Check if we are authenticated to the ThoughtSpot cluster
|
|
440
|
+
*/
|
|
441
|
+
export declare const isAuthenticated: () => boolean;
|
|
253
442
|
|
|
254
443
|
/**
|
|
255
444
|
* @group Embed components
|
|
@@ -1702,7 +1891,7 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
1702
1891
|
*/
|
|
1703
1892
|
protected getEmbedParams(): string;
|
|
1704
1893
|
protected beforePrerenderVisible(): void;
|
|
1705
|
-
protected handleRenderForPrerender():
|
|
1894
|
+
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
1706
1895
|
/**
|
|
1707
1896
|
* Triggers an event to the embedded app
|
|
1708
1897
|
* @param {HostEvent} messageType The event type
|
|
@@ -1730,177 +1919,39 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
1730
1919
|
export declare class PinboardEmbed extends LiveboardEmbed {
|
|
1731
1920
|
}
|
|
1732
1921
|
|
|
1733
|
-
export type EmbedEventHandlers = {
|
|
1734
|
-
[key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
|
|
1735
|
-
};
|
|
1736
|
-
export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
|
|
1737
|
-
className?: string;
|
|
1738
|
-
}
|
|
1739
|
-
export interface ViewConfigAndListeners<T extends ViewConfig> {
|
|
1740
|
-
viewConfig: T;
|
|
1741
|
-
listeners: {
|
|
1742
|
-
[key in EmbedEvent]?: MessageCallback;
|
|
1743
|
-
};
|
|
1744
|
-
}
|
|
1745
|
-
/**
|
|
1746
|
-
*
|
|
1747
|
-
* @param props
|
|
1748
|
-
*/
|
|
1749
|
-
export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewConfig>(props: T): ViewConfigAndListeners<U>;
|
|
1750
|
-
|
|
1751
1922
|
/**
|
|
1752
|
-
*
|
|
1923
|
+
* Copyright (c) 2023
|
|
1924
|
+
*
|
|
1925
|
+
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
|
|
1926
|
+
* @summary Type definitions for Embed SDK
|
|
1927
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
1753
1928
|
*/
|
|
1754
|
-
export interface SearchOptions {
|
|
1755
|
-
/**
|
|
1756
|
-
* The query string to pass to start the Conversation.
|
|
1757
|
-
*/
|
|
1758
|
-
searchQuery: string;
|
|
1759
|
-
}
|
|
1760
1929
|
/**
|
|
1761
|
-
* The
|
|
1762
|
-
*
|
|
1930
|
+
* The authentication mechanism for allowing access to the
|
|
1931
|
+
* the embedded app
|
|
1932
|
+
* @group Authentication / Init
|
|
1763
1933
|
*/
|
|
1764
|
-
export
|
|
1765
|
-
/**
|
|
1766
|
-
* The ID of the worksheet to use for the conversation.
|
|
1767
|
-
*/
|
|
1768
|
-
worksheetId: string;
|
|
1769
|
-
/**
|
|
1770
|
-
* Ability to pass a starting search query to the conversation.
|
|
1771
|
-
*/
|
|
1772
|
-
searchOptions?: SearchOptions;
|
|
1934
|
+
export declare enum AuthType {
|
|
1773
1935
|
/**
|
|
1774
|
-
*
|
|
1775
|
-
*
|
|
1936
|
+
* No authentication on the SDK. Pass-through to the embedded App. Alias for
|
|
1937
|
+
* `Passthrough`.
|
|
1776
1938
|
* @example
|
|
1777
1939
|
* ```js
|
|
1778
|
-
*
|
|
1779
|
-
*
|
|
1780
|
-
*
|
|
1781
|
-
*
|
|
1940
|
+
* init({
|
|
1941
|
+
* // ...
|
|
1942
|
+
* authType: AuthType.None,
|
|
1943
|
+
* });
|
|
1782
1944
|
* ```
|
|
1783
|
-
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
1784
1945
|
*/
|
|
1785
|
-
|
|
1946
|
+
None = "None",
|
|
1786
1947
|
/**
|
|
1787
|
-
*
|
|
1788
|
-
*
|
|
1789
|
-
*
|
|
1790
|
-
*
|
|
1791
|
-
*
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1794
|
-
* ```
|
|
1795
|
-
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
1796
|
-
*/
|
|
1797
|
-
hideSourceSelection?: boolean;
|
|
1798
|
-
/**
|
|
1799
|
-
* Flag to control Data panel experience
|
|
1800
|
-
* @default false
|
|
1801
|
-
* @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.4.0.cl
|
|
1802
|
-
* @example
|
|
1803
|
-
* ```js
|
|
1804
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
1805
|
-
* ... // other options
|
|
1806
|
-
* dataPanelV2: true,
|
|
1807
|
-
* })
|
|
1808
|
-
* ```
|
|
1809
|
-
*/
|
|
1810
|
-
dataPanelV2?: boolean;
|
|
1811
|
-
/**
|
|
1812
|
-
* showSpotterLimitations : show limitation text
|
|
1813
|
-
* of the spotter underneath the chat input.
|
|
1814
|
-
* default is false.
|
|
1815
|
-
* @example
|
|
1816
|
-
* ```js
|
|
1817
|
-
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
1818
|
-
* ... // other options
|
|
1819
|
-
* showSpotterLimitations : true,
|
|
1820
|
-
* })
|
|
1821
|
-
* ```
|
|
1822
|
-
* @version SDK: 1.36.0 | Thoughtspot: 10.5.0.cl
|
|
1823
|
-
*/
|
|
1824
|
-
showSpotterLimitations?: boolean;
|
|
1825
|
-
/**
|
|
1826
|
-
* hideSampleQuestions : Hide sample questions on
|
|
1827
|
-
* the initial screen of the conversation.
|
|
1828
|
-
* @example
|
|
1829
|
-
* ```js
|
|
1830
|
-
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
1831
|
-
* ... // other options
|
|
1832
|
-
* hideSampleQuestions : true,
|
|
1833
|
-
* })
|
|
1834
|
-
* ```
|
|
1835
|
-
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
1836
|
-
*/
|
|
1837
|
-
hideSampleQuestions?: boolean;
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* Embed ThoughtSpot AI Conversation.
|
|
1841
|
-
* @group Embed components
|
|
1842
|
-
* @example
|
|
1843
|
-
* ```js
|
|
1844
|
-
* const conversation = new ConversationEmbed('#tsEmbed', {
|
|
1845
|
-
* worksheetId: 'worksheetId',
|
|
1846
|
-
* searchOptions: {
|
|
1847
|
-
* searchQuery: 'searchQuery',
|
|
1848
|
-
* },
|
|
1849
|
-
* });
|
|
1850
|
-
* conversation.render();
|
|
1851
|
-
* ```
|
|
1852
|
-
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
|
|
1853
|
-
*/
|
|
1854
|
-
export declare class ConversationEmbed extends TsEmbed {
|
|
1855
|
-
protected viewConfig: ConversationViewConfig;
|
|
1856
|
-
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
1857
|
-
getIframeSrc(): string;
|
|
1858
|
-
render(): Promise<ConversationEmbed>;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
/**
|
|
1862
|
-
* Copyright (c) 2023
|
|
1863
|
-
*
|
|
1864
|
-
* ThoughtSpot Visual Embed SDK for embedding ThoughtSpot analytics
|
|
1865
|
-
* in other web applications.
|
|
1866
|
-
* @summary ThoughtSpot Visual Embed SDK
|
|
1867
|
-
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
1868
|
-
*/
|
|
1869
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, UIPassthroughEvent, };
|
|
1870
|
-
|
|
1871
|
-
/**
|
|
1872
|
-
* Copyright (c) 2023
|
|
1873
|
-
*
|
|
1874
|
-
* TypeScript type definitions for ThoughtSpot Visual Embed SDK
|
|
1875
|
-
* @summary Type definitions for Embed SDK
|
|
1876
|
-
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
1877
|
-
*/
|
|
1878
|
-
/**
|
|
1879
|
-
* The authentication mechanism for allowing access to the
|
|
1880
|
-
* the embedded app
|
|
1881
|
-
* @group Authentication / Init
|
|
1882
|
-
*/
|
|
1883
|
-
export declare enum AuthType {
|
|
1884
|
-
/**
|
|
1885
|
-
* No authentication on the SDK. Pass-through to the embedded App. Alias for
|
|
1886
|
-
* `Passthrough`.
|
|
1887
|
-
* @example
|
|
1888
|
-
* ```js
|
|
1889
|
-
* init({
|
|
1890
|
-
* // ...
|
|
1891
|
-
* authType: AuthType.None,
|
|
1892
|
-
* });
|
|
1893
|
-
* ```
|
|
1894
|
-
*/
|
|
1895
|
-
None = "None",
|
|
1896
|
-
/**
|
|
1897
|
-
* Passthrough SSO to the embedded application within the iframe. Requires least
|
|
1898
|
-
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
1899
|
-
* if SSO is not configured on ThoughtSpot.
|
|
1900
|
-
*
|
|
1901
|
-
* To use this:
|
|
1902
|
-
* Your SAML or OpenID provider must allow iframe redirects.
|
|
1903
|
-
* For example, if you are using Okta as IdP, you can enable iframe embedding.
|
|
1948
|
+
* Passthrough SSO to the embedded application within the iframe. Requires least
|
|
1949
|
+
* configuration, but may not be supported by all IDPs. This will behave like `None`
|
|
1950
|
+
* if SSO is not configured on ThoughtSpot.
|
|
1951
|
+
*
|
|
1952
|
+
* To use this:
|
|
1953
|
+
* Your SAML or OpenID provider must allow iframe redirects.
|
|
1954
|
+
* For example, if you are using Okta as IdP, you can enable iframe embedding.
|
|
1904
1955
|
* @example
|
|
1905
1956
|
* ```js
|
|
1906
1957
|
* init({
|
|
@@ -3222,8 +3273,9 @@ export declare enum EmbedEvent {
|
|
|
3222
3273
|
*/
|
|
3223
3274
|
Load = "load",
|
|
3224
3275
|
/**
|
|
3225
|
-
* Data pertaining to an Answer or Liveboard is received
|
|
3226
|
-
*
|
|
3276
|
+
* Data pertaining to an Answer or Liveboard is received.
|
|
3277
|
+
* The event payload includes the raw data of the object.
|
|
3278
|
+
* @return data - Answer of Liveboard data
|
|
3227
3279
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
3228
3280
|
* @example
|
|
3229
3281
|
*```js
|
|
@@ -4127,17 +4179,39 @@ export declare enum EmbedEvent {
|
|
|
4127
4179
|
*/
|
|
4128
4180
|
ParameterChanged = "parameterChanged",
|
|
4129
4181
|
/**
|
|
4130
|
-
*
|
|
4131
|
-
*
|
|
4132
|
-
*
|
|
4182
|
+
* Emits when a table visualization is rendered in
|
|
4183
|
+
* the ThoughtSpot embedded app.
|
|
4184
|
+
* You can also use this event as a hook to trigger host events
|
|
4185
|
+
* such as `HostEvent.TransformTableVizData` on the table visualization.
|
|
4186
|
+
* The event payload contains the data used in the rendered table.
|
|
4187
|
+
* You can extract the relevant data from the payload
|
|
4188
|
+
* stored in `payload.data.data.columnDataLite`.
|
|
4189
|
+
* `columnDataLite` is a multidimensional array that contains
|
|
4190
|
+
* data values for each column, which was used in the query to
|
|
4191
|
+
* generate the table visualization. To find and modify specific cell data,
|
|
4192
|
+
* you can either loop through the array or directly access a cell if
|
|
4193
|
+
* you know its position and data index.
|
|
4194
|
+
* In the following code sample, the first cell in the first column
|
|
4195
|
+
* (`columnDataLite[0].dataValue[0]`) is set to `new fob`.
|
|
4196
|
+
* Note that any changes made to the data in the payload will only update the
|
|
4197
|
+
* visual presentation and do not affect the underlying data.
|
|
4198
|
+
* To persist data value modifications after a reload or during chart
|
|
4199
|
+
* interactions such as drill down, ensure that the modified
|
|
4200
|
+
* payload in the `columnDataLite` is passed on to
|
|
4201
|
+
* `HostEvent.TransformTableVizData` and trigger an update to
|
|
4202
|
+
* the table visualization.
|
|
4203
|
+
* If the Row-Level Security (RLS) rules are applied on the
|
|
4204
|
+
* Worksheet or Model, exercise caution when changing column
|
|
4205
|
+
* or table cell values to maintain data security.
|
|
4206
|
+
*
|
|
4133
4207
|
* @example
|
|
4134
4208
|
* ```js
|
|
4135
4209
|
* searchEmbed.on(EmbedEvent.TableVizRendered, (payload) => {
|
|
4136
|
-
*
|
|
4137
|
-
*
|
|
4138
|
-
*
|
|
4139
|
-
*
|
|
4140
|
-
*
|
|
4210
|
+
* console.log(payload);
|
|
4211
|
+
* const columnDataLite = payload.data.data.columnDataLite;
|
|
4212
|
+
* columnDataLite[0].dataValue[0]="new fob";
|
|
4213
|
+
* console.log('>>> new Data', columnDataLite);
|
|
4214
|
+
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
4141
4215
|
* })
|
|
4142
4216
|
* ```
|
|
4143
4217
|
* @version SDK: 1.35.12 | ThoughtSpot: 10.7.0.cl
|
|
@@ -5174,19 +5248,20 @@ export declare enum HostEvent {
|
|
|
5174
5248
|
*/
|
|
5175
5249
|
UIPassthrough = "UiPassthrough",
|
|
5176
5250
|
/**
|
|
5177
|
-
* Triggers the table
|
|
5251
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5178
5252
|
* Includes the following properties:
|
|
5179
|
-
* @param - columnDataLite - an array of object containing
|
|
5180
|
-
*
|
|
5181
|
-
* For example, { columnDataLite: []}
|
|
5253
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5254
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5255
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5256
|
+
*
|
|
5182
5257
|
* @example
|
|
5183
5258
|
* ```js
|
|
5184
5259
|
* searchEmbed.on(EmbedEvent.TableVizRendered, (payload) => {
|
|
5185
|
-
*
|
|
5186
|
-
*
|
|
5187
|
-
*
|
|
5188
|
-
*
|
|
5189
|
-
*
|
|
5260
|
+
* console.log(payload);
|
|
5261
|
+
* const columnDataLite = payload.data.data.columnDataLite;
|
|
5262
|
+
* columnDataLite[0].dataValue[0]="new fob";
|
|
5263
|
+
* console.log('>>> new Data', columnDataLite);
|
|
5264
|
+
* searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
|
|
5190
5265
|
* })
|
|
5191
5266
|
* ```
|
|
5192
5267
|
* @version SDK: 1.35.12 | ThoughtSpot: 10.7.0.cl
|
|
@@ -6670,6 +6745,144 @@ export interface DefaultAppInitData {
|
|
|
6670
6745
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6671
6746
|
}
|
|
6672
6747
|
|
|
6748
|
+
export type EmbedEventHandlers = {
|
|
6749
|
+
[key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
|
|
6750
|
+
};
|
|
6751
|
+
export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
|
|
6752
|
+
className?: string;
|
|
6753
|
+
}
|
|
6754
|
+
export interface ViewConfigAndListeners<T extends ViewConfig> {
|
|
6755
|
+
viewConfig: T;
|
|
6756
|
+
listeners: {
|
|
6757
|
+
[key in EmbedEvent]?: MessageCallback;
|
|
6758
|
+
};
|
|
6759
|
+
}
|
|
6760
|
+
/**
|
|
6761
|
+
*
|
|
6762
|
+
* @param props
|
|
6763
|
+
*/
|
|
6764
|
+
export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewConfig>(props: T): ViewConfigAndListeners<U>;
|
|
6765
|
+
|
|
6766
|
+
/**
|
|
6767
|
+
* Configuration for search options
|
|
6768
|
+
*/
|
|
6769
|
+
export interface SearchOptions {
|
|
6770
|
+
/**
|
|
6771
|
+
* The query string to pass to start the Conversation.
|
|
6772
|
+
*/
|
|
6773
|
+
searchQuery: string;
|
|
6774
|
+
}
|
|
6775
|
+
/**
|
|
6776
|
+
* The configuration for the embedded conversationEmbed options.
|
|
6777
|
+
* @group Embed components
|
|
6778
|
+
*/
|
|
6779
|
+
export interface ConversationViewConfig extends ViewConfig {
|
|
6780
|
+
/**
|
|
6781
|
+
* The ID of the worksheet to use for the conversation.
|
|
6782
|
+
*/
|
|
6783
|
+
worksheetId: string;
|
|
6784
|
+
/**
|
|
6785
|
+
* Ability to pass a starting search query to the conversation.
|
|
6786
|
+
*/
|
|
6787
|
+
searchOptions?: SearchOptions;
|
|
6788
|
+
/**
|
|
6789
|
+
* disableSourceSelection : Disables data source selection
|
|
6790
|
+
* but still display the selected data source.
|
|
6791
|
+
* @example
|
|
6792
|
+
* ```js
|
|
6793
|
+
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
6794
|
+
* ... // other options
|
|
6795
|
+
* disableSourceSelection : true,
|
|
6796
|
+
* })
|
|
6797
|
+
* ```
|
|
6798
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
6799
|
+
*/
|
|
6800
|
+
disableSourceSelection?: boolean;
|
|
6801
|
+
/**
|
|
6802
|
+
* hideSourceSelection : Hide data source selection
|
|
6803
|
+
* @example
|
|
6804
|
+
* ```js
|
|
6805
|
+
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
6806
|
+
* ... // other options
|
|
6807
|
+
* hideSourceSelection : true,
|
|
6808
|
+
* })
|
|
6809
|
+
* ```
|
|
6810
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
6811
|
+
*/
|
|
6812
|
+
hideSourceSelection?: boolean;
|
|
6813
|
+
/**
|
|
6814
|
+
* Flag to control Data panel experience
|
|
6815
|
+
* @default false
|
|
6816
|
+
* @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.4.0.cl
|
|
6817
|
+
* @example
|
|
6818
|
+
* ```js
|
|
6819
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
6820
|
+
* ... // other options
|
|
6821
|
+
* dataPanelV2: true,
|
|
6822
|
+
* })
|
|
6823
|
+
* ```
|
|
6824
|
+
*/
|
|
6825
|
+
dataPanelV2?: boolean;
|
|
6826
|
+
/**
|
|
6827
|
+
* showSpotterLimitations : show limitation text
|
|
6828
|
+
* of the spotter underneath the chat input.
|
|
6829
|
+
* default is false.
|
|
6830
|
+
* @example
|
|
6831
|
+
* ```js
|
|
6832
|
+
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
6833
|
+
* ... // other options
|
|
6834
|
+
* showSpotterLimitations : true,
|
|
6835
|
+
* })
|
|
6836
|
+
* ```
|
|
6837
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.5.0.cl
|
|
6838
|
+
*/
|
|
6839
|
+
showSpotterLimitations?: boolean;
|
|
6840
|
+
/**
|
|
6841
|
+
* hideSampleQuestions : Hide sample questions on
|
|
6842
|
+
* the initial screen of the conversation.
|
|
6843
|
+
* @example
|
|
6844
|
+
* ```js
|
|
6845
|
+
* const embed = new ConversationEmbed('#tsEmbed', {
|
|
6846
|
+
* ... // other options
|
|
6847
|
+
* hideSampleQuestions : true,
|
|
6848
|
+
* })
|
|
6849
|
+
* ```
|
|
6850
|
+
* @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
|
|
6851
|
+
*/
|
|
6852
|
+
hideSampleQuestions?: boolean;
|
|
6853
|
+
}
|
|
6854
|
+
/**
|
|
6855
|
+
* Embed ThoughtSpot AI Conversation.
|
|
6856
|
+
* @group Embed components
|
|
6857
|
+
* @example
|
|
6858
|
+
* ```js
|
|
6859
|
+
* const conversation = new ConversationEmbed('#tsEmbed', {
|
|
6860
|
+
* worksheetId: 'worksheetId',
|
|
6861
|
+
* searchOptions: {
|
|
6862
|
+
* searchQuery: 'searchQuery',
|
|
6863
|
+
* },
|
|
6864
|
+
* });
|
|
6865
|
+
* conversation.render();
|
|
6866
|
+
* ```
|
|
6867
|
+
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
|
|
6868
|
+
*/
|
|
6869
|
+
export declare class ConversationEmbed extends TsEmbed {
|
|
6870
|
+
protected viewConfig: ConversationViewConfig;
|
|
6871
|
+
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
6872
|
+
getIframeSrc(): string;
|
|
6873
|
+
render(): Promise<ConversationEmbed>;
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6876
|
+
/**
|
|
6877
|
+
* Copyright (c) 2023
|
|
6878
|
+
*
|
|
6879
|
+
* ThoughtSpot Visual Embed SDK for embedding ThoughtSpot analytics
|
|
6880
|
+
* in other web applications.
|
|
6881
|
+
* @summary ThoughtSpot Visual Embed SDK
|
|
6882
|
+
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
6883
|
+
*/
|
|
6884
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, UIPassthroughEvent, };
|
|
6885
|
+
|
|
6673
6886
|
/**
|
|
6674
6887
|
* Copyright (c) 2022
|
|
6675
6888
|
*
|
|
@@ -6725,6 +6938,7 @@ export declare class TsEmbed {
|
|
|
6725
6938
|
*/
|
|
6726
6939
|
protected isRendered: boolean;
|
|
6727
6940
|
protected hostEventClient: HostEventClient;
|
|
6941
|
+
protected isReadyForRenderPromise: Promise<void>;
|
|
6728
6942
|
constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
|
|
6729
6943
|
/**
|
|
6730
6944
|
* Handles errors within the SDK
|
|
@@ -6868,12 +7082,12 @@ export declare class TsEmbed {
|
|
|
6868
7082
|
*/
|
|
6869
7083
|
render(): Promise<TsEmbed>;
|
|
6870
7084
|
getIframeSrc(): string;
|
|
6871
|
-
protected handleRenderForPrerender():
|
|
7085
|
+
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
6872
7086
|
/**
|
|
6873
7087
|
* Creates the preRender shell
|
|
6874
7088
|
* @param showPreRenderByDefault - Show the preRender after render, hidden by default
|
|
6875
7089
|
*/
|
|
6876
|
-
preRender(showPreRenderByDefault?: boolean): TsEmbed
|
|
7090
|
+
preRender(showPreRenderByDefault?: boolean): Promise<TsEmbed>;
|
|
6877
7091
|
/**
|
|
6878
7092
|
* Get the Post Url Params for THOUGHTSPOT from the current
|
|
6879
7093
|
* host app URL.
|
|
@@ -6904,7 +7118,7 @@ export declare class TsEmbed {
|
|
|
6904
7118
|
* Also, synchronizes the style of the PreRender component with the embedding
|
|
6905
7119
|
* element.
|
|
6906
7120
|
*/
|
|
6907
|
-
showPreRender():
|
|
7121
|
+
showPreRender(): Promise<TsEmbed>;
|
|
6908
7122
|
/**
|
|
6909
7123
|
* Synchronizes the style properties of the PreRender component with the embedding
|
|
6910
7124
|
* element. This function adjusts the position, width, and height of the PreRender
|
|
@@ -7056,510 +7270,54 @@ export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends
|
|
|
7056
7270
|
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
7057
7271
|
export type TriggerResponse<PayloadT, HostEventT extends HostEvent> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT> : any;
|
|
7058
7272
|
|
|
7059
|
-
export interface executeTMLInput {
|
|
7060
|
-
metadata_tmls: string[];
|
|
7061
|
-
import_policy?: 'PARTIAL' | 'ALL_OR_NONE' | 'VALIDATE_ONLY';
|
|
7062
|
-
create_new?: boolean;
|
|
7063
|
-
}
|
|
7064
|
-
export interface exportTMLInput {
|
|
7065
|
-
metadata: {
|
|
7066
|
-
identifier: string;
|
|
7067
|
-
type?: 'LIVEBOARD' | 'ANSWER' | 'LOGICAL_TABLE' | 'CONNECTION';
|
|
7068
|
-
}[];
|
|
7069
|
-
export_associated?: boolean;
|
|
7070
|
-
export_fqn?: boolean;
|
|
7071
|
-
edoc_format?: 'YAML' | 'JSON';
|
|
7072
|
-
}
|
|
7073
|
-
export declare let authPromise: Promise<boolean>;
|
|
7074
|
-
export declare const getAuthPromise: () => Promise<boolean>;
|
|
7075
|
-
export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
|
|
7076
|
-
/**
|
|
7077
|
-
* Perform authentication on the ThoughtSpot app as applicable.
|
|
7078
|
-
*/
|
|
7079
|
-
export declare const handleAuth: () => Promise<boolean>;
|
|
7080
|
-
/**
|
|
7081
|
-
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
7082
|
-
* prefetched resources and serve them from the user's local disk to provide faster access
|
|
7083
|
-
* to your app.
|
|
7084
|
-
* @param url The URL provided for prefetch
|
|
7085
|
-
* @param prefetchFeatures Specify features which needs to be prefetched.
|
|
7086
|
-
* @param additionalFlags This can be used to add any URL flag.
|
|
7087
|
-
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
|
|
7088
|
-
* @group Global methods
|
|
7089
|
-
*/
|
|
7090
|
-
export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[], additionalFlags?: {
|
|
7091
|
-
[key: string]: string | number | boolean;
|
|
7092
|
-
}) => void;
|
|
7093
|
-
/**
|
|
7094
|
-
* Initializes the Visual Embed SDK globally and perform
|
|
7095
|
-
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
7096
|
-
* component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
|
|
7097
|
-
* to actually embed. That is handled internally.
|
|
7098
|
-
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
7099
|
-
* authentication mechanism and so on.
|
|
7100
|
-
* @example
|
|
7101
|
-
* ```js
|
|
7102
|
-
* const authStatus = init({
|
|
7103
|
-
* thoughtSpotHost: 'https://my.thoughtspot.cloud',
|
|
7104
|
-
* authType: AuthType.None,
|
|
7105
|
-
* });
|
|
7106
|
-
* authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
|
|
7107
|
-
* ```
|
|
7108
|
-
* @returns {@link AuthEventEmitter} event emitter which emits events on authentication success,
|
|
7109
|
-
* failure and logout. See {@link AuthStatus}
|
|
7110
|
-
* @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
7111
|
-
* @group Authentication / Init
|
|
7112
|
-
*/
|
|
7113
|
-
export declare const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
|
|
7114
|
-
/**
|
|
7115
|
-
*
|
|
7116
|
-
*/
|
|
7117
|
-
export declare function disableAutoLogin(): void;
|
|
7118
|
-
/**
|
|
7119
|
-
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
7120
|
-
* prevent the SDK from automatically logging in again.
|
|
7121
|
-
*
|
|
7122
|
-
* You can call the `init` method again to re login, if autoLogin is set to
|
|
7123
|
-
* true in this second call it will be honored.
|
|
7124
|
-
* @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
|
|
7125
|
-
* @returns Promise which resolves when logout completes.
|
|
7126
|
-
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
7127
|
-
* @group Global methods
|
|
7128
|
-
*/
|
|
7129
|
-
export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
|
|
7130
|
-
/**
|
|
7131
|
-
* Renders functions in a queue, resolves to next function only after the callback next
|
|
7132
|
-
* is called
|
|
7133
|
-
* @param fn The function being registered
|
|
7134
|
-
*/
|
|
7135
|
-
export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
|
|
7136
|
-
/**
|
|
7137
|
-
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
7138
|
-
* @param data
|
|
7139
|
-
* @returns imports TML data into ThoughtSpot
|
|
7140
|
-
* @example
|
|
7141
|
-
* ```js
|
|
7142
|
-
* executeTML({
|
|
7143
|
-
* //Array of metadata Tmls in string format
|
|
7144
|
-
* metadata_tmls: [
|
|
7145
|
-
* "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
|
|
7146
|
-
* \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
|
|
7147
|
-
* ],
|
|
7148
|
-
* import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
|
|
7149
|
-
* create_new: false, // If selected, creates TML objects with new GUIDs.
|
|
7150
|
-
* }).then(result => {
|
|
7151
|
-
* console.log(result);
|
|
7152
|
-
* }).catch(error => {
|
|
7153
|
-
* console.error(error);
|
|
7154
|
-
* });
|
|
7155
|
-
*```
|
|
7156
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
7157
|
-
* @group Global methods
|
|
7158
|
-
*/
|
|
7159
|
-
export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
7160
|
-
/**
|
|
7161
|
-
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
7162
|
-
* format.
|
|
7163
|
-
* @param data
|
|
7164
|
-
* @returns exports TML data
|
|
7165
|
-
* @example
|
|
7166
|
-
* ```js
|
|
7167
|
-
* exportTML({
|
|
7168
|
-
* metadata: [
|
|
7169
|
-
* {
|
|
7170
|
-
* type: "LIVEBOARD", //Metadata Type
|
|
7171
|
-
* identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
|
|
7172
|
-
* }
|
|
7173
|
-
* ],
|
|
7174
|
-
* export_associated: false,//indicates whether to export associated metadata objects
|
|
7175
|
-
* export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
|
|
7176
|
-
* //exporting a Liveboard and its associated objects, the API
|
|
7177
|
-
* //returns the Liveboard TML data with the FQNs of the referenced
|
|
7178
|
-
* //worksheet. If the exported TML data includes FQNs, you don't need
|
|
7179
|
-
* //to manually add FQNs of the referenced objects during TML import.
|
|
7180
|
-
* edoc_format: "JSON" //It takes JSON or YAML value
|
|
7181
|
-
* }).then(result => {
|
|
7182
|
-
* console.log(result);
|
|
7183
|
-
* }).catch(error => {
|
|
7184
|
-
* console.error(error);
|
|
7185
|
-
* });
|
|
7186
|
-
* ```
|
|
7187
|
-
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
7188
|
-
* @group Global methods
|
|
7189
|
-
*/
|
|
7190
|
-
export declare const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
7191
|
-
/**
|
|
7192
|
-
*
|
|
7193
|
-
*/
|
|
7194
|
-
export declare function reset(): void;
|
|
7195
|
-
|
|
7196
7273
|
/**
|
|
7197
|
-
*
|
|
7198
|
-
*
|
|
7274
|
+
* The list of customization css variables. These
|
|
7275
|
+
* are the only allowed variables possible.
|
|
7199
7276
|
*/
|
|
7200
|
-
export interface
|
|
7277
|
+
export interface CustomCssVariables {
|
|
7201
7278
|
/**
|
|
7202
|
-
*
|
|
7279
|
+
* Background color of the Liveboard, visualization, Search, and Answer pages.
|
|
7203
7280
|
*/
|
|
7204
|
-
|
|
7205
|
-
}
|
|
7206
|
-
/**
|
|
7207
|
-
* Create a conversation embed, which can be integrated inside
|
|
7208
|
-
* chatbots or other conversational interfaces.
|
|
7209
|
-
* @example
|
|
7210
|
-
* ```js
|
|
7211
|
-
* import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
|
|
7212
|
-
*
|
|
7213
|
-
* const conversation = new BodylessConversation({
|
|
7214
|
-
* worksheetId: 'worksheetId',
|
|
7215
|
-
* });
|
|
7216
|
-
*
|
|
7217
|
-
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
7218
|
-
*
|
|
7219
|
-
* // append the container to the DOM
|
|
7220
|
-
* document.body.appendChild(container); // or to any other element
|
|
7221
|
-
* ```
|
|
7222
|
-
* @group Embed components
|
|
7223
|
-
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
|
|
7224
|
-
*/
|
|
7225
|
-
export declare class BodylessConversation {
|
|
7226
|
-
constructor(viewConfig: BodylessConversationViewConfig);
|
|
7227
|
-
sendMessage(userMessage: string): Promise<{
|
|
7228
|
-
error: any;
|
|
7229
|
-
container?: undefined;
|
|
7230
|
-
} | {
|
|
7231
|
-
container: HTMLDivElement;
|
|
7232
|
-
error?: undefined;
|
|
7233
|
-
}>;
|
|
7234
|
-
}
|
|
7235
|
-
|
|
7236
|
-
export declare let loggedInStatus: boolean;
|
|
7237
|
-
export declare let samlAuthWindow: Window;
|
|
7238
|
-
export declare let samlCompletionPromise: Promise<void>;
|
|
7239
|
-
export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
|
|
7240
|
-
/**
|
|
7241
|
-
* Enum for auth failure types. This is the parameter passed to the listner
|
|
7242
|
-
* of {@link AuthStatus.FAILURE}.
|
|
7243
|
-
* @group Authentication / Init
|
|
7244
|
-
*/
|
|
7245
|
-
export declare enum AuthFailureType {
|
|
7246
|
-
SDK = "SDK",
|
|
7247
|
-
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
7248
|
-
EXPIRY = "EXPIRY",
|
|
7249
|
-
OTHER = "OTHER",
|
|
7250
|
-
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
|
|
7251
|
-
}
|
|
7252
|
-
/**
|
|
7253
|
-
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
7254
|
-
* @group Authentication / Init
|
|
7255
|
-
*/
|
|
7256
|
-
export declare enum AuthStatus {
|
|
7281
|
+
'--ts-var-root-background'?: string;
|
|
7257
7282
|
/**
|
|
7258
|
-
*
|
|
7283
|
+
* Color of the text on application pages.
|
|
7259
7284
|
*/
|
|
7260
|
-
|
|
7285
|
+
'--ts-var-root-color'?: string;
|
|
7261
7286
|
/**
|
|
7262
|
-
*
|
|
7287
|
+
* Font type for the text on application pages.
|
|
7263
7288
|
*/
|
|
7264
|
-
|
|
7289
|
+
'--ts-var-root-font-family'?: string;
|
|
7265
7290
|
/**
|
|
7266
|
-
*
|
|
7267
|
-
* Emits when iframe is loaded and session info is available
|
|
7291
|
+
* Text transformation specification for UI elements in the app.
|
|
7268
7292
|
*/
|
|
7269
|
-
|
|
7293
|
+
'--ts-var-root-text-transform'?: string;
|
|
7270
7294
|
/**
|
|
7271
|
-
*
|
|
7295
|
+
* Font color of the text on toggle buttons such as
|
|
7296
|
+
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
7297
|
+
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
7298
|
+
* experience), and title text on the AI-generated charts and tables.
|
|
7299
|
+
* The default color code is #2770EF.
|
|
7300
|
+
*
|
|
7272
7301
|
*/
|
|
7273
|
-
|
|
7302
|
+
'--ts-var-application-color'?: string;
|
|
7274
7303
|
/**
|
|
7275
|
-
*
|
|
7304
|
+
* Background color of the top navigation panel.
|
|
7276
7305
|
*/
|
|
7277
|
-
|
|
7306
|
+
'--ts-var-nav-background'?: string;
|
|
7278
7307
|
/**
|
|
7279
|
-
*
|
|
7280
|
-
* popup is waiting to be triggered either programmatically
|
|
7281
|
-
* or by the trigger button.
|
|
7282
|
-
* @version SDK: 1.19.0
|
|
7308
|
+
* Font color of the top navigation panel.
|
|
7283
7309
|
*/
|
|
7284
|
-
|
|
7285
|
-
}
|
|
7286
|
-
/**
|
|
7287
|
-
* Event emitter returned from {@link init}.
|
|
7288
|
-
* @group Authentication / Init
|
|
7289
|
-
*/
|
|
7290
|
-
export interface AuthEventEmitter {
|
|
7310
|
+
'--ts-var-nav-color'?: string;
|
|
7291
7311
|
/**
|
|
7292
|
-
*
|
|
7293
|
-
* @param event
|
|
7294
|
-
* @param listener
|
|
7312
|
+
* Background color of the *Search data* button.
|
|
7295
7313
|
*/
|
|
7296
|
-
|
|
7314
|
+
'--ts-var-search-data-button-background'?: string;
|
|
7297
7315
|
/**
|
|
7298
|
-
*
|
|
7299
|
-
* @param event
|
|
7300
|
-
* @param listener
|
|
7316
|
+
* Color of the text on the *Search data* button.
|
|
7301
7317
|
*/
|
|
7302
|
-
|
|
7303
|
-
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
7304
|
-
once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
7305
|
-
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
7306
|
-
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
7318
|
+
'--ts-var-search-data-button-font-color'?: string;
|
|
7307
7319
|
/**
|
|
7308
|
-
*
|
|
7309
|
-
* @param {@link AuthEvent}
|
|
7310
|
-
*/
|
|
7311
|
-
emit(event: AuthEvent, ...args: any[]): boolean;
|
|
7312
|
-
/**
|
|
7313
|
-
* Remove listener from the emitter returned from init.
|
|
7314
|
-
* @param event
|
|
7315
|
-
* @param listener
|
|
7316
|
-
* @param context
|
|
7317
|
-
* @param once
|
|
7318
|
-
*/
|
|
7319
|
-
off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
|
|
7320
|
-
/**
|
|
7321
|
-
* Remove all the event listeners
|
|
7322
|
-
* @param event
|
|
7323
|
-
*/
|
|
7324
|
-
removeAllListeners(event: AuthStatus): this;
|
|
7325
|
-
}
|
|
7326
|
-
/**
|
|
7327
|
-
* Events which can be triggered on the emitter returned from {@link init}.
|
|
7328
|
-
* @group Authentication / Init
|
|
7329
|
-
*/
|
|
7330
|
-
export declare enum AuthEvent {
|
|
7331
|
-
/**
|
|
7332
|
-
* Manually trigger the SSO popup. This is useful when
|
|
7333
|
-
* authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
|
|
7334
|
-
*/
|
|
7335
|
-
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
7336
|
-
}
|
|
7337
|
-
/**
|
|
7338
|
-
*
|
|
7339
|
-
*/
|
|
7340
|
-
export declare function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
|
|
7341
|
-
/**
|
|
7342
|
-
*
|
|
7343
|
-
* @param eventEmitter
|
|
7344
|
-
*/
|
|
7345
|
-
export declare function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
|
|
7346
|
-
/**
|
|
7347
|
-
*
|
|
7348
|
-
*/
|
|
7349
|
-
export declare function notifyAuthSDKSuccess(): void;
|
|
7350
|
-
/**
|
|
7351
|
-
*
|
|
7352
|
-
*/
|
|
7353
|
-
export declare function notifyAuthSuccess(): Promise<void>;
|
|
7354
|
-
/**
|
|
7355
|
-
*
|
|
7356
|
-
* @param failureType
|
|
7357
|
-
*/
|
|
7358
|
-
export declare function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
7359
|
-
/**
|
|
7360
|
-
*
|
|
7361
|
-
*/
|
|
7362
|
-
export declare function notifyLogout(): void;
|
|
7363
|
-
/**
|
|
7364
|
-
* Services to be called after the login is successful,
|
|
7365
|
-
* This should be called after the cookie is set for cookie auth or
|
|
7366
|
-
* after the token is set for cookieless.
|
|
7367
|
-
* @return {Promise<void>}
|
|
7368
|
-
* @example
|
|
7369
|
-
* ```js
|
|
7370
|
-
* await postLoginService();
|
|
7371
|
-
* ```
|
|
7372
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7373
|
-
*/
|
|
7374
|
-
export declare function postLoginService(): Promise<void>;
|
|
7375
|
-
/**
|
|
7376
|
-
* Return releaseVersion if available
|
|
7377
|
-
*/
|
|
7378
|
-
export declare function getReleaseVersion(): string;
|
|
7379
|
-
/**
|
|
7380
|
-
* Perform token based authentication
|
|
7381
|
-
* @param embedConfig The embed configuration
|
|
7382
|
-
*/
|
|
7383
|
-
export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7384
|
-
/**
|
|
7385
|
-
* Validate embedConfig parameters required for cookielessTokenAuth
|
|
7386
|
-
* @param embedConfig The embed configuration
|
|
7387
|
-
*/
|
|
7388
|
-
export declare const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7389
|
-
/**
|
|
7390
|
-
* Perform basic authentication to the ThoughtSpot cluster using the cluster
|
|
7391
|
-
* credentials.
|
|
7392
|
-
*
|
|
7393
|
-
* Warning: This feature is primarily intended for developer testing. It is
|
|
7394
|
-
* strongly advised not to use this authentication method in production.
|
|
7395
|
-
* @param embedConfig The embed configuration
|
|
7396
|
-
*/
|
|
7397
|
-
export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7398
|
-
export declare const doSamlAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7399
|
-
export declare const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7400
|
-
export declare const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7401
|
-
/**
|
|
7402
|
-
* Perform authentication on the ThoughtSpot cluster
|
|
7403
|
-
* @param embedConfig The embed configuration
|
|
7404
|
-
*/
|
|
7405
|
-
export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
7406
|
-
/**
|
|
7407
|
-
* Check if we are authenticated to the ThoughtSpot cluster
|
|
7408
|
-
*/
|
|
7409
|
-
export declare const isAuthenticated: () => boolean;
|
|
7410
|
-
|
|
7411
|
-
export type SessionInfo = {
|
|
7412
|
-
releaseVersion: string;
|
|
7413
|
-
userGUID: string;
|
|
7414
|
-
currentOrgId: number;
|
|
7415
|
-
privileges: string[];
|
|
7416
|
-
mixpanelToken: string;
|
|
7417
|
-
isPublicUser: boolean;
|
|
7418
|
-
clusterId: string;
|
|
7419
|
-
clusterName: string;
|
|
7420
|
-
[key: string]: any;
|
|
7421
|
-
};
|
|
7422
|
-
export type PreauthInfo = {
|
|
7423
|
-
info?: SessionInfo;
|
|
7424
|
-
headers: Record<string, string>;
|
|
7425
|
-
status: number;
|
|
7426
|
-
[key: string]: any;
|
|
7427
|
-
};
|
|
7428
|
-
/**
|
|
7429
|
-
* Processes the session info response and returns the session info object.
|
|
7430
|
-
* @param preauthInfoResp {any} Response from the session info API.
|
|
7431
|
-
* @returns {PreauthInfo} The session info object.
|
|
7432
|
-
* @example ```js
|
|
7433
|
-
* const preauthInfoResp = await fetch(sessionInfoPath);
|
|
7434
|
-
* const sessionInfo = await formatPreauthInfo(preauthInfoResp);
|
|
7435
|
-
* console.log(sessionInfo);
|
|
7436
|
-
* ```
|
|
7437
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7438
|
-
*/
|
|
7439
|
-
export declare const formatPreauthInfo: (preauthInfoResp: any) => Promise<PreauthInfo>;
|
|
7440
|
-
/**
|
|
7441
|
-
* Returns the session info object and caches it for future use.
|
|
7442
|
-
* Once fetched the session info object is cached and returned from the cache on
|
|
7443
|
-
* subsequent calls.
|
|
7444
|
-
* @example ```js
|
|
7445
|
-
* const preauthInfo = await getPreauthInfo();
|
|
7446
|
-
* console.log(preauthInfo);
|
|
7447
|
-
* ```
|
|
7448
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7449
|
-
* @returns {Promise<SessionInfo>} The session info object.
|
|
7450
|
-
*/
|
|
7451
|
-
export declare function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
|
|
7452
|
-
/**
|
|
7453
|
-
* Returns the cached session info object and caches it for future use.
|
|
7454
|
-
* Once fetched the session info object is cached and returned from the cache on
|
|
7455
|
-
* subsequent calls.
|
|
7456
|
-
* This cache is cleared when inti is called OR resetCachedSessionInfo is called.
|
|
7457
|
-
* @example ```js
|
|
7458
|
-
* const sessionInfo = await getSessionInfo();
|
|
7459
|
-
* console.log(sessionInfo);
|
|
7460
|
-
* ```
|
|
7461
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7462
|
-
* @returns {Promise<SessionInfo>} The session info object.
|
|
7463
|
-
*/
|
|
7464
|
-
export declare function getSessionInfo(): Promise<SessionInfo>;
|
|
7465
|
-
/**
|
|
7466
|
-
* Returns the cached session info object. If the client is not authenticated the
|
|
7467
|
-
* function will return null.
|
|
7468
|
-
* @example ```js
|
|
7469
|
-
* const sessionInfo = getCachedSessionInfo();
|
|
7470
|
-
* if (sessionInfo) {
|
|
7471
|
-
* console.log(sessionInfo);
|
|
7472
|
-
* } else {
|
|
7473
|
-
* console.log('Not authenticated');
|
|
7474
|
-
* }
|
|
7475
|
-
* ```
|
|
7476
|
-
* @returns {SessionInfo | null} The session info object.
|
|
7477
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7478
|
-
*/
|
|
7479
|
-
export declare function getCachedSessionInfo(): SessionInfo | null;
|
|
7480
|
-
/**
|
|
7481
|
-
* Processes the session info response and returns the session info object.
|
|
7482
|
-
* @param sessionInfoResp {any} Response from the session info API.
|
|
7483
|
-
* @returns {SessionInfo} The session info object.
|
|
7484
|
-
* @example ```js
|
|
7485
|
-
* const sessionInfoResp = await fetch(sessionInfoPath);
|
|
7486
|
-
* const sessionInfo = getSessionDetails(sessionInfoResp);
|
|
7487
|
-
* console.log(sessionInfo);
|
|
7488
|
-
* ```
|
|
7489
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7490
|
-
*/
|
|
7491
|
-
export declare const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
7492
|
-
/**
|
|
7493
|
-
* Resets the cached session info object and forces a new fetch on the next call.
|
|
7494
|
-
* @example ```js
|
|
7495
|
-
* resetCachedSessionInfo();
|
|
7496
|
-
* const sessionInfo = await getSessionInfo();
|
|
7497
|
-
* console.log(sessionInfo);
|
|
7498
|
-
* ```
|
|
7499
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7500
|
-
* @returns {void}
|
|
7501
|
-
*/
|
|
7502
|
-
export declare function resetCachedSessionInfo(): void;
|
|
7503
|
-
/**
|
|
7504
|
-
* Resets the cached preauth info object and forces a new fetch on the next call.
|
|
7505
|
-
* @example ```js
|
|
7506
|
-
* resetCachedPreauthInfo();
|
|
7507
|
-
* const preauthInfo = await getPreauthInfo();
|
|
7508
|
-
* console.log(preauthInfo);
|
|
7509
|
-
* ```
|
|
7510
|
-
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
7511
|
-
* @returns {void}
|
|
7512
|
-
*/
|
|
7513
|
-
export declare function resetCachedPreauthInfo(): void;
|
|
7514
|
-
|
|
7515
|
-
/**
|
|
7516
|
-
* The list of customization css variables. These
|
|
7517
|
-
* are the only allowed variables possible.
|
|
7518
|
-
*/
|
|
7519
|
-
export interface CustomCssVariables {
|
|
7520
|
-
/**
|
|
7521
|
-
* Background color of the Liveboard, visualization, Search, and Answer pages.
|
|
7522
|
-
*/
|
|
7523
|
-
'--ts-var-root-background'?: string;
|
|
7524
|
-
/**
|
|
7525
|
-
* Color of the text on application pages.
|
|
7526
|
-
*/
|
|
7527
|
-
'--ts-var-root-color'?: string;
|
|
7528
|
-
/**
|
|
7529
|
-
* Font type for the text on application pages.
|
|
7530
|
-
*/
|
|
7531
|
-
'--ts-var-root-font-family'?: string;
|
|
7532
|
-
/**
|
|
7533
|
-
* Text transformation specification for UI elements in the app.
|
|
7534
|
-
*/
|
|
7535
|
-
'--ts-var-root-text-transform'?: string;
|
|
7536
|
-
/**
|
|
7537
|
-
* Font color of the text on toggle buttons such as
|
|
7538
|
-
* **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
|
|
7539
|
-
* the text color of the chart and table tiles on Home page (New modular Homepage
|
|
7540
|
-
* experience), and title text on the AI-generated charts and tables.
|
|
7541
|
-
* The default color code is #2770EF.
|
|
7542
|
-
*
|
|
7543
|
-
*/
|
|
7544
|
-
'--ts-var-application-color'?: string;
|
|
7545
|
-
/**
|
|
7546
|
-
* Background color of the top navigation panel.
|
|
7547
|
-
*/
|
|
7548
|
-
'--ts-var-nav-background'?: string;
|
|
7549
|
-
/**
|
|
7550
|
-
* Font color of the top navigation panel.
|
|
7551
|
-
*/
|
|
7552
|
-
'--ts-var-nav-color'?: string;
|
|
7553
|
-
/**
|
|
7554
|
-
* Background color of the *Search data* button.
|
|
7555
|
-
*/
|
|
7556
|
-
'--ts-var-search-data-button-background'?: string;
|
|
7557
|
-
/**
|
|
7558
|
-
* Color of the text on the *Search data* button.
|
|
7559
|
-
*/
|
|
7560
|
-
'--ts-var-search-data-button-font-color'?: string;
|
|
7561
|
-
/**
|
|
7562
|
-
* Font of the text on the *Search data* button.
|
|
7320
|
+
* Font of the text on the *Search data* button.
|
|
7563
7321
|
*/
|
|
7564
7322
|
'--ts-var-search-data-button-font-family'?: string;
|
|
7565
7323
|
/**
|
|
@@ -7612,7 +7370,7 @@ export interface CustomCssVariables {
|
|
|
7612
7370
|
/**
|
|
7613
7371
|
* Background color of the previously asked prompt message in the Spotter page.
|
|
7614
7372
|
*/
|
|
7615
|
-
'--ts-var-spotter-prompt-background'
|
|
7373
|
+
'--ts-var-spotter-prompt-background'?: string;
|
|
7616
7374
|
/**
|
|
7617
7375
|
* Background color of the data panel.
|
|
7618
7376
|
*/
|
|
@@ -8078,6 +7836,291 @@ export declare class AnswerService {
|
|
|
8078
7836
|
setTMLOverride(override: any): void;
|
|
8079
7837
|
}
|
|
8080
7838
|
|
|
7839
|
+
import '../utils/with-resolvers-polyfill';
|
|
7840
|
+
export interface executeTMLInput {
|
|
7841
|
+
metadata_tmls: string[];
|
|
7842
|
+
import_policy?: 'PARTIAL' | 'ALL_OR_NONE' | 'VALIDATE_ONLY';
|
|
7843
|
+
create_new?: boolean;
|
|
7844
|
+
}
|
|
7845
|
+
export interface exportTMLInput {
|
|
7846
|
+
metadata: {
|
|
7847
|
+
identifier: string;
|
|
7848
|
+
type?: 'LIVEBOARD' | 'ANSWER' | 'LOGICAL_TABLE' | 'CONNECTION';
|
|
7849
|
+
}[];
|
|
7850
|
+
export_associated?: boolean;
|
|
7851
|
+
export_fqn?: boolean;
|
|
7852
|
+
edoc_format?: 'YAML' | 'JSON';
|
|
7853
|
+
}
|
|
7854
|
+
export declare let authPromise: Promise<boolean>;
|
|
7855
|
+
export declare const getAuthPromise: () => Promise<boolean>;
|
|
7856
|
+
export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
|
|
7857
|
+
/**
|
|
7858
|
+
* Perform authentication on the ThoughtSpot app as applicable.
|
|
7859
|
+
*/
|
|
7860
|
+
export declare const handleAuth: () => Promise<boolean>;
|
|
7861
|
+
/**
|
|
7862
|
+
* Prefetches static resources from the specified URL. Web browsers can then cache the
|
|
7863
|
+
* prefetched resources and serve them from the user's local disk to provide faster access
|
|
7864
|
+
* to your app.
|
|
7865
|
+
* @param url The URL provided for prefetch
|
|
7866
|
+
* @param prefetchFeatures Specify features which needs to be prefetched.
|
|
7867
|
+
* @param additionalFlags This can be used to add any URL flag.
|
|
7868
|
+
* @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
|
|
7869
|
+
* @group Global methods
|
|
7870
|
+
*/
|
|
7871
|
+
export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[], additionalFlags?: {
|
|
7872
|
+
[key: string]: string | number | boolean;
|
|
7873
|
+
}) => void;
|
|
7874
|
+
export declare const createAndSetInitPromise: () => void;
|
|
7875
|
+
export declare const getInitPromise: () => Promise<ReturnType<typeof init>>;
|
|
7876
|
+
export declare const getIsInitCalled: () => boolean;
|
|
7877
|
+
/**
|
|
7878
|
+
* Initializes the Visual Embed SDK globally and perform
|
|
7879
|
+
* authentication if applicable. This function needs to be called before any ThoughtSpot
|
|
7880
|
+
* component like Liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
|
|
7881
|
+
* to actually embed. That is handled internally.
|
|
7882
|
+
* @param embedConfig The configuration object containing ThoughtSpot host,
|
|
7883
|
+
* authentication mechanism and so on.
|
|
7884
|
+
* @example
|
|
7885
|
+
* ```js
|
|
7886
|
+
* const authStatus = init({
|
|
7887
|
+
* thoughtSpotHost: 'https://my.thoughtspot.cloud',
|
|
7888
|
+
* authType: AuthType.None,
|
|
7889
|
+
* });
|
|
7890
|
+
* authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
|
|
7891
|
+
* ```
|
|
7892
|
+
* @returns {@link AuthEventEmitter} event emitter which emits events on authentication success,
|
|
7893
|
+
* failure and logout. See {@link AuthStatus}
|
|
7894
|
+
* @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
7895
|
+
* @group Authentication / Init
|
|
7896
|
+
*/
|
|
7897
|
+
export declare const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
|
|
7898
|
+
/**
|
|
7899
|
+
*
|
|
7900
|
+
*/
|
|
7901
|
+
export declare function disableAutoLogin(): void;
|
|
7902
|
+
/**
|
|
7903
|
+
* Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
|
|
7904
|
+
* prevent the SDK from automatically logging in again.
|
|
7905
|
+
*
|
|
7906
|
+
* You can call the `init` method again to re login, if autoLogin is set to
|
|
7907
|
+
* true in this second call it will be honored.
|
|
7908
|
+
* @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
|
|
7909
|
+
* @returns Promise which resolves when logout completes.
|
|
7910
|
+
* @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
7911
|
+
* @group Global methods
|
|
7912
|
+
*/
|
|
7913
|
+
export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
|
|
7914
|
+
/**
|
|
7915
|
+
* Renders functions in a queue, resolves to next function only after the callback next
|
|
7916
|
+
* is called
|
|
7917
|
+
* @param fn The function being registered
|
|
7918
|
+
*/
|
|
7919
|
+
export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
|
|
7920
|
+
/**
|
|
7921
|
+
* Imports TML representation of the metadata objects into ThoughtSpot.
|
|
7922
|
+
* @param data
|
|
7923
|
+
* @returns imports TML data into ThoughtSpot
|
|
7924
|
+
* @example
|
|
7925
|
+
* ```js
|
|
7926
|
+
* executeTML({
|
|
7927
|
+
* //Array of metadata Tmls in string format
|
|
7928
|
+
* metadata_tmls: [
|
|
7929
|
+
* "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
|
|
7930
|
+
* \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
|
|
7931
|
+
* ],
|
|
7932
|
+
* import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
|
|
7933
|
+
* create_new: false, // If selected, creates TML objects with new GUIDs.
|
|
7934
|
+
* }).then(result => {
|
|
7935
|
+
* console.log(result);
|
|
7936
|
+
* }).catch(error => {
|
|
7937
|
+
* console.error(error);
|
|
7938
|
+
* });
|
|
7939
|
+
*```
|
|
7940
|
+
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
7941
|
+
* @group Global methods
|
|
7942
|
+
*/
|
|
7943
|
+
export declare const executeTML: (data: executeTMLInput) => Promise<any>;
|
|
7944
|
+
/**
|
|
7945
|
+
* Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
|
|
7946
|
+
* format.
|
|
7947
|
+
* @param data
|
|
7948
|
+
* @returns exports TML data
|
|
7949
|
+
* @example
|
|
7950
|
+
* ```js
|
|
7951
|
+
* exportTML({
|
|
7952
|
+
* metadata: [
|
|
7953
|
+
* {
|
|
7954
|
+
* type: "LIVEBOARD", //Metadata Type
|
|
7955
|
+
* identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
|
|
7956
|
+
* }
|
|
7957
|
+
* ],
|
|
7958
|
+
* export_associated: false,//indicates whether to export associated metadata objects
|
|
7959
|
+
* export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
|
|
7960
|
+
* //exporting a Liveboard and its associated objects, the API
|
|
7961
|
+
* //returns the Liveboard TML data with the FQNs of the referenced
|
|
7962
|
+
* //worksheet. If the exported TML data includes FQNs, you don't need
|
|
7963
|
+
* //to manually add FQNs of the referenced objects during TML import.
|
|
7964
|
+
* edoc_format: "JSON" //It takes JSON or YAML value
|
|
7965
|
+
* }).then(result => {
|
|
7966
|
+
* console.log(result);
|
|
7967
|
+
* }).catch(error => {
|
|
7968
|
+
* console.error(error);
|
|
7969
|
+
* });
|
|
7970
|
+
* ```
|
|
7971
|
+
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
7972
|
+
* @group Global methods
|
|
7973
|
+
*/
|
|
7974
|
+
export declare const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
7975
|
+
/**
|
|
7976
|
+
*
|
|
7977
|
+
*/
|
|
7978
|
+
export declare function reset(): void;
|
|
7979
|
+
|
|
7980
|
+
/**
|
|
7981
|
+
* Configuration for bodyless conversation options.
|
|
7982
|
+
* @group Embed components
|
|
7983
|
+
*/
|
|
7984
|
+
export interface BodylessConversationViewConfig extends ViewConfig {
|
|
7985
|
+
/**
|
|
7986
|
+
* The ID of the worksheet to use for the conversation.
|
|
7987
|
+
*/
|
|
7988
|
+
worksheetId: string;
|
|
7989
|
+
}
|
|
7990
|
+
/**
|
|
7991
|
+
* Create a conversation embed, which can be integrated inside
|
|
7992
|
+
* chatbots or other conversational interfaces.
|
|
7993
|
+
* @example
|
|
7994
|
+
* ```js
|
|
7995
|
+
* import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
|
|
7996
|
+
*
|
|
7997
|
+
* const conversation = new BodylessConversation({
|
|
7998
|
+
* worksheetId: 'worksheetId',
|
|
7999
|
+
* });
|
|
8000
|
+
*
|
|
8001
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
8002
|
+
*
|
|
8003
|
+
* // append the container to the DOM
|
|
8004
|
+
* document.body.appendChild(container); // or to any other element
|
|
8005
|
+
* ```
|
|
8006
|
+
* @group Embed components
|
|
8007
|
+
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
|
|
8008
|
+
*/
|
|
8009
|
+
export declare class BodylessConversation {
|
|
8010
|
+
constructor(viewConfig: BodylessConversationViewConfig);
|
|
8011
|
+
sendMessage(userMessage: string): Promise<{
|
|
8012
|
+
error: any;
|
|
8013
|
+
container?: undefined;
|
|
8014
|
+
} | {
|
|
8015
|
+
container: HTMLDivElement;
|
|
8016
|
+
error?: undefined;
|
|
8017
|
+
}>;
|
|
8018
|
+
}
|
|
8019
|
+
|
|
8020
|
+
export type SessionInfo = {
|
|
8021
|
+
releaseVersion: string;
|
|
8022
|
+
userGUID: string;
|
|
8023
|
+
currentOrgId: number;
|
|
8024
|
+
privileges: string[];
|
|
8025
|
+
mixpanelToken: string;
|
|
8026
|
+
isPublicUser: boolean;
|
|
8027
|
+
clusterId: string;
|
|
8028
|
+
clusterName: string;
|
|
8029
|
+
[key: string]: any;
|
|
8030
|
+
};
|
|
8031
|
+
export type PreauthInfo = {
|
|
8032
|
+
info?: SessionInfo;
|
|
8033
|
+
headers: Record<string, string>;
|
|
8034
|
+
status: number;
|
|
8035
|
+
[key: string]: any;
|
|
8036
|
+
};
|
|
8037
|
+
/**
|
|
8038
|
+
* Processes the session info response and returns the session info object.
|
|
8039
|
+
* @param preauthInfoResp {any} Response from the session info API.
|
|
8040
|
+
* @returns {PreauthInfo} The session info object.
|
|
8041
|
+
* @example ```js
|
|
8042
|
+
* const preauthInfoResp = await fetch(sessionInfoPath);
|
|
8043
|
+
* const sessionInfo = await formatPreauthInfo(preauthInfoResp);
|
|
8044
|
+
* console.log(sessionInfo);
|
|
8045
|
+
* ```
|
|
8046
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8047
|
+
*/
|
|
8048
|
+
export declare const formatPreauthInfo: (preauthInfoResp: any) => Promise<PreauthInfo>;
|
|
8049
|
+
/**
|
|
8050
|
+
* Returns the session info object and caches it for future use.
|
|
8051
|
+
* Once fetched the session info object is cached and returned from the cache on
|
|
8052
|
+
* subsequent calls.
|
|
8053
|
+
* @example ```js
|
|
8054
|
+
* const preauthInfo = await getPreauthInfo();
|
|
8055
|
+
* console.log(preauthInfo);
|
|
8056
|
+
* ```
|
|
8057
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8058
|
+
* @returns {Promise<SessionInfo>} The session info object.
|
|
8059
|
+
*/
|
|
8060
|
+
export declare function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
|
|
8061
|
+
/**
|
|
8062
|
+
* Returns the cached session info object and caches it for future use.
|
|
8063
|
+
* Once fetched the session info object is cached and returned from the cache on
|
|
8064
|
+
* subsequent calls.
|
|
8065
|
+
* This cache is cleared when inti is called OR resetCachedSessionInfo is called.
|
|
8066
|
+
* @example ```js
|
|
8067
|
+
* const sessionInfo = await getSessionInfo();
|
|
8068
|
+
* console.log(sessionInfo);
|
|
8069
|
+
* ```
|
|
8070
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8071
|
+
* @returns {Promise<SessionInfo>} The session info object.
|
|
8072
|
+
*/
|
|
8073
|
+
export declare function getSessionInfo(): Promise<SessionInfo>;
|
|
8074
|
+
/**
|
|
8075
|
+
* Returns the cached session info object. If the client is not authenticated the
|
|
8076
|
+
* function will return null.
|
|
8077
|
+
* @example ```js
|
|
8078
|
+
* const sessionInfo = getCachedSessionInfo();
|
|
8079
|
+
* if (sessionInfo) {
|
|
8080
|
+
* console.log(sessionInfo);
|
|
8081
|
+
* } else {
|
|
8082
|
+
* console.log('Not authenticated');
|
|
8083
|
+
* }
|
|
8084
|
+
* ```
|
|
8085
|
+
* @returns {SessionInfo | null} The session info object.
|
|
8086
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8087
|
+
*/
|
|
8088
|
+
export declare function getCachedSessionInfo(): SessionInfo | null;
|
|
8089
|
+
/**
|
|
8090
|
+
* Processes the session info response and returns the session info object.
|
|
8091
|
+
* @param sessionInfoResp {any} Response from the session info API.
|
|
8092
|
+
* @returns {SessionInfo} The session info object.
|
|
8093
|
+
* @example ```js
|
|
8094
|
+
* const sessionInfoResp = await fetch(sessionInfoPath);
|
|
8095
|
+
* const sessionInfo = getSessionDetails(sessionInfoResp);
|
|
8096
|
+
* console.log(sessionInfo);
|
|
8097
|
+
* ```
|
|
8098
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8099
|
+
*/
|
|
8100
|
+
export declare const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
8101
|
+
/**
|
|
8102
|
+
* Resets the cached session info object and forces a new fetch on the next call.
|
|
8103
|
+
* @example ```js
|
|
8104
|
+
* resetCachedSessionInfo();
|
|
8105
|
+
* const sessionInfo = await getSessionInfo();
|
|
8106
|
+
* console.log(sessionInfo);
|
|
8107
|
+
* ```
|
|
8108
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8109
|
+
* @returns {void}
|
|
8110
|
+
*/
|
|
8111
|
+
export declare function resetCachedSessionInfo(): void;
|
|
8112
|
+
/**
|
|
8113
|
+
* Resets the cached preauth info object and forces a new fetch on the next call.
|
|
8114
|
+
* @example ```js
|
|
8115
|
+
* resetCachedPreauthInfo();
|
|
8116
|
+
* const preauthInfo = await getPreauthInfo();
|
|
8117
|
+
* console.log(preauthInfo);
|
|
8118
|
+
* ```
|
|
8119
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
8120
|
+
* @returns {void}
|
|
8121
|
+
*/
|
|
8122
|
+
export declare function resetCachedPreauthInfo(): void;
|
|
8123
|
+
|
|
8081
8124
|
/**
|
|
8082
8125
|
* Gets the configuration embed was initialized with.
|
|
8083
8126
|
* @returns {@link EmbedConfig} The configuration embed was initialized with.
|