@thoughtspot/visual-embed-sdk 1.35.14 → 1.36.0

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.
Files changed (172) hide show
  1. package/cjs/package.json +2 -3
  2. package/cjs/src/auth.d.ts +5 -0
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +7 -0
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/embed/ts-embed.d.ts +6 -0
  7. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  8. package/cjs/src/embed/ts-embed.js +27 -0
  9. package/cjs/src/embed/ts-embed.js.map +1 -1
  10. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  11. package/cjs/src/embed/ts-embed.spec.js +73 -1
  12. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  13. package/cjs/src/react/index.spec.js +2 -2
  14. package/cjs/src/react/index.spec.js.map +1 -1
  15. package/cjs/src/types.d.ts +13 -2
  16. package/cjs/src/types.d.ts.map +1 -1
  17. package/cjs/src/types.js +12 -2
  18. package/cjs/src/types.js.map +1 -1
  19. package/cjs/src/utils/authService/authService.d.ts +1 -0
  20. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  21. package/cjs/src/utils/authService/authService.js +1 -0
  22. package/cjs/src/utils/authService/authService.js.map +1 -1
  23. package/cjs/src/utils/authService/index.d.ts +1 -1
  24. package/cjs/src/utils/authService/index.d.ts.map +1 -1
  25. package/cjs/src/utils/authService/index.js +2 -1
  26. package/cjs/src/utils/authService/index.js.map +1 -1
  27. package/cjs/src/utils/authService/tokenizedAuthService.d.ts +10 -0
  28. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  29. package/cjs/src/utils/authService/tokenizedAuthService.js +27 -1
  30. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  31. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +58 -1
  32. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  33. package/cjs/src/utils/sessionInfoService.d.ts +30 -0
  34. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
  35. package/cjs/src/utils/sessionInfoService.js +59 -1
  36. package/cjs/src/utils/sessionInfoService.js.map +1 -1
  37. package/dist/{index-B3hd6DTM.js → index-V2oBuwy6.js} +1 -1
  38. package/dist/src/auth.d.ts +5 -0
  39. package/dist/src/auth.d.ts.map +1 -1
  40. package/dist/src/embed/ts-embed.d.ts +6 -0
  41. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  42. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  43. package/dist/src/types.d.ts +13 -2
  44. package/dist/src/types.d.ts.map +1 -1
  45. package/dist/src/utils/authService/authService.d.ts +1 -0
  46. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  47. package/dist/src/utils/authService/index.d.ts +1 -1
  48. package/dist/src/utils/authService/index.d.ts.map +1 -1
  49. package/dist/src/utils/authService/tokenizedAuthService.d.ts +10 -0
  50. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  51. package/dist/src/utils/sessionInfoService.d.ts +30 -0
  52. package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
  53. package/dist/tsembed-react.es.js +129 -5
  54. package/dist/tsembed-react.js +128 -4
  55. package/dist/tsembed.es.js +130 -5
  56. package/dist/tsembed.js +129 -4
  57. package/dist/visual-embed-sdk-react-full.d.ts +48 -2
  58. package/dist/visual-embed-sdk-react.d.ts +48 -2
  59. package/dist/visual-embed-sdk.d.ts +48 -2
  60. package/lib/package.json +2 -3
  61. package/lib/src/auth.d.ts +5 -0
  62. package/lib/src/auth.d.ts.map +1 -1
  63. package/lib/src/auth.js +8 -1
  64. package/lib/src/auth.js.map +1 -1
  65. package/lib/src/embed/ts-embed.d.ts +6 -0
  66. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  67. package/lib/src/embed/ts-embed.js +27 -0
  68. package/lib/src/embed/ts-embed.js.map +1 -1
  69. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  70. package/lib/src/embed/ts-embed.spec.js +73 -1
  71. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  72. package/lib/src/react/index.spec.js +2 -2
  73. package/lib/src/react/index.spec.js.map +1 -1
  74. package/lib/src/types.d.ts +13 -2
  75. package/lib/src/types.d.ts.map +1 -1
  76. package/lib/src/types.js +12 -2
  77. package/lib/src/types.js.map +1 -1
  78. package/lib/src/utils/authService/authService.d.ts +1 -0
  79. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  80. package/lib/src/utils/authService/authService.js +1 -0
  81. package/lib/src/utils/authService/authService.js.map +1 -1
  82. package/lib/src/utils/authService/index.d.ts +1 -1
  83. package/lib/src/utils/authService/index.d.ts.map +1 -1
  84. package/lib/src/utils/authService/index.js +1 -1
  85. package/lib/src/utils/authService/index.js.map +1 -1
  86. package/lib/src/utils/authService/tokenizedAuthService.d.ts +10 -0
  87. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  88. package/lib/src/utils/authService/tokenizedAuthService.js +25 -0
  89. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  90. package/lib/src/utils/authService/tokenizedAuthService.spec.js +59 -2
  91. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  92. package/lib/src/utils/sessionInfoService.d.ts +30 -0
  93. package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
  94. package/lib/src/utils/sessionInfoService.js +57 -1
  95. package/lib/src/utils/sessionInfoService.js.map +1 -1
  96. package/lib/src/visual-embed-sdk.d.ts +48 -2
  97. package/package.json +2 -3
  98. package/src/auth.ts +8 -1
  99. package/src/embed/ts-embed.spec.ts +95 -1
  100. package/src/embed/ts-embed.ts +31 -0
  101. package/src/react/index.spec.tsx +2 -2
  102. package/src/types.ts +14 -2
  103. package/src/utils/authService/authService.ts +1 -0
  104. package/src/utils/authService/index.ts +5 -1
  105. package/src/utils/authService/tokenizedAuthService.spec.ts +66 -2
  106. package/src/utils/authService/tokenizedAuthService.ts +26 -0
  107. package/src/utils/sessionInfoService.ts +64 -1
  108. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  109. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  110. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +0 -104
  111. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  112. package/cjs/src/hostEventsTypeMapping.d.ts +0 -2
  113. package/cjs/src/hostEventsTypeMapping.d.ts.map +0 -1
  114. package/cjs/src/hostEventsTypeMapping.js +0 -4
  115. package/cjs/src/hostEventsTypeMapping.js.map +0 -1
  116. package/cjs/src/utils/embedApi/contracts.d.ts +0 -101
  117. package/cjs/src/utils/embedApi/contracts.d.ts.map +0 -1
  118. package/cjs/src/utils/embedApi/contracts.js +0 -17
  119. package/cjs/src/utils/embedApi/contracts.js.map +0 -1
  120. package/cjs/src/utils/embedApi/embedApiClient.d.ts +0 -12
  121. package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  122. package/cjs/src/utils/embedApi/embedApiClient.js +0 -46
  123. package/cjs/src/utils/embedApi/embedApiClient.js.map +0 -1
  124. package/cjs/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  125. package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  126. package/cjs/src/utils/embedApi/processEmbedApi.js +0 -18
  127. package/cjs/src/utils/embedApi/processEmbedApi.js.map +0 -1
  128. package/dist/index-BBBimG1x.js +0 -7370
  129. package/dist/index-BGnxP5NY.js +0 -7370
  130. package/dist/index-CENLvayL.js +0 -7370
  131. package/dist/index-CbltIawo.js +0 -7370
  132. package/dist/index-CoQfqaHj.js +0 -7370
  133. package/dist/index-CzwzS0P4.js +0 -7370
  134. package/dist/index-D-9WUCUl.js +0 -7370
  135. package/dist/index-DFwi_pV_.js +0 -7370
  136. package/dist/index-DOIjN0N_.js +0 -7370
  137. package/dist/index-DYBx8SuE.js +0 -7370
  138. package/dist/index-DaLHJaLd.js +0 -7370
  139. package/dist/index-DnJX-gN2.js +0 -7370
  140. package/dist/index-IDmSUe93.js +0 -7370
  141. package/dist/index-nWevLycs.js +0 -7370
  142. package/dist/index-vxW97_xb.js +0 -7370
  143. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  144. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  145. package/dist/src/hostEventsTypeMapping.d.ts +0 -2
  146. package/dist/src/hostEventsTypeMapping.d.ts.map +0 -1
  147. package/dist/src/utils/embedApi/contracts.d.ts +0 -101
  148. package/dist/src/utils/embedApi/contracts.d.ts.map +0 -1
  149. package/dist/src/utils/embedApi/embedApiClient.d.ts +0 -12
  150. package/dist/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  151. package/dist/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  152. package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  153. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +0 -2
  154. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +0 -1
  155. package/lib/src/embed/searchEmbed-basic-auth.spec.js +0 -101
  156. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +0 -1
  157. package/lib/src/hostEventsTypeMapping.d.ts +0 -2
  158. package/lib/src/hostEventsTypeMapping.d.ts.map +0 -1
  159. package/lib/src/hostEventsTypeMapping.js +0 -2
  160. package/lib/src/hostEventsTypeMapping.js.map +0 -1
  161. package/lib/src/utils/embedApi/contracts.d.ts +0 -101
  162. package/lib/src/utils/embedApi/contracts.d.ts.map +0 -1
  163. package/lib/src/utils/embedApi/contracts.js +0 -14
  164. package/lib/src/utils/embedApi/contracts.js.map +0 -1
  165. package/lib/src/utils/embedApi/embedApiClient.d.ts +0 -12
  166. package/lib/src/utils/embedApi/embedApiClient.d.ts.map +0 -1
  167. package/lib/src/utils/embedApi/embedApiClient.js +0 -42
  168. package/lib/src/utils/embedApi/embedApiClient.js.map +0 -1
  169. package/lib/src/utils/embedApi/processEmbedApi.d.ts +0 -9
  170. package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +0 -1
  171. package/lib/src/utils/embedApi/processEmbedApi.js +0 -14
  172. package/lib/src/utils/embedApi/processEmbedApi.js.map +0 -1
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.35.14 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.36.0 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -2604,8 +2604,17 @@
2604
2604
  */
2605
2605
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
2606
2606
  /**
2607
- * Triggers the action to get the current view of the Liveboard.
2608
- * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2607
+ * @hidden
2608
+ * Notify when info call is completed successfully
2609
+ * ```js
2610
+ * liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
2611
+ *```
2612
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2613
+ */
2614
+ HostEvent["InfoSuccess"] = "InfoSuccess";
2615
+ /**
2616
+ * Triggers the action to get the current view of the liveboard
2617
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2609
2618
  */
2610
2619
  HostEvent["SaveAnswer"] = "saveAnswer";
2611
2620
  /**
@@ -2762,6 +2771,7 @@
2762
2771
  Param["OauthPollingInterval"] = "oAuthPollingInterval";
2763
2772
  Param["IsForceRedirect"] = "isForceRedirect";
2764
2773
  Param["DataSourceId"] = "dataSourceId";
2774
+ Param["preAuthCache"] = "preAuthCache";
2765
2775
  Param["ShowSpotterLimitations"] = "showSpotterLimitations";
2766
2776
  })(Param || (Param = {}));
2767
2777
  /**
@@ -6421,6 +6431,7 @@
6421
6431
  const EndPoints = {
6422
6432
  AUTH_VERIFICATION: '/callosum/v1/session/info',
6423
6433
  SESSION_INFO: '/callosum/v1/session/info',
6434
+ PREAUTH_INFO: '/prism/preauth/info',
6424
6435
  SAML_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
6425
6436
  OIDC_LOGIN_TEMPLATE: (targetUrl) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
6426
6437
  TOKEN_LOGIN: '/callosum/v1/session/login/token',
@@ -14018,6 +14029,31 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14018
14029
  return r;
14019
14030
  });
14020
14031
  }
14032
+ /**
14033
+ * Fetches the session info from the ThoughtSpot server.
14034
+ * @param thoughtspotHost
14035
+ * @returns {Promise<any>}
14036
+ * @example
14037
+ * ```js
14038
+ * const response = await sessionInfoService();
14039
+ * ```
14040
+ */
14041
+ async function fetchPreauthInfoService(thoughtspotHost) {
14042
+ const sessionInfoPath = `${thoughtspotHost}${EndPoints.PREAUTH_INFO}`;
14043
+ const handleError = (e) => {
14044
+ const error = new Error(`Failed to fetch auth info: ${e.message || e.statusText}`);
14045
+ error.status = e.status; // Attach the status code to the error object
14046
+ throw error;
14047
+ };
14048
+ try {
14049
+ const response = await tokenizedFailureLoggedFetch(sessionInfoPath);
14050
+ return response;
14051
+ }
14052
+ catch (e) {
14053
+ handleError(e);
14054
+ return null;
14055
+ }
14056
+ }
14021
14057
  /**
14022
14058
  * Fetches the session info from the ThoughtSpot server.
14023
14059
  * @param thoughtspotHost
@@ -14069,6 +14105,62 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14069
14105
  }
14070
14106
 
14071
14107
  let sessionInfo = null;
14108
+ let preauthInfo = null;
14109
+ /**
14110
+ * Processes the session info response and returns the session info object.
14111
+ * @param preauthInfoResp {any} Response from the session info API.
14112
+ * @returns {PreauthInfo} The session info object.
14113
+ * @example ```js
14114
+ * const preauthInfoResp = await fetch(sessionInfoPath);
14115
+ * const sessionInfo = await formatPreauthInfo(preauthInfoResp);
14116
+ * console.log(sessionInfo);
14117
+ * ```
14118
+ * @version SDK: 1.28.3 | ThoughtSpot: *
14119
+ */
14120
+ const formatPreauthInfo = async (preauthInfoResp) => {
14121
+ var _a;
14122
+ try {
14123
+ // Convert Headers to a plain object
14124
+ const headers = {};
14125
+ (_a = preauthInfoResp === null || preauthInfoResp === void 0 ? void 0 : preauthInfoResp.headers) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => {
14126
+ headers[key] = value;
14127
+ });
14128
+ const data = await preauthInfoResp.json();
14129
+ return {
14130
+ ...data,
14131
+ status: 200,
14132
+ headers,
14133
+ };
14134
+ }
14135
+ catch (error) {
14136
+ return null;
14137
+ }
14138
+ };
14139
+ /**
14140
+ * Returns the session info object and caches it for future use.
14141
+ * Once fetched the session info object is cached and returned from the cache on
14142
+ * subsequent calls.
14143
+ * @example ```js
14144
+ * const preauthInfo = await getPreauthInfo();
14145
+ * console.log(preauthInfo);
14146
+ * ```
14147
+ * @version SDK: 1.28.3 | ThoughtSpot: *
14148
+ * @returns {Promise<SessionInfo>} The session info object.
14149
+ */
14150
+ async function getPreauthInfo(allowCache = true) {
14151
+ if (!allowCache || !preauthInfo) {
14152
+ try {
14153
+ const host = getEmbedConfig().thoughtSpotHost;
14154
+ const sessionResponse = await fetchPreauthInfoService(host);
14155
+ const processedPreauthInfo = await formatPreauthInfo(sessionResponse);
14156
+ preauthInfo = processedPreauthInfo;
14157
+ }
14158
+ catch (error) {
14159
+ return null;
14160
+ }
14161
+ }
14162
+ return preauthInfo;
14163
+ }
14072
14164
  /**
14073
14165
  * Returns the session info object and caches it for future use.
14074
14166
  * Once fetched the session info object is cached and returned from the cache on
@@ -14152,6 +14244,11 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14152
14244
  * Emits when the SDK authenticates successfully
14153
14245
  */
14154
14246
  AuthStatus["SDK_SUCCESS"] = "SDK_SUCCESS";
14247
+ /**
14248
+ * @hidden
14249
+ * Emits when iframe is loaded and session info is available
14250
+ */
14251
+ AuthStatus["SESSION_INFO_SUCCESS"] = "SESSION_INFO_SUCCESS";
14155
14252
  /**
14156
14253
  * Emits when the app sends an authentication success message
14157
14254
  */
@@ -14207,6 +14304,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14207
14304
  return;
14208
14305
  }
14209
14306
  try {
14307
+ getPreauthInfo();
14210
14308
  const sessionInfo = await getSessionInfo();
14211
14309
  authEE.emit(exports.AuthStatus.SUCCESS, sessionInfo);
14212
14310
  }
@@ -14261,6 +14359,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14261
14359
  */
14262
14360
  async function postLoginService() {
14263
14361
  try {
14362
+ getPreauthInfo();
14264
14363
  const sessionInfo = await getSessionInfo();
14265
14364
  releaseVersion = sessionInfo.releaseVersion;
14266
14365
  const embedConfig = getEmbedConfig();
@@ -14928,7 +15027,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14928
15027
  return e;
14929
15028
  }
14930
15029
 
14931
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.14";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
15030
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.36.0";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"6.3.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14932
15031
 
14933
15032
  /**
14934
15033
  * Reloads the ThoughtSpot iframe.
@@ -15291,6 +15390,21 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15291
15390
  }
15292
15391
  return null;
15293
15392
  }
15393
+ /**
15394
+ * Checks if preauth cache is enabled
15395
+ * from the view config and embed config
15396
+ * @returns boolean
15397
+ */
15398
+ isPreAuthCacheEnabled() {
15399
+ // Disable preauth cache when:
15400
+ // 1. overrideOrgId is present since:
15401
+ // - cached auth info would be for wrong org
15402
+ // - info call response changes for each different overrideOrgId
15403
+ // 2. disablePreauthCache is explicitly set to true
15404
+ const isDisabled = (this.viewConfig.overrideOrgId !== undefined
15405
+ || this.embedConfig.disablePreauthCache === true);
15406
+ return !isDisabled;
15407
+ }
15294
15408
  /**
15295
15409
  * fix for ts7.sep.cl
15296
15410
  * will be removed for ts7.oct.cl
@@ -15509,6 +15623,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15509
15623
  if (overrideOrgId !== undefined) {
15510
15624
  queryParams[Param.OverrideOrgId] = overrideOrgId;
15511
15625
  }
15626
+ if (this.isPreAuthCacheEnabled()) {
15627
+ queryParams[Param.preAuthCache] = true;
15628
+ }
15512
15629
  queryParams[Param.OverrideNativeConsole] = true;
15513
15630
  queryParams[Param.ClientLogLevel] = this.embedConfig.logLevel;
15514
15631
  if (isObject_1(additionalFlags) && !isEmpty_1(additionalFlags)) {
@@ -15627,6 +15744,14 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15627
15744
  elHeight: this.iFrame.clientHeight,
15628
15745
  timeTookToLoad: loadTimestamp - initTimestamp,
15629
15746
  });
15747
+ // Send info event if preauth cache is enabled
15748
+ if (this.isPreAuthCacheEnabled()) {
15749
+ getPreauthInfo().then((data) => {
15750
+ if (data === null || data === void 0 ? void 0 : data.info) {
15751
+ this.trigger(exports.HostEvent.InfoSuccess, data);
15752
+ }
15753
+ });
15754
+ }
15630
15755
  });
15631
15756
  this.iFrame.addEventListener('error', () => {
15632
15757
  nextInQueue();
@@ -2057,6 +2057,11 @@ export declare enum AuthStatus {
2057
2057
  * Emits when the SDK authenticates successfully
2058
2058
  */
2059
2059
  SDK_SUCCESS = "SDK_SUCCESS",
2060
+ /**
2061
+ * @hidden
2062
+ * Emits when iframe is loaded and session info is available
2063
+ */
2064
+ SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS",
2060
2065
  /**
2061
2066
  * Emits when the app sends an authentication success message
2062
2067
  */
@@ -2209,6 +2214,36 @@ export type SessionInfo = {
2209
2214
  clusterName: string;
2210
2215
  [key: string]: any;
2211
2216
  };
2217
+ export type PreauthInfo = {
2218
+ info?: SessionInfo;
2219
+ headers: Record<string, string>;
2220
+ status: number;
2221
+ [key: string]: any;
2222
+ };
2223
+ /**
2224
+ * Processes the session info response and returns the session info object.
2225
+ * @param preauthInfoResp {any} Response from the session info API.
2226
+ * @returns {PreauthInfo} The session info object.
2227
+ * @example ```js
2228
+ * const preauthInfoResp = await fetch(sessionInfoPath);
2229
+ * const sessionInfo = await formatPreauthInfo(preauthInfoResp);
2230
+ * console.log(sessionInfo);
2231
+ * ```
2232
+ * @version SDK: 1.28.3 | ThoughtSpot: *
2233
+ */
2234
+ export declare const formatPreauthInfo: (preauthInfoResp: any) => Promise<PreauthInfo>;
2235
+ /**
2236
+ * Returns the session info object and caches it for future use.
2237
+ * Once fetched the session info object is cached and returned from the cache on
2238
+ * subsequent calls.
2239
+ * @example ```js
2240
+ * const preauthInfo = await getPreauthInfo();
2241
+ * console.log(preauthInfo);
2242
+ * ```
2243
+ * @version SDK: 1.28.3 | ThoughtSpot: *
2244
+ * @returns {Promise<SessionInfo>} The session info object.
2245
+ */
2246
+ export declare function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
2212
2247
  /**
2213
2248
  * Returns the session info object and caches it for future use.
2214
2249
  * Once fetched the session info object is cached and returned from the cache on
@@ -2863,6 +2898,7 @@ export interface EmbedConfig {
2863
2898
  * @version SDK 1.37.0 | ThoughtSpot: 10.7.0.cl
2864
2899
  */
2865
2900
  customVariablesForThirdPartyTools?: Record<string, any>;
2901
+ disablePreauthCache?: boolean;
2866
2902
  }
2867
2903
  export interface LayoutConfig {
2868
2904
  }
@@ -5478,8 +5514,17 @@ export declare enum HostEvent {
5478
5514
  */
5479
5515
  UpdatePersonalisedView = "UpdatePersonalisedView",
5480
5516
  /**
5481
- * Triggers the action to get the current view of the Liveboard.
5482
- * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5517
+ * @hidden
5518
+ * Notify when info call is completed successfully
5519
+ * ```js
5520
+ * liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
5521
+ *```
5522
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5523
+ */
5524
+ InfoSuccess = "InfoSuccess",
5525
+ /**
5526
+ * Triggers the action to get the current view of the liveboard
5527
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5483
5528
  */
5484
5529
  SaveAnswer = "saveAnswer",
5485
5530
  /**
@@ -5626,6 +5671,7 @@ export declare enum Param {
5626
5671
  OauthPollingInterval = "oAuthPollingInterval",
5627
5672
  IsForceRedirect = "isForceRedirect",
5628
5673
  DataSourceId = "dataSourceId",
5674
+ preAuthCache = "preAuthCache",
5629
5675
  ShowSpotterLimitations = "showSpotterLimitations"
5630
5676
  }
5631
5677
  /**
@@ -2454,6 +2454,7 @@ export interface EmbedConfig {
2454
2454
  * @version SDK 1.37.0 | ThoughtSpot: 10.7.0.cl
2455
2455
  */
2456
2456
  customVariablesForThirdPartyTools?: Record<string, any>;
2457
+ disablePreauthCache?: boolean;
2457
2458
  }
2458
2459
  export interface LayoutConfig {
2459
2460
  }
@@ -5069,8 +5070,17 @@ export declare enum HostEvent {
5069
5070
  */
5070
5071
  UpdatePersonalisedView = "UpdatePersonalisedView",
5071
5072
  /**
5072
- * Triggers the action to get the current view of the Liveboard.
5073
- * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5073
+ * @hidden
5074
+ * Notify when info call is completed successfully
5075
+ * ```js
5076
+ * liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
5077
+ *```
5078
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5079
+ */
5080
+ InfoSuccess = "InfoSuccess",
5081
+ /**
5082
+ * Triggers the action to get the current view of the liveboard
5083
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5074
5084
  */
5075
5085
  SaveAnswer = "saveAnswer",
5076
5086
  /**
@@ -5217,6 +5227,7 @@ export declare enum Param {
5217
5227
  OauthPollingInterval = "oAuthPollingInterval",
5218
5228
  IsForceRedirect = "isForceRedirect",
5219
5229
  DataSourceId = "dataSourceId",
5230
+ preAuthCache = "preAuthCache",
5220
5231
  ShowSpotterLimitations = "showSpotterLimitations"
5221
5232
  }
5222
5233
  /**
@@ -7151,6 +7162,11 @@ export declare enum AuthStatus {
7151
7162
  * Emits when the SDK authenticates successfully
7152
7163
  */
7153
7164
  SDK_SUCCESS = "SDK_SUCCESS",
7165
+ /**
7166
+ * @hidden
7167
+ * Emits when iframe is loaded and session info is available
7168
+ */
7169
+ SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS",
7154
7170
  /**
7155
7171
  * Emits when the app sends an authentication success message
7156
7172
  */
@@ -7303,6 +7319,36 @@ export type SessionInfo = {
7303
7319
  clusterName: string;
7304
7320
  [key: string]: any;
7305
7321
  };
7322
+ export type PreauthInfo = {
7323
+ info?: SessionInfo;
7324
+ headers: Record<string, string>;
7325
+ status: number;
7326
+ [key: string]: any;
7327
+ };
7328
+ /**
7329
+ * Processes the session info response and returns the session info object.
7330
+ * @param preauthInfoResp {any} Response from the session info API.
7331
+ * @returns {PreauthInfo} The session info object.
7332
+ * @example ```js
7333
+ * const preauthInfoResp = await fetch(sessionInfoPath);
7334
+ * const sessionInfo = await formatPreauthInfo(preauthInfoResp);
7335
+ * console.log(sessionInfo);
7336
+ * ```
7337
+ * @version SDK: 1.28.3 | ThoughtSpot: *
7338
+ */
7339
+ export declare const formatPreauthInfo: (preauthInfoResp: any) => Promise<PreauthInfo>;
7340
+ /**
7341
+ * Returns the session info object and caches it for future use.
7342
+ * Once fetched the session info object is cached and returned from the cache on
7343
+ * subsequent calls.
7344
+ * @example ```js
7345
+ * const preauthInfo = await getPreauthInfo();
7346
+ * console.log(preauthInfo);
7347
+ * ```
7348
+ * @version SDK: 1.28.3 | ThoughtSpot: *
7349
+ * @returns {Promise<SessionInfo>} The session info object.
7350
+ */
7351
+ export declare function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
7306
7352
  /**
7307
7353
  * Returns the session info object and caches it for future use.
7308
7354
  * Once fetched the session info object is cached and returned from the cache on
@@ -1646,6 +1646,11 @@ export enum AuthStatus {
1646
1646
  * Emits when the SDK authenticates successfully
1647
1647
  */
1648
1648
  SDK_SUCCESS = "SDK_SUCCESS",
1649
+ /**
1650
+ * @hidden
1651
+ * Emits when iframe is loaded and session info is available
1652
+ */
1653
+ SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS",
1649
1654
  /**
1650
1655
  * Emits when the app sends an authentication success message
1651
1656
  */
@@ -1798,6 +1803,36 @@ export type SessionInfo = {
1798
1803
  clusterName: string;
1799
1804
  [key: string]: any;
1800
1805
  };
1806
+ export type PreauthInfo = {
1807
+ info?: SessionInfo;
1808
+ headers: Record<string, string>;
1809
+ status: number;
1810
+ [key: string]: any;
1811
+ };
1812
+ /**
1813
+ * Processes the session info response and returns the session info object.
1814
+ * @param preauthInfoResp {any} Response from the session info API.
1815
+ * @returns {PreauthInfo} The session info object.
1816
+ * @example ```js
1817
+ * const preauthInfoResp = await fetch(sessionInfoPath);
1818
+ * const sessionInfo = await formatPreauthInfo(preauthInfoResp);
1819
+ * console.log(sessionInfo);
1820
+ * ```
1821
+ * @version SDK: 1.28.3 | ThoughtSpot: *
1822
+ */
1823
+ export const formatPreauthInfo: (preauthInfoResp: any) => Promise<PreauthInfo>;
1824
+ /**
1825
+ * Returns the session info object and caches it for future use.
1826
+ * Once fetched the session info object is cached and returned from the cache on
1827
+ * subsequent calls.
1828
+ * @example ```js
1829
+ * const preauthInfo = await getPreauthInfo();
1830
+ * console.log(preauthInfo);
1831
+ * ```
1832
+ * @version SDK: 1.28.3 | ThoughtSpot: *
1833
+ * @returns {Promise<SessionInfo>} The session info object.
1834
+ */
1835
+ export function getPreauthInfo(allowCache?: boolean): Promise<PreauthInfo>;
1801
1836
  /**
1802
1837
  * Returns the session info object and caches it for future use.
1803
1838
  * Once fetched the session info object is cached and returned from the cache on
@@ -2452,6 +2487,7 @@ export interface EmbedConfig {
2452
2487
  * @version SDK 1.37.0 | ThoughtSpot: 10.7.0.cl
2453
2488
  */
2454
2489
  customVariablesForThirdPartyTools?: Record<string, any>;
2490
+ disablePreauthCache?: boolean;
2455
2491
  }
2456
2492
  export interface LayoutConfig {
2457
2493
  }
@@ -5067,8 +5103,17 @@ export enum HostEvent {
5067
5103
  */
5068
5104
  UpdatePersonalisedView = "UpdatePersonalisedView",
5069
5105
  /**
5070
- * Triggers the action to get the current view of the Liveboard.
5071
- * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5106
+ * @hidden
5107
+ * Notify when info call is completed successfully
5108
+ * ```js
5109
+ * liveboardEmbed.trigger(HostEvent.InfoSuccess, data);
5110
+ *```
5111
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5112
+ */
5113
+ InfoSuccess = "InfoSuccess",
5114
+ /**
5115
+ * Triggers the action to get the current view of the liveboard
5116
+ * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5072
5117
  */
5073
5118
  SaveAnswer = "saveAnswer",
5074
5119
  /**
@@ -5215,6 +5260,7 @@ export enum Param {
5215
5260
  OauthPollingInterval = "oAuthPollingInterval",
5216
5261
  IsForceRedirect = "isForceRedirect",
5217
5262
  DataSourceId = "dataSourceId",
5263
+ preAuthCache = "preAuthCache",
5218
5264
  ShowSpotterLimitations = "showSpotterLimitations"
5219
5265
  }
5220
5266
  /**
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.35.14",
3
+ "version": "1.36.0",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -72,7 +72,6 @@
72
72
  "classnames": "^2.3.1",
73
73
  "eventemitter3": "^4.0.7",
74
74
  "gatsby-plugin-vercel": "^1.0.3",
75
- "html-react-parser": "^1.4.12",
76
75
  "lodash": "^4.17.21",
77
76
  "mixpanel-browser": "2.47.0",
78
77
  "ts-deepmerge": "^6.0.2",
@@ -117,7 +116,7 @@
117
116
  "eslint-plugin-comment-length": "1.7.3",
118
117
  "eslint-plugin-jsdoc": "^46.9.0",
119
118
  "fs-extra": "^10.0.0",
120
- "gh-pages": "^3.1.0",
119
+ "gh-pages": "6.3.0",
121
120
  "highlight.js": "^10.6.0",
122
121
  "html-to-text": "^8.0.0",
123
122
  "identity-obj-proxy": "^3.0.0",
package/lib/src/auth.d.ts CHANGED
@@ -29,6 +29,11 @@ export declare enum AuthStatus {
29
29
  * Emits when the SDK authenticates successfully
30
30
  */
31
31
  SDK_SUCCESS = "SDK_SUCCESS",
32
+ /**
33
+ * @hidden
34
+ * Emits when iframe is loaded and session info is available
35
+ */
36
+ SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS",
32
37
  /**
33
38
  * Emits when the app sends an authentication success message
34
39
  */
@@ -1 +1 @@
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;AAejB,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;;;;GAIG;AACH,oBAAY,eAAe;IACvB,GAAG,QAAQ;IACX,gBAAgB,qBAA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AAoB,IAAI,IAAI,CAM3C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYvD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI,CAMpE;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAeD;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYtD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,WAEhC;AAyBD;;;GAGG;AACH,eAAO,MAAM,WAAW,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAgC3E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAgBrF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAa3E,CAAC;AA2EF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAiBxD,CAAC;AAEF,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAkBxD,CAAC;AAEF,eAAO,MAAM,MAAM,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAYtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,gBAAuB,WAAW,KAAG,QAAQ,OAAO,CAoB5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,OAAyB,CAAC"}
package/lib/src/auth.js CHANGED
@@ -6,7 +6,7 @@ import { getDOMNode, getRedirectUrl, getSSOMarker } from './utils';
6
6
  import { EndPoints, fetchAuthPostService, fetchAuthService, fetchBasicAuthService, fetchLogoutService, } from './utils/authService';
7
7
  import { isActiveService } from './utils/authService/tokenizedAuthService';
8
8
  import { logger } from './utils/logger';
9
- import { getSessionInfo } from './utils/sessionInfoService';
9
+ import { getSessionInfo, getPreauthInfo } from './utils/sessionInfoService';
10
10
  import { ERROR_MESSAGE } from './errors';
11
11
  // eslint-disable-next-line import/no-mutable-exports
12
12
  export let loggedInStatus = false;
@@ -43,6 +43,11 @@ export var AuthStatus;
43
43
  * Emits when the SDK authenticates successfully
44
44
  */
45
45
  AuthStatus["SDK_SUCCESS"] = "SDK_SUCCESS";
46
+ /**
47
+ * @hidden
48
+ * Emits when iframe is loaded and session info is available
49
+ */
50
+ AuthStatus["SESSION_INFO_SUCCESS"] = "SESSION_INFO_SUCCESS";
46
51
  /**
47
52
  * Emits when the app sends an authentication success message
48
53
  */
@@ -104,6 +109,7 @@ export async function notifyAuthSuccess() {
104
109
  return;
105
110
  }
106
111
  try {
112
+ getPreauthInfo();
107
113
  const sessionInfo = await getSessionInfo();
108
114
  authEE.emit(AuthStatus.SUCCESS, sessionInfo);
109
115
  }
@@ -158,6 +164,7 @@ async function isLoggedIn(thoughtSpotHost) {
158
164
  */
159
165
  export async function postLoginService() {
160
166
  try {
167
+ getPreauthInfo();
161
168
  const sessionInfo = await getSessionInfo();
162
169
  releaseVersion = sessionInfo.releaseVersion;
163
170
  const embedConfig = getEmbedConfig();
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACH,QAAQ,EAA4B,UAAU,GACjD,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnE,OAAO,EACH,SAAS,EACT,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,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,CAAC,GAAG,CAAC;QAClB,KAAK,QAAQ,CAAC,YAAY,CAAC;QAC3B,KAAK,QAAQ,CAAC,IAAI;YACd,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,QAAQ,CAAC,IAAI,CAAC;QACnB,KAAK,QAAQ,CAAC,YAAY;YACtB,OAAO,UAAU,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"}
@@ -101,6 +101,12 @@ export declare class TsEmbed {
101
101
  * @returns
102
102
  */
103
103
  private getEventPort;
104
+ /**
105
+ * Checks if preauth cache is enabled
106
+ * from the view config and embed config
107
+ * @returns boolean
108
+ */
109
+ private isPreAuthCacheEnabled;
104
110
  /**
105
111
  * fix for ts7.sep.cl
106
112
  * will be removed for ts7.oct.cl