@thoughtspot/visual-embed-sdk 1.13.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -2
- package/dist/src/embed/app.d.ts +4 -3
- package/dist/src/embed/base.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts +6 -8
- package/dist/src/embed/pinboard.d.ts +91 -0
- package/dist/src/embed/search.d.ts +1 -1
- package/dist/src/embed/ts-embed.d.ts +4 -4
- package/dist/src/types.d.ts +83 -76
- package/dist/src/utils/authService.d.ts +1 -0
- package/dist/src/utils/plugin.d.ts +0 -0
- package/dist/src/v1/api.d.ts +19 -0
- package/dist/tsembed.es.js +103 -76
- package/dist/tsembed.js +103 -76
- package/lib/package.json +1 -1
- package/lib/src/auth.js +8 -2
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +18 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +4 -3
- package/lib/src/embed/app.js +2 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/base.d.ts +1 -1
- package/lib/src/embed/base.js +1 -1
- package/lib/src/embed/liveboard.d.ts +6 -8
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/pinboard.d.ts +91 -0
- package/lib/src/embed/pinboard.js +110 -0
- package/lib/src/embed/pinboard.js.map +1 -0
- package/lib/src/embed/search.d.ts +1 -1
- package/lib/src/embed/ts-embed.d.ts +4 -4
- package/lib/src/types.d.ts +83 -76
- package/lib/src/types.js +73 -68
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService.d.ts +1 -0
- package/lib/src/utils/authService.js +13 -0
- package/lib/src/utils/authService.js.map +1 -1
- package/lib/src/utils/authService.spec.js +15 -1
- package/lib/src/utils/authService.spec.js.map +1 -1
- package/lib/src/utils/plugin.d.ts +0 -0
- package/lib/src/utils/plugin.js +1 -0
- package/lib/src/utils/plugin.js.map +1 -0
- package/lib/src/utils/processData.js +7 -5
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js +14 -0
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +99 -93
- package/package.json +1 -1
- package/src/auth.spec.ts +39 -0
- package/src/auth.ts +11 -5
- package/src/embed/app.ts +4 -3
- package/src/embed/base.ts +1 -1
- package/src/embed/liveboard.ts +6 -8
- package/src/embed/search.ts +1 -1
- package/src/embed/ts-embed.ts +4 -4
- package/src/types.ts +83 -76
- package/src/utils/authService.spec.ts +21 -0
- package/src/utils/authService.ts +20 -0
- package/src/utils/processData.spec.ts +17 -0
- package/src/utils/processData.ts +7 -5
package/lib/src/types.js
CHANGED
|
@@ -14,9 +14,13 @@
|
|
|
14
14
|
export var AuthType;
|
|
15
15
|
(function (AuthType) {
|
|
16
16
|
/**
|
|
17
|
-
* No authentication.
|
|
17
|
+
* No authentication on the SDK. Passthrough to the embedded App. Alias for `Passthrough`.
|
|
18
18
|
*/
|
|
19
19
|
AuthType["None"] = "None";
|
|
20
|
+
/**
|
|
21
|
+
* No authentication on the SDK. Passthrough to the embedded App.
|
|
22
|
+
*/
|
|
23
|
+
AuthType["Passthrough"] = "None";
|
|
20
24
|
/**
|
|
21
25
|
* SSO using SAML
|
|
22
26
|
* @deprecated Use {@link SAML} instead
|
|
@@ -155,7 +159,7 @@ export var EmbedEvent;
|
|
|
155
159
|
/**
|
|
156
160
|
* One or more data columns have been selected.
|
|
157
161
|
* @return columnIds - the list of columns
|
|
158
|
-
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl
|
|
162
|
+
* @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
159
163
|
*/
|
|
160
164
|
EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
|
|
161
165
|
/**
|
|
@@ -167,13 +171,13 @@ export var EmbedEvent;
|
|
|
167
171
|
/**
|
|
168
172
|
* A double click has been triggered on table/chart
|
|
169
173
|
* @return ContextMenuInputPoints - data point that is double clicked
|
|
170
|
-
* @version 1.5.0
|
|
174
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
171
175
|
*/
|
|
172
176
|
EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
|
|
173
177
|
/**
|
|
174
178
|
* A click has been triggered on table/chart
|
|
175
179
|
* @return ContextMenuInputPoints - data point that is clicked
|
|
176
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
180
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
177
181
|
*/
|
|
178
182
|
EmbedEvent["VizPointClick"] = "vizPointClick";
|
|
179
183
|
/**
|
|
@@ -225,7 +229,7 @@ export var EmbedEvent;
|
|
|
225
229
|
* Emitted when the embed does not have cookie access. This
|
|
226
230
|
* happens on Safari where third-party cookies are blocked by default.
|
|
227
231
|
*
|
|
228
|
-
* @version 1.1.0
|
|
232
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
229
233
|
*/
|
|
230
234
|
EmbedEvent["NoCookieAccess"] = "noCookieAccess";
|
|
231
235
|
/**
|
|
@@ -236,179 +240,180 @@ export var EmbedEvent;
|
|
|
236
240
|
EmbedEvent["SAMLComplete"] = "samlComplete";
|
|
237
241
|
/**
|
|
238
242
|
* Emitted when any modal is opened in the app
|
|
239
|
-
* @version 1.6.0
|
|
243
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
240
244
|
*/
|
|
241
245
|
EmbedEvent["DialogOpen"] = "dialog-open";
|
|
242
246
|
/**
|
|
243
247
|
* Emitted when any modal is closed in the app
|
|
244
|
-
* @version 1.6.0
|
|
248
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
245
249
|
*/
|
|
246
250
|
EmbedEvent["DialogClose"] = "dialog-close";
|
|
247
251
|
/**
|
|
248
252
|
* Emitted when a liveboard has completed rendering,
|
|
249
253
|
* this event can be used as a hook to trigger events on the
|
|
250
254
|
* rendered liveboard
|
|
251
|
-
* @version 1.9.1
|
|
255
|
+
* @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
252
256
|
*/
|
|
253
257
|
EmbedEvent["LiveboardRendered"] = "PinboardRendered";
|
|
254
258
|
/**
|
|
255
259
|
* This can be used to register an event listener which
|
|
256
260
|
* is triggered on all events.
|
|
257
|
-
* @
|
|
261
|
+
* @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
|
|
258
262
|
*/
|
|
259
263
|
EmbedEvent["ALL"] = "*";
|
|
260
264
|
/**
|
|
261
265
|
* Emitted when answer is saved in the app
|
|
262
|
-
* @
|
|
266
|
+
* @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
263
267
|
*/
|
|
264
268
|
EmbedEvent["Save"] = "save";
|
|
265
269
|
/**
|
|
266
270
|
* Emitted when the download action is triggered on an answer
|
|
267
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
271
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
268
272
|
*/
|
|
269
273
|
EmbedEvent["Download"] = "download";
|
|
270
274
|
/**
|
|
271
275
|
* Emitted when the Download as PDF action is triggered on an answer
|
|
272
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
276
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
273
277
|
*/
|
|
274
278
|
EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
275
279
|
/**
|
|
276
280
|
* Emitted when the Download as CSV action is triggered on an answer
|
|
277
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
281
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
278
282
|
*/
|
|
279
283
|
EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
|
|
280
284
|
/**
|
|
281
285
|
* Emitted when the Download as XLSX action is triggered on an answer
|
|
282
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
286
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
283
287
|
*/
|
|
284
288
|
EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
|
|
285
289
|
/**
|
|
286
290
|
* Emitted when an answer is deleted in the app
|
|
287
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
291
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
288
292
|
*/
|
|
289
293
|
EmbedEvent["AnswerDelete"] = "answerDelete";
|
|
290
294
|
/**
|
|
291
295
|
* Emitted when an answer is pinned to a Liveboard
|
|
292
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
296
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
293
297
|
*/
|
|
294
298
|
EmbedEvent["Pin"] = "pin";
|
|
295
299
|
/**
|
|
296
300
|
* Emitted when SpotIQ analysis is triggered
|
|
297
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
301
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
298
302
|
*/
|
|
299
303
|
EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
|
|
300
304
|
/**
|
|
301
305
|
* Emitted when a user shares an object with another user or group
|
|
302
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
306
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
303
307
|
*/
|
|
304
308
|
EmbedEvent["Share"] = "share";
|
|
305
309
|
/**
|
|
306
310
|
* Emitted when a user clicks the Include action to include a specific value or data on a chart or table
|
|
307
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
311
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
308
312
|
*/
|
|
309
313
|
EmbedEvent["DrillInclude"] = "context-menu-item-include";
|
|
310
314
|
/**
|
|
311
315
|
* Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
|
|
312
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
316
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
313
317
|
*/
|
|
314
318
|
EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
|
|
315
319
|
/**
|
|
316
320
|
* Emitted when copied column value on the app
|
|
317
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
321
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
318
322
|
*/
|
|
319
323
|
EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
|
|
320
324
|
/**
|
|
321
325
|
* Emitted when a user clicks the Update TML action
|
|
322
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
326
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
323
327
|
*/
|
|
324
328
|
EmbedEvent["UpdateTML"] = "updateTSL";
|
|
325
329
|
/**
|
|
326
330
|
* Emitted when a user clicks the Edit TML action
|
|
327
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
331
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
328
332
|
*/
|
|
329
333
|
EmbedEvent["EditTML"] = "editTSL";
|
|
330
334
|
/**
|
|
331
335
|
* Emitted when ExportTML trigger in answer on the app
|
|
332
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
336
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
333
337
|
*/
|
|
334
338
|
EmbedEvent["ExportTML"] = "exportTSL";
|
|
335
339
|
/**
|
|
336
340
|
* Emitted when an answer is saved as a view
|
|
337
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
341
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
338
342
|
*/
|
|
339
343
|
EmbedEvent["SaveAsView"] = "saveAsView";
|
|
340
344
|
/**
|
|
341
345
|
* Emitted when copy of existing answer on the app
|
|
342
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
346
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
343
347
|
*/
|
|
344
348
|
EmbedEvent["CopyAEdit"] = "copyAEdit";
|
|
345
349
|
/**
|
|
346
350
|
* Emitted when a user clicks Show underlying data on an answe
|
|
347
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
351
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
348
352
|
*/
|
|
349
353
|
EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
|
|
350
354
|
/**
|
|
351
355
|
* Emitted when an answer is switched to a chart or table view
|
|
352
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
356
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
353
357
|
*/
|
|
354
358
|
EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
355
359
|
/**
|
|
356
|
-
*
|
|
360
|
+
* Internal event to communicate the initial settings back to the TS APP
|
|
361
|
+
* @hidden
|
|
357
362
|
*/
|
|
358
363
|
EmbedEvent["APP_INIT"] = "appInit";
|
|
359
364
|
/**
|
|
360
365
|
* Emitted when a user clicks Show Liveboard details on a Liveboard
|
|
361
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
366
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
362
367
|
*/
|
|
363
368
|
EmbedEvent["LiveboardInfo"] = "pinboardInfo";
|
|
364
369
|
/**
|
|
365
370
|
* Emitted when a user clicks on the Favorite icon on a Liveboard
|
|
366
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
371
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
367
372
|
*/
|
|
368
373
|
EmbedEvent["AddToFavorites"] = "addToFavorites";
|
|
369
374
|
/**
|
|
370
375
|
* Emitted when a user clicks Schedule on a Liveboard
|
|
371
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
376
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
372
377
|
*/
|
|
373
378
|
EmbedEvent["Schedule"] = "subscription";
|
|
374
379
|
/**
|
|
375
380
|
* Emitted when a user clicks Edit on a Liveboard or visualization
|
|
376
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
381
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
377
382
|
*/
|
|
378
383
|
EmbedEvent["Edit"] = "edit";
|
|
379
384
|
/**
|
|
380
385
|
* Emitted when a user clicks Make a copy on a Liveboard
|
|
381
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
386
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
382
387
|
*/
|
|
383
388
|
EmbedEvent["MakeACopy"] = "makeACopy";
|
|
384
389
|
/**
|
|
385
390
|
* Emitted when a user clicks Present on a Liveboard or visualization
|
|
386
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
391
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
387
392
|
*/
|
|
388
393
|
EmbedEvent["Present"] = "present";
|
|
389
394
|
/**
|
|
390
395
|
* Emitted when a user clicks Delete on a Liveboard
|
|
391
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
396
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
392
397
|
*/
|
|
393
398
|
EmbedEvent["Delete"] = "delete";
|
|
394
399
|
/**
|
|
395
400
|
* Emitted when a user clicks Manage schedules on a Liveboard
|
|
396
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
401
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
397
402
|
*/
|
|
398
403
|
EmbedEvent["SchedulesList"] = "schedule-list";
|
|
399
404
|
/**
|
|
400
405
|
* Emitted when a user clicks Cancel in edit mode on a Liveboard
|
|
401
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
406
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
402
407
|
*/
|
|
403
408
|
EmbedEvent["Cancel"] = "cancel";
|
|
404
409
|
/**
|
|
405
410
|
* Emitted when a user clicks Explore on a visualization
|
|
406
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
411
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
407
412
|
*/
|
|
408
413
|
EmbedEvent["Explore"] = "explore";
|
|
409
414
|
/**
|
|
410
415
|
* Emitted when a user clicks Copy link action on a visualization
|
|
411
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
416
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
412
417
|
*/
|
|
413
418
|
EmbedEvent["CopyLink"] = "embedDocument";
|
|
414
419
|
})(EmbedEvent || (EmbedEvent = {}));
|
|
@@ -433,8 +438,8 @@ export var HostEvent;
|
|
|
433
438
|
* @param points - an object containing selectedPoints/clickedPoints
|
|
434
439
|
* eg. { selectedPoints: []}
|
|
435
440
|
* @param columnGuid - a string guid of the column to drill by. This is optional,
|
|
436
|
-
* if not provided it will auto drill by the configured column.
|
|
437
|
-
* @version 1.5.0
|
|
441
|
+
* if not provided it will auto drill by the configured column.
|
|
442
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
438
443
|
*/
|
|
439
444
|
HostEvent["DrillDown"] = "triggerDrillDown";
|
|
440
445
|
/**
|
|
@@ -451,97 +456,97 @@ export var HostEvent;
|
|
|
451
456
|
* Set the visible visualizations on a Liveboard.
|
|
452
457
|
* @param - an array of ids of visualizations to show, the ids not passed
|
|
453
458
|
* will be hidden.
|
|
454
|
-
* @version 1.6.0
|
|
459
|
+
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
|
|
455
460
|
*/
|
|
456
461
|
HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
|
|
457
462
|
/**
|
|
458
463
|
* Update the runtime filters. The runtime filters passed here are extended
|
|
459
464
|
* on to the existing runtime filters if they exist.
|
|
460
465
|
* @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
|
|
461
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
466
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
462
467
|
*/
|
|
463
468
|
HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
|
|
464
469
|
/**
|
|
465
470
|
* Navigate to a specific page in App embed without any reload.
|
|
466
471
|
* This is the same as calling `appEmbed.navigateToPage(path, true)`
|
|
467
472
|
* @param path - the path to navigate to (can be a number[1/-1] to go forward/back)
|
|
468
|
-
* @version SDK: 1.12.0 | ThoughtSpot
|
|
473
|
+
* @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
|
|
469
474
|
*/
|
|
470
475
|
HostEvent["Navigate"] = "Navigate";
|
|
471
476
|
/**
|
|
472
477
|
* Gets the current pinboard content.
|
|
473
|
-
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl
|
|
478
|
+
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
474
479
|
*/
|
|
475
480
|
HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
|
|
476
481
|
/**
|
|
477
482
|
* Triggers the Pin action on an embedded object
|
|
478
483
|
* @param - incase of Liveboard embed, takes in an object with vizId as a key
|
|
479
484
|
* can be left empty for search and visualization embeds
|
|
480
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
485
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
481
486
|
*/
|
|
482
487
|
HostEvent["Pin"] = "pin";
|
|
483
488
|
/**
|
|
484
489
|
* Triggers the Show Liveboard details action on a Liveboard
|
|
485
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
490
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
486
491
|
*/
|
|
487
492
|
HostEvent["LiveboardInfo"] = "pinboardInfo";
|
|
488
493
|
/**
|
|
489
494
|
* Triggers the Schedule action on a Liveboard
|
|
490
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
495
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
491
496
|
*/
|
|
492
497
|
HostEvent["Schedule"] = "subscription";
|
|
493
498
|
/**
|
|
494
499
|
* Triggers the Manage schedule action on a Liveboard
|
|
495
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
500
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
496
501
|
*/
|
|
497
502
|
HostEvent["SchedulesList"] = "schedule-list";
|
|
498
503
|
/**
|
|
499
504
|
* Triggers the Export TML action on a Liveboard
|
|
500
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
505
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
501
506
|
*/
|
|
502
507
|
HostEvent["ExportTML"] = "exportTSL";
|
|
503
508
|
/**
|
|
504
509
|
* Triggers the Edit TML action on a Liveboard
|
|
505
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
510
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
506
511
|
*/
|
|
507
512
|
HostEvent["EditTML"] = "editTSL";
|
|
508
513
|
/**
|
|
509
514
|
* Triggers the Update TML action on a Liveboard
|
|
510
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
515
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
511
516
|
*/
|
|
512
517
|
HostEvent["UpdateTML"] = "updateTSL";
|
|
513
518
|
/**
|
|
514
519
|
* Triggers the Download PDF action on a Liveboard
|
|
515
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
520
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
516
521
|
*/
|
|
517
522
|
HostEvent["DownloadAsPdf"] = "downloadAsPdf";
|
|
518
523
|
/**
|
|
519
524
|
* Triggers the Make a copy action on a Liveboard
|
|
520
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
525
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
521
526
|
*/
|
|
522
527
|
HostEvent["MakeACopy"] = "makeACopy";
|
|
523
528
|
/**
|
|
524
529
|
* Triggers the Delete action on a Liveboard
|
|
525
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
530
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
526
531
|
*/
|
|
527
532
|
HostEvent["Remove"] = "delete";
|
|
528
533
|
/**
|
|
529
534
|
* Triggers the Explore action on a visualization
|
|
530
535
|
* @param - an object with vizId as a key
|
|
531
536
|
* eg: {vizId: '730496d6-6903-4601-937e-2c691821af3c'}
|
|
532
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
537
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
533
538
|
*/
|
|
534
539
|
HostEvent["Explore"] = "explore";
|
|
535
540
|
/**
|
|
536
541
|
* Triggers the Create alert action on a visualization
|
|
537
542
|
* @param - an object with vizId as a key
|
|
538
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
543
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
539
544
|
*/
|
|
540
545
|
HostEvent["CreateMonitor"] = "createMonitor";
|
|
541
546
|
/**
|
|
542
547
|
* Triggers the Manage alert action on a visualization
|
|
543
548
|
* @param - an object with vizId as a key
|
|
544
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
549
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
545
550
|
*/
|
|
546
551
|
HostEvent["ManageMonitor"] = "manageMonitor";
|
|
547
552
|
/**
|
|
@@ -551,7 +556,7 @@ export var HostEvent;
|
|
|
551
556
|
* liveboardEmbed.trigger(HostEvent.Edit)
|
|
552
557
|
* liveboardEmbed.trigger(HostEvent.Edit, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
553
558
|
* vizEmbed.trigger((HostEvent.Edit)
|
|
554
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
559
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
555
560
|
*/
|
|
556
561
|
HostEvent["Edit"] = "edit";
|
|
557
562
|
/**
|
|
@@ -561,7 +566,7 @@ export var HostEvent;
|
|
|
561
566
|
* liveboardEmbed.trigger(HostEvent.CopyLink)
|
|
562
567
|
* liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
563
568
|
* vizEmbed.trigger((HostEvent.CopyLink)
|
|
564
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
569
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
565
570
|
*/
|
|
566
571
|
HostEvent["CopyLink"] = "embedDocument";
|
|
567
572
|
/**
|
|
@@ -571,7 +576,7 @@ export var HostEvent;
|
|
|
571
576
|
* liveboardEmbed.trigger(HostEvent.Present)
|
|
572
577
|
* liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
573
578
|
* vizEmbed.trigger((HostEvent.Present)
|
|
574
|
-
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl
|
|
579
|
+
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
|
|
575
580
|
*/
|
|
576
581
|
HostEvent["Present"] = "present";
|
|
577
582
|
})(HostEvent || (HostEvent = {}));
|
|
@@ -757,27 +762,27 @@ export var Action;
|
|
|
757
762
|
Action["RequestAccess"] = "requestAccess";
|
|
758
763
|
Action["QueryDetailsButtons"] = "queryDetailsButtons";
|
|
759
764
|
/**
|
|
760
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
765
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
761
766
|
*/
|
|
762
767
|
Action["AnswerDelete"] = "onDeleteAnswer";
|
|
763
768
|
/**
|
|
764
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
769
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
765
770
|
*/
|
|
766
771
|
Action["AnswerChartSwitcher"] = "answerChartSwitcher";
|
|
767
772
|
/**
|
|
768
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
773
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
769
774
|
*/
|
|
770
775
|
Action["AddToFavorites"] = "addToFavorites";
|
|
771
776
|
/**
|
|
772
|
-
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl
|
|
777
|
+
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
|
|
773
778
|
*/
|
|
774
779
|
Action["EditDetails"] = "editDetails";
|
|
775
780
|
/**
|
|
776
|
-
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl
|
|
781
|
+
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
777
782
|
*/
|
|
778
783
|
Action["CreateMonitor"] = "createMonitor";
|
|
779
784
|
/**
|
|
780
|
-
* @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl
|
|
785
|
+
* @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
781
786
|
*/
|
|
782
787
|
Action["ReportError"] = "reportError";
|
|
783
788
|
})(Action || (Action = {}));
|
package/lib/src/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,QAiCX;AAjCD,WAAY,QAAQ;IAChB;;OAEG;IACH,yBAAa,CAAA;IACb;;OAEG;IACH,gCAAoB,CAAA;IACpB;;;OAGG;IACH,4BAAgB,CAAA;IAChB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,6BAAiB,CAAA;IACjB;;OAEG;IACH,qCAAyB,CAAA;IACzB;;;;;OAKG;IACH,2BAAe,CAAA;AACnB,CAAC,EAjCW,QAAQ,KAAR,QAAQ,QAiCnB;AA6ND;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,eAyDX;AAzDD,WAAY,eAAe;IACvB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,wCAAqB,CAAA;IACrB;;OAEG;IACH,8CAA2B,CAAA;IAC3B;;OAEG;IACH,0CAAuB,CAAA;IACvB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,4CAAyB,CAAA;IACzB;;OAEG;IACH,oCAAiB,CAAA;IACjB;;OAEG;IACH,4BAAS,CAAA;IACT;;OAEG;IACH,4BAAS,CAAA;AACb,CAAC,EAzDW,eAAe,KAAf,eAAe,QAyD1B;AAsBD;;GAEG;AACH,qCAAqC;AACrC,MAAM,CAAN,IAAY,UA8SX;AA9SD,WAAY,UAAU;IAClB;;;OAGG;IACH,2BAAa,CAAA;IACb;;;OAGG;IACH,mCAAqB,CAAA;IACrB;;;OAGG;IACH,2BAAa,CAAA;IACb;;;OAGG;IACH,2BAAa,CAAA;IACb;;;OAGG;IAC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7B,wCAA8B,CAAA;IAC9B;;OAEG;IACH,6CAAmC,CAAA;IACnC;;OAEG;IACH,2DAAiD,CAAA;IACjD,qBAAW,CAAA;IACX;;OAEG;IACH,uCAA6B,CAAA;IAC7B,uCAA6B,CAAA;IAC7B,6BAAmB,CAAA;IACnB,oDAA0C,CAAA;IAC1C,oDAA0C,CAAA;IAC1C,iEAAuD,CAAA;IACvD,yDAA+C,CAAA;IAC/C;;OAEG;IACH,8CAAoC,CAAA;IACpC,wDAA8C,CAAA;IAC9C,mDAAyC,CAAA;IACzC;;OAEG;IACH,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;IAC/B,qDAA2C,CAAA;IAC3C;;OAEG;IACH,yCAA+B,CAAA;IAC/B;;OAEG;IACH,qDAA2C,CAAA;IAC3C;;OAEG;IACH,2CAAiC,CAAA;IACjC;;OAEG;IACH,qCAA2B,CAAA;IAC3B;;OAEG;IACH,yCAA+B,CAAA;IAC/B;;OAEG;IACH,qCAA2B,CAAA;AAC/B,CAAC,EA3IW,MAAM,KAAN,MAAM,QA2IjB;AAQD,qCAAqC;AACrC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,sDAAqC,CAAA;IACrC,sEAAqD,CAAA;AACzD,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare function fetchSessionInfoService(authVerificationUrl: string): Promise<any>;
|
|
2
2
|
export declare function fetchAuthTokenService(authEndpoint: string): Promise<any>;
|
|
3
3
|
export declare function fetchAuthService(thoughtSpotHost: string, username: string, authToken: string): Promise<any>;
|
|
4
|
+
export declare function fetchAuthPostService(thoughtSpotHost: string, username: string, authToken: string): Promise<any>;
|
|
4
5
|
export declare function fetchBasicAuthService(thoughtSpotHost: string, username: string, password: string): Promise<any>;
|
|
5
6
|
export declare function fetchLogoutService(thoughtSpotHost: string): Promise<any>;
|
|
@@ -24,6 +24,19 @@ export async function fetchAuthService(thoughtSpotHost, username, authToken) {
|
|
|
24
24
|
redirect: 'manual',
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
export async function fetchAuthPostService(thoughtSpotHost, username, authToken) {
|
|
28
|
+
return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}`, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: {
|
|
31
|
+
'content-type': 'application/x-www-form-urlencoded',
|
|
32
|
+
'x-requested-by': 'ThoughtSpot',
|
|
33
|
+
},
|
|
34
|
+
body: `username=${encodeURIComponent(username)}&auth_token=${encodeURIComponent(authToken)}`,
|
|
35
|
+
credentials: 'include',
|
|
36
|
+
// We do not want to follow the redirect, as it starts giving a CORS error
|
|
37
|
+
redirect: 'manual',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
27
40
|
export async function fetchBasicAuthService(thoughtSpotHost, username, password) {
|
|
28
41
|
return failureLoggedFetch(`${thoughtSpotHost}${EndPoints.BASIC_LOGIN}`, {
|
|
29
42
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authService.js","sourceRoot":"","sources":["../../../src/utils/authService.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,SAAS,kBAAkB,CACvB,GAAW,EACX,UAAuB,EAAE;IAEzB,OAAO,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;;QACxC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,gBAAgB,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC7D,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,MAAM,CAAA,MAAA,CAAC,CAAC,IAAI,+CAAN,CAAC,CAAS,CAAA,CAAC,CAAC;SAC9C;QACD,OAAO,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;AACP,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AAE;YACL,cAAc,EAAE,mCAAmC;YACnD,gBAAgB,EAAE,aAAa;SAClC;QACD,IAAI,EAAE,YAAY,kBAAkB,CAChC,QAAQ,CACX,eAAe,kBAAkB,CAAC,SAAS,CAAC,EAAE;QAC/C,WAAW,EAAE,SAAS;QACtB,0EAA0E;QAC1E,QAAQ,EAAE,QAAQ;KACrB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACvC,eAAuB,EACvB,QAAgB,EAChB,QAAgB;IAEhB,OAAO,kBAAkB,CAAC,GAAG,eAAe,GAAG,SAAS,CAAC,WAAW,EAAE,EAAE;QACpE,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,cAAc,EAAE,mCAAmC;YACnD,gBAAgB,EAAE,aAAa;SAClC;QACD,IAAI,EAAE,YAAY,kBAAkB,CAChC,QAAQ,CACX,aAAa,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAC5C,WAAW,EAAE,SAAS;KACzB,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,eAAuB;IAEvB,OAAO,kBAAkB,CAAC,GAAG,eAAe,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE;QAC/D,WAAW,EAAE,SAAS;QACtB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE;YACL,gBAAgB,EAAE,aAAa;SAClC;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchSessionInfoService, fetchAuthTokenService, fetchAuthService, fetchBasicAuthService, } from './authService';
|
|
1
|
+
import { fetchSessionInfoService, fetchAuthTokenService, fetchAuthService, fetchBasicAuthService, fetchAuthPostService, } from './authService';
|
|
2
2
|
import { EndPoints } from '../auth';
|
|
3
3
|
const thoughtSpotHost = 'http://10.79.135.124:3000';
|
|
4
4
|
const authVerificationUrl = 'http://localhost:3000';
|
|
@@ -37,6 +37,20 @@ describe('Unit test for authService', () => {
|
|
|
37
37
|
redirect: 'manual',
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
+
test('fetchAuthPostService', async () => {
|
|
41
|
+
global.fetch = jest.fn(() => Promise.resolve({ success: true, ok: true }));
|
|
42
|
+
await fetchAuthPostService(thoughtSpotHost, username, authToken);
|
|
43
|
+
expect(fetch).toBeCalledWith(`${thoughtSpotHost}${EndPoints.TOKEN_LOGIN}`, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
credentials: 'include',
|
|
46
|
+
redirect: 'manual',
|
|
47
|
+
body: 'username=tsuser&auth_token=token',
|
|
48
|
+
headers: {
|
|
49
|
+
'content-type': 'application/x-www-form-urlencoded',
|
|
50
|
+
'x-requested-by': 'ThoughtSpot',
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
});
|
|
40
54
|
test('fetchBasicAuthService called with manual redirect', async () => {
|
|
41
55
|
global.fetch = jest.fn(() => Promise.resolve({ success: true, ok: true }));
|
|
42
56
|
await fetchBasicAuthService(thoughtSpotHost, username, password);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authService.spec.js","sourceRoot":"","sources":["../../../src/utils/authService.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"authService.spec.js","sourceRoot":"","sources":["../../../src/utils/authService.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,eAAe,GAAG,2BAA2B,CAAC;AAEpD,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AACpD,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAC1B,MAAM,QAAQ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C,EAAE,CAAC,GAAG,EAAE,CACxB,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAC/C,CAAC;QACF,MAAM,qBAAqB,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACjE,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACxE,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CACxB,OAAO,CAAC,OAAO,CAAC;YACZ,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,MAAM,EAAE,GAAG;YACX,EAAE,EAAE,KAAK;SACZ,CAAC,CACL,CAAC;QACF,MAAM,uBAAuB,CAAC,mBAAmB,CAAC,CAAC;QACnD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/utils/plugin.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { disableAutoLogin, getEmbedConfig, handleAuth, notifyAuthFailure, notifyAuthSuccess, notifyLogout, } from '../embed/base';
|
|
2
2
|
import { AuthFailureType, initSession } from '../auth';
|
|
3
|
-
import { EmbedEvent, OperationType } from '../types';
|
|
3
|
+
import { AuthType, EmbedEvent, OperationType } from '../types';
|
|
4
4
|
import { getAnswerServiceInstance } from './answerService';
|
|
5
5
|
export function processCustomAction(e, thoughtSpotHost) {
|
|
6
6
|
var _a;
|
|
@@ -50,10 +50,12 @@ function processNoCookieAccess(e, containerEl) {
|
|
|
50
50
|
return e;
|
|
51
51
|
}
|
|
52
52
|
function processAuthFailure(e, containerEl) {
|
|
53
|
-
const { loginFailedMessage } = getEmbedConfig();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
const { loginFailedMessage, authType } = getEmbedConfig();
|
|
54
|
+
if (authType !== AuthType.None) {
|
|
55
|
+
// eslint-disable-next-line no-param-reassign
|
|
56
|
+
containerEl.innerHTML = loginFailedMessage;
|
|
57
|
+
notifyAuthFailure(AuthFailureType.OTHER);
|
|
58
|
+
}
|
|
57
59
|
return e;
|
|
58
60
|
}
|
|
59
61
|
function processAuthLogout(e, containerEl) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processData.js","sourceRoot":"","sources":["../../../src/utils/processData.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"processData.js","sourceRoot":"","sources":["../../../src/utils/processData.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,UAA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,CAAC,CAAC;QACjD,KAAK,UAAU,CAAC,WAAW;YACvB,OAAO,kBAAkB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC9C,KAAK,UAAU,CAAC,UAAU;YACtB,OAAO,iBAAiB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QAC7C,QAAQ;KACX;IACD,OAAO,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -129,6 +129,20 @@ describe('Unit test for process data', () => {
|
|
|
129
129
|
expect(base.notifyAuthFailure).toBeCalledWith(auth.AuthFailureType.OTHER);
|
|
130
130
|
expect(el.innerHTML).toBe('Hello');
|
|
131
131
|
});
|
|
132
|
+
test('process authFailure AuthType=None', () => {
|
|
133
|
+
const e = { type: EmbedEvent.AuthFailure };
|
|
134
|
+
jest.spyOn(base, 'notifyAuthFailure');
|
|
135
|
+
jest.spyOn(base, 'getEmbedConfig').mockReturnValue({
|
|
136
|
+
loginFailedMessage: 'Hello',
|
|
137
|
+
authType: AuthType.None,
|
|
138
|
+
});
|
|
139
|
+
const el = {};
|
|
140
|
+
expect(processDataInstance.processEventData(e.type, e, '', el)).toEqual({
|
|
141
|
+
type: e.type,
|
|
142
|
+
});
|
|
143
|
+
expect(base.notifyAuthFailure).not.toBeCalled();
|
|
144
|
+
expect(el.innerHTML).not.toBe('Hello');
|
|
145
|
+
});
|
|
132
146
|
test('process authLogout', () => {
|
|
133
147
|
base.init({
|
|
134
148
|
loginFailedMessage: 'Hello',
|