@thoughtspot/visual-embed-sdk 1.28.0-alpha.3 → 1.28.0-alpha.5

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 (88) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/authToken.d.ts +6 -0
  3. package/cjs/src/authToken.d.ts.map +1 -1
  4. package/cjs/src/authToken.js +6 -0
  5. package/cjs/src/authToken.js.map +1 -1
  6. package/cjs/src/embed/app.d.ts +138 -2
  7. package/cjs/src/embed/app.d.ts.map +1 -1
  8. package/cjs/src/embed/app.js +1 -1
  9. package/cjs/src/embed/app.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts.map +1 -1
  11. package/cjs/src/embed/base.js +2 -0
  12. package/cjs/src/embed/base.js.map +1 -1
  13. package/cjs/src/embed/liveboard.d.ts +114 -5
  14. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  15. package/cjs/src/embed/liveboard.js.map +1 -1
  16. package/cjs/src/embed/search-bar.d.ts +36 -5
  17. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  18. package/cjs/src/embed/search-bar.js.map +1 -1
  19. package/cjs/src/embed/search.d.ts +89 -0
  20. package/cjs/src/embed/search.d.ts.map +1 -1
  21. package/cjs/src/embed/search.js.map +1 -1
  22. package/cjs/src/index.d.ts +1 -0
  23. package/cjs/src/index.d.ts.map +1 -1
  24. package/cjs/src/index.js +3 -1
  25. package/cjs/src/index.js.map +1 -1
  26. package/cjs/src/types.d.ts +149 -8
  27. package/cjs/src/types.d.ts.map +1 -1
  28. package/cjs/src/types.js.map +1 -1
  29. package/dist/src/authToken.d.ts +6 -0
  30. package/dist/src/authToken.d.ts.map +1 -1
  31. package/dist/src/embed/app.d.ts +138 -2
  32. package/dist/src/embed/app.d.ts.map +1 -1
  33. package/dist/src/embed/base.d.ts.map +1 -1
  34. package/dist/src/embed/liveboard.d.ts +114 -5
  35. package/dist/src/embed/liveboard.d.ts.map +1 -1
  36. package/dist/src/embed/search-bar.d.ts +36 -5
  37. package/dist/src/embed/search-bar.d.ts.map +1 -1
  38. package/dist/src/embed/search.d.ts +89 -0
  39. package/dist/src/embed/search.d.ts.map +1 -1
  40. package/dist/src/index.d.ts +1 -0
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/types.d.ts +149 -8
  43. package/dist/src/types.d.ts.map +1 -1
  44. package/dist/tsembed-react.es.js +8 -2
  45. package/dist/tsembed-react.js +8 -2
  46. package/dist/tsembed.es.js +10 -3
  47. package/dist/tsembed.js +10 -2
  48. package/dist/visual-embed-sdk-react-full.d.ts +535 -20
  49. package/dist/visual-embed-sdk-react.d.ts +535 -20
  50. package/dist/visual-embed-sdk.d.ts +535 -20
  51. package/lib/package.json +1 -1
  52. package/lib/src/authToken.d.ts +6 -0
  53. package/lib/src/authToken.d.ts.map +1 -1
  54. package/lib/src/authToken.js +6 -0
  55. package/lib/src/authToken.js.map +1 -1
  56. package/lib/src/embed/app.d.ts +138 -2
  57. package/lib/src/embed/app.d.ts.map +1 -1
  58. package/lib/src/embed/app.js +1 -1
  59. package/lib/src/embed/app.js.map +1 -1
  60. package/lib/src/embed/base.d.ts.map +1 -1
  61. package/lib/src/embed/base.js +2 -0
  62. package/lib/src/embed/base.js.map +1 -1
  63. package/lib/src/embed/liveboard.d.ts +114 -5
  64. package/lib/src/embed/liveboard.d.ts.map +1 -1
  65. package/lib/src/embed/liveboard.js.map +1 -1
  66. package/lib/src/embed/search-bar.d.ts +36 -5
  67. package/lib/src/embed/search-bar.d.ts.map +1 -1
  68. package/lib/src/embed/search-bar.js.map +1 -1
  69. package/lib/src/embed/search.d.ts +89 -0
  70. package/lib/src/embed/search.d.ts.map +1 -1
  71. package/lib/src/embed/search.js.map +1 -1
  72. package/lib/src/index.d.ts +1 -0
  73. package/lib/src/index.d.ts.map +1 -1
  74. package/lib/src/index.js +1 -0
  75. package/lib/src/index.js.map +1 -1
  76. package/lib/src/types.d.ts +149 -8
  77. package/lib/src/types.d.ts.map +1 -1
  78. package/lib/src/types.js.map +1 -1
  79. package/lib/src/visual-embed-sdk.d.ts +539 -20
  80. package/package.json +1 -1
  81. package/src/authToken.ts +6 -0
  82. package/src/embed/app.ts +145 -6
  83. package/src/embed/base.ts +2 -0
  84. package/src/embed/liveboard.ts +120 -7
  85. package/src/embed/search-bar.tsx +36 -5
  86. package/src/embed/search.ts +95 -2
  87. package/src/index.ts +2 -0
  88. package/src/types.ts +159 -18
@@ -68,6 +68,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
68
68
  * If true, the top navigation bar within the ThoughtSpot app
69
69
  * is displayed. By default, the navigation bar is hidden.
70
70
  * This flag also controls the homepage left navigation bar.
71
+ *
72
+ * @default true
73
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
74
+ *
75
+ * @example
76
+ * ```js
77
+ * const embed = new AppEmbed('#tsEmbed', {
78
+ * ... // other options
79
+ * showPrimaryNavbar:true,
80
+ * })
81
+ * ```
71
82
  */
72
83
  showPrimaryNavbar?: boolean;
73
84
  /**
@@ -82,11 +93,29 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
82
93
  *
83
94
  * @default false
84
95
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
96
+ *
97
+ * @example
98
+ * ```js
99
+ * const embed = new AppEmbed('#tsEmbed', {
100
+ * ... // other options
101
+ * hideHomepageLeftNav : true,
102
+ * })
103
+ * ```
85
104
  */
86
105
  hideHomepageLeftNav?: boolean;
87
106
  /**
88
107
  * Control the visibility of the help (?) and profile buttons on the
89
108
  * Global nav-bar. By default, these buttons are visible on the nav-bar.
109
+ * @default false
110
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
111
+ *
112
+ * @example
113
+ * ```js
114
+ * const embed = new AppEmbed('#tsEmbed', {
115
+ * ... // other options
116
+ * disableProfileAndHelp: true,
117
+ * })
118
+ * ```
90
119
  */
91
120
  disableProfileAndHelp?: boolean;
92
121
  /**
@@ -97,6 +126,16 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
97
126
  * To access the updated modular homepage, set
98
127
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
99
128
  *
129
+ * @default false
130
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
131
+ *
132
+ * @example
133
+ * ```js
134
+ * const embed = new AppEmbed('#tsEmbed', {
135
+ * ... // other options
136
+ * hideApplicationSwitcher : true,
137
+ * })
138
+ * ```
100
139
  */
101
140
  hideApplicationSwitcher?: boolean;
102
141
  /**
@@ -107,6 +146,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
107
146
  * To access the updated modular homepage, set
108
147
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
109
148
  *
149
+ *
150
+ * @default true
151
+ * @version SDK: 1.2.0 | Thoughtspot: 9.4.0.cl
152
+ *
153
+ * @example
154
+ * ```js
155
+ * const embed = new AppEmbed('#tsEmbed', {
156
+ * ... // other options
157
+ * hideOrgSwitcher : true,
158
+ * })
159
+ * ```
110
160
  */
111
161
  hideOrgSwitcher?: boolean;
112
162
  /**
@@ -118,9 +168,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
118
168
  * For eg, if you want the component to open to a specific Liveboard
119
169
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
120
170
  *
171
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
172
+ *
121
173
  * @example
122
- * ```
123
- * <AppEmbed path="pinboard/1234/tab/7464" />
174
+ * ```js
175
+ * const embed = new AppEmbed('#tsEmbed', {
176
+ * ... // other options
177
+ * path:"pinboard/1234/tab/7464"
178
+ * })
124
179
  * ```
125
180
  */
126
181
  path?: string;
@@ -130,16 +185,48 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
130
185
  *
131
186
  * Use this to open to particular page in the app. To open to a specific
132
187
  * path within the app, use the `path` attribute which is more flexible.
188
+ *
189
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
190
+ *
191
+ * @example
192
+ * ```js
193
+ * const embed = new AppEmbed('#tsEmbed', {
194
+ * ... // other options
195
+ * pageId : Page.Answers | Page.Data
196
+ * })
197
+ * ```
133
198
  */
134
199
  pageId?: Page;
135
200
  /**
136
201
  * This puts a filter tag on the application. All metadata lists in the
137
202
  * application, such as Liveboards and answers, would be filtered by this
138
203
  * tag.
204
+ *
205
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
206
+ * @example
207
+ * ```js
208
+ * const embed = new AppEmbed('#tsEmbed', {
209
+ * ... // other options
210
+ * tag:'value',
211
+ * })
212
+ * ```
139
213
  */
140
214
  tag?: string;
141
215
  /**
142
216
  * The array of GUIDs to be hidden
217
+ *
218
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
219
+ *
220
+ * @example
221
+ * ```js
222
+ * const embed = new AppEmbed('#tsEmbed', {
223
+ * ... // other options
224
+ * hideObjects: [
225
+ * '430496d6-6903-4601-937e-2c691821af3c',
226
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
227
+ * ]
228
+ * })
229
+ * ```
143
230
  */
144
231
  hideObjects?: string[];
145
232
  /**
@@ -152,8 +239,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
152
239
  liveboardV2?: boolean;
153
240
  /**
154
241
  * If set to true, the Search Assist feature is enabled.
242
+ * @default true
155
243
  *
156
244
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
245
+ *
246
+ * @example
247
+ * ```js
248
+ * const embed = new AppEmbed('#tsEmbed', {
249
+ * ... // other options
250
+ * enableSearchAssist: true,
251
+ * })
252
+ * ```
157
253
  */
158
254
  enableSearchAssist?: boolean;
159
255
  /**
@@ -161,6 +257,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
161
257
  * according to the height of the pages which support fullHeight mode.
162
258
  *
163
259
  * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
260
+ *
261
+ * @example
262
+ * ```js
263
+ * const embed = new AppEmbed('#tsEmbed', {
264
+ * ... // other options
265
+ * fullHeight: true,
266
+ * })
267
+ * ```
164
268
  */
165
269
  fullHeight?: boolean;
166
270
  /**
@@ -176,6 +280,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
176
280
  *
177
281
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
178
282
  * @default false
283
+ *
284
+ * @example
285
+ * ```js
286
+ * const embed = new AppEmbed('#tsEmbed', {
287
+ * ... // other options
288
+ * hideLiveboardHeader : true,
289
+ * })
290
+ * ```
179
291
  */
180
292
  hideLiveboardHeader?: boolean;
181
293
  /**
@@ -183,6 +295,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
183
295
  *
184
296
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
185
297
  * @default false
298
+ *
299
+ * @example
300
+ * ```js
301
+ * const embed = new AppEmbed('#tsEmbed', {
302
+ * ... // other options
303
+ * showLiveboardTitle:true,
304
+ * })
305
+ * ```
186
306
  */
187
307
  showLiveboardTitle?: boolean;
188
308
  /**
@@ -190,6 +310,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
190
310
  *
191
311
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
192
312
  * @default false
313
+ *
314
+ * @example
315
+ * ```js
316
+ * const embed = new AppEmbed('#tsEmbed', {
317
+ * ... // other options
318
+ * showLiveboardDescription:true,
319
+ * })
320
+ * ```
193
321
  */
194
322
  showLiveboardDescription?: boolean;
195
323
  /**
@@ -197,6 +325,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
197
325
  *
198
326
  * @default false
199
327
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
328
+ *
329
+ * @example
330
+ * ```js
331
+ * const embed = new AppEmbed('#tsEmbed', {
332
+ * ... // other options
333
+ * modularHomeExperience : true,
334
+ * })
335
+ * ```
200
336
  */
201
337
  modularHomeExperience?: boolean;
202
338
  /**
@@ -433,6 +569,14 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
433
569
  * incrementally as users scroll the page to view the charts and tables.
434
570
  *
435
571
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
572
+ *
573
+ * @example
574
+ * ```js
575
+ * const embed = new LiveboardEmbed('#embed', {
576
+ * ... // other liveboard view config
577
+ * fullHeight: true,
578
+ * });
579
+ * ```
436
580
  */
437
581
  fullHeight?: boolean;
438
582
  /**
@@ -442,10 +586,28 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
442
586
  *
443
587
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
444
588
  * @default 500
589
+ * @example
590
+ * ```js
591
+ * const embed = new LiveboardEmbed('#embed', {
592
+ * ... // other liveboard view config
593
+ * fullHeight: true,
594
+ * defaultHeight: 600,
595
+ * });
596
+ * ```
445
597
  */
446
598
  defaultHeight?: number;
447
599
  /**
448
600
  * @Deprecated If set to true, the context menu in visualizations will be enabled.
601
+ *
602
+ * @example
603
+ * ```js
604
+ * const embed = new LiveboardEmbed('#tsEmbed', {
605
+ * ... // other options
606
+ * enableVizTransformations:true,
607
+ * })
608
+ * ```
609
+ *
610
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
449
611
  */
450
612
  enableVizTransformations?: boolean;
451
613
  /**
@@ -453,6 +615,12 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
453
615
  * Use either liveboardId or pinboardId to reference the Liveboard to embed.
454
616
  *
455
617
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
618
+ * @example
619
+ * ```js
620
+ * const embed = new LiveboardEmbed('#embed-container', {
621
+ * ... // other options
622
+ * liveboardId:id of liveboard,
623
+ * })
456
624
  */
457
625
  liveboardId?: string;
458
626
  /**
@@ -463,6 +631,16 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
463
631
  pinboardId?: string;
464
632
  /**
465
633
  * The visualization within the Liveboard to display.
634
+ *
635
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
636
+ *
637
+ * @example
638
+ * ```js
639
+ * const embed = new LiveboardEmbed('#embed-container', {
640
+ * ... // other options
641
+ * vizId:'430496d6-6903-4601-937e-2c691821af3c',
642
+ * })
643
+ * ```
466
644
  */
467
645
  vizId?: string;
468
646
  /**
@@ -470,6 +648,13 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
470
648
  * Liveboard page will be read-only (no X buttons)
471
649
  *
472
650
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw
651
+ * @example
652
+ * ```js
653
+ * const embed = new LiveboardEmbed('#embed-container', {
654
+ * ... // other options
655
+ * preventLiveboardFilterRemoval:true,
656
+ * })
657
+ * ```
473
658
  */
474
659
  preventLiveboardFilterRemoval?: boolean;
475
660
  /**
@@ -478,6 +663,16 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
478
663
  * event.
479
664
  *
480
665
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
666
+ *
667
+ * @example
668
+ * ```js
669
+ * const embed = new LiveboardEmbed('#embed-container', {
670
+ * ... // other options
671
+ * visibleVizs: [
672
+ * '430496d6-6903-4601-937e-2c691821af3c',
673
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
674
+ * ]
675
+ * })
481
676
  */
482
677
  visibleVizs?: string[];
483
678
  /**
@@ -491,12 +686,26 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
491
686
  * new Liveboard experience mode.
492
687
  *
493
688
  * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
689
+ * @example
690
+ * ```js
691
+ * const embed = new LiveboardEmbed('#embed-container', {
692
+ * ... // other options
693
+ * liveboardV2:true,
694
+ * })
695
+ * ```
494
696
  */
495
697
  liveboardV2?: boolean;
496
698
  /**
497
699
  * Set a Liveboard tab as an active tab.
498
700
  * Specify the tab ID.
499
701
  *
702
+ * @example
703
+ * ```js
704
+ * const embed = new LiveboardEmbed('#tsEmbed', {
705
+ * ... // other options
706
+ * activeTabId:'id-1234',
707
+ * })
708
+ * ```
500
709
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
501
710
  */
502
711
  activeTabId?: string;
@@ -504,6 +713,14 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
504
713
  * Show or hide the tab panel of the embedded Liveboard.
505
714
  *
506
715
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
716
+ *
717
+ * @example
718
+ * ```js
719
+ * const embed = new LiveboardEmbed('#embed-container', {
720
+ * ... // other options
721
+ * hideTabPanel:true,
722
+ * })
723
+ * ```
507
724
  */
508
725
  hideTabPanel?: boolean;
509
726
  /**
@@ -511,20 +728,41 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
511
728
  *
512
729
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
513
730
  * @default false
731
+ * @example
732
+ * ```js
733
+ * const embed = new LiveboardEmbed('#embed', {
734
+ * ... // other liveboard view config
735
+ * hideLiveboardHeader:true,
736
+ * });
737
+ * ```
514
738
  */
515
739
  hideLiveboardHeader?: boolean;
516
740
  /**
517
741
  * Show or hide the Liveboard title.
518
- *
519
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
520
742
  * @default false
743
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
744
+ *
745
+ * @example
746
+ * ```js
747
+ * const embed = new LiveboardEmbed('#embed-container', {
748
+ * ... // other options
749
+ * showLiveboardTitle:true,
750
+ * })
751
+ * ```
521
752
  */
522
753
  showLiveboardTitle?: boolean;
523
754
  /**
524
755
  * Show or hide the Liveboard description.
525
- *
526
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
527
756
  * @default false
757
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
758
+ *
759
+ * @example
760
+ * ```js
761
+ * const embed = new LiveboardEmbed('#embed-container', {
762
+ * ... // other options
763
+ * showLiveboardDescription:true,
764
+ * })
765
+ * ```
528
766
  */
529
767
  showLiveboardDescription?: boolean;
530
768
  /**
@@ -545,8 +783,15 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
545
783
  /**
546
784
  * enable or disable ask sage
547
785
  *
548
- * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
549
786
  * @default false
787
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
788
+ * @example
789
+ * ```js
790
+ * const embed = new SearchEmbed('#tsEmbed', {
791
+ * ... // other options
792
+ * enableAskSage:true,
793
+ * })
794
+ * ```
550
795
  */
551
796
  enableAskSage?: boolean;
552
797
  }
@@ -632,27 +877,74 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
632
877
  /**
633
878
  * If set to true, the data sources panel is collapsed on load,
634
879
  * but can be expanded manually.
880
+ *
881
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
882
+ *
883
+ * @example
884
+ * ```js
885
+ * const embed = new SearchEmbed('#tsEmbed', {
886
+ * ... // other options
887
+ * collapseDataSources:true,
888
+ * })
889
+ * ```
635
890
  */
636
891
  collapseDataSources?: boolean;
637
892
  /**
638
893
  * Show or hide the data sources panel.
894
+ *
895
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
896
+ *
897
+ * @example
898
+ * ```js
899
+ * const embed = new SearchEmbed('#tsEmbed', {
900
+ * ... // other options
901
+ * hideDataSources:true,
902
+ * })
903
+ * ```
639
904
  */
640
905
  hideDataSources?: boolean;
641
906
  /**
642
907
  * Show or hide the charts and tables in search answers.
643
908
  * This attribute can be used to create a custom visualization
644
909
  * using raw answer data.
910
+ *
911
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
912
+ *
913
+ * @example
914
+ * ```js
915
+ * const embed = new SearchEmbed('#tsEmbed', {
916
+ * ... // other options
917
+ * hideResults:true,
918
+ * })
919
+ * ```
645
920
  */
646
921
  hideResults?: boolean;
647
922
  /**
648
923
  * If set to true, the Search Assist feature is enabled.
649
924
  *
650
925
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
926
+ *
927
+ * @example
928
+ * ```js
929
+ * const embed = new SearchEmbed('#tsEmbed', {
930
+ * ... // other options
931
+ * enableSearchAssist:true,
932
+ * })
933
+ * ```
651
934
  */
652
935
  enableSearchAssist?: boolean;
653
936
  /**
654
937
  * If set to true, the tabular view is set as the default
655
938
  * format for presenting search data.
939
+ *
940
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
941
+ *
942
+ * @example
943
+ * ```js
944
+ * const embed = new SearchEmbed('#tsEmbed', {
945
+ * ... // other options
946
+ * forceTable:true,
947
+ * })
656
948
  */
657
949
  forceTable?: boolean;
658
950
  /**
@@ -660,12 +952,28 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
660
952
  * Only a single data source is supported currently.
661
953
  *
662
954
  * @deprecated Use `dataSource` instead.
955
+ *
956
+ * @example
957
+ * ```js
958
+ * const embed = new SearchEmbed('#tsEmbed', {
959
+ * ... // other options
960
+ * dataSources:['id-234','id-456'],
961
+ * })
962
+ * ```
663
963
  */
664
964
  dataSources?: string[];
665
965
  /**
666
966
  * The array of data source GUIDs to set on load.
667
967
  *
668
968
  * @version: SDK: 1.19.0
969
+ *
970
+ * @example
971
+ * ```js
972
+ * const embed = new SearchEmbed('#tsEmbed', {
973
+ * ... // other options
974
+ * dataSource:'id-234',
975
+ * })
976
+ * ```
669
977
  */
670
978
  dataSource?: string;
671
979
  /**
@@ -698,6 +1006,16 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
698
1006
  searchOptions?: SearchOptions;
699
1007
  /**
700
1008
  * The GUID of a saved answer to load initially.
1009
+ *
1010
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
1011
+ *
1012
+ * @example
1013
+ * ```js
1014
+ * const embed = new SearchEmbed('#tsEmbed', {
1015
+ * ... // other options
1016
+ * answerId:'sed-1234',
1017
+ * })
1018
+ * ```
701
1019
  */
702
1020
  answerId?: string;
703
1021
  /**
@@ -705,6 +1023,14 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
705
1023
  * The chart/table should still be visible.
706
1024
  *
707
1025
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1026
+ *
1027
+ * @example
1028
+ * ```js
1029
+ * const embed = new SearchEmbed('#tsEmbed', {
1030
+ * ... // other options
1031
+ * hideSearchBar:true,
1032
+ * })
1033
+ * ```
708
1034
  */
709
1035
  hideSearchBar?: boolean;
710
1036
  /**
@@ -712,6 +1038,14 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
712
1038
  *
713
1039
  * @default false
714
1040
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1041
+ *
1042
+ * @example
1043
+ * ```js
1044
+ * const embed = new SearchEmbed('#tsEmbed', {
1045
+ * ... // other options
1046
+ * dataPanelV2:false,
1047
+ * })
1048
+ * ```
715
1049
  */
716
1050
  dataPanelV2?: boolean;
717
1051
  /**
@@ -757,18 +1091,44 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
757
1091
  * Only a single data source is supported currently.
758
1092
  *
759
1093
  * @deprecated Use `dataSource` instead
1094
+ *
1095
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.1-sw
1096
+ *
1097
+ * @example
1098
+ * ```js
1099
+ * const embed = new SearchBarEmbed('#tsEmbed', {
1100
+ * ... // other options
1101
+ * dataSources:['id-2345','id-2345'],
1102
+ * })
1103
+ * ```
760
1104
  */
761
1105
  dataSources?: string[];
762
1106
  /**
763
- * The array of data source GUIDs to set on load.
1107
+ * Pass the ID of the source to be selected.
764
1108
  *
765
1109
  * @version: SDK: 1.19.0, ThoughtSpot 9.0.0.cl, 9.0.1.sw
1110
+ *
1111
+ * @example
1112
+ * ```js
1113
+ * const embed = new SearchBarEmbed('#tsEmbed', {
1114
+ * ... // other options
1115
+ * dataSource:'id-2345',
1116
+ * })
1117
+ * ```
766
1118
  */
767
1119
  dataSource?: string;
768
1120
  /**
769
1121
  * Boolean to define if the last selected data source should be used
770
1122
  *
771
1123
  * @version: SDK: 1.24.0, ThoughtSpot 9.5.0.cl, 9.5.0.sw
1124
+ *
1125
+ * @example
1126
+ * ```js
1127
+ * const embed = new SearchBarEmbed('#tsEmbed', {
1128
+ * ... // other options
1129
+ * useLastSelectedSources:false,
1130
+ * })
1131
+ * ```
772
1132
  */
773
1133
  useLastSelectedSources?: boolean;
774
1134
  /**
@@ -782,12 +1142,17 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
782
1142
  * If it’s not executed, the focus is placed at the end of
783
1143
  * the token string in the search bar.
784
1144
  *
1145
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.4.0.sw
1146
+ *
785
1147
  * @example
786
1148
  * ```js
787
- * searchOptions: {
788
- * searchTokenString: '[quantity purchased] [region]',
789
- * executeSearch: true,
790
- * }
1149
+ * const embed = new SearchBarEmbed('#tsEmbed', {
1150
+ * ... // other options
1151
+ * searchOptions: {
1152
+ * searchTokenString: '[quantity purchased] [region]',
1153
+ * executeSearch: true,
1154
+ * }
1155
+ * })
791
1156
  * ```
792
1157
  */
793
1158
  searchOptions?: SearchOptions;
@@ -1594,8 +1959,21 @@ export interface ViewConfig {
1594
1959
  */
1595
1960
  layoutConfig?: LayoutConfig;
1596
1961
  /**
1597
- * The <b>width</b> and <b>height</b> dimensions to render an embedded
1962
+ * The width and height dimensions to render an embedded
1598
1963
  * object inside your app. Specify the values in pixels or percentage.
1964
+ *
1965
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1966
+ *
1967
+ * @example
1968
+ * ```js
1969
+ * const embed = new LiveboardEmbed('#embed', {
1970
+ * ... // other liveboard view config
1971
+ * frameParams: {
1972
+ * width: '500px' | '50%',
1973
+ * height: '400px' | '60%',
1974
+ * },
1975
+ * });
1976
+ * ```
1599
1977
  */
1600
1978
  frameParams?: FrameParams;
1601
1979
  /**
@@ -1612,6 +1990,7 @@ export interface ViewConfig {
1612
1990
  * for the user.
1613
1991
  * Use this to disable actions.
1614
1992
  *
1993
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1615
1994
  * @example
1616
1995
  * ```js
1617
1996
  * const embed = new LiveboardEmbed('#embed', {
@@ -1623,6 +2002,15 @@ export interface ViewConfig {
1623
2002
  disabledActions?: Action[];
1624
2003
  /**
1625
2004
  * The tooltip to display for disabled actions.
2005
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2006
+ * @example
2007
+ * ```js
2008
+ * const embed = new LiveboardEmbed('#embed', {
2009
+ * ... // other liveboard view config
2010
+ * disabledActions: [Action.Download, Action.Save]
2011
+ * disabledActionReason: "Reason for disabling",
2012
+ * });
2013
+ * ```
1626
2014
  */
1627
2015
  disabledActionReason?: string;
1628
2016
  /**
@@ -1630,6 +2018,8 @@ export interface ViewConfig {
1630
2018
  * This actions will be hidden from the user.
1631
2019
  * Use this to hide an action.
1632
2020
  *
2021
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2022
+ *
1633
2023
  * @example
1634
2024
  * ```js
1635
2025
  * const embed = new LiveboardEmbed('#embed', {
@@ -1650,17 +2040,49 @@ export interface ViewConfig {
1650
2040
  *
1651
2041
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1652
2042
  * @important
2043
+ *
2044
+ * @example
2045
+ * ```js
2046
+ * const embed = new LiveboardEmbed('#embed', {
2047
+ * ... // other liveboard view config
2048
+ * visibleActions: [Action.Download, Action.Export]
2049
+ * });
2050
+ * ```
1653
2051
  */
1654
2052
  visibleActions?: Action[];
1655
2053
  /**
1656
2054
  * Show alert messages and toast messages in the embedded view.
1657
2055
  *
1658
2056
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2057
+ *
2058
+ * @example
2059
+ * ```js
2060
+ * const embed = new LiveboardEmbed('#embed-container', {
2061
+ * ... // other options
2062
+ * showAlerts:true,
2063
+ * })
2064
+ * ```
1659
2065
  */
1660
2066
  showAlerts?: boolean;
1661
2067
  /**
1662
2068
  * The list of runtime filters to apply to a search answer,
1663
2069
  * visualization, or Liveboard.
2070
+ *
2071
+ * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2072
+ *
2073
+ * @example
2074
+ * ```js
2075
+ * const embed = new LiveboardEmbed('#embed-container', {
2076
+ * ... // other options
2077
+ * runtimeFilters: [
2078
+ * {
2079
+ * columnName: 'value',
2080
+ * operator: RuntimeFilterOp.EQ,
2081
+ * values: ['string' | 123 | true],
2082
+ * },
2083
+ * ],
2084
+ * })
2085
+ * ```
1664
2086
  */
1665
2087
  runtimeFilters?: RuntimeFilter[];
1666
2088
  /**
@@ -1668,12 +2090,32 @@ export interface ViewConfig {
1668
2090
  * visualization, or Liveboard.
1669
2091
  *
1670
2092
  * @version SDK : 1.25.0 | Thoughtspot: 9.2.0.cl, 9.5.0.sw
2093
+ *
2094
+ * @example
2095
+ * ```js
2096
+ * const embed = new LiveboardEmbed('#embed-container', {
2097
+ * ... // other options
2098
+ * runtimeParameters: [
2099
+ * {
2100
+ * name: 'value',
2101
+ * value: 'string' | 123 | true,
2102
+ * },
2103
+ * ],
2104
+ * })
2105
+ * ```
1671
2106
  */
1672
2107
  runtimeParameters?: RuntimeParameter[];
1673
2108
  /**
1674
2109
  * The locale/language to use for the embedded view.
1675
2110
  *
1676
2111
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2112
+ * @example
2113
+ * ```js
2114
+ * const embed = new LiveboardEmbed('#embed-container', {
2115
+ * ... // other options
2116
+ * locale:'en',
2117
+ * })
2118
+ * ```
1677
2119
  */
1678
2120
  locale?: string;
1679
2121
  /**
@@ -1683,7 +2125,16 @@ export interface ViewConfig {
1683
2125
  * Warning: This option is for advanced use only and is used internally
1684
2126
  * to control embed behavior in non-regular ways. We do not publish the
1685
2127
  * list of supported keys and values associated with each.
1686
- *
2128
+ * @example
2129
+ * ```js
2130
+ * const embed = new LiveboardEmbed('#embed', {
2131
+ * ... // other liveboard view config
2132
+ * additionalFlags: {
2133
+ * flag1: 'value1',
2134
+ * flag2: 'value2'
2135
+ * }
2136
+ * });
2137
+ * ```
1687
2138
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1688
2139
  */
1689
2140
  additionalFlags?: {
@@ -1700,18 +2151,42 @@ export interface ViewConfig {
1700
2151
  /**
1701
2152
  * Insert as a sibling of the target container, instead of appending to a
1702
2153
  * child inside it.
2154
+ *
2155
+ * @version SDK: 1.2.0 | Thoughtspot: 9.0.0.cl, 9.0.0.sw
2156
+ *
2157
+ * @example
2158
+ * ```js
2159
+ * const embed = new LiveboardEmbed('#embed-container', {
2160
+ * ... // other options
2161
+ * insertAsSibling:true,
2162
+ * })
2163
+ * ```
1703
2164
  */
1704
2165
  insertAsSibling?: boolean;
1705
2166
  /**
1706
2167
  * flag to set ContextMenu Trigger to either left or right click.
1707
2168
  *
2169
+ * @example
2170
+ * ```js
2171
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2172
+ * ... // other options
2173
+ * contextMenuTrigger:ContextMenuTriggerOptions.LEFT_CLICK || RIGHT_CLICK,
2174
+ * })
2175
+ * ```
1708
2176
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1709
2177
  */
1710
2178
  contextMenuTrigger?: ContextMenuTriggerOptions;
1711
2179
  /**
1712
- * flag to override openNew tab context menu link
2180
+ * Flag to override openNew tab context menu link
1713
2181
  *
1714
2182
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2183
+ * @example
2184
+ * ```js
2185
+ * const embed = new LiveboardEmbed('#embed-container', {
2186
+ * ... // other options
2187
+ * linkOverride:false,
2188
+ * })
2189
+ * ```
1715
2190
  */
1716
2191
  linkOverride?: boolean;
1717
2192
  /**
@@ -1769,6 +2244,14 @@ export interface ViewConfig {
1769
2244
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
1770
2245
  *
1771
2246
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
2247
+ * @example
2248
+ * ```js
2249
+ * const embed = new AppEmbed('#tsEmbed', {
2250
+ * ... // other options
2251
+ * hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning],
2252
+ * })
2253
+ * ```
2254
+ *
1772
2255
  */
1773
2256
  hiddenHomepageModules?: HomepageModule[];
1774
2257
  /**
@@ -1780,6 +2263,14 @@ export interface ViewConfig {
1780
2263
  * `modularHomeExperience` to `true` (available in Early Access from 9.12.0.cl onwards).
1781
2264
  *
1782
2265
  * @version SDK: 1.27.9| Thoughtspot: 9.12.0.cl
2266
+ *
2267
+ * @example
2268
+ * ```js
2269
+ * const embed = new AppEmbed('#tsEmbed', {
2270
+ * ... // other options
2271
+ * reorderedHomepageModules:[HomepageModule.Favorite,HomepageModule.MyLibrary]
2272
+ * })
2273
+ * ```
1783
2274
  */
1784
2275
  reorderedHomepageModules?: HomepageModule[];
1785
2276
  /**
@@ -1788,13 +2279,18 @@ export interface ViewConfig {
1788
2279
  *
1789
2280
  * Use either `visibleTabs` or `hiddenTabs`.
1790
2281
  *
2282
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2283
+ *
1791
2284
  * @example
1792
2285
  * ```js
1793
- * visibleTabs: [
1794
- * '430496d6-6903-4601-937e-2c691821af3c',
1795
- * 'f547ec54-2a37-4516-a222-2b06719af726']
2286
+ * const embed = new LiveboardEmbed('#embed-container', {
2287
+ * ... // other options
2288
+ * visibleTabs: [
2289
+ * '430496d6-6903-4601-937e-2c691821af3c',
2290
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
2291
+ * ]
2292
+ * })
1796
2293
  * ```
1797
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1798
2294
  */
1799
2295
  visibleTabs?: string[];
1800
2296
  /**
@@ -1802,8 +2298,14 @@ export interface ViewConfig {
1802
2298
  * There are 8 eight home navigation list items.
1803
2299
  * To hide these items, specify the string in the array.
1804
2300
  *
2301
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
2302
+ *
2303
+ * * @example
1805
2304
  * ```js
1806
- * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
2305
+ * const embed = new AppEmbed('#tsEmbed', {
2306
+ * ... // other options
2307
+ * hiddenHomeLeftNavItems : [HomeLeftNavItem.Home,HomeLeftNavItem.Answers],
2308
+ * })
1807
2309
  * ```
1808
2310
  *
1809
2311
  * **Note**: This option does not apply to the classic homepage.
@@ -1837,7 +2339,10 @@ export interface ViewConfig {
1837
2339
  *
1838
2340
  * @type {boolean}
1839
2341
  * @default false
2342
+ * @version SDK: 1.24.0 | ThoughtSpot:9.4.0.cl, 9.4.0.sw
2343
+ *
1840
2344
  * @example
2345
+ * ```js
1841
2346
  * // Disable tracking PreRender size in the configuration
1842
2347
  * const config = {
1843
2348
  * doNotTrackPreRenderSize: true,
@@ -1845,6 +2350,7 @@ export interface ViewConfig {
1845
2350
  *
1846
2351
  * // Instantiate an object with the configuration
1847
2352
  * const myComponent = new MyComponent(config);
2353
+ * ```
1848
2354
  */
1849
2355
  doNotTrackPreRenderSize?: boolean;
1850
2356
  /**
@@ -5617,6 +6123,15 @@ export function testResetMixpanel(): void;
5617
6123
  */
5618
6124
  export const tokenizedFetch: typeof fetch;
5619
6125
 
6126
+ export const getAuthenticationToken: (embedConfig: EmbedConfig) => Promise<string>;
6127
+ /**
6128
+ * Resets the auth token and a new token will be fetched on the next request.
6129
+ *
6130
+ * @version SDK: 1.28.0 | ThoughtSpot: *
6131
+ * @group Authentication / Init
6132
+ */
6133
+ export const resetCachedAuthToken: () => void;
6134
+
5620
6135
  /**
5621
6136
  * Copyright (c) 2022
5622
6137
  *