@thoughtspot/visual-embed-sdk 1.29.0-alpha.8 → 1.29.0-alpha.SCAL-205893-1
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/auth.d.ts +14 -17
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +45 -59
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.d.ts +12 -0
- package/cjs/src/auth.spec.d.ts.map +1 -1
- package/cjs/src/auth.spec.js +89 -67
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/authToken.d.ts +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js +10 -4
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/embed/app.spec.js +4 -2
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js +2 -0
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js +1 -0
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/embed.spec.js +3 -0
- package/cjs/src/embed/embed.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +3 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +2 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/pinboard.spec.js +3 -0
- package/cjs/src/embed/pinboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.spec.js +3 -0
- package/cjs/src/embed/sage.spec.js.map +1 -1
- package/cjs/src/embed/search.spec.js +1 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed-trigger.spec.js +3 -0
- package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +7 -0
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +7 -0
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -1
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/mixpanel-service.d.ts +2 -1
- package/cjs/src/mixpanel-service.d.ts.map +1 -1
- package/cjs/src/mixpanel-service.js +1 -0
- package/cjs/src/mixpanel-service.js.map +1 -1
- package/cjs/src/mixpanel-service.spec.js +7 -0
- package/cjs/src/mixpanel-service.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +2 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +6 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +1 -1
- package/cjs/src/types.js +1 -1
- package/cjs/src/utils/authService/authService.d.ts +1 -0
- package/cjs/src/utils/authService/authService.d.ts.map +1 -1
- package/cjs/src/utils/authService/authService.js +1 -0
- package/cjs/src/utils/authService/authService.js.map +1 -1
- package/cjs/src/utils/authService/authService.spec.js +18 -5
- package/cjs/src/utils/authService/authService.spec.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.d.ts +15 -2
- package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.js +39 -9
- package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +32 -0
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +10 -0
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +10 -0
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.js +2 -2
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js +3 -2
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/sessionInfoService.d.ts +66 -0
- package/cjs/src/utils/sessionInfoService.d.ts.map +1 -0
- package/cjs/src/utils/sessionInfoService.js +92 -0
- package/cjs/src/utils/sessionInfoService.js.map +1 -0
- package/dist/src/auth.d.ts +14 -17
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/auth.spec.d.ts +12 -0
- package/dist/src/auth.spec.d.ts.map +1 -1
- package/dist/src/authToken.d.ts +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mixpanel-service.d.ts +2 -1
- package/dist/src/mixpanel-service.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/utils/authService/authService.d.ts +1 -0
- package/dist/src/utils/authService/authService.d.ts.map +1 -1
- package/dist/src/utils/authService/tokenizedAuthService.d.ts +15 -2
- package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts +10 -0
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/sessionInfoService.d.ts +66 -0
- package/dist/src/utils/sessionInfoService.d.ts.map +1 -0
- package/dist/tsembed-react.es.js +154 -58
- package/dist/tsembed-react.js +154 -57
- package/dist/tsembed.es.js +162 -69
- package/dist/tsembed.js +162 -69
- package/dist/visual-embed-sdk-react-full.d.ts +93 -20
- package/dist/visual-embed-sdk-react.d.ts +93 -20
- package/dist/visual-embed-sdk.d.ts +93 -20
- package/lib/package.json +1 -1
- package/lib/src/auth.d.ts +14 -17
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +44 -56
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.d.ts +12 -0
- package/lib/src/auth.spec.d.ts.map +1 -1
- package/lib/src/auth.spec.js +88 -66
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/authToken.d.ts +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js +10 -4
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/embed/app.spec.js +4 -2
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js +3 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js +1 -0
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/embed.spec.js +2 -0
- package/lib/src/embed/embed.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +2 -0
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +2 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/pinboard.spec.js +2 -0
- package/lib/src/embed/pinboard.spec.js.map +1 -1
- package/lib/src/embed/sage.spec.js +2 -0
- package/lib/src/embed/sage.spec.js.map +1 -1
- package/lib/src/embed/search.spec.js +1 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed-trigger.spec.js +2 -0
- package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +7 -0
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +7 -0
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -1
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -1
- package/lib/src/index.js.map +1 -1
- package/lib/src/mixpanel-service.d.ts +2 -1
- package/lib/src/mixpanel-service.d.ts.map +1 -1
- package/lib/src/mixpanel-service.js +1 -0
- package/lib/src/mixpanel-service.js.map +1 -1
- package/lib/src/mixpanel-service.spec.js +7 -0
- package/lib/src/mixpanel-service.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +6 -0
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +1 -1
- package/lib/src/types.js +1 -1
- package/lib/src/utils/authService/authService.d.ts +1 -0
- package/lib/src/utils/authService/authService.d.ts.map +1 -1
- package/lib/src/utils/authService/authService.js +1 -0
- package/lib/src/utils/authService/authService.js.map +1 -1
- package/lib/src/utils/authService/authService.spec.js +18 -5
- package/lib/src/utils/authService/authService.spec.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.d.ts +15 -2
- package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.js +37 -8
- package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +29 -0
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts +10 -0
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +10 -0
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.js +3 -3
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +3 -2
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/sessionInfoService.d.ts +66 -0
- package/lib/src/utils/sessionInfoService.d.ts.map +1 -0
- package/lib/src/utils/sessionInfoService.js +85 -0
- package/lib/src/utils/sessionInfoService.js.map +1 -0
- package/lib/src/visual-embed-sdk.d.ts +98 -21
- package/package.json +1 -1
- package/src/auth.spec.ts +92 -72
- package/src/auth.ts +46 -68
- package/src/authToken.ts +9 -4
- package/src/embed/app.spec.ts +4 -2
- package/src/embed/base.spec.ts +1 -0
- package/src/embed/base.ts +3 -0
- package/src/embed/embed.spec.ts +2 -0
- package/src/embed/events.spec.ts +2 -0
- package/src/embed/liveboard.spec.ts +2 -0
- package/src/embed/pinboard.spec.ts +2 -0
- package/src/embed/sage.spec.ts +3 -0
- package/src/embed/search.spec.ts +1 -0
- package/src/embed/ts-embed-trigger.spec.ts +3 -0
- package/src/embed/ts-embed.spec.ts +8 -0
- package/src/embed/ts-embed.ts +7 -0
- package/src/index.ts +2 -1
- package/src/mixpanel-service.spec.ts +12 -3
- package/src/mixpanel-service.ts +3 -1
- package/src/react/index.spec.tsx +7 -0
- package/src/react/index.tsx +1 -0
- package/src/types.ts +1 -1
- package/src/utils/authService/authService.spec.ts +18 -5
- package/src/utils/authService/authService.ts +1 -0
- package/src/utils/authService/tokenizedAuthService.spec.ts +36 -0
- package/src/utils/authService/tokenizedAuthService.ts +38 -8
- package/src/utils/graphql/answerService/answerService.ts +10 -0
- package/src/utils/processData.spec.ts +3 -2
- package/src/utils/processData.ts +3 -3
- package/src/utils/sessionInfoService.ts +101 -0
|
@@ -4037,7 +4037,7 @@ export declare enum HostEvent {
|
|
|
4037
4037
|
*
|
|
4038
4038
|
* @example
|
|
4039
4039
|
* ```js
|
|
4040
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
4040
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
4041
4041
|
* data=>console.log(data))
|
|
4042
4042
|
* ```
|
|
4043
4043
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
@@ -6301,12 +6301,6 @@ export declare let loggedInStatus: boolean;
|
|
|
6301
6301
|
export declare let samlAuthWindow: Window;
|
|
6302
6302
|
export declare let samlCompletionPromise: Promise<void>;
|
|
6303
6303
|
export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
|
|
6304
|
-
interface sessionInfoInterface {
|
|
6305
|
-
userGUID: any;
|
|
6306
|
-
isPublicUser: any;
|
|
6307
|
-
mixpanelToken: any;
|
|
6308
|
-
[key: string]: any;
|
|
6309
|
-
}
|
|
6310
6304
|
/**
|
|
6311
6305
|
* Enum for auth failure types. This is the parameter passed to the listner
|
|
6312
6306
|
* of {@link AuthStatus.FAILURE}.
|
|
@@ -6424,7 +6418,7 @@ export declare function notifyAuthSDKSuccess(): void;
|
|
|
6424
6418
|
/**
|
|
6425
6419
|
*
|
|
6426
6420
|
*/
|
|
6427
|
-
export declare function notifyAuthSuccess(): void
|
|
6421
|
+
export declare function notifyAuthSuccess(): Promise<void>;
|
|
6428
6422
|
/**
|
|
6429
6423
|
*
|
|
6430
6424
|
* @param failureType
|
|
@@ -6434,19 +6428,23 @@ export declare function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
|
6434
6428
|
*
|
|
6435
6429
|
*/
|
|
6436
6430
|
export declare function notifyLogout(): void;
|
|
6437
|
-
export declare const initSession: (sessionDetails: sessionInfoInterface) => void;
|
|
6438
|
-
export declare const getSessionDetails: (sessionInfoResp: any) => sessionInfoInterface;
|
|
6439
6431
|
/**
|
|
6440
|
-
*
|
|
6432
|
+
* Services to be called after the login is successful,
|
|
6433
|
+
* This should be called after the cookie is set for cookie auth or
|
|
6434
|
+
* after the token is set for cookieless.
|
|
6435
|
+
*
|
|
6436
|
+
* @return {Promise<void>}
|
|
6437
|
+
* @example
|
|
6438
|
+
* ```js
|
|
6439
|
+
* await postLoginService();
|
|
6440
|
+
* ```
|
|
6441
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
6441
6442
|
*/
|
|
6442
|
-
export declare function
|
|
6443
|
+
export declare function postLoginService(): Promise<void>;
|
|
6443
6444
|
/**
|
|
6444
|
-
* Return
|
|
6445
|
-
* authentication is successful. And info is available.
|
|
6446
|
-
*
|
|
6447
|
-
* @group Global methods
|
|
6445
|
+
* Return releaseVersion if available
|
|
6448
6446
|
*/
|
|
6449
|
-
export declare function
|
|
6447
|
+
export declare function getReleaseVersion(): string;
|
|
6450
6448
|
/**
|
|
6451
6449
|
* Perform token based authentication
|
|
6452
6450
|
*
|
|
@@ -6482,7 +6480,72 @@ export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean
|
|
|
6482
6480
|
* Check if we are authenticated to the ThoughtSpot cluster
|
|
6483
6481
|
*/
|
|
6484
6482
|
export declare const isAuthenticated: () => boolean;
|
|
6485
|
-
|
|
6483
|
+
|
|
6484
|
+
export type SessionInfo = {
|
|
6485
|
+
releaseVersion: string;
|
|
6486
|
+
userGUID: string;
|
|
6487
|
+
currentOrgId: number;
|
|
6488
|
+
privileges: string[];
|
|
6489
|
+
mixpanelToken: string;
|
|
6490
|
+
isPublicUser: boolean;
|
|
6491
|
+
clusterId: string;
|
|
6492
|
+
clusterName: string;
|
|
6493
|
+
[key: string]: any;
|
|
6494
|
+
};
|
|
6495
|
+
/**
|
|
6496
|
+
* Returns the session info object and caches it for future use.
|
|
6497
|
+
* Once fetched the session info object is cached and returned from the cache on
|
|
6498
|
+
* subsequent calls.
|
|
6499
|
+
*
|
|
6500
|
+
* @example ```js
|
|
6501
|
+
* const sessionInfo = await getSessionInfo();
|
|
6502
|
+
* console.log(sessionInfo);
|
|
6503
|
+
* ```
|
|
6504
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
6505
|
+
* @returns {Promise<SessionInfo>} The session info object.
|
|
6506
|
+
*/
|
|
6507
|
+
export declare function getSessionInfo(): Promise<SessionInfo>;
|
|
6508
|
+
/**
|
|
6509
|
+
* Returns the cached session info object. If the client is not authenticated the
|
|
6510
|
+
* function will return null.
|
|
6511
|
+
*
|
|
6512
|
+
* @example ```js
|
|
6513
|
+
* const sessionInfo = getCachedSessionInfo();
|
|
6514
|
+
* if (sessionInfo) {
|
|
6515
|
+
* console.log(sessionInfo);
|
|
6516
|
+
* } else {
|
|
6517
|
+
* console.log('Not authenticated');
|
|
6518
|
+
* }
|
|
6519
|
+
* ```
|
|
6520
|
+
* @returns {SessionInfo | null} The session info object.
|
|
6521
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
6522
|
+
*/
|
|
6523
|
+
export declare function getCachedSessionInfo(): SessionInfo | null;
|
|
6524
|
+
/**
|
|
6525
|
+
* Processes the session info response and returns the session info object.
|
|
6526
|
+
*
|
|
6527
|
+
* @param sessionInfoResp {any} Response from the session info API.
|
|
6528
|
+
* @returns {SessionInfo} The session info object.
|
|
6529
|
+
* @example ```js
|
|
6530
|
+
* const sessionInfoResp = await fetch(sessionInfoPath);
|
|
6531
|
+
* const sessionInfo = getSessionDetails(sessionInfoResp);
|
|
6532
|
+
* console.log(sessionInfo);
|
|
6533
|
+
* ```
|
|
6534
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
6535
|
+
*/
|
|
6536
|
+
export declare const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
6537
|
+
/**
|
|
6538
|
+
* Resets the cached session info object and forces a new fetch on the next call.
|
|
6539
|
+
*
|
|
6540
|
+
* @example ```js
|
|
6541
|
+
* resetCachedSessionInfo();
|
|
6542
|
+
* const sessionInfo = await getSessionInfo();
|
|
6543
|
+
* console.log(sessionInfo);
|
|
6544
|
+
* ```
|
|
6545
|
+
* @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
6546
|
+
* @returns {void}
|
|
6547
|
+
*/
|
|
6548
|
+
export declare function resetCachedSessionInfo(): void;
|
|
6486
6549
|
|
|
6487
6550
|
/**
|
|
6488
6551
|
* The list of customization css variables. These
|
|
@@ -6856,6 +6919,16 @@ export interface UnderlyingDataPoint {
|
|
|
6856
6919
|
* const data = await underlying.fetchData(0, 100);
|
|
6857
6920
|
* })
|
|
6858
6921
|
* ```
|
|
6922
|
+
* @example
|
|
6923
|
+
* ```js
|
|
6924
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
6925
|
+
* const service = await embed.getAnswerService();
|
|
6926
|
+
* await service.addColumns([
|
|
6927
|
+
* "<column guid>"
|
|
6928
|
+
* ]);
|
|
6929
|
+
* console.log(await service.fetchData());
|
|
6930
|
+
* });
|
|
6931
|
+
* ```
|
|
6859
6932
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
6860
6933
|
* @group Events
|
|
6861
6934
|
*/
|
|
@@ -6995,7 +7068,7 @@ export declare function uploadMixpanelEvent(eventId: string, eventProps?: {}): v
|
|
|
6995
7068
|
*
|
|
6996
7069
|
* @param sessionInfo
|
|
6997
7070
|
*/
|
|
6998
|
-
export declare function initMixpanel(sessionInfo:
|
|
7071
|
+
export declare function initMixpanel(sessionInfo: SessionInfo): void;
|
|
6999
7072
|
/**
|
|
7000
7073
|
*
|
|
7001
7074
|
*/
|
|
@@ -7012,7 +7085,7 @@ export declare function testResetMixpanel(): void;
|
|
|
7012
7085
|
*/
|
|
7013
7086
|
export declare const tokenizedFetch: typeof fetch;
|
|
7014
7087
|
|
|
7015
|
-
export declare
|
|
7088
|
+
export declare function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string>;
|
|
7016
7089
|
/**
|
|
7017
7090
|
* Resets the auth token and a new token will be fetched on the next request.
|
|
7018
7091
|
*
|
|
@@ -1345,12 +1345,6 @@ export let loggedInStatus: boolean;
|
|
|
1345
1345
|
export let samlAuthWindow: Window;
|
|
1346
1346
|
export let samlCompletionPromise: Promise<void>;
|
|
1347
1347
|
export const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
|
|
1348
|
-
interface sessionInfoInterface {
|
|
1349
|
-
userGUID: any;
|
|
1350
|
-
isPublicUser: any;
|
|
1351
|
-
mixpanelToken: any;
|
|
1352
|
-
[key: string]: any;
|
|
1353
|
-
}
|
|
1354
1348
|
/**
|
|
1355
1349
|
* Enum for auth failure types. This is the parameter passed to the listner
|
|
1356
1350
|
* of {@link AuthStatus.FAILURE}.
|
|
@@ -1468,7 +1462,7 @@ export function notifyAuthSDKSuccess(): void;
|
|
|
1468
1462
|
/**
|
|
1469
1463
|
*
|
|
1470
1464
|
*/
|
|
1471
|
-
export function notifyAuthSuccess(): void
|
|
1465
|
+
export function notifyAuthSuccess(): Promise<void>;
|
|
1472
1466
|
/**
|
|
1473
1467
|
*
|
|
1474
1468
|
* @param failureType
|
|
@@ -1478,19 +1472,23 @@ export function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
|
1478
1472
|
*
|
|
1479
1473
|
*/
|
|
1480
1474
|
export function notifyLogout(): void;
|
|
1481
|
-
export const initSession: (sessionDetails: sessionInfoInterface) => void;
|
|
1482
|
-
export const getSessionDetails: (sessionInfoResp: any) => sessionInfoInterface;
|
|
1483
1475
|
/**
|
|
1484
|
-
*
|
|
1476
|
+
* Services to be called after the login is successful,
|
|
1477
|
+
* This should be called after the cookie is set for cookie auth or
|
|
1478
|
+
* after the token is set for cookieless.
|
|
1479
|
+
*
|
|
1480
|
+
* @return {Promise<void>}
|
|
1481
|
+
* @example
|
|
1482
|
+
* ```js
|
|
1483
|
+
* await postLoginService();
|
|
1484
|
+
* ```
|
|
1485
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
1485
1486
|
*/
|
|
1486
|
-
export function
|
|
1487
|
+
export function postLoginService(): Promise<void>;
|
|
1487
1488
|
/**
|
|
1488
|
-
* Return
|
|
1489
|
-
* authentication is successful. And info is available.
|
|
1490
|
-
*
|
|
1491
|
-
* @group Global methods
|
|
1489
|
+
* Return releaseVersion if available
|
|
1492
1490
|
*/
|
|
1493
|
-
export function
|
|
1491
|
+
export function getReleaseVersion(): string;
|
|
1494
1492
|
/**
|
|
1495
1493
|
* Perform token based authentication
|
|
1496
1494
|
*
|
|
@@ -1526,7 +1524,72 @@ export const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
|
|
|
1526
1524
|
* Check if we are authenticated to the ThoughtSpot cluster
|
|
1527
1525
|
*/
|
|
1528
1526
|
export const isAuthenticated: () => boolean;
|
|
1529
|
-
|
|
1527
|
+
|
|
1528
|
+
export type SessionInfo = {
|
|
1529
|
+
releaseVersion: string;
|
|
1530
|
+
userGUID: string;
|
|
1531
|
+
currentOrgId: number;
|
|
1532
|
+
privileges: string[];
|
|
1533
|
+
mixpanelToken: string;
|
|
1534
|
+
isPublicUser: boolean;
|
|
1535
|
+
clusterId: string;
|
|
1536
|
+
clusterName: string;
|
|
1537
|
+
[key: string]: any;
|
|
1538
|
+
};
|
|
1539
|
+
/**
|
|
1540
|
+
* Returns the session info object and caches it for future use.
|
|
1541
|
+
* Once fetched the session info object is cached and returned from the cache on
|
|
1542
|
+
* subsequent calls.
|
|
1543
|
+
*
|
|
1544
|
+
* @example ```js
|
|
1545
|
+
* const sessionInfo = await getSessionInfo();
|
|
1546
|
+
* console.log(sessionInfo);
|
|
1547
|
+
* ```
|
|
1548
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
1549
|
+
* @returns {Promise<SessionInfo>} The session info object.
|
|
1550
|
+
*/
|
|
1551
|
+
export function getSessionInfo(): Promise<SessionInfo>;
|
|
1552
|
+
/**
|
|
1553
|
+
* Returns the cached session info object. If the client is not authenticated the
|
|
1554
|
+
* function will return null.
|
|
1555
|
+
*
|
|
1556
|
+
* @example ```js
|
|
1557
|
+
* const sessionInfo = getCachedSessionInfo();
|
|
1558
|
+
* if (sessionInfo) {
|
|
1559
|
+
* console.log(sessionInfo);
|
|
1560
|
+
* } else {
|
|
1561
|
+
* console.log('Not authenticated');
|
|
1562
|
+
* }
|
|
1563
|
+
* ```
|
|
1564
|
+
* @returns {SessionInfo | null} The session info object.
|
|
1565
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
1566
|
+
*/
|
|
1567
|
+
export function getCachedSessionInfo(): SessionInfo | null;
|
|
1568
|
+
/**
|
|
1569
|
+
* Processes the session info response and returns the session info object.
|
|
1570
|
+
*
|
|
1571
|
+
* @param sessionInfoResp {any} Response from the session info API.
|
|
1572
|
+
* @returns {SessionInfo} The session info object.
|
|
1573
|
+
* @example ```js
|
|
1574
|
+
* const sessionInfoResp = await fetch(sessionInfoPath);
|
|
1575
|
+
* const sessionInfo = getSessionDetails(sessionInfoResp);
|
|
1576
|
+
* console.log(sessionInfo);
|
|
1577
|
+
* ```
|
|
1578
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
1579
|
+
*/
|
|
1580
|
+
export const getSessionDetails: (sessionInfoResp: any) => SessionInfo;
|
|
1581
|
+
/**
|
|
1582
|
+
* Resets the cached session info object and forces a new fetch on the next call.
|
|
1583
|
+
*
|
|
1584
|
+
* @example ```js
|
|
1585
|
+
* resetCachedSessionInfo();
|
|
1586
|
+
* const sessionInfo = await getSessionInfo();
|
|
1587
|
+
* console.log(sessionInfo);
|
|
1588
|
+
* ```
|
|
1589
|
+
* @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
|
|
1590
|
+
* @returns {void}
|
|
1591
|
+
*/
|
|
1592
|
+
export function resetCachedSessionInfo(): void;
|
|
1530
1593
|
|
|
1531
1594
|
/**
|
|
1532
1595
|
* Copyright (c) 2023
|
|
@@ -3961,7 +4024,7 @@ export enum HostEvent {
|
|
|
3961
4024
|
*
|
|
3962
4025
|
* @example
|
|
3963
4026
|
* ```js
|
|
3964
|
-
* liveboardEmbed.trigger(HostEvent.
|
|
4027
|
+
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
3965
4028
|
* data=>console.log(data))
|
|
3966
4029
|
* ```
|
|
3967
4030
|
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
|
|
@@ -6311,6 +6374,16 @@ export interface UnderlyingDataPoint {
|
|
|
6311
6374
|
* const data = await underlying.fetchData(0, 100);
|
|
6312
6375
|
* })
|
|
6313
6376
|
* ```
|
|
6377
|
+
* @example
|
|
6378
|
+
* ```js
|
|
6379
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
6380
|
+
* const service = await embed.getAnswerService();
|
|
6381
|
+
* await service.addColumns([
|
|
6382
|
+
* "<column guid>"
|
|
6383
|
+
* ]);
|
|
6384
|
+
* console.log(await service.fetchData());
|
|
6385
|
+
* });
|
|
6386
|
+
* ```
|
|
6314
6387
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
6315
6388
|
* @group Events
|
|
6316
6389
|
*/
|
|
@@ -6450,7 +6523,7 @@ export function uploadMixpanelEvent(eventId: string, eventProps?: {}): void;
|
|
|
6450
6523
|
*
|
|
6451
6524
|
* @param sessionInfo
|
|
6452
6525
|
*/
|
|
6453
|
-
export function initMixpanel(sessionInfo:
|
|
6526
|
+
export function initMixpanel(sessionInfo: SessionInfo): void;
|
|
6454
6527
|
/**
|
|
6455
6528
|
*
|
|
6456
6529
|
*/
|
|
@@ -6467,7 +6540,7 @@ export function testResetMixpanel(): void;
|
|
|
6467
6540
|
*/
|
|
6468
6541
|
export const tokenizedFetch: typeof fetch;
|
|
6469
6542
|
|
|
6470
|
-
export
|
|
6543
|
+
export function getAuthenticationToken(embedConfig: EmbedConfig): Promise<string>;
|
|
6471
6544
|
/**
|
|
6472
6545
|
* Resets the auth token and a new token will be fetched on the next request.
|
|
6473
6546
|
*
|
package/lib/package.json
CHANGED
package/lib/src/auth.d.ts
CHANGED
|
@@ -4,12 +4,6 @@ export declare let loggedInStatus: boolean;
|
|
|
4
4
|
export declare let samlAuthWindow: Window;
|
|
5
5
|
export declare let samlCompletionPromise: Promise<void>;
|
|
6
6
|
export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
|
|
7
|
-
interface sessionInfoInterface {
|
|
8
|
-
userGUID: any;
|
|
9
|
-
isPublicUser: any;
|
|
10
|
-
mixpanelToken: any;
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}
|
|
13
7
|
/**
|
|
14
8
|
* Enum for auth failure types. This is the parameter passed to the listner
|
|
15
9
|
* of {@link AuthStatus.FAILURE}.
|
|
@@ -127,7 +121,7 @@ export declare function notifyAuthSDKSuccess(): void;
|
|
|
127
121
|
/**
|
|
128
122
|
*
|
|
129
123
|
*/
|
|
130
|
-
export declare function notifyAuthSuccess(): void
|
|
124
|
+
export declare function notifyAuthSuccess(): Promise<void>;
|
|
131
125
|
/**
|
|
132
126
|
*
|
|
133
127
|
* @param failureType
|
|
@@ -137,19 +131,23 @@ export declare function notifyAuthFailure(failureType: AuthFailureType): void;
|
|
|
137
131
|
*
|
|
138
132
|
*/
|
|
139
133
|
export declare function notifyLogout(): void;
|
|
140
|
-
export declare const initSession: (sessionDetails: sessionInfoInterface) => void;
|
|
141
|
-
export declare const getSessionDetails: (sessionInfoResp: any) => sessionInfoInterface;
|
|
142
134
|
/**
|
|
143
|
-
*
|
|
135
|
+
* Services to be called after the login is successful,
|
|
136
|
+
* This should be called after the cookie is set for cookie auth or
|
|
137
|
+
* after the token is set for cookieless.
|
|
138
|
+
*
|
|
139
|
+
* @return {Promise<void>}
|
|
140
|
+
* @example
|
|
141
|
+
* ```js
|
|
142
|
+
* await postLoginService();
|
|
143
|
+
* ```
|
|
144
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
144
145
|
*/
|
|
145
|
-
export declare function
|
|
146
|
+
export declare function postLoginService(): Promise<void>;
|
|
146
147
|
/**
|
|
147
|
-
* Return
|
|
148
|
-
* authentication is successful. And info is available.
|
|
149
|
-
*
|
|
150
|
-
* @group Global methods
|
|
148
|
+
* Return releaseVersion if available
|
|
151
149
|
*/
|
|
152
|
-
export declare function
|
|
150
|
+
export declare function getReleaseVersion(): string;
|
|
153
151
|
/**
|
|
154
152
|
* Perform token based authentication
|
|
155
153
|
*
|
|
@@ -185,5 +183,4 @@ export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean
|
|
|
185
183
|
* Check if we are authenticated to the ThoughtSpot cluster
|
|
186
184
|
*/
|
|
187
185
|
export declare const isAuthenticated: () => boolean;
|
|
188
|
-
export {};
|
|
189
186
|
//# sourceMappingURL=auth.d.ts.map
|
package/lib/src/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,eAAe,CAAC;AAIzC,OAAO,EACoB,WAAW,EACrC,MAAM,SAAS,CAAC;AAcjB,eAAO,IAAI,cAAc,SAAQ,CAAC;AAElC,eAAO,IAAI,cAAc,EAAE,MAAa,CAAC;AAEzC,eAAO,IAAI,qBAAqB,EAAE,OAAO,CAAC,IAAI,CAAQ,CAAC;AAIvD,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,oBAAY,eAAe;IACvB,GAAG,QAAQ;IACX,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED;;;;GAIG;AACH,oBAAY,UAAU;IAClB;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,WAAW,gBAAgB;IAC3B;;OAEG;IACH,OAAO,YAAY;IACnB;;OAEG;IACH,MAAM,WAAW;IACjB;;;;;;OAMG;IACH,iBAAiB,sBAAsB;CAC1C;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,EAAE,CA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AuthToken } from './authToken';
|
|
2
|
+
import { getEmbedConfig } from './embed/embedConfig';
|
|
1
3
|
import { initMixpanel } from './mixpanel-service';
|
|
2
4
|
import { AuthType, EmbedEvent, } from './types';
|
|
3
5
|
import { getDOMNode, getRedirectUrl } from './utils';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
+
import { EndPoints, fetchAuthPostService, fetchAuthService, fetchBasicAuthService, fetchLogoutService, } from './utils/authService';
|
|
7
|
+
import { isActiveService } from './utils/authService/tokenizedAuthService';
|
|
6
8
|
import { logger } from './utils/logger';
|
|
7
|
-
import {
|
|
9
|
+
import { getSessionInfo } from './utils/sessionInfoService';
|
|
8
10
|
// eslint-disable-next-line import/no-mutable-exports
|
|
9
11
|
export let loggedInStatus = false;
|
|
10
12
|
// eslint-disable-next-line import/no-mutable-exports
|
|
11
13
|
export let samlAuthWindow = null;
|
|
12
14
|
// eslint-disable-next-line import/no-mutable-exports
|
|
13
15
|
export let samlCompletionPromise = null;
|
|
14
|
-
let sessionInfo = null;
|
|
15
|
-
let sessionInfoResolver = null;
|
|
16
|
-
const sessionInfoPromise = new Promise((resolve) => {
|
|
17
|
-
sessionInfoResolver = resolve;
|
|
18
|
-
});
|
|
19
16
|
let releaseVersion = '';
|
|
20
17
|
export const SSO_REDIRECTION_MARKER_GUID = '5e16222e-ef02-43e9-9fbd-24226bf3ce5b';
|
|
21
18
|
/**
|
|
@@ -103,12 +100,18 @@ export function notifyAuthSDKSuccess() {
|
|
|
103
100
|
/**
|
|
104
101
|
*
|
|
105
102
|
*/
|
|
106
|
-
export function notifyAuthSuccess() {
|
|
103
|
+
export async function notifyAuthSuccess() {
|
|
107
104
|
if (!authEE) {
|
|
108
105
|
logger.error('SDK not initialized');
|
|
109
106
|
return;
|
|
110
107
|
}
|
|
111
|
-
|
|
108
|
+
try {
|
|
109
|
+
const sessionInfo = await getSessionInfo();
|
|
110
|
+
authEE.emit(AuthStatus.SUCCESS, sessionInfo);
|
|
111
|
+
}
|
|
112
|
+
catch (e) {
|
|
113
|
+
logger.error('Failed to get session info');
|
|
114
|
+
}
|
|
112
115
|
}
|
|
113
116
|
/**
|
|
114
117
|
*
|
|
@@ -131,67 +134,45 @@ export function notifyLogout() {
|
|
|
131
134
|
}
|
|
132
135
|
authEE.emit(AuthStatus.LOGOUT);
|
|
133
136
|
}
|
|
134
|
-
export const initSession = (sessionDetails) => {
|
|
135
|
-
const embedConfig = getEmbedConfig();
|
|
136
|
-
if (sessionInfo == null) {
|
|
137
|
-
sessionInfo = sessionDetails;
|
|
138
|
-
if (!embedConfig.disableSDKTracking) {
|
|
139
|
-
initMixpanel(sessionInfo);
|
|
140
|
-
}
|
|
141
|
-
sessionInfoResolver(sessionInfo);
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
export const getSessionDetails = (sessionInfoResp) => {
|
|
145
|
-
const devMixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.devSdkKey;
|
|
146
|
-
const prodMixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.prodSdkKey;
|
|
147
|
-
const mixpanelToken = sessionInfoResp.configInfo.mixpanelConfig.production
|
|
148
|
-
? prodMixpanelToken
|
|
149
|
-
: devMixpanelToken;
|
|
150
|
-
return {
|
|
151
|
-
userGUID: sessionInfoResp.userGUID,
|
|
152
|
-
mixpanelToken,
|
|
153
|
-
isPublicUser: sessionInfoResp.configInfo.isPublicUser,
|
|
154
|
-
releaseVersion: sessionInfoResp.releaseVersion,
|
|
155
|
-
clusterId: sessionInfoResp.configInfo.selfClusterId,
|
|
156
|
-
clusterName: sessionInfoResp.configInfo.selfClusterName,
|
|
157
|
-
...sessionInfoResp,
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
137
|
/**
|
|
161
138
|
* Check if we are logged into the ThoughtSpot cluster
|
|
162
139
|
*
|
|
163
140
|
* @param thoughtSpotHost The ThoughtSpot cluster hostname or IP
|
|
164
141
|
*/
|
|
165
142
|
async function isLoggedIn(thoughtSpotHost) {
|
|
166
|
-
const authVerificationUrl = `${thoughtSpotHost}${EndPoints.AUTH_VERIFICATION}`;
|
|
167
|
-
let response = null;
|
|
168
143
|
try {
|
|
169
|
-
response = await
|
|
170
|
-
|
|
171
|
-
const sessionDetails = getSessionDetails(sessionInfoResp);
|
|
172
|
-
// Store user session details from session info
|
|
173
|
-
initSession(sessionDetails);
|
|
174
|
-
releaseVersion = sessionInfoResp.releaseVersion;
|
|
144
|
+
const response = await isActiveService(thoughtSpotHost);
|
|
145
|
+
return response;
|
|
175
146
|
}
|
|
176
147
|
catch (e) {
|
|
177
148
|
return false;
|
|
178
149
|
}
|
|
179
|
-
return response.status === 200;
|
|
180
150
|
}
|
|
181
151
|
/**
|
|
182
|
-
*
|
|
152
|
+
* Services to be called after the login is successful,
|
|
153
|
+
* This should be called after the cookie is set for cookie auth or
|
|
154
|
+
* after the token is set for cookieless.
|
|
155
|
+
*
|
|
156
|
+
* @return {Promise<void>}
|
|
157
|
+
* @example
|
|
158
|
+
* ```js
|
|
159
|
+
* await postLoginService();
|
|
160
|
+
* ```
|
|
161
|
+
* @version SDK: 1.28.3 | ThoughtSpot: *
|
|
183
162
|
*/
|
|
184
|
-
export function
|
|
185
|
-
|
|
163
|
+
export async function postLoginService() {
|
|
164
|
+
const sessionInfo = await getSessionInfo();
|
|
165
|
+
releaseVersion = sessionInfo.releaseVersion;
|
|
166
|
+
const embedConfig = getEmbedConfig();
|
|
167
|
+
if (!embedConfig.disableSDKTracking) {
|
|
168
|
+
initMixpanel(sessionInfo);
|
|
169
|
+
}
|
|
186
170
|
}
|
|
187
171
|
/**
|
|
188
|
-
* Return
|
|
189
|
-
* authentication is successful. And info is available.
|
|
190
|
-
*
|
|
191
|
-
* @group Global methods
|
|
172
|
+
* Return releaseVersion if available
|
|
192
173
|
*/
|
|
193
|
-
export function
|
|
194
|
-
return
|
|
174
|
+
export function getReleaseVersion() {
|
|
175
|
+
return releaseVersion;
|
|
195
176
|
}
|
|
196
177
|
/**
|
|
197
178
|
* Check if we are stuck at the SSO redirect URL
|
|
@@ -222,7 +203,14 @@ export const doTokenAuth = async (embedConfig) => {
|
|
|
222
203
|
}
|
|
223
204
|
loggedInStatus = await isLoggedIn(thoughtSpotHost);
|
|
224
205
|
if (!loggedInStatus) {
|
|
225
|
-
|
|
206
|
+
let authToken;
|
|
207
|
+
try {
|
|
208
|
+
authToken = await getAuthenticationToken(embedConfig);
|
|
209
|
+
}
|
|
210
|
+
catch (e) {
|
|
211
|
+
loggedInStatus = false;
|
|
212
|
+
throw e;
|
|
213
|
+
}
|
|
226
214
|
let resp;
|
|
227
215
|
try {
|
|
228
216
|
resp = await fetchAuthPostService(thoughtSpotHost, username, authToken);
|
|
@@ -380,7 +368,7 @@ export const logout = async (embedConfig) => {
|
|
|
380
368
|
const { thoughtSpotHost } = embedConfig;
|
|
381
369
|
await fetchLogoutService(thoughtSpotHost);
|
|
382
370
|
resetCachedAuthToken();
|
|
383
|
-
const thoughtspotIframes = document.querySelectorAll(
|
|
371
|
+
const thoughtspotIframes = document.querySelectorAll("[data-ts-iframe='true']");
|
|
384
372
|
if (thoughtspotIframes === null || thoughtspotIframes === void 0 ? void 0 : thoughtspotIframes.length) {
|
|
385
373
|
thoughtspotIframes.forEach((el) => {
|
|
386
374
|
el.parentElement.innerHTML = embedConfig.loginFailedMessage;
|
package/lib/src/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACH,QAAQ,EAA4B,UAAU,GACjD,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACH,
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAA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AU,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,QAAQ,CAAC,UAAU,CAAC;QACzB,KAAK,QAAQ,CAAC,gBAAgB;YAC1B,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC;QACpC,KAAK,QAAQ,CAAC,0BAA0B;YACpC,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;QAC9C,KAAK,QAAQ,CAAC,KAAK;YACf,OAAO,WAAW,CAAC,WAAW,CAAC,CAAC;QACpC;YACI,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACpC;AACL,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAY,EAAE,CAAC,cAAc,CAAC"}
|
package/lib/src/auth.spec.d.ts
CHANGED
|
@@ -10,4 +10,16 @@ export declare const mockSessionInfo: {
|
|
|
10
10
|
genNo: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
+
export declare const mockSessionInfoApiResponse: {
|
|
14
|
+
userGUID: string;
|
|
15
|
+
releaseVersion: string;
|
|
16
|
+
configInfo: {
|
|
17
|
+
isPublicUser: boolean;
|
|
18
|
+
mixpanelConfig: {
|
|
19
|
+
production: boolean;
|
|
20
|
+
devSdkKey: string;
|
|
21
|
+
prodSdkKey: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
13
25
|
//# sourceMappingURL=auth.spec.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.spec.d.ts","sourceRoot":"","sources":["../../src/auth.spec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.spec.d.ts","sourceRoot":"","sources":["../../src/auth.spec.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,WAAW,EAAE,GAoFzB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;CAU3B,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;CAWtC,CAAC"}
|