@thoughtspot/visual-embed-sdk 1.36.0 → 1.36.2

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 (164) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +2 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/css-variables.d.ts +8 -0
  6. package/cjs/src/css-variables.d.ts.map +1 -1
  7. package/cjs/src/embed/base.d.ts.map +1 -1
  8. package/cjs/src/embed/base.js +2 -2
  9. package/cjs/src/embed/base.js.map +1 -1
  10. package/cjs/src/embed/base.spec.js +24 -0
  11. package/cjs/src/embed/base.spec.js.map +1 -1
  12. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  13. package/cjs/src/embed/hostEventClient/host-event-client.js +8 -3
  14. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  15. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +54 -0
  16. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  17. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  18. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  19. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
  20. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  21. package/cjs/src/hostEventsTypeMapping.d.ts +2 -0
  22. package/cjs/src/hostEventsTypeMapping.d.ts.map +1 -0
  23. package/cjs/src/hostEventsTypeMapping.js +4 -0
  24. package/cjs/src/hostEventsTypeMapping.js.map +1 -0
  25. package/cjs/src/types.d.ts +72 -8
  26. package/cjs/src/types.d.ts.map +1 -1
  27. package/cjs/src/types.js +72 -8
  28. package/cjs/src/types.js.map +1 -1
  29. package/cjs/src/utils/embedApi/contracts.d.ts +101 -0
  30. package/cjs/src/utils/embedApi/contracts.d.ts.map +1 -0
  31. package/cjs/src/utils/embedApi/contracts.js +17 -0
  32. package/cjs/src/utils/embedApi/contracts.js.map +1 -0
  33. package/cjs/src/utils/embedApi/embedApiClient.d.ts +12 -0
  34. package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  35. package/cjs/src/utils/embedApi/embedApiClient.js +46 -0
  36. package/cjs/src/utils/embedApi/embedApiClient.js.map +1 -0
  37. package/cjs/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  38. package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  39. package/cjs/src/utils/embedApi/processEmbedApi.js +18 -0
  40. package/cjs/src/utils/embedApi/processEmbedApi.js.map +1 -0
  41. package/cjs/src/utils/resetServices.d.ts +8 -0
  42. package/cjs/src/utils/resetServices.d.ts.map +1 -0
  43. package/cjs/src/utils/resetServices.js +18 -0
  44. package/cjs/src/utils/resetServices.js.map +1 -0
  45. package/cjs/src/utils/resetServices.spec.d.ts +2 -0
  46. package/cjs/src/utils/resetServices.spec.d.ts.map +1 -0
  47. package/cjs/src/utils/resetServices.spec.js +18 -0
  48. package/cjs/src/utils/resetServices.spec.js.map +1 -0
  49. package/cjs/src/utils/sessionInfoService.d.ts +14 -2
  50. package/cjs/src/utils/sessionInfoService.d.ts.map +1 -1
  51. package/cjs/src/utils/sessionInfoService.js +18 -3
  52. package/cjs/src/utils/sessionInfoService.js.map +1 -1
  53. package/dist/{index-V2oBuwy6.js → index-B3hd6DTM.js} +1 -1
  54. package/dist/index-BBBimG1x.js +7370 -0
  55. package/dist/index-BGnxP5NY.js +7370 -0
  56. package/dist/index-CENLvayL.js +7370 -0
  57. package/dist/index-CR5u7BMC.js +7370 -0
  58. package/dist/index-CbltIawo.js +7370 -0
  59. package/dist/index-CoQfqaHj.js +7370 -0
  60. package/dist/index-CzwzS0P4.js +7370 -0
  61. package/dist/index-D-9WUCUl.js +7370 -0
  62. package/dist/index-DFwi_pV_.js +7370 -0
  63. package/dist/index-DOIjN0N_.js +7370 -0
  64. package/dist/index-DYBx8SuE.js +7370 -0
  65. package/dist/index-DaLHJaLd.js +7370 -0
  66. package/dist/index-DnJX-gN2.js +7370 -0
  67. package/dist/index-DpuhnTj2.js +7370 -0
  68. package/dist/index-IDmSUe93.js +7370 -0
  69. package/dist/index-nWevLycs.js +7370 -0
  70. package/dist/index-vxW97_xb.js +7370 -0
  71. package/dist/src/auth.d.ts.map +1 -1
  72. package/dist/src/css-variables.d.ts +8 -0
  73. package/dist/src/css-variables.d.ts.map +1 -1
  74. package/dist/src/embed/base.d.ts.map +1 -1
  75. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  76. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  77. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  78. package/dist/src/hostEventsTypeMapping.d.ts +2 -0
  79. package/dist/src/hostEventsTypeMapping.d.ts.map +1 -0
  80. package/dist/src/types.d.ts +72 -8
  81. package/dist/src/types.d.ts.map +1 -1
  82. package/dist/src/utils/embedApi/contracts.d.ts +101 -0
  83. package/dist/src/utils/embedApi/contracts.d.ts.map +1 -0
  84. package/dist/src/utils/embedApi/embedApiClient.d.ts +12 -0
  85. package/dist/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  86. package/dist/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  87. package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  88. package/dist/src/utils/resetServices.d.ts +8 -0
  89. package/dist/src/utils/resetServices.d.ts.map +1 -0
  90. package/dist/src/utils/resetServices.spec.d.ts +2 -0
  91. package/dist/src/utils/resetServices.spec.d.ts.map +1 -0
  92. package/dist/src/utils/sessionInfoService.d.ts +14 -2
  93. package/dist/src/utils/sessionInfoService.d.ts.map +1 -1
  94. package/dist/tsembed-react.es.js +85 -15
  95. package/dist/tsembed-react.js +84 -14
  96. package/dist/tsembed.es.js +126 -18
  97. package/dist/tsembed.js +125 -17
  98. package/dist/visual-embed-sdk-react-full.d.ts +94 -10
  99. package/dist/visual-embed-sdk-react.d.ts +94 -10
  100. package/dist/visual-embed-sdk.d.ts +94 -10
  101. package/lib/package.json +1 -1
  102. package/lib/src/auth.d.ts.map +1 -1
  103. package/lib/src/auth.js +3 -2
  104. package/lib/src/auth.js.map +1 -1
  105. package/lib/src/css-variables.d.ts +8 -0
  106. package/lib/src/css-variables.d.ts.map +1 -1
  107. package/lib/src/embed/base.d.ts.map +1 -1
  108. package/lib/src/embed/base.js +2 -2
  109. package/lib/src/embed/base.js.map +1 -1
  110. package/lib/src/embed/base.spec.js +24 -0
  111. package/lib/src/embed/base.spec.js.map +1 -1
  112. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  113. package/lib/src/embed/hostEventClient/host-event-client.js +8 -3
  114. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  115. package/lib/src/embed/hostEventClient/host-event-client.spec.js +54 -0
  116. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  117. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  118. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  119. package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
  120. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  121. package/lib/src/hostEventsTypeMapping.d.ts +2 -0
  122. package/lib/src/hostEventsTypeMapping.d.ts.map +1 -0
  123. package/lib/src/hostEventsTypeMapping.js +2 -0
  124. package/lib/src/hostEventsTypeMapping.js.map +1 -0
  125. package/lib/src/types.d.ts +72 -8
  126. package/lib/src/types.d.ts.map +1 -1
  127. package/lib/src/types.js +72 -8
  128. package/lib/src/types.js.map +1 -1
  129. package/lib/src/utils/embedApi/contracts.d.ts +101 -0
  130. package/lib/src/utils/embedApi/contracts.d.ts.map +1 -0
  131. package/lib/src/utils/embedApi/contracts.js +14 -0
  132. package/lib/src/utils/embedApi/contracts.js.map +1 -0
  133. package/lib/src/utils/embedApi/embedApiClient.d.ts +12 -0
  134. package/lib/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  135. package/lib/src/utils/embedApi/embedApiClient.js +42 -0
  136. package/lib/src/utils/embedApi/embedApiClient.js.map +1 -0
  137. package/lib/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  138. package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  139. package/lib/src/utils/embedApi/processEmbedApi.js +14 -0
  140. package/lib/src/utils/embedApi/processEmbedApi.js.map +1 -0
  141. package/lib/src/utils/resetServices.d.ts +8 -0
  142. package/lib/src/utils/resetServices.d.ts.map +1 -0
  143. package/lib/src/utils/resetServices.js +14 -0
  144. package/lib/src/utils/resetServices.js.map +1 -0
  145. package/lib/src/utils/resetServices.spec.d.ts +2 -0
  146. package/lib/src/utils/resetServices.spec.d.ts.map +1 -0
  147. package/lib/src/utils/resetServices.spec.js +15 -0
  148. package/lib/src/utils/resetServices.spec.js.map +1 -0
  149. package/lib/src/utils/sessionInfoService.d.ts +14 -2
  150. package/lib/src/utils/sessionInfoService.d.ts.map +1 -1
  151. package/lib/src/utils/sessionInfoService.js +16 -2
  152. package/lib/src/utils/sessionInfoService.js.map +1 -1
  153. package/lib/src/visual-embed-sdk.d.ts +94 -10
  154. package/package.json +1 -1
  155. package/src/auth.ts +3 -2
  156. package/src/css-variables.ts +10 -0
  157. package/src/embed/base.spec.ts +26 -0
  158. package/src/embed/base.ts +2 -2
  159. package/src/embed/hostEventClient/host-event-client.spec.ts +61 -0
  160. package/src/embed/hostEventClient/host-event-client.ts +8 -3
  161. package/src/types.ts +72 -8
  162. package/src/utils/resetServices.spec.ts +15 -0
  163. package/src/utils/resetServices.ts +14 -0
  164. package/src/utils/sessionInfoService.ts +17 -2
package/src/embed/base.ts CHANGED
@@ -9,7 +9,6 @@
9
9
  */
10
10
  import EventEmitter from 'eventemitter3';
11
11
  import { registerReportingObserver } from '../utils/reporting';
12
- import { resetCachedAuthToken } from '../authToken';
13
12
  import { logger, setGlobalLogLevelOverride } from '../utils/logger';
14
13
  import { tokenizedFetch } from '../tokenizedFetch';
15
14
  import { EndPoints } from '../utils/authService/authService';
@@ -34,6 +33,7 @@ import {
34
33
  import { uploadMixpanelEvent, MIXPANEL_EVENT } from '../mixpanel-service';
35
34
  import { getEmbedConfig, setEmbedConfig } from './embedConfig';
36
35
  import { getQueryParamString } from '../utils';
36
+ import { resetAllCachedServices } from '../utils/resetServices';
37
37
 
38
38
  const CONFIG_DEFAULTS: Partial<EmbedConfig> = {
39
39
  loginFailedMessage: 'Not logged in',
@@ -193,7 +193,7 @@ function backwardCompat(embedConfig: EmbedConfig): EmbedConfig {
193
193
  */
194
194
  export const init = (embedConfig: EmbedConfig): AuthEventEmitter => {
195
195
  sanity(embedConfig);
196
- resetCachedAuthToken();
196
+ resetAllCachedServices();
197
197
  embedConfig = setEmbedConfig(
198
198
  backwardCompat({
199
199
  ...CONFIG_DEFAULTS,
@@ -133,6 +133,7 @@ describe('HostEventClient', () => {
133
133
  const mockResponse = {
134
134
  value: {
135
135
  pinboardId: 'testPinboard',
136
+ liveboardId: 'testPinboard',
136
137
  tabId: 'testTab',
137
138
  vizId: 'testVizId',
138
139
  },
@@ -250,5 +251,65 @@ describe('HostEventClient', () => {
250
251
  );
251
252
  expect(result).toEqual([mockResponse]);
252
253
  });
254
+
255
+ it('Pin response support pinboardId as well', async () => {
256
+ const { client, mockIframe } = createHostEventClient();
257
+ const hostEvent = HostEvent.Pin;
258
+ const payload: HostEventRequest<typeof hostEvent> = {
259
+ newVizDescription: 'Test Description',
260
+ vizId: 'testVizId',
261
+ newVizName: 'Test Answer',
262
+ newLiveboardName: 'testLiveboard',
263
+ } as any;
264
+ const mockResponse = [{
265
+ value: {
266
+ pinboardId: 'testLiveboard',
267
+ liveboardId: 'testPinboard',
268
+ tabId: 'testTab',
269
+ vizId: 'testVizId',
270
+ },
271
+ refId: 'testVizId',
272
+ }];
273
+ mockProcessTrigger.mockResolvedValue(mockResponse);
274
+ const result = await client.triggerHostEvent(hostEvent, payload);
275
+ expect(result.liveboardId).toBe('testLiveboard');
276
+ });
277
+
278
+ it('should request liveboardId as well', async () => {
279
+ const { client, mockIframe } = createHostEventClient();
280
+ const hostEvent = HostEvent.Pin;
281
+ const payload: HostEventRequest<typeof hostEvent> = {
282
+ liveboardId: 'test',
283
+ newVizName: 'Test Answer',
284
+ newPinboardName: 'testLiveboard1',
285
+ newLiveboardName: 'testLiveboard',
286
+ } as any;
287
+ const mockResponse = [{
288
+ value: {
289
+ pinboardId: 'testLiveboard',
290
+ tabId: 'testTab',
291
+ vizId: 'testVizId',
292
+ },
293
+ refId: 'testVizId',
294
+ }];
295
+ mockProcessTrigger.mockResolvedValue(mockResponse);
296
+ const result = await client.triggerHostEvent(hostEvent, payload);
297
+ expect(result.liveboardId).toBe('testLiveboard');
298
+ expect(mockProcessTrigger).toHaveBeenCalledWith(
299
+ mockIframe,
300
+ HostEvent.UIPassthrough,
301
+ mockThoughtSpotHost,
302
+ {
303
+ parameters: { ...payload, pinboardId: 'test', newPinboardName: 'testLiveboard' },
304
+ type: 'addVizToPinboard',
305
+ },
306
+ );
307
+ expect(result).toEqual({
308
+ pinboardId: 'testLiveboard',
309
+ tabId: 'testTab',
310
+ vizId: 'testVizId',
311
+ liveboardId: 'testLiveboard',
312
+ });
313
+ });
253
314
  });
254
315
  });
@@ -98,13 +98,18 @@ export class HostEventClient {
98
98
 
99
99
  const formattedPayload = {
100
100
  ...payload,
101
- pinboardId: payload.liveboardId,
102
- newPinboardName: payload.newLiveboardName,
101
+ pinboardId: payload.liveboardId ?? (payload as any).pinboardId,
102
+ newPinboardName: payload.newLiveboardName ?? (payload as any).newPinboardName,
103
103
  };
104
104
 
105
- return this.handleHostEventWithParam(
105
+ const data = await this.handleHostEventWithParam(
106
106
  UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload,
107
107
  );
108
+
109
+ return {
110
+ ...data,
111
+ liveboardId: (data as any).pinboardId,
112
+ };
108
113
  }
109
114
 
110
115
  protected async handleSaveAnswerEvent(
package/src/types.ts CHANGED
@@ -2615,16 +2615,63 @@ export enum HostEvent {
2615
2615
  */
2616
2616
  getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
2617
2617
  /**
2618
- * Trigger the **Pin** action on an embedded object
2619
- * @param - Liveboard embed takes the `vizId` as a
2620
- * key. Can be left undefined when embedding Search, full app, or
2621
- * a visualization.
2618
+ * Trigger **Pin** action on an embedded object.
2619
+ * If no parameters are defined, the pin action is triggered
2620
+ * for the Answer that the user is currently on
2621
+ * and a modal opens for Liveboard selection.
2622
+ * To add an Answer or visualization to a Liveboard programmatically without
2623
+ * showing requiring additional user input via *Pin to Liveboard* modal, define
2624
+ * the following parameters:
2625
+ *
2626
+ * @param
2627
+ * `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
2628
+ * Optional when pinning a new chart or table generated from a Search query.
2629
+ * @param
2630
+ * `liveboardID` - GUID of the Liveboard to pin an Answer. If there is no Liveboard,
2631
+ * specify the `newLiveboardName` parameter to create a new Liveboard.
2632
+ * @param
2633
+ * `tabId` - GUID of the Liveboard tab. Adds the Answer to the Liveboard tab
2634
+ * specified in the code.
2635
+ * @param
2636
+ * `newVizName` - Name string for the Answer or visualization. If defined,
2637
+ * this parameter adds a new visualization object or creates a copy of the
2638
+ * Answer or visualization specified in `vizId`.
2639
+ * Required attribute.
2640
+ * @param
2641
+ * `newLiveboardName` - Name string for the Liveboard.
2642
+ * Creates a new Liveboard object with the specified name.
2643
+ * @param
2644
+ * `newTabName` - Name of the tab. Adds a new tab Liveboard specified
2645
+ * in the code.
2646
+ *
2622
2647
  * @example
2623
2648
  * ```js
2624
- * appEmbed.trigger(HostEvent.Pin)
2649
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2650
+ * vizId: "123",
2651
+ * newVizName: "Sales by region",
2652
+ * liveboardId: "123",
2653
+ * tabId: "123"
2654
+ * });
2625
2655
  * ```
2656
+ * @example
2626
2657
  * ```js
2627
- * searchEmbed.trigger(HostEvent.Pin)
2658
+ * const pinResponse = await appEmbed.trigger(HostEvent.Pin, {
2659
+ * newVizName: "Total sales of Jackets",
2660
+ * liveboardId: "123"
2661
+ * });
2662
+ * ```
2663
+ *
2664
+ * @example
2665
+ * ```js
2666
+ * const pinResponse = await searchEmbed.trigger(HostEvent.Pin, {
2667
+ * newVizName: "Sales by state",
2668
+ * newLiveboardName: "Sales",
2669
+ * newTabName: "Products"
2670
+ * });
2671
+ * ```
2672
+ * @example
2673
+ * ```js
2674
+ * appEmbed.trigger(HostEvent.Pin)
2628
2675
  * ```
2629
2676
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2630
2677
  */
@@ -3280,8 +3327,25 @@ export enum HostEvent {
3280
3327
  */
3281
3328
  InfoSuccess = 'InfoSuccess',
3282
3329
  /**
3283
- * Triggers the action to get the current view of the liveboard
3284
- * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
3330
+ * Trigger the save action for an Answer.
3331
+ * To programmatically save an answer without opening the
3332
+ * *Describe your Answer* modal, define the `name` and `description`
3333
+ * properties.
3334
+ * If no parameters are specified, the save action is
3335
+ * triggered with a modal to prompt users to
3336
+ * add a name and description for the Answer.
3337
+ * @param - optional attributes to set Answer properties.
3338
+ * `name` - Name string for the Answer.
3339
+ * `description` - Description text for the Answer.
3340
+ *
3341
+ * @example
3342
+ * ```js
3343
+ * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
3344
+ * name: "Sales by states",
3345
+ * description: "Total sales by states in MidWest"
3346
+ * });
3347
+ * ```
3348
+ * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3285
3349
  */
3286
3350
  SaveAnswer = 'saveAnswer',
3287
3351
  /**
@@ -0,0 +1,15 @@
1
+ import * as authToken from '../authToken';
2
+ import { resetAllCachedServices } from './resetServices';
3
+ import * as sessionInfoService from './sessionInfoService';
4
+
5
+ describe('resetAllServices', () => {
6
+ it('should reset all services', () => {
7
+ const resetCachedAuthTokenSpy = jest.spyOn(authToken, 'resetCachedAuthToken');
8
+ const resetCachedSessionInfoSpy = jest.spyOn(sessionInfoService, 'resetCachedSessionInfo');
9
+ const resetCachedPreauthInfoSpy = jest.spyOn(sessionInfoService, 'resetCachedPreauthInfo');
10
+ resetAllCachedServices();
11
+ expect(resetCachedAuthTokenSpy).toHaveBeenCalled();
12
+ expect(resetCachedSessionInfoSpy).toHaveBeenCalled();
13
+ expect(resetCachedPreauthInfoSpy).toHaveBeenCalled();
14
+ });
15
+ });
@@ -0,0 +1,14 @@
1
+ import { resetCachedAuthToken } from '../authToken';
2
+ import { resetCachedPreauthInfo, resetCachedSessionInfo } from './sessionInfoService';
3
+
4
+ /**
5
+ * This function resets all the services that are cached in the SDK.
6
+ * This is to be called when the user logs out of the application and also
7
+ * when init is called again.
8
+ * @version SDK: 1.30.2 | ThoughtSpot: *
9
+ */
10
+ export function resetAllCachedServices(): void {
11
+ resetCachedAuthToken();
12
+ resetCachedSessionInfo();
13
+ resetCachedPreauthInfo();
14
+ }
@@ -79,9 +79,10 @@ export async function getPreauthInfo(allowCache = true): Promise<PreauthInfo> {
79
79
  }
80
80
 
81
81
  /**
82
- * Returns the session info object and caches it for future use.
82
+ * Returns the cached session info object and caches it for future use.
83
83
  * Once fetched the session info object is cached and returned from the cache on
84
84
  * subsequent calls.
85
+ * This cache is cleared when inti is called OR resetCachedSessionInfo is called.
85
86
  * @example ```js
86
87
  * const sessionInfo = await getSessionInfo();
87
88
  * console.log(sessionInfo);
@@ -152,9 +153,23 @@ export const getSessionDetails = (sessionInfoResp: any): SessionInfo => {
152
153
  * const sessionInfo = await getSessionInfo();
153
154
  * console.log(sessionInfo);
154
155
  * ```
155
- * @version SDK: 1.28.3 | ThoughtSpot ts7.april.cl, 7.2.1
156
+ * @version SDK: 1.28.3 | ThoughtSpot: *
156
157
  * @returns {void}
157
158
  */
158
159
  export function resetCachedSessionInfo(): void {
159
160
  sessionInfo = null;
160
161
  }
162
+
163
+ /**
164
+ * Resets the cached preauth info object and forces a new fetch on the next call.
165
+ * @example ```js
166
+ * resetCachedPreauthInfo();
167
+ * const preauthInfo = await getPreauthInfo();
168
+ * console.log(preauthInfo);
169
+ * ```
170
+ * @version SDK: 1.28.3 | ThoughtSpot: *
171
+ * @returns {void}
172
+ */
173
+ export function resetCachedPreauthInfo(): void {
174
+ preauthInfo = null;
175
+ }