Skip to content

Commit bc0bb6e

Browse files
SCAL-234606 Add forced token generation flags in embed sdk
1 parent 5ba92ca commit bc0bb6e

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

src/embed/liveboard.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,32 @@ export interface LiveboardViewConfig
338338
* ```
339339
*/
340340
hideIrrelevantChipsInLiveboardTabs?: boolean;
341+
342+
/**
343+
* The Liveboard to run on regular intervals to fetch the cdw token.
344+
* Use either liveboardId or pinboardId to reference the Liveboard to embed.
345+
* @version SDK: 1.35.0 | ThoughtSpot:10.6.0.cl
346+
* @example
347+
* ```js
348+
* const embed = new LiveboardEmbed('#embed-container', {
349+
* ... // other options
350+
* oAuthPollingInterval: value in milli seconds,
351+
* })
352+
*/
353+
oAuthPollingInterval?: string;
354+
355+
/**
356+
* The Liveboard to run on regular intervals to fetch the cdw token.
357+
* Use either liveboardId or pinboardId to reference the Liveboard to embed.
358+
* @version SDK: 1.35.0 | ThoughtSpot:10.6.0.cl
359+
* @example
360+
* ```js
361+
* const embed = new LiveboardEmbed('#embed-container', {
362+
* ... // other options
363+
* oAuthPollingInterval: false,
364+
* })
365+
*/
366+
isForceRedirect?: boolean;
341367
}
342368

343369
/**
@@ -399,6 +425,8 @@ export class LiveboardEmbed extends V1Embed {
399425
enable2ColumnLayout,
400426
dataPanelV2 = false,
401427
enableCustomColumnGroups = false,
428+
oAuthPollingInterval,
429+
isForceRedirect,
402430
} = this.viewConfig;
403431

404432
const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
@@ -445,6 +473,14 @@ export class LiveboardEmbed extends V1Embed {
445473
params[Param.enableAskSage] = enableAskSage;
446474
}
447475

476+
if (oAuthPollingInterval !== undefined) {
477+
params[Param.OAUTH_POLLING_INTERVAL] = oAuthPollingInterval;
478+
}
479+
480+
if (isForceRedirect !== undefined) {
481+
params[Param.IS_FORCE_REDIRECT] = isForceRedirect;
482+
}
483+
448484
params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
449485
params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
450486
params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;

src/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,6 +3308,8 @@ export enum Param {
33083308
SpotterEnabled = 'isSpotterExperienceEnabled',
33093309
IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
33103310
OverrideOrgId = 'orgId',
3311+
OAUTH_POLLING_INTERVAL = 'oAuthPollingInterval',
3312+
IS_FORCE_REDIRECT = 'isForceRedirect',
33113313
}
33123314

33133315
/**

0 commit comments

Comments
 (0)