@thoughtspot/visual-embed-sdk 1.29.0-alpha.7 → 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.
Files changed (256) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts +14 -17
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +45 -59
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/auth.spec.d.ts +12 -0
  7. package/cjs/src/auth.spec.d.ts.map +1 -1
  8. package/cjs/src/auth.spec.js +89 -67
  9. package/cjs/src/auth.spec.js.map +1 -1
  10. package/cjs/src/authToken.d.ts +1 -1
  11. package/cjs/src/authToken.d.ts.map +1 -1
  12. package/cjs/src/authToken.js +18 -5
  13. package/cjs/src/authToken.js.map +1 -1
  14. package/cjs/src/authToken.spec.d.ts +2 -0
  15. package/cjs/src/authToken.spec.d.ts.map +1 -0
  16. package/cjs/src/authToken.spec.js +29 -0
  17. package/cjs/src/authToken.spec.js.map +1 -0
  18. package/cjs/src/embed/app.spec.js +4 -2
  19. package/cjs/src/embed/app.spec.js.map +1 -1
  20. package/cjs/src/embed/base.d.ts.map +1 -1
  21. package/cjs/src/embed/base.js +2 -0
  22. package/cjs/src/embed/base.js.map +1 -1
  23. package/cjs/src/embed/base.spec.js +1 -0
  24. package/cjs/src/embed/base.spec.js.map +1 -1
  25. package/cjs/src/embed/embed.spec.js +3 -0
  26. package/cjs/src/embed/embed.spec.js.map +1 -1
  27. package/cjs/src/embed/events.spec.js +3 -0
  28. package/cjs/src/embed/events.spec.js.map +1 -1
  29. package/cjs/src/embed/liveboard.spec.js +2 -0
  30. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  31. package/cjs/src/embed/pinboard.spec.js +3 -0
  32. package/cjs/src/embed/pinboard.spec.js.map +1 -1
  33. package/cjs/src/embed/sage.spec.js +3 -0
  34. package/cjs/src/embed/sage.spec.js.map +1 -1
  35. package/cjs/src/embed/search.spec.js +1 -0
  36. package/cjs/src/embed/search.spec.js.map +1 -1
  37. package/cjs/src/embed/ts-embed-trigger.spec.js +3 -0
  38. package/cjs/src/embed/ts-embed-trigger.spec.js.map +1 -1
  39. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  40. package/cjs/src/embed/ts-embed.js +7 -0
  41. package/cjs/src/embed/ts-embed.js.map +1 -1
  42. package/cjs/src/embed/ts-embed.spec.js +7 -0
  43. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  44. package/cjs/src/index.d.ts +2 -1
  45. package/cjs/src/index.d.ts.map +1 -1
  46. package/cjs/src/index.js +2 -1
  47. package/cjs/src/index.js.map +1 -1
  48. package/cjs/src/mixpanel-service.d.ts +2 -1
  49. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  50. package/cjs/src/mixpanel-service.js +1 -0
  51. package/cjs/src/mixpanel-service.js.map +1 -1
  52. package/cjs/src/mixpanel-service.spec.js +7 -0
  53. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  54. package/cjs/src/react/index.d.ts +1 -1
  55. package/cjs/src/react/index.d.ts.map +1 -1
  56. package/cjs/src/react/index.js +2 -1
  57. package/cjs/src/react/index.js.map +1 -1
  58. package/cjs/src/react/index.spec.js +6 -0
  59. package/cjs/src/react/index.spec.js.map +1 -1
  60. package/cjs/src/types.d.ts +79 -47
  61. package/cjs/src/types.d.ts.map +1 -1
  62. package/cjs/src/types.js +61 -46
  63. package/cjs/src/types.js.map +1 -1
  64. package/cjs/src/utils/authService/authService.d.ts +1 -0
  65. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  66. package/cjs/src/utils/authService/authService.js +1 -0
  67. package/cjs/src/utils/authService/authService.js.map +1 -1
  68. package/cjs/src/utils/authService/authService.spec.js +18 -5
  69. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  70. package/cjs/src/utils/authService/tokenizedAuthService.d.ts +15 -2
  71. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  72. package/cjs/src/utils/authService/tokenizedAuthService.js +39 -9
  73. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  74. package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
  75. package/cjs/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
  76. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +32 -0
  77. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
  78. package/cjs/src/utils/graphql/answerService/answerService.d.ts +10 -0
  79. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  80. package/cjs/src/utils/graphql/answerService/answerService.js +10 -0
  81. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  82. package/cjs/src/utils/processData.js +2 -2
  83. package/cjs/src/utils/processData.js.map +1 -1
  84. package/cjs/src/utils/processData.spec.js +3 -2
  85. package/cjs/src/utils/processData.spec.js.map +1 -1
  86. package/cjs/src/utils/sessionInfoService.d.ts +66 -0
  87. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -0
  88. package/cjs/src/utils/sessionInfoService.js +92 -0
  89. package/cjs/src/utils/sessionInfoService.js.map +1 -0
  90. package/cjs/src/utils.d.ts +1 -1
  91. package/cjs/src/utils.d.ts.map +1 -1
  92. package/cjs/src/utils.js +4 -1
  93. package/cjs/src/utils.js.map +1 -1
  94. package/dist/src/auth.d.ts +14 -17
  95. package/dist/src/auth.d.ts.map +1 -1
  96. package/dist/src/auth.spec.d.ts +12 -0
  97. package/dist/src/auth.spec.d.ts.map +1 -1
  98. package/dist/src/authToken.d.ts +1 -1
  99. package/dist/src/authToken.d.ts.map +1 -1
  100. package/dist/src/authToken.spec.d.ts +2 -0
  101. package/dist/src/authToken.spec.d.ts.map +1 -0
  102. package/dist/src/embed/base.d.ts.map +1 -1
  103. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  104. package/dist/src/index.d.ts +2 -1
  105. package/dist/src/index.d.ts.map +1 -1
  106. package/dist/src/mixpanel-service.d.ts +2 -1
  107. package/dist/src/mixpanel-service.d.ts.map +1 -1
  108. package/dist/src/react/index.d.ts +1 -1
  109. package/dist/src/react/index.d.ts.map +1 -1
  110. package/dist/src/types.d.ts +79 -47
  111. package/dist/src/types.d.ts.map +1 -1
  112. package/dist/src/utils/authService/authService.d.ts +1 -0
  113. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  114. package/dist/src/utils/authService/tokenizedAuthService.d.ts +15 -2
  115. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  116. package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
  117. package/dist/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
  118. package/dist/src/utils/graphql/answerService/answerService.d.ts +10 -0
  119. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  120. package/dist/src/utils/sessionInfoService.d.ts +66 -0
  121. package/dist/src/utils/sessionInfoService.d.ts.map +1 -0
  122. package/dist/src/utils.d.ts +1 -1
  123. package/dist/src/utils.d.ts.map +1 -1
  124. package/dist/tsembed-react.es.js +225 -105
  125. package/dist/tsembed-react.js +225 -104
  126. package/dist/tsembed.es.js +233 -116
  127. package/dist/tsembed.js +233 -116
  128. package/dist/visual-embed-sdk-react-full.d.ts +171 -66
  129. package/dist/visual-embed-sdk-react.d.ts +171 -66
  130. package/dist/visual-embed-sdk.d.ts +171 -66
  131. package/lib/package.json +1 -1
  132. package/lib/src/auth.d.ts +14 -17
  133. package/lib/src/auth.d.ts.map +1 -1
  134. package/lib/src/auth.js +44 -56
  135. package/lib/src/auth.js.map +1 -1
  136. package/lib/src/auth.spec.d.ts +12 -0
  137. package/lib/src/auth.spec.d.ts.map +1 -1
  138. package/lib/src/auth.spec.js +88 -66
  139. package/lib/src/auth.spec.js.map +1 -1
  140. package/lib/src/authToken.d.ts +1 -1
  141. package/lib/src/authToken.d.ts.map +1 -1
  142. package/lib/src/authToken.js +18 -5
  143. package/lib/src/authToken.js.map +1 -1
  144. package/lib/src/authToken.spec.d.ts +2 -0
  145. package/lib/src/authToken.spec.d.ts.map +1 -0
  146. package/lib/src/authToken.spec.js +26 -0
  147. package/lib/src/authToken.spec.js.map +1 -0
  148. package/lib/src/embed/app.spec.js +4 -2
  149. package/lib/src/embed/app.spec.js.map +1 -1
  150. package/lib/src/embed/base.d.ts.map +1 -1
  151. package/lib/src/embed/base.js +3 -1
  152. package/lib/src/embed/base.js.map +1 -1
  153. package/lib/src/embed/base.spec.js +1 -0
  154. package/lib/src/embed/base.spec.js.map +1 -1
  155. package/lib/src/embed/embed.spec.js +2 -0
  156. package/lib/src/embed/embed.spec.js.map +1 -1
  157. package/lib/src/embed/events.spec.js +2 -0
  158. package/lib/src/embed/events.spec.js.map +1 -1
  159. package/lib/src/embed/liveboard.spec.js +2 -0
  160. package/lib/src/embed/liveboard.spec.js.map +1 -1
  161. package/lib/src/embed/pinboard.spec.js +2 -0
  162. package/lib/src/embed/pinboard.spec.js.map +1 -1
  163. package/lib/src/embed/sage.spec.js +2 -0
  164. package/lib/src/embed/sage.spec.js.map +1 -1
  165. package/lib/src/embed/search.spec.js +1 -0
  166. package/lib/src/embed/search.spec.js.map +1 -1
  167. package/lib/src/embed/ts-embed-trigger.spec.js +2 -0
  168. package/lib/src/embed/ts-embed-trigger.spec.js.map +1 -1
  169. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  170. package/lib/src/embed/ts-embed.js +7 -0
  171. package/lib/src/embed/ts-embed.js.map +1 -1
  172. package/lib/src/embed/ts-embed.spec.js +7 -0
  173. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  174. package/lib/src/index.d.ts +2 -1
  175. package/lib/src/index.d.ts.map +1 -1
  176. package/lib/src/index.js +2 -1
  177. package/lib/src/index.js.map +1 -1
  178. package/lib/src/mixpanel-service.d.ts +2 -1
  179. package/lib/src/mixpanel-service.d.ts.map +1 -1
  180. package/lib/src/mixpanel-service.js +1 -0
  181. package/lib/src/mixpanel-service.js.map +1 -1
  182. package/lib/src/mixpanel-service.spec.js +7 -0
  183. package/lib/src/mixpanel-service.spec.js.map +1 -1
  184. package/lib/src/react/index.d.ts +1 -1
  185. package/lib/src/react/index.d.ts.map +1 -1
  186. package/lib/src/react/index.js +1 -1
  187. package/lib/src/react/index.js.map +1 -1
  188. package/lib/src/react/index.spec.js +6 -0
  189. package/lib/src/react/index.spec.js.map +1 -1
  190. package/lib/src/types.d.ts +79 -47
  191. package/lib/src/types.d.ts.map +1 -1
  192. package/lib/src/types.js +61 -46
  193. package/lib/src/types.js.map +1 -1
  194. package/lib/src/utils/authService/authService.d.ts +1 -0
  195. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  196. package/lib/src/utils/authService/authService.js +1 -0
  197. package/lib/src/utils/authService/authService.js.map +1 -1
  198. package/lib/src/utils/authService/authService.spec.js +18 -5
  199. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  200. package/lib/src/utils/authService/tokenizedAuthService.d.ts +15 -2
  201. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  202. package/lib/src/utils/authService/tokenizedAuthService.js +37 -8
  203. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  204. package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts +2 -0
  205. package/lib/src/utils/authService/tokenizedAuthService.spec.d.ts.map +1 -0
  206. package/lib/src/utils/authService/tokenizedAuthService.spec.js +29 -0
  207. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -0
  208. package/lib/src/utils/graphql/answerService/answerService.d.ts +10 -0
  209. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  210. package/lib/src/utils/graphql/answerService/answerService.js +10 -0
  211. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  212. package/lib/src/utils/processData.js +3 -3
  213. package/lib/src/utils/processData.js.map +1 -1
  214. package/lib/src/utils/processData.spec.js +3 -2
  215. package/lib/src/utils/processData.spec.js.map +1 -1
  216. package/lib/src/utils/sessionInfoService.d.ts +66 -0
  217. package/lib/src/utils/sessionInfoService.d.ts.map +1 -0
  218. package/lib/src/utils/sessionInfoService.js +85 -0
  219. package/lib/src/utils/sessionInfoService.js.map +1 -0
  220. package/lib/src/utils.d.ts +1 -1
  221. package/lib/src/utils.d.ts.map +1 -1
  222. package/lib/src/utils.js +4 -1
  223. package/lib/src/utils.js.map +1 -1
  224. package/lib/src/visual-embed-sdk.d.ts +176 -67
  225. package/package.json +1 -1
  226. package/src/auth.spec.ts +92 -72
  227. package/src/auth.ts +46 -68
  228. package/src/authToken.spec.ts +31 -0
  229. package/src/authToken.ts +17 -5
  230. package/src/embed/app.spec.ts +4 -2
  231. package/src/embed/base.spec.ts +1 -0
  232. package/src/embed/base.ts +3 -0
  233. package/src/embed/embed.spec.ts +2 -0
  234. package/src/embed/events.spec.ts +2 -0
  235. package/src/embed/liveboard.spec.ts +2 -0
  236. package/src/embed/pinboard.spec.ts +2 -0
  237. package/src/embed/sage.spec.ts +3 -0
  238. package/src/embed/search.spec.ts +1 -0
  239. package/src/embed/ts-embed-trigger.spec.ts +3 -0
  240. package/src/embed/ts-embed.spec.ts +8 -0
  241. package/src/embed/ts-embed.ts +7 -0
  242. package/src/index.ts +2 -1
  243. package/src/mixpanel-service.spec.ts +12 -3
  244. package/src/mixpanel-service.ts +3 -1
  245. package/src/react/index.spec.tsx +7 -0
  246. package/src/react/index.tsx +1 -0
  247. package/src/types.ts +80 -47
  248. package/src/utils/authService/authService.spec.ts +18 -5
  249. package/src/utils/authService/authService.ts +1 -0
  250. package/src/utils/authService/tokenizedAuthService.spec.ts +36 -0
  251. package/src/utils/authService/tokenizedAuthService.ts +38 -8
  252. package/src/utils/graphql/answerService/answerService.ts +10 -0
  253. package/src/utils/processData.spec.ts +3 -2
  254. package/src/utils/processData.ts +3 -3
  255. package/src/utils/sessionInfoService.ts +101 -0
  256. package/src/utils.ts +7 -2
package/src/types.ts CHANGED
@@ -610,6 +610,24 @@ export interface EmbedConfig {
610
610
  * @version SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw
611
611
  */
612
612
  currencyFormat?: string;
613
+
614
+ /**
615
+ * This flag is used to disable the token verification in the SDK.
616
+ * Enabling this flag will also disable the caching of the token.
617
+ *
618
+ * @hidden
619
+ *
620
+ * @example
621
+ * ```js
622
+ * init({
623
+ * ...embedConfig,
624
+ * disableTokenVerification : true
625
+ * })
626
+ * ```
627
+ *
628
+ * @version SDK: 1.28.5 | Thoughtspot: *
629
+ */
630
+ disableTokenVerification?: boolean;
613
631
  }
614
632
 
615
633
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -1227,7 +1245,7 @@ export interface RuntimeFilter {
1227
1245
  * a single operand, whereas other operators like BW and IN accept multiple
1228
1246
  * operands.
1229
1247
  */
1230
- values: (number | boolean | string)[];
1248
+ values: (number | boolean | string | bigint)[];
1231
1249
  }
1232
1250
  /**
1233
1251
  * A filter that can be applied to ThoughtSpot Answers, Liveboards, or
@@ -1283,6 +1301,8 @@ export enum EmbedEvent {
1283
1301
  /**
1284
1302
  * Authentication has either succeeded or failed.
1285
1303
  *
1304
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1305
+ *
1286
1306
  * @example
1287
1307
  *```js
1288
1308
  * appEmbed.on(EmbedEvent.AuthInit, payload => {
@@ -1296,6 +1316,8 @@ export enum EmbedEvent {
1296
1316
  * The embed object container has loaded.
1297
1317
  *
1298
1318
  * @returns timestamp - The timestamp when the event was generated.
1319
+ *
1320
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1299
1321
  * @example
1300
1322
  *```js
1301
1323
  * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
@@ -1310,6 +1332,8 @@ export enum EmbedEvent {
1310
1332
  * Data pertaining to answer or Liveboard is received
1311
1333
  *
1312
1334
  * @return data - The answer or Liveboard data
1335
+ *
1336
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1313
1337
  * @example
1314
1338
  *```js
1315
1339
  * liveboardEmbed.on(EmbedEvent.Data, payload => {
@@ -1328,6 +1352,7 @@ export enum EmbedEvent {
1328
1352
  /**
1329
1353
  * Search query has been updated by the user.
1330
1354
  *
1355
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
1331
1356
  * @example
1332
1357
  *```js
1333
1358
  * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
@@ -1337,12 +1362,14 @@ export enum EmbedEvent {
1337
1362
  /**
1338
1363
  * A drill-down operation has been performed.
1339
1364
  *
1365
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1366
+ *
1340
1367
  * @returns additionalFilters - Any additional filters applied
1341
1368
  * @returns drillDownColumns - The columns on which drill down was performed
1342
1369
  * @returns nonFilteredColumns - The columns that were not filtered
1343
1370
  * @example
1344
1371
  *```js
1345
- * searchEmbed.trigger(EmbedEvent.DrillDown, {
1372
+ * searchEmbed.on(EmbedEvent.DrillDown, {
1346
1373
  * points: {
1347
1374
  * clickedPoint,
1348
1375
  * selectedPoints: selectedPoint
@@ -1375,6 +1402,8 @@ export enum EmbedEvent {
1375
1402
  * One or more data sources have been selected.
1376
1403
  *
1377
1404
  * @returns dataSourceIds - the list of data sources
1405
+ *
1406
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1378
1407
  * @example
1379
1408
  * ```js
1380
1409
  * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
@@ -1402,6 +1431,8 @@ export enum EmbedEvent {
1402
1431
  * @returns actionId - ID of the custom action
1403
1432
  * @returns payload {@link CustomActionPayload} - Response payload with the
1404
1433
  * Answer or Liveboard data
1434
+ *
1435
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1405
1436
  * @example
1406
1437
  * ```js
1407
1438
  * appEmbed.on(EmbedEvent.customAction, payload => {
@@ -1449,21 +1480,18 @@ export enum EmbedEvent {
1449
1480
  /**
1450
1481
  * An error has occurred. This event is fired for the following error types:
1451
1482
  *
1452
- * API - API call failure error.
1453
- *
1454
- * FULLSCREEN - Error when presenting a Liveboard or visualization in full screen mode.
1455
- *
1456
- * SINGLE_VALUE_FILTER - Error due to multiple values in the single value filter.
1457
- *
1458
- * NON_EXIST_FILTER - Error due to a non-existent filter.
1483
+ * `API` - API call failure error.
1484
+ * `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen mode.
1485
+ * `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value filter.
1486
+ * `NON_EXIST_FILTER` - Error due to a non-existent filter.
1487
+ * `INVALID_DATE_VALUE` - Invalid date value error.
1488
+ * `INVALID_OPERATOR` - Use of invalid operator during filter application.
1459
1489
  *
1460
- * INVALID_DATE_VALUE - Invalid date value error.
1461
- *
1462
- * INVALID_OPERATOR - Use of invalid operator during filter application.
1463
- *
1464
- * For more information, see [Developer Documentation](https://developers.thoughtspot.com/docs/events-app-integration#errorType)
1490
+ * For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
1465
1491
  *
1466
1492
  * @returns error - An error object or message
1493
+ *
1494
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1467
1495
  * @example
1468
1496
  * ```js
1469
1497
  * // API error
@@ -1489,6 +1517,9 @@ export enum EmbedEvent {
1489
1517
  * The embedded object has sent an alert.
1490
1518
  *
1491
1519
  * @returns alert - An alert object
1520
+ *
1521
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
1522
+ *
1492
1523
  * @example
1493
1524
  * ```js
1494
1525
  * searchEmbed.on(EmbedEvent.Alert)
@@ -1498,6 +1529,8 @@ export enum EmbedEvent {
1498
1529
  /**
1499
1530
  * The ThoughtSpot auth session has expired.
1500
1531
  *
1532
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw
1533
+ *
1501
1534
  * @example
1502
1535
  *```js
1503
1536
  * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
@@ -1551,6 +1584,7 @@ export enum EmbedEvent {
1551
1584
  /**
1552
1585
  * Detects the route change.
1553
1586
  *
1587
+ * @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw
1554
1588
  * @example
1555
1589
  *```js
1556
1590
  * searchEmbed.on(EmbedEvent.RouteChange, payload =>
@@ -1631,8 +1665,7 @@ export enum EmbedEvent {
1631
1665
  */
1632
1666
  LiveboardRendered = 'PinboardRendered',
1633
1667
  /**
1634
- * This can be used to register an event listener which
1635
- * is triggered on all events.
1668
+ * Emits all events.
1636
1669
  *
1637
1670
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1638
1671
  * @example
@@ -1649,13 +1682,13 @@ export enum EmbedEvent {
1649
1682
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1650
1683
  * @example
1651
1684
  *```js
1652
- * //trigger when action starts
1685
+ * //Emit when action starts
1653
1686
  * searchEmbed.on(EmbedEvent.Save, payload => {
1654
1687
  * console.log('Save', payload)
1655
1688
  * }, {
1656
1689
  * start: true
1657
1690
  * })
1658
- * //trigger when action ends
1691
+ * //emit when action ends
1659
1692
  * searchEmbed.on(EmbedEvent.Save, payload => {
1660
1693
  * console.log('Save', payload)
1661
1694
  * })
@@ -1673,7 +1706,7 @@ export enum EmbedEvent {
1673
1706
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1674
1707
  * @example
1675
1708
  *```js
1676
- * liveboardEmbed.trigger(HostEvent.Download, {
1709
+ * liveboardEmbed.on(EmbedEvent.Download, {
1677
1710
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1678
1711
  * })
1679
1712
  *```
@@ -1685,10 +1718,10 @@ export enum EmbedEvent {
1685
1718
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1686
1719
  * @example
1687
1720
  *```js
1688
- * //trigger when action starts
1721
+ * //emit when action starts
1689
1722
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1690
1723
  * console.log('download PNG', payload)}, {start: true })
1691
- * //trigger when action ends
1724
+ * //emit when action ends
1692
1725
  * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1693
1726
  * console.log('download PNG', payload)})
1694
1727
  *```
@@ -1700,10 +1733,10 @@ export enum EmbedEvent {
1700
1733
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1701
1734
  * @example
1702
1735
  *```js
1703
- * //trigger when action starts
1736
+ * //emit when action starts
1704
1737
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1705
1738
  * console.log('download PDF', payload)}, {start: true })
1706
- * //trigger when action ends
1739
+ * //emit when action ends
1707
1740
  * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1708
1741
  * console.log('download PDF', payload)})
1709
1742
  *```
@@ -1715,10 +1748,10 @@ export enum EmbedEvent {
1715
1748
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1716
1749
  * @example
1717
1750
  *```js
1718
- * //trigger when action starts
1751
+ * //emit when action starts
1719
1752
  * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1720
1753
  * console.log('download CSV', payload)}, {start: true })
1721
- * //trigger when action ends
1754
+ * //emit when action ends
1722
1755
  * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1723
1756
  * console.log('download CSV', payload)})
1724
1757
  *```
@@ -1730,10 +1763,10 @@ export enum EmbedEvent {
1730
1763
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1731
1764
  * @example
1732
1765
  *```js
1733
- * //trigger when action starts
1766
+ * //emit when action starts
1734
1767
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1735
1768
  * console.log('download Xlsx', payload)}, { start: true })
1736
- * //trigger when action ends
1769
+ * //emit when action ends
1737
1770
  * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1738
1771
  * console.log('download Xlsx', payload)})
1739
1772
  *```
@@ -1745,7 +1778,7 @@ export enum EmbedEvent {
1745
1778
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1746
1779
  * @example
1747
1780
  *```js
1748
- * //trigger when action starts
1781
+ * //emit when action starts
1749
1782
  * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1750
1783
  * console.log('delete answer', payload)}, {start: true })
1751
1784
  * //trigger when action is completed
@@ -1760,13 +1793,13 @@ export enum EmbedEvent {
1760
1793
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1761
1794
  * @example
1762
1795
  *```js
1763
- * //trigger when action starts
1796
+ * //emit when action starts
1764
1797
  * searchEmbed.on(EmbedEvent.Pin, payload => {
1765
1798
  * console.log('pin', payload)
1766
1799
  * }, {
1767
1800
  * start: true
1768
1801
  * })
1769
- * //trigger when action ends
1802
+ * //emit when action ends
1770
1803
  * searchEmbed.on(EmbedEvent.Pin, payload => {
1771
1804
  * console.log('pin', payload)
1772
1805
  * })
@@ -1779,13 +1812,13 @@ export enum EmbedEvent {
1779
1812
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1780
1813
  * @example
1781
1814
  *```js
1782
- * //trigger when action starts
1815
+ * //emit when action starts
1783
1816
  * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1784
1817
  * console.log('SpotIQAnalyze', payload)
1785
1818
  * }, {
1786
1819
  * start: true
1787
1820
  * })
1788
- * //trigger when action ends
1821
+ * //emit when action ends
1789
1822
  * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1790
1823
  * console.log('SpotIQ analyze', payload)
1791
1824
  * })
@@ -1798,13 +1831,13 @@ export enum EmbedEvent {
1798
1831
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1799
1832
  * @example
1800
1833
  *```js
1801
- * //trigger when action starts
1834
+ * //emit when action starts
1802
1835
  * searchEmbed.on(EmbedEvent.Share, payload => {
1803
1836
  * console.log('Share', payload)
1804
1837
  * }, {
1805
1838
  * start: true
1806
1839
  * })
1807
- * //trigger when action ends
1840
+ * //emit when action ends
1808
1841
  * searchEmbed.on(EmbedEvent.Share, payload => {
1809
1842
  * console.log('Share', payload)
1810
1843
  * })
@@ -1879,10 +1912,10 @@ export enum EmbedEvent {
1879
1912
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1880
1913
  * @example
1881
1914
  *```js
1882
- * //trigger when action starts
1915
+ * //emit when action starts
1883
1916
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1884
1917
  * console.log('Export TML', payload)}, { start: true })
1885
- * //trigger when action ends
1918
+ * //emit when action ends
1886
1919
  * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1887
1920
  * console.log('Export TML', payload)})
1888
1921
  *```
@@ -1906,10 +1939,10 @@ export enum EmbedEvent {
1906
1939
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1907
1940
  * @example
1908
1941
  *```js
1909
- * //trigger when action starts
1942
+ * //emit when action starts
1910
1943
  * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1911
1944
  * console.log('Copy and edit', payload)}, {start: true })
1912
- * //trigger when action ends
1945
+ * //emit when action ends
1913
1946
  * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1914
1947
  * console.log('Copy and edit', payload)})
1915
1948
  *```
@@ -2011,7 +2044,7 @@ export enum EmbedEvent {
2011
2044
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2012
2045
  * @example
2013
2046
  *```js
2014
- * liveboardEmbed.trigger(HostEvent.Present)
2047
+ * liveboardEmbed.on(EmbedEvent.Present)
2015
2048
  *```
2016
2049
  * @example
2017
2050
  *```js
@@ -2027,7 +2060,7 @@ export enum EmbedEvent {
2027
2060
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2028
2061
  * @example
2029
2062
  *```js
2030
- * liveboardEmbed.trigger(EmbedEvent.Delete,
2063
+ * liveboardEmbed.on(EmbedEvent.Delete,
2031
2064
  * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2032
2065
  *```
2033
2066
  */
@@ -2038,7 +2071,7 @@ export enum EmbedEvent {
2038
2071
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2039
2072
  * @example
2040
2073
  *```js
2041
- * liveboardEmbed.trigger(EmbedEvent.SchedulesList)
2074
+ * liveboardEmbed.on(EmbedEvent.SchedulesList)
2042
2075
  *```
2043
2076
  */
2044
2077
  SchedulesList = 'schedule-list',
@@ -2048,7 +2081,7 @@ export enum EmbedEvent {
2048
2081
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2049
2082
  * @example
2050
2083
  *```js
2051
- * liveboardEmbed.trigger(EmbedEvent.Cancel)
2084
+ * liveboardEmbed.on(EmbedEvent.Cancel)
2052
2085
  *```
2053
2086
  */
2054
2087
  Cancel = 'cancel',
@@ -2058,7 +2091,7 @@ export enum EmbedEvent {
2058
2091
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2059
2092
  * @example
2060
2093
  *```js
2061
- * liveboardEmbed.trigger(EmbedEvent.Explore, {
2094
+ * liveboardEmbed.on(EmbedEvent.Explore, {
2062
2095
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2063
2096
  *```
2064
2097
  */
@@ -2069,7 +2102,7 @@ export enum EmbedEvent {
2069
2102
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2070
2103
  * @example
2071
2104
  *```js
2072
- * liveboardEmbed.trigger(EmbedEvent.CopyLink, {
2105
+ * liveboardEmbed.on(EmbedEvent.CopyLink, {
2073
2106
  * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2074
2107
  *```
2075
2108
  */
@@ -2449,7 +2482,7 @@ export enum HostEvent {
2449
2482
  *
2450
2483
  * @example
2451
2484
  * ```js
2452
- * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
2485
+ * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
2453
2486
  * data=>console.log(data))
2454
2487
  * ```
2455
2488
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
@@ -2913,7 +2946,7 @@ export enum HostEvent {
2913
2946
  *
2914
2947
  * ```js
2915
2948
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
2916
- * filter: { column: 'column name', oper: 'IN', values: [1,2,3], is_mandatory: false }
2949
+ * filter: { column: 'column name', oper: 'IN', values: [1,2,3]}
2917
2950
  * })
2918
2951
  * ```
2919
2952
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -4072,7 +4105,7 @@ export enum Action {
4072
4105
  * disabledActions: [Action.TML] // to disable all TML actions
4073
4106
  * ```
4074
4107
  *
4075
- * @version SDK : 1.28.2 | Thoughtspot: 9.10.5.cl
4108
+ * @version SDK : 1.28.3 | Thoughtspot: 9.12.0.cl
4076
4109
  */
4077
4110
  TML = 'tml',
4078
4111
 
@@ -26,9 +26,10 @@ describe('Unit test for authService', () => {
26
26
  status: 200,
27
27
  ok: true,
28
28
  }));
29
- const response = await fetchSessionInfoService(authVerificationUrl);
30
- expect(response.status).toBe(200);
29
+ const response = await fetchSessionInfoService(thoughtSpotHost);
30
+ expect(response.success).toBe(true);
31
31
  expect(fetch).toHaveBeenCalledTimes(1);
32
+ expect(fetch).toBeCalledWith(`${thoughtSpotHost}${EndPoints.SESSION_INFO}`, {});
32
33
  });
33
34
 
34
35
  test('fetchAuthTokenService', async () => {
@@ -108,11 +109,15 @@ describe('Unit test for authService', () => {
108
109
  status: 500,
109
110
  ok: false,
110
111
  }));
111
- await fetchSessionInfoService(authVerificationUrl);
112
- expect(logger.error).toHaveBeenCalledWith('Failure', 'error');
112
+ try {
113
+ await fetchSessionInfoService(authVerificationUrl);
114
+ } catch (e) {
115
+ expect(e.message).toContain('Failed to fetch session info');
116
+ }
117
+ expect(logger.error).toHaveBeenCalledWith('Failed to fetch http://localhost:3000/callosum/v1/session/info', 'error');
113
118
  });
114
119
 
115
- test('verifyTokenService', async () => {
120
+ test('verifyTokenService if token api works', async () => {
116
121
  global.fetch = jest.fn(() => Promise.resolve({ success: true, ok: true }));
117
122
  await verifyTokenService(thoughtSpotHost, authToken);
118
123
  expect(fetch).toBeCalledWith(`${thoughtSpotHost}${EndPoints.IS_ACTIVE}`, {
@@ -123,4 +128,12 @@ describe('Unit test for authService', () => {
123
128
  },
124
129
  });
125
130
  });
131
+
132
+ test('verifyTokenService if token api fails', async () => {
133
+ global.fetch = jest.fn(() => Promise.reject(new Error('error')));
134
+ jest.spyOn(logger, 'warn');
135
+ const status = await verifyTokenService(thoughtSpotHost, authToken);
136
+ expect(status).toBe(false);
137
+ expect(logger.warn).toHaveBeenCalledWith('Token Verification Service failed : error');
138
+ });
126
139
  });
@@ -2,6 +2,7 @@ import { logger } from '../logger';
2
2
 
3
3
  export const EndPoints = {
4
4
  AUTH_VERIFICATION: '/callosum/v1/session/info',
5
+ SESSION_INFO: '/callosum/v1/session/info',
5
6
  SAML_LOGIN_TEMPLATE: (targetUrl: string) => `/callosum/v1/saml/login?targetURLPath=${targetUrl}`,
6
7
  OIDC_LOGIN_TEMPLATE: (targetUrl: string) => `/callosum/v1/oidc/login?targetURLPath=${targetUrl}`,
7
8
  TOKEN_LOGIN: '/callosum/v1/session/login/token',
@@ -0,0 +1,36 @@
1
+ import * as tokenizedFetchModule from '../../tokenizedFetch';
2
+ import { isActiveService } from './tokenizedAuthService';
3
+ import { logger } from '../logger';
4
+
5
+ describe('tokenizedAuthService', () => {
6
+ test('isActiveService is fetch returns ok', async () => {
7
+ jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockResolvedValueOnce({
8
+ ok: true,
9
+ });
10
+
11
+ const isActiveResp = await isActiveService('http://thoughtspotHost');
12
+
13
+ expect(isActiveResp).toEqual(true);
14
+ });
15
+ test('isActiveService if fetch returns not ok', async () => {
16
+ jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockResolvedValueOnce({
17
+ ok: false,
18
+ });
19
+
20
+ const isActiveResp = await isActiveService('http://thoughtspotHost');
21
+
22
+ expect(isActiveResp).toEqual(false);
23
+ });
24
+
25
+ test('isActiveService if fetch fails', async () => {
26
+ jest.spyOn(tokenizedFetchModule, 'tokenizedFetch').mockRejectedValueOnce({
27
+ ok: false,
28
+ });
29
+ jest.spyOn(logger, 'warn');
30
+
31
+ const isActiveResp = await isActiveService('http://thoughtspotHost');
32
+
33
+ expect(isActiveResp).toEqual(false);
34
+ expect(logger.warn).toHaveBeenCalled();
35
+ });
36
+ });
@@ -7,23 +7,33 @@ import { EndPoints } from './authService';
7
7
  * @param url
8
8
  * @param options
9
9
  */
10
- function tokenisedFailureLoggedFetch(url: string, options: RequestInit = {}): Promise<Response> {
10
+ function tokenizedFailureLoggedFetch(url: string, options: RequestInit = {}): Promise<Response> {
11
11
  return tokenizedFetch(url, options).then(async (r) => {
12
12
  if (!r.ok && r.type !== 'opaqueredirect' && r.type !== 'opaque') {
13
- logger.error('Failure', await r.text?.());
13
+ logger.error(`Failed to fetch ${url}`, await r.text?.());
14
14
  }
15
15
  return r;
16
16
  });
17
17
  }
18
18
 
19
19
  /**
20
+ * Fetches the session info from the ThoughtSpot server.
20
21
  *
21
- * @param authVerificationUrl
22
+ * @param thoughtspotHost
23
+ * @returns {Promise<any>}
24
+ * @example
25
+ * ```js
26
+ * const response = await sessionInfoService();
27
+ * ```
22
28
  */
23
- export function fetchSessionInfoService(authVerificationUrl: string): Promise<any> {
24
- return tokenisedFailureLoggedFetch(authVerificationUrl, {
25
- credentials: 'include',
26
- });
29
+ export async function fetchSessionInfoService(thoughtspotHost: string): Promise<any> {
30
+ const sessionInfoPath = `${thoughtspotHost}${EndPoints.SESSION_INFO}`;
31
+ const response = await tokenizedFailureLoggedFetch(sessionInfoPath);
32
+ if (!response.ok) {
33
+ throw new Error(`Failed to fetch session info: ${response.statusText}`);
34
+ }
35
+ const data = await response.json();
36
+ return data;
27
37
  }
28
38
 
29
39
  /**
@@ -31,7 +41,7 @@ export function fetchSessionInfoService(authVerificationUrl: string): Promise<an
31
41
  * @param thoughtSpotHost
32
42
  */
33
43
  export async function fetchLogoutService(thoughtSpotHost: string): Promise<any> {
34
- return tokenisedFailureLoggedFetch(`${thoughtSpotHost}${EndPoints.LOGOUT}`, {
44
+ return tokenizedFailureLoggedFetch(`${thoughtSpotHost}${EndPoints.LOGOUT}`, {
35
45
  credentials: 'include',
36
46
  method: 'POST',
37
47
  headers: {
@@ -39,3 +49,23 @@ export async function fetchLogoutService(thoughtSpotHost: string): Promise<any>
39
49
  },
40
50
  });
41
51
  }
52
+
53
+ /**
54
+ * Is active service to check if the user is logged in.
55
+ *
56
+ * @param thoughtSpotHost
57
+ * @version SDK: 1.28.4 | ThoughtSpot: *
58
+ */
59
+ export async function isActiveService(thoughtSpotHost: string): Promise<boolean> {
60
+ const isActiveUrl = `${thoughtSpotHost}${EndPoints.IS_ACTIVE}`;
61
+ try {
62
+ const res = await tokenizedFetch(isActiveUrl, {
63
+ credentials: 'include',
64
+ });
65
+ return res.ok;
66
+ } catch (e) {
67
+ logger.warn(`Is Logged In Service failed : ${e.message}`);
68
+ }
69
+
70
+ return false;
71
+ }
@@ -37,6 +37,16 @@ export interface UnderlyingDataPoint {
37
37
  * const data = await underlying.fetchData(0, 100);
38
38
  * })
39
39
  * ```
40
+ * @example
41
+ * ```js
42
+ * embed.on(EmbedEvent.Data, async (e) => {
43
+ * const service = await embed.getAnswerService();
44
+ * await service.addColumns([
45
+ * "<column guid>"
46
+ * ]);
47
+ * console.log(await service.fetchData());
48
+ * });
49
+ * ```
40
50
  * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
41
51
  * @group Events
42
52
  */
@@ -4,9 +4,11 @@ import * as auth from '../auth';
4
4
  import * as base from '../embed/base';
5
5
  import * as embedConfigInstance from '../embed/embedConfig';
6
6
  import { EmbedEvent, AuthType } from '../types';
7
+ import * as sessionInfoService from './sessionInfoService';
7
8
 
8
9
  describe('Unit test for process data', () => {
9
10
  beforeAll(() => {
11
+ jest.spyOn(auth, 'postLoginService').mockImplementation(() => Promise.resolve({}));
10
12
  base.init({
11
13
  thoughtSpotHost: 'https://tshost',
12
14
  authType: AuthType.None,
@@ -58,15 +60,14 @@ describe('Unit test for process data', () => {
58
60
  isPublicUser: false,
59
61
  };
60
62
  const e = { type: EmbedEvent.AuthInit, data: sessionInfo };
61
- jest.spyOn(auth, 'initSession').mockReturnValue(null);
62
63
  jest.spyOn(base, 'notifyAuthSuccess');
64
+ jest.spyOn(sessionInfoService, 'getSessionInfo').mockReturnValue(sessionInfo);
63
65
  expect(processDataInstance.processEventData(e.type, e, '', null)).toEqual({
64
66
  type: e.type,
65
67
  data: {
66
68
  userGUID: sessionInfo.userGUID,
67
69
  },
68
70
  });
69
- expect(auth.initSession).toBeCalledWith(sessionInfo);
70
71
  expect(base.notifyAuthSuccess).toBeCalled();
71
72
  });
72
73
 
@@ -5,7 +5,7 @@ import {
5
5
  notifyAuthSuccess,
6
6
  notifyLogout,
7
7
  } from '../embed/base';
8
- import { AuthFailureType, initSession } from '../auth';
8
+ import { AuthFailureType } from '../auth';
9
9
  import { AuthType, CustomActionPayload, EmbedEvent } from '../types';
10
10
  import { AnswerService } from './graphql/answerService/answerService';
11
11
  import { resetCachedAuthToken } from '../authToken';
@@ -30,12 +30,12 @@ export function processCustomAction(e: any, thoughtSpotHost: string) {
30
30
  }
31
31
 
32
32
  /**
33
+ * Responds to AuthInit sent from host signifying successful authentication in host.
33
34
  *
34
35
  * @param e
36
+ * @returns {any}
35
37
  */
36
38
  function processAuthInit(e: any) {
37
- // Store user session details sent by app.
38
- initSession(e.data);
39
39
  notifyAuthSuccess();
40
40
 
41
41
  // Expose only allowed details (eg: userGUID) back to SDK users.