@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
@@ -234,18 +234,44 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
234
234
  * Only a single data source is supported currently.
235
235
  *
236
236
  * @deprecated Use `dataSource` instead
237
+ *
238
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.1-sw
239
+ *
240
+ * @example
241
+ * ```js
242
+ * const embed = new SearchBarEmbed('#tsEmbed', {
243
+ * ... // other options
244
+ * dataSources:['id-2345','id-2345'],
245
+ * })
246
+ * ```
237
247
  */
238
248
  dataSources?: string[];
239
249
  /**
240
- * The array of data source GUIDs to set on load.
250
+ * Pass the ID of the source to be selected.
241
251
  *
242
252
  * @version: SDK: 1.19.0, ThoughtSpot 9.0.0.cl, 9.0.1.sw
253
+ *
254
+ * @example
255
+ * ```js
256
+ * const embed = new SearchBarEmbed('#tsEmbed', {
257
+ * ... // other options
258
+ * dataSource:'id-2345',
259
+ * })
260
+ * ```
243
261
  */
244
262
  dataSource?: string;
245
263
  /**
246
264
  * Boolean to define if the last selected data source should be used
247
265
  *
248
266
  * @version: SDK: 1.24.0, ThoughtSpot 9.5.0.cl, 9.5.0.sw
267
+ *
268
+ * @example
269
+ * ```js
270
+ * const embed = new SearchBarEmbed('#tsEmbed', {
271
+ * ... // other options
272
+ * useLastSelectedSources:false,
273
+ * })
274
+ * ```
249
275
  */
250
276
  useLastSelectedSources?: boolean;
251
277
  /**
@@ -259,12 +285,17 @@ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' |
259
285
  * If it’s not executed, the focus is placed at the end of
260
286
  * the token string in the search bar.
261
287
  *
288
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.4.0.sw
289
+ *
262
290
  * @example
263
291
  * ```js
264
- * searchOptions: {
265
- * searchTokenString: '[quantity purchased] [region]',
266
- * executeSearch: true,
267
- * }
292
+ * const embed = new SearchBarEmbed('#tsEmbed', {
293
+ * ... // other options
294
+ * searchOptions: {
295
+ * searchTokenString: '[quantity purchased] [region]',
296
+ * executeSearch: true,
297
+ * }
298
+ * })
268
299
  * ```
269
300
  */
270
301
  searchOptions?: SearchOptions;
@@ -484,27 +515,74 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
484
515
  /**
485
516
  * If set to true, the data sources panel is collapsed on load,
486
517
  * but can be expanded manually.
518
+ *
519
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
520
+ *
521
+ * @example
522
+ * ```js
523
+ * const embed = new SearchEmbed('#tsEmbed', {
524
+ * ... // other options
525
+ * collapseDataSources:true,
526
+ * })
527
+ * ```
487
528
  */
488
529
  collapseDataSources?: boolean;
489
530
  /**
490
531
  * Show or hide the data sources panel.
532
+ *
533
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
534
+ *
535
+ * @example
536
+ * ```js
537
+ * const embed = new SearchEmbed('#tsEmbed', {
538
+ * ... // other options
539
+ * hideDataSources:true,
540
+ * })
541
+ * ```
491
542
  */
492
543
  hideDataSources?: boolean;
493
544
  /**
494
545
  * Show or hide the charts and tables in search answers.
495
546
  * This attribute can be used to create a custom visualization
496
547
  * using raw answer data.
548
+ *
549
+ * @version: SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw
550
+ *
551
+ * @example
552
+ * ```js
553
+ * const embed = new SearchEmbed('#tsEmbed', {
554
+ * ... // other options
555
+ * hideResults:true,
556
+ * })
557
+ * ```
497
558
  */
498
559
  hideResults?: boolean;
499
560
  /**
500
561
  * If set to true, the Search Assist feature is enabled.
501
562
  *
502
563
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
564
+ *
565
+ * @example
566
+ * ```js
567
+ * const embed = new SearchEmbed('#tsEmbed', {
568
+ * ... // other options
569
+ * enableSearchAssist:true,
570
+ * })
571
+ * ```
503
572
  */
504
573
  enableSearchAssist?: boolean;
505
574
  /**
506
575
  * If set to true, the tabular view is set as the default
507
576
  * format for presenting search data.
577
+ *
578
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
579
+ *
580
+ * @example
581
+ * ```js
582
+ * const embed = new SearchEmbed('#tsEmbed', {
583
+ * ... // other options
584
+ * forceTable:true,
585
+ * })
508
586
  */
509
587
  forceTable?: boolean;
510
588
  /**
@@ -512,12 +590,28 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
512
590
  * Only a single data source is supported currently.
513
591
  *
514
592
  * @deprecated Use `dataSource` instead.
593
+ *
594
+ * @example
595
+ * ```js
596
+ * const embed = new SearchEmbed('#tsEmbed', {
597
+ * ... // other options
598
+ * dataSources:['id-234','id-456'],
599
+ * })
600
+ * ```
515
601
  */
516
602
  dataSources?: string[];
517
603
  /**
518
604
  * The array of data source GUIDs to set on load.
519
605
  *
520
606
  * @version: SDK: 1.19.0
607
+ *
608
+ * @example
609
+ * ```js
610
+ * const embed = new SearchEmbed('#tsEmbed', {
611
+ * ... // other options
612
+ * dataSource:'id-234',
613
+ * })
614
+ * ```
521
615
  */
522
616
  dataSource?: string;
523
617
  /**
@@ -550,6 +644,16 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
550
644
  searchOptions?: SearchOptions;
551
645
  /**
552
646
  * The GUID of a saved answer to load initially.
647
+ *
648
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
649
+ *
650
+ * @example
651
+ * ```js
652
+ * const embed = new SearchEmbed('#tsEmbed', {
653
+ * ... // other options
654
+ * answerId:'sed-1234',
655
+ * })
656
+ * ```
553
657
  */
554
658
  answerId?: string;
555
659
  /**
@@ -557,6 +661,14 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
557
661
  * The chart/table should still be visible.
558
662
  *
559
663
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
664
+ *
665
+ * @example
666
+ * ```js
667
+ * const embed = new SearchEmbed('#tsEmbed', {
668
+ * ... // other options
669
+ * hideSearchBar:true,
670
+ * })
671
+ * ```
560
672
  */
561
673
  hideSearchBar?: boolean;
562
674
  /**
@@ -564,6 +676,14 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
564
676
  *
565
677
  * @default false
566
678
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
679
+ *
680
+ * @example
681
+ * ```js
682
+ * const embed = new SearchEmbed('#tsEmbed', {
683
+ * ... // other options
684
+ * dataPanelV2:false,
685
+ * })
686
+ * ```
567
687
  */
568
688
  dataPanelV2?: boolean;
569
689
  /**
@@ -653,6 +773,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
653
773
  * If true, the top navigation bar within the ThoughtSpot app
654
774
  * is displayed. By default, the navigation bar is hidden.
655
775
  * This flag also controls the homepage left navigation bar.
776
+ *
777
+ * @default true
778
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
779
+ *
780
+ * @example
781
+ * ```js
782
+ * const embed = new AppEmbed('#tsEmbed', {
783
+ * ... // other options
784
+ * showPrimaryNavbar:true,
785
+ * })
786
+ * ```
656
787
  */
657
788
  showPrimaryNavbar?: boolean;
658
789
  /**
@@ -667,11 +798,29 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
667
798
  *
668
799
  * @default false
669
800
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
801
+ *
802
+ * @example
803
+ * ```js
804
+ * const embed = new AppEmbed('#tsEmbed', {
805
+ * ... // other options
806
+ * hideHomepageLeftNav : true,
807
+ * })
808
+ * ```
670
809
  */
671
810
  hideHomepageLeftNav?: boolean;
672
811
  /**
673
812
  * Control the visibility of the help (?) and profile buttons on the
674
813
  * Global nav-bar. By default, these buttons are visible on the nav-bar.
814
+ * @default false
815
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
816
+ *
817
+ * @example
818
+ * ```js
819
+ * const embed = new AppEmbed('#tsEmbed', {
820
+ * ... // other options
821
+ * disableProfileAndHelp: true,
822
+ * })
823
+ * ```
675
824
  */
676
825
  disableProfileAndHelp?: boolean;
677
826
  /**
@@ -682,6 +831,16 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
682
831
  * To access the updated modular homepage, set
683
832
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
684
833
  *
834
+ * @default false
835
+ * @version SDK: 1.2.0 | Thoughtspot: 8.4.0.cl
836
+ *
837
+ * @example
838
+ * ```js
839
+ * const embed = new AppEmbed('#tsEmbed', {
840
+ * ... // other options
841
+ * hideApplicationSwitcher : true,
842
+ * })
843
+ * ```
685
844
  */
686
845
  hideApplicationSwitcher?: boolean;
687
846
  /**
@@ -692,6 +851,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
692
851
  * To access the updated modular homepage, set
693
852
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
694
853
  *
854
+ *
855
+ * @default true
856
+ * @version SDK: 1.2.0 | Thoughtspot: 9.4.0.cl
857
+ *
858
+ * @example
859
+ * ```js
860
+ * const embed = new AppEmbed('#tsEmbed', {
861
+ * ... // other options
862
+ * hideOrgSwitcher : true,
863
+ * })
864
+ * ```
695
865
  */
696
866
  hideOrgSwitcher?: boolean;
697
867
  /**
@@ -703,9 +873,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
703
873
  * For eg, if you want the component to open to a specific Liveboard
704
874
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
705
875
  *
876
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
877
+ *
706
878
  * @example
707
- * ```
708
- * <AppEmbed path="pinboard/1234/tab/7464" />
879
+ * ```js
880
+ * const embed = new AppEmbed('#tsEmbed', {
881
+ * ... // other options
882
+ * path:"pinboard/1234/tab/7464"
883
+ * })
709
884
  * ```
710
885
  */
711
886
  path?: string;
@@ -715,16 +890,48 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
715
890
  *
716
891
  * Use this to open to particular page in the app. To open to a specific
717
892
  * path within the app, use the `path` attribute which is more flexible.
893
+ *
894
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
895
+ *
896
+ * @example
897
+ * ```js
898
+ * const embed = new AppEmbed('#tsEmbed', {
899
+ * ... // other options
900
+ * pageId : Page.Answers | Page.Data
901
+ * })
902
+ * ```
718
903
  */
719
904
  pageId?: Page;
720
905
  /**
721
906
  * This puts a filter tag on the application. All metadata lists in the
722
907
  * application, such as Liveboards and answers, would be filtered by this
723
908
  * tag.
909
+ *
910
+ * @version SDK: 1.1.0 | Thoughtspot: 9.4.0.cl
911
+ * @example
912
+ * ```js
913
+ * const embed = new AppEmbed('#tsEmbed', {
914
+ * ... // other options
915
+ * tag:'value',
916
+ * })
917
+ * ```
724
918
  */
725
919
  tag?: string;
726
920
  /**
727
921
  * The array of GUIDs to be hidden
922
+ *
923
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
924
+ *
925
+ * @example
926
+ * ```js
927
+ * const embed = new AppEmbed('#tsEmbed', {
928
+ * ... // other options
929
+ * hideObjects: [
930
+ * '430496d6-6903-4601-937e-2c691821af3c',
931
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
932
+ * ]
933
+ * })
934
+ * ```
728
935
  */
729
936
  hideObjects?: string[];
730
937
  /**
@@ -737,8 +944,17 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
737
944
  liveboardV2?: boolean;
738
945
  /**
739
946
  * If set to true, the Search Assist feature is enabled.
947
+ * @default true
740
948
  *
741
949
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
950
+ *
951
+ * @example
952
+ * ```js
953
+ * const embed = new AppEmbed('#tsEmbed', {
954
+ * ... // other options
955
+ * enableSearchAssist: true,
956
+ * })
957
+ * ```
742
958
  */
743
959
  enableSearchAssist?: boolean;
744
960
  /**
@@ -746,6 +962,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
746
962
  * according to the height of the pages which support fullHeight mode.
747
963
  *
748
964
  * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
965
+ *
966
+ * @example
967
+ * ```js
968
+ * const embed = new AppEmbed('#tsEmbed', {
969
+ * ... // other options
970
+ * fullHeight: true,
971
+ * })
972
+ * ```
749
973
  */
750
974
  fullHeight?: boolean;
751
975
  /**
@@ -761,6 +985,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
761
985
  *
762
986
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
763
987
  * @default false
988
+ *
989
+ * @example
990
+ * ```js
991
+ * const embed = new AppEmbed('#tsEmbed', {
992
+ * ... // other options
993
+ * hideLiveboardHeader : true,
994
+ * })
995
+ * ```
764
996
  */
765
997
  hideLiveboardHeader?: boolean;
766
998
  /**
@@ -768,6 +1000,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
768
1000
  *
769
1001
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
770
1002
  * @default false
1003
+ *
1004
+ * @example
1005
+ * ```js
1006
+ * const embed = new AppEmbed('#tsEmbed', {
1007
+ * ... // other options
1008
+ * showLiveboardTitle:true,
1009
+ * })
1010
+ * ```
771
1011
  */
772
1012
  showLiveboardTitle?: boolean;
773
1013
  /**
@@ -775,6 +1015,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
775
1015
  *
776
1016
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
777
1017
  * @default false
1018
+ *
1019
+ * @example
1020
+ * ```js
1021
+ * const embed = new AppEmbed('#tsEmbed', {
1022
+ * ... // other options
1023
+ * showLiveboardDescription:true,
1024
+ * })
1025
+ * ```
778
1026
  */
779
1027
  showLiveboardDescription?: boolean;
780
1028
  /**
@@ -782,6 +1030,14 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
782
1030
  *
783
1031
  * @default false
784
1032
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
1033
+ *
1034
+ * @example
1035
+ * ```js
1036
+ * const embed = new AppEmbed('#tsEmbed', {
1037
+ * ... // other options
1038
+ * modularHomeExperience : true,
1039
+ * })
1040
+ * ```
785
1041
  */
786
1042
  modularHomeExperience?: boolean;
787
1043
  /**
@@ -880,6 +1136,14 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
880
1136
  * incrementally as users scroll the page to view the charts and tables.
881
1137
  *
882
1138
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1139
+ *
1140
+ * @example
1141
+ * ```js
1142
+ * const embed = new LiveboardEmbed('#embed', {
1143
+ * ... // other liveboard view config
1144
+ * fullHeight: true,
1145
+ * });
1146
+ * ```
883
1147
  */
884
1148
  fullHeight?: boolean;
885
1149
  /**
@@ -889,10 +1153,28 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
889
1153
  *
890
1154
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
891
1155
  * @default 500
1156
+ * @example
1157
+ * ```js
1158
+ * const embed = new LiveboardEmbed('#embed', {
1159
+ * ... // other liveboard view config
1160
+ * fullHeight: true,
1161
+ * defaultHeight: 600,
1162
+ * });
1163
+ * ```
892
1164
  */
893
1165
  defaultHeight?: number;
894
1166
  /**
895
1167
  * @Deprecated If set to true, the context menu in visualizations will be enabled.
1168
+ *
1169
+ * @example
1170
+ * ```js
1171
+ * const embed = new LiveboardEmbed('#tsEmbed', {
1172
+ * ... // other options
1173
+ * enableVizTransformations:true,
1174
+ * })
1175
+ * ```
1176
+ *
1177
+ * @version: SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
896
1178
  */
897
1179
  enableVizTransformations?: boolean;
898
1180
  /**
@@ -900,6 +1182,12 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
900
1182
  * Use either liveboardId or pinboardId to reference the Liveboard to embed.
901
1183
  *
902
1184
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
1185
+ * @example
1186
+ * ```js
1187
+ * const embed = new LiveboardEmbed('#embed-container', {
1188
+ * ... // other options
1189
+ * liveboardId:id of liveboard,
1190
+ * })
903
1191
  */
904
1192
  liveboardId?: string;
905
1193
  /**
@@ -910,6 +1198,16 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
910
1198
  pinboardId?: string;
911
1199
  /**
912
1200
  * The visualization within the Liveboard to display.
1201
+ *
1202
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1203
+ *
1204
+ * @example
1205
+ * ```js
1206
+ * const embed = new LiveboardEmbed('#embed-container', {
1207
+ * ... // other options
1208
+ * vizId:'430496d6-6903-4601-937e-2c691821af3c',
1209
+ * })
1210
+ * ```
913
1211
  */
914
1212
  vizId?: string;
915
1213
  /**
@@ -917,6 +1215,13 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
917
1215
  * Liveboard page will be read-only (no X buttons)
918
1216
  *
919
1217
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw
1218
+ * @example
1219
+ * ```js
1220
+ * const embed = new LiveboardEmbed('#embed-container', {
1221
+ * ... // other options
1222
+ * preventLiveboardFilterRemoval:true,
1223
+ * })
1224
+ * ```
920
1225
  */
921
1226
  preventLiveboardFilterRemoval?: boolean;
922
1227
  /**
@@ -925,6 +1230,16 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
925
1230
  * event.
926
1231
  *
927
1232
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1233
+ *
1234
+ * @example
1235
+ * ```js
1236
+ * const embed = new LiveboardEmbed('#embed-container', {
1237
+ * ... // other options
1238
+ * visibleVizs: [
1239
+ * '430496d6-6903-4601-937e-2c691821af3c',
1240
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
1241
+ * ]
1242
+ * })
928
1243
  */
929
1244
  visibleVizs?: string[];
930
1245
  /**
@@ -938,12 +1253,26 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
938
1253
  * new Liveboard experience mode.
939
1254
  *
940
1255
  * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
1256
+ * @example
1257
+ * ```js
1258
+ * const embed = new LiveboardEmbed('#embed-container', {
1259
+ * ... // other options
1260
+ * liveboardV2:true,
1261
+ * })
1262
+ * ```
941
1263
  */
942
1264
  liveboardV2?: boolean;
943
1265
  /**
944
1266
  * Set a Liveboard tab as an active tab.
945
1267
  * Specify the tab ID.
946
1268
  *
1269
+ * @example
1270
+ * ```js
1271
+ * const embed = new LiveboardEmbed('#tsEmbed', {
1272
+ * ... // other options
1273
+ * activeTabId:'id-1234',
1274
+ * })
1275
+ * ```
947
1276
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
948
1277
  */
949
1278
  activeTabId?: string;
@@ -951,6 +1280,14 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
951
1280
  * Show or hide the tab panel of the embedded Liveboard.
952
1281
  *
953
1282
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
1283
+ *
1284
+ * @example
1285
+ * ```js
1286
+ * const embed = new LiveboardEmbed('#embed-container', {
1287
+ * ... // other options
1288
+ * hideTabPanel:true,
1289
+ * })
1290
+ * ```
954
1291
  */
955
1292
  hideTabPanel?: boolean;
956
1293
  /**
@@ -958,20 +1295,41 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
958
1295
  *
959
1296
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
960
1297
  * @default false
1298
+ * @example
1299
+ * ```js
1300
+ * const embed = new LiveboardEmbed('#embed', {
1301
+ * ... // other liveboard view config
1302
+ * hideLiveboardHeader:true,
1303
+ * });
1304
+ * ```
961
1305
  */
962
1306
  hideLiveboardHeader?: boolean;
963
1307
  /**
964
1308
  * Show or hide the Liveboard title.
965
- *
966
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
967
1309
  * @default false
1310
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1311
+ *
1312
+ * @example
1313
+ * ```js
1314
+ * const embed = new LiveboardEmbed('#embed-container', {
1315
+ * ... // other options
1316
+ * showLiveboardTitle:true,
1317
+ * })
1318
+ * ```
968
1319
  */
969
1320
  showLiveboardTitle?: boolean;
970
1321
  /**
971
1322
  * Show or hide the Liveboard description.
972
- *
973
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
974
1323
  * @default false
1324
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1325
+ *
1326
+ * @example
1327
+ * ```js
1328
+ * const embed = new LiveboardEmbed('#embed-container', {
1329
+ * ... // other options
1330
+ * showLiveboardDescription:true,
1331
+ * })
1332
+ * ```
975
1333
  */
976
1334
  showLiveboardDescription?: boolean;
977
1335
  /**
@@ -992,8 +1350,15 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
992
1350
  /**
993
1351
  * enable or disable ask sage
994
1352
  *
995
- * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
996
1353
  * @default false
1354
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
1355
+ * @example
1356
+ * ```js
1357
+ * const embed = new SearchEmbed('#tsEmbed', {
1358
+ * ... // other options
1359
+ * enableAskSage:true,
1360
+ * })
1361
+ * ```
997
1362
  */
998
1363
  enableAskSage?: boolean;
999
1364
  }
@@ -1670,8 +2035,21 @@ export interface ViewConfig {
1670
2035
  */
1671
2036
  layoutConfig?: LayoutConfig;
1672
2037
  /**
1673
- * The <b>width</b> and <b>height</b> dimensions to render an embedded
2038
+ * The width and height dimensions to render an embedded
1674
2039
  * object inside your app. Specify the values in pixels or percentage.
2040
+ *
2041
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
2042
+ *
2043
+ * @example
2044
+ * ```js
2045
+ * const embed = new LiveboardEmbed('#embed', {
2046
+ * ... // other liveboard view config
2047
+ * frameParams: {
2048
+ * width: '500px' | '50%',
2049
+ * height: '400px' | '60%',
2050
+ * },
2051
+ * });
2052
+ * ```
1675
2053
  */
1676
2054
  frameParams?: FrameParams;
1677
2055
  /**
@@ -1688,6 +2066,7 @@ export interface ViewConfig {
1688
2066
  * for the user.
1689
2067
  * Use this to disable actions.
1690
2068
  *
2069
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1691
2070
  * @example
1692
2071
  * ```js
1693
2072
  * const embed = new LiveboardEmbed('#embed', {
@@ -1699,6 +2078,15 @@ export interface ViewConfig {
1699
2078
  disabledActions?: Action[];
1700
2079
  /**
1701
2080
  * The tooltip to display for disabled actions.
2081
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2082
+ * @example
2083
+ * ```js
2084
+ * const embed = new LiveboardEmbed('#embed', {
2085
+ * ... // other liveboard view config
2086
+ * disabledActions: [Action.Download, Action.Save]
2087
+ * disabledActionReason: "Reason for disabling",
2088
+ * });
2089
+ * ```
1702
2090
  */
1703
2091
  disabledActionReason?: string;
1704
2092
  /**
@@ -1706,6 +2094,8 @@ export interface ViewConfig {
1706
2094
  * This actions will be hidden from the user.
1707
2095
  * Use this to hide an action.
1708
2096
  *
2097
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2098
+ *
1709
2099
  * @example
1710
2100
  * ```js
1711
2101
  * const embed = new LiveboardEmbed('#embed', {
@@ -1726,17 +2116,49 @@ export interface ViewConfig {
1726
2116
  *
1727
2117
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1728
2118
  * @important
2119
+ *
2120
+ * @example
2121
+ * ```js
2122
+ * const embed = new LiveboardEmbed('#embed', {
2123
+ * ... // other liveboard view config
2124
+ * visibleActions: [Action.Download, Action.Export]
2125
+ * });
2126
+ * ```
1729
2127
  */
1730
2128
  visibleActions?: Action[];
1731
2129
  /**
1732
2130
  * Show alert messages and toast messages in the embedded view.
1733
2131
  *
1734
2132
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2133
+ *
2134
+ * @example
2135
+ * ```js
2136
+ * const embed = new LiveboardEmbed('#embed-container', {
2137
+ * ... // other options
2138
+ * showAlerts:true,
2139
+ * })
2140
+ * ```
1735
2141
  */
1736
2142
  showAlerts?: boolean;
1737
2143
  /**
1738
2144
  * The list of runtime filters to apply to a search answer,
1739
2145
  * visualization, or Liveboard.
2146
+ *
2147
+ * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2148
+ *
2149
+ * @example
2150
+ * ```js
2151
+ * const embed = new LiveboardEmbed('#embed-container', {
2152
+ * ... // other options
2153
+ * runtimeFilters: [
2154
+ * {
2155
+ * columnName: 'value',
2156
+ * operator: RuntimeFilterOp.EQ,
2157
+ * values: ['string' | 123 | true],
2158
+ * },
2159
+ * ],
2160
+ * })
2161
+ * ```
1740
2162
  */
1741
2163
  runtimeFilters?: RuntimeFilter[];
1742
2164
  /**
@@ -1744,12 +2166,32 @@ export interface ViewConfig {
1744
2166
  * visualization, or Liveboard.
1745
2167
  *
1746
2168
  * @version SDK : 1.25.0 | Thoughtspot: 9.2.0.cl, 9.5.0.sw
2169
+ *
2170
+ * @example
2171
+ * ```js
2172
+ * const embed = new LiveboardEmbed('#embed-container', {
2173
+ * ... // other options
2174
+ * runtimeParameters: [
2175
+ * {
2176
+ * name: 'value',
2177
+ * value: 'string' | 123 | true,
2178
+ * },
2179
+ * ],
2180
+ * })
2181
+ * ```
1747
2182
  */
1748
2183
  runtimeParameters?: RuntimeParameter[];
1749
2184
  /**
1750
2185
  * The locale/language to use for the embedded view.
1751
2186
  *
1752
2187
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
2188
+ * @example
2189
+ * ```js
2190
+ * const embed = new LiveboardEmbed('#embed-container', {
2191
+ * ... // other options
2192
+ * locale:'en',
2193
+ * })
2194
+ * ```
1753
2195
  */
1754
2196
  locale?: string;
1755
2197
  /**
@@ -1759,7 +2201,16 @@ export interface ViewConfig {
1759
2201
  * Warning: This option is for advanced use only and is used internally
1760
2202
  * to control embed behavior in non-regular ways. We do not publish the
1761
2203
  * list of supported keys and values associated with each.
1762
- *
2204
+ * @example
2205
+ * ```js
2206
+ * const embed = new LiveboardEmbed('#embed', {
2207
+ * ... // other liveboard view config
2208
+ * additionalFlags: {
2209
+ * flag1: 'value1',
2210
+ * flag2: 'value2'
2211
+ * }
2212
+ * });
2213
+ * ```
1763
2214
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1764
2215
  */
1765
2216
  additionalFlags?: {
@@ -1776,18 +2227,42 @@ export interface ViewConfig {
1776
2227
  /**
1777
2228
  * Insert as a sibling of the target container, instead of appending to a
1778
2229
  * child inside it.
2230
+ *
2231
+ * @version SDK: 1.2.0 | Thoughtspot: 9.0.0.cl, 9.0.0.sw
2232
+ *
2233
+ * @example
2234
+ * ```js
2235
+ * const embed = new LiveboardEmbed('#embed-container', {
2236
+ * ... // other options
2237
+ * insertAsSibling:true,
2238
+ * })
2239
+ * ```
1779
2240
  */
1780
2241
  insertAsSibling?: boolean;
1781
2242
  /**
1782
2243
  * flag to set ContextMenu Trigger to either left or right click.
1783
2244
  *
2245
+ * @example
2246
+ * ```js
2247
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2248
+ * ... // other options
2249
+ * contextMenuTrigger:ContextMenuTriggerOptions.LEFT_CLICK || RIGHT_CLICK,
2250
+ * })
2251
+ * ```
1784
2252
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1785
2253
  */
1786
2254
  contextMenuTrigger?: ContextMenuTriggerOptions;
1787
2255
  /**
1788
- * flag to override openNew tab context menu link
2256
+ * Flag to override openNew tab context menu link
1789
2257
  *
1790
2258
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2259
+ * @example
2260
+ * ```js
2261
+ * const embed = new LiveboardEmbed('#embed-container', {
2262
+ * ... // other options
2263
+ * linkOverride:false,
2264
+ * })
2265
+ * ```
1791
2266
  */
1792
2267
  linkOverride?: boolean;
1793
2268
  /**
@@ -1845,6 +2320,14 @@ export interface ViewConfig {
1845
2320
  * `modularHomeExperience` to `true` (available in Early Access from 9.12 forward).
1846
2321
  *
1847
2322
  * @version SDK: 1.27.9 | Thoughtspot: 9.12.0.cl
2323
+ * @example
2324
+ * ```js
2325
+ * const embed = new AppEmbed('#tsEmbed', {
2326
+ * ... // other options
2327
+ * hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning],
2328
+ * })
2329
+ * ```
2330
+ *
1848
2331
  */
1849
2332
  hiddenHomepageModules?: HomepageModule[];
1850
2333
  /**
@@ -1856,6 +2339,14 @@ export interface ViewConfig {
1856
2339
  * `modularHomeExperience` to `true` (available in Early Access from 9.12.0.cl onwards).
1857
2340
  *
1858
2341
  * @version SDK: 1.27.9| Thoughtspot: 9.12.0.cl
2342
+ *
2343
+ * @example
2344
+ * ```js
2345
+ * const embed = new AppEmbed('#tsEmbed', {
2346
+ * ... // other options
2347
+ * reorderedHomepageModules:[HomepageModule.Favorite,HomepageModule.MyLibrary]
2348
+ * })
2349
+ * ```
1859
2350
  */
1860
2351
  reorderedHomepageModules?: HomepageModule[];
1861
2352
  /**
@@ -1864,13 +2355,18 @@ export interface ViewConfig {
1864
2355
  *
1865
2356
  * Use either `visibleTabs` or `hiddenTabs`.
1866
2357
  *
2358
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2359
+ *
1867
2360
  * @example
1868
2361
  * ```js
1869
- * visibleTabs: [
1870
- * '430496d6-6903-4601-937e-2c691821af3c',
1871
- * 'f547ec54-2a37-4516-a222-2b06719af726']
2362
+ * const embed = new LiveboardEmbed('#embed-container', {
2363
+ * ... // other options
2364
+ * visibleTabs: [
2365
+ * '430496d6-6903-4601-937e-2c691821af3c',
2366
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
2367
+ * ]
2368
+ * })
1872
2369
  * ```
1873
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1874
2370
  */
1875
2371
  visibleTabs?: string[];
1876
2372
  /**
@@ -1878,8 +2374,14 @@ export interface ViewConfig {
1878
2374
  * There are 8 eight home navigation list items.
1879
2375
  * To hide these items, specify the string in the array.
1880
2376
  *
2377
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
2378
+ *
2379
+ * * @example
1881
2380
  * ```js
1882
- * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
2381
+ * const embed = new AppEmbed('#tsEmbed', {
2382
+ * ... // other options
2383
+ * hiddenHomeLeftNavItems : [HomeLeftNavItem.Home,HomeLeftNavItem.Answers],
2384
+ * })
1883
2385
  * ```
1884
2386
  *
1885
2387
  * **Note**: This option does not apply to the classic homepage.
@@ -1913,7 +2415,10 @@ export interface ViewConfig {
1913
2415
  *
1914
2416
  * @type {boolean}
1915
2417
  * @default false
2418
+ * @version SDK: 1.24.0 | ThoughtSpot:9.4.0.cl, 9.4.0.sw
2419
+ *
1916
2420
  * @example
2421
+ * ```js
1917
2422
  * // Disable tracking PreRender size in the configuration
1918
2423
  * const config = {
1919
2424
  * doNotTrackPreRenderSize: true,
@@ -1921,6 +2426,7 @@ export interface ViewConfig {
1921
2426
  *
1922
2427
  * // Instantiate an object with the configuration
1923
2428
  * const myComponent = new MyComponent(config);
2429
+ * ```
1924
2430
  */
1925
2431
  doNotTrackPreRenderSize?: boolean;
1926
2432
  /**
@@ -6162,3 +6668,12 @@ export declare function testResetMixpanel(): void;
6162
6668
  */
6163
6669
  export declare const tokenizedFetch: typeof fetch;
6164
6670
 
6671
+ export declare const getAuthenticationToken: (embedConfig: EmbedConfig) => Promise<string>;
6672
+ /**
6673
+ * Resets the auth token and a new token will be fetched on the next request.
6674
+ *
6675
+ * @version SDK: 1.28.0 | ThoughtSpot: *
6676
+ * @group Authentication / Init
6677
+ */
6678
+ export declare const resetCachedAuthToken: () => void;
6679
+