@thoughtspot/visual-embed-sdk 1.33.0-alpha.2 → 1.33.0

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 (198) hide show
  1. package/cjs/package.json +6 -24
  2. package/cjs/src/css-variables.d.ts +46 -3
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +47 -27
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +10 -1
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +32 -0
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/base.d.ts +35 -33
  11. package/cjs/src/embed/base.d.ts.map +1 -1
  12. package/cjs/src/embed/base.js +35 -33
  13. package/cjs/src/embed/base.js.map +1 -1
  14. package/cjs/src/embed/embed.spec.js +0 -19
  15. package/cjs/src/embed/embed.spec.js.map +1 -1
  16. package/cjs/src/embed/liveboard.d.ts +42 -0
  17. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  18. package/cjs/src/embed/liveboard.js +6 -1
  19. package/cjs/src/embed/liveboard.js.map +1 -1
  20. package/cjs/src/embed/liveboard.spec.js +43 -0
  21. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  22. package/cjs/src/embed/search.d.ts +0 -26
  23. package/cjs/src/embed/search.d.ts.map +1 -1
  24. package/cjs/src/embed/search.js.map +1 -1
  25. package/cjs/src/embed/ts-embed.d.ts +0 -1
  26. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  27. package/cjs/src/embed/ts-embed.js +8 -12
  28. package/cjs/src/embed/ts-embed.js.map +1 -1
  29. package/cjs/src/embed/ts-embed.spec.js +0 -9
  30. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  31. package/cjs/src/mixpanel-service.d.ts +4 -0
  32. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  33. package/cjs/src/mixpanel-service.js +4 -0
  34. package/cjs/src/mixpanel-service.js.map +1 -1
  35. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  36. package/cjs/src/tokenizedFetch.js +5 -1
  37. package/cjs/src/tokenizedFetch.js.map +1 -1
  38. package/cjs/src/types.d.ts +179 -22
  39. package/cjs/src/types.d.ts.map +1 -1
  40. package/cjs/src/types.js +143 -12
  41. package/cjs/src/types.js.map +1 -1
  42. package/cjs/src/utils/authService/authService.spec.js +3 -1
  43. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  44. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  45. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  46. package/cjs/src/utils/graphql/answerService/answer-queries.js +9 -2
  47. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  48. package/cjs/src/utils/graphql/answerService/answerService.d.ts +15 -0
  49. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  50. package/cjs/src/utils/graphql/answerService/answerService.js +25 -0
  51. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  52. package/cjs/src/utils/graphql/answerService/answerService.spec.js +53 -0
  53. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  54. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  55. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  56. package/cjs/src/utils/graphql/graphql-request.spec.js +36 -0
  57. package/cjs/src/utils/graphql/graphql-request.spec.js.map +1 -0
  58. package/cjs/src/utils/processData.js +2 -2
  59. package/cjs/src/utils/processData.js.map +1 -1
  60. package/cjs/src/utils/processData.spec.js +14 -0
  61. package/cjs/src/utils/processData.spec.js.map +1 -1
  62. package/cjs/src/utils/processTrigger.d.ts +1 -0
  63. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  64. package/cjs/src/utils/processTrigger.js +3 -3
  65. package/cjs/src/utils/processTrigger.js.map +1 -1
  66. package/cjs/src/utils/processTrigger.spec.js +10 -0
  67. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  68. package/cjs/src/utils.d.ts.map +1 -1
  69. package/cjs/src/utils.js +1 -3
  70. package/cjs/src/utils.js.map +1 -1
  71. package/dist/src/css-variables.d.ts +46 -3
  72. package/dist/src/css-variables.d.ts.map +1 -1
  73. package/dist/src/embed/app.d.ts +47 -27
  74. package/dist/src/embed/app.d.ts.map +1 -1
  75. package/dist/src/embed/base.d.ts +35 -33
  76. package/dist/src/embed/base.d.ts.map +1 -1
  77. package/dist/src/embed/liveboard.d.ts +42 -0
  78. package/dist/src/embed/liveboard.d.ts.map +1 -1
  79. package/dist/src/embed/search.d.ts +0 -26
  80. package/dist/src/embed/search.d.ts.map +1 -1
  81. package/dist/src/embed/ts-embed.d.ts +0 -1
  82. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  83. package/dist/src/mixpanel-service.d.ts +4 -0
  84. package/dist/src/mixpanel-service.d.ts.map +1 -1
  85. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  86. package/dist/src/types.d.ts +179 -22
  87. package/dist/src/types.d.ts.map +1 -1
  88. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  89. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  90. package/dist/src/utils/graphql/answerService/answerService.d.ts +15 -0
  91. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  92. package/dist/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  93. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  94. package/dist/src/utils/processTrigger.d.ts +1 -0
  95. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  96. package/dist/src/utils.d.ts.map +1 -1
  97. package/dist/tsembed-react.es.js +442 -107
  98. package/dist/tsembed-react.js +385 -106
  99. package/dist/tsembed.es.js +477 -140
  100. package/dist/tsembed.js +420 -139
  101. package/dist/visual-embed-sdk-react-full.d.ts +368 -112
  102. package/dist/visual-embed-sdk-react.d.ts +368 -112
  103. package/dist/visual-embed-sdk.d.ts +368 -112
  104. package/lib/package.json +6 -24
  105. package/lib/src/css-variables.d.ts +46 -3
  106. package/lib/src/css-variables.d.ts.map +1 -1
  107. package/lib/src/embed/app.d.ts +47 -27
  108. package/lib/src/embed/app.d.ts.map +1 -1
  109. package/lib/src/embed/app.js +10 -1
  110. package/lib/src/embed/app.js.map +1 -1
  111. package/lib/src/embed/app.spec.js +32 -0
  112. package/lib/src/embed/app.spec.js.map +1 -1
  113. package/lib/src/embed/base.d.ts +35 -33
  114. package/lib/src/embed/base.d.ts.map +1 -1
  115. package/lib/src/embed/base.js +35 -33
  116. package/lib/src/embed/base.js.map +1 -1
  117. package/lib/src/embed/embed.spec.js +0 -19
  118. package/lib/src/embed/embed.spec.js.map +1 -1
  119. package/lib/src/embed/liveboard.d.ts +42 -0
  120. package/lib/src/embed/liveboard.d.ts.map +1 -1
  121. package/lib/src/embed/liveboard.js +6 -1
  122. package/lib/src/embed/liveboard.js.map +1 -1
  123. package/lib/src/embed/liveboard.spec.js +43 -0
  124. package/lib/src/embed/liveboard.spec.js.map +1 -1
  125. package/lib/src/embed/search.d.ts +0 -26
  126. package/lib/src/embed/search.d.ts.map +1 -1
  127. package/lib/src/embed/search.js.map +1 -1
  128. package/lib/src/embed/ts-embed.d.ts +0 -1
  129. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  130. package/lib/src/embed/ts-embed.js +8 -12
  131. package/lib/src/embed/ts-embed.js.map +1 -1
  132. package/lib/src/embed/ts-embed.spec.js +0 -9
  133. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  134. package/lib/src/mixpanel-service.d.ts +4 -0
  135. package/lib/src/mixpanel-service.d.ts.map +1 -1
  136. package/lib/src/mixpanel-service.js +4 -0
  137. package/lib/src/mixpanel-service.js.map +1 -1
  138. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  139. package/lib/src/tokenizedFetch.js +5 -1
  140. package/lib/src/tokenizedFetch.js.map +1 -1
  141. package/lib/src/types.d.ts +179 -22
  142. package/lib/src/types.d.ts.map +1 -1
  143. package/lib/src/types.js +143 -12
  144. package/lib/src/types.js.map +1 -1
  145. package/lib/src/utils/authService/authService.spec.js +3 -1
  146. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  147. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  148. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  149. package/lib/src/utils/graphql/answerService/answer-queries.js +8 -1
  150. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  151. package/lib/src/utils/graphql/answerService/answerService.d.ts +15 -0
  152. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  153. package/lib/src/utils/graphql/answerService/answerService.js +25 -0
  154. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  155. package/lib/src/utils/graphql/answerService/answerService.spec.js +54 -1
  156. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  157. package/lib/src/utils/graphql/graphql-request.spec.d.ts +2 -0
  158. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +1 -0
  159. package/lib/src/utils/graphql/graphql-request.spec.js +33 -0
  160. package/lib/src/utils/graphql/graphql-request.spec.js.map +1 -0
  161. package/lib/src/utils/processData.js +2 -2
  162. package/lib/src/utils/processData.js.map +1 -1
  163. package/lib/src/utils/processData.spec.js +14 -0
  164. package/lib/src/utils/processData.spec.js.map +1 -1
  165. package/lib/src/utils/processTrigger.d.ts +1 -0
  166. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  167. package/lib/src/utils/processTrigger.js +1 -1
  168. package/lib/src/utils/processTrigger.js.map +1 -1
  169. package/lib/src/utils/processTrigger.spec.js +10 -0
  170. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  171. package/lib/src/utils.d.ts.map +1 -1
  172. package/lib/src/utils.js +1 -3
  173. package/lib/src/utils.js.map +1 -1
  174. package/lib/src/visual-embed-sdk.d.ts +368 -112
  175. package/package.json +6 -24
  176. package/src/css-variables.ts +49 -3
  177. package/src/embed/app.spec.ts +47 -0
  178. package/src/embed/app.ts +54 -26
  179. package/src/embed/base.ts +35 -33
  180. package/src/embed/embed.spec.ts +0 -22
  181. package/src/embed/liveboard.spec.ts +62 -0
  182. package/src/embed/liveboard.ts +52 -0
  183. package/src/embed/search.ts +0 -26
  184. package/src/embed/ts-embed.spec.ts +0 -11
  185. package/src/embed/ts-embed.ts +9 -12
  186. package/src/mixpanel-service.ts +4 -0
  187. package/src/tokenizedFetch.ts +5 -1
  188. package/src/types.ts +180 -21
  189. package/src/utils/authService/authService.spec.ts +3 -1
  190. package/src/utils/graphql/answerService/answer-queries.ts +9 -1
  191. package/src/utils/graphql/answerService/answerService.spec.ts +69 -0
  192. package/src/utils/graphql/answerService/answerService.ts +35 -0
  193. package/src/utils/graphql/graphql-request.spec.ts +38 -0
  194. package/src/utils/processData.spec.ts +16 -0
  195. package/src/utils/processData.ts +2 -2
  196. package/src/utils/processTrigger.spec.ts +19 -0
  197. package/src/utils/processTrigger.ts +1 -1
  198. package/src/utils.ts +1 -3
@@ -653,19 +653,6 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
653
653
  * ```
654
654
  */
655
655
  hideSearchBar?: boolean;
656
- /**
657
- * Flag to control Data panel experience
658
- * @default true
659
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
660
- * @example
661
- * ```js
662
- * const embed = new SearchEmbed('#tsEmbed', {
663
- * ... // other options
664
- * dataPanelV2:false,
665
- * })
666
- * ```
667
- */
668
- dataPanelV2?: boolean;
669
656
  /**
670
657
  * Flag to set if last selected dataSource should be used
671
658
  * @version: SDK: 1.24.0
@@ -678,19 +665,6 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
678
665
  * @deprecated Use {@link collapseSearchBar} instead
679
666
  */
680
667
  collapseSearchBarInitially?: boolean;
681
- /**
682
- * To enable custom column groups in data panel v2
683
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
684
- * @default false
685
- * @example
686
- * ```js
687
- * const embed = new SearchEmbed('#tsEmbed', {
688
- * ... // other options
689
- * enableCustomColumnGroups: true,
690
- * });
691
- * ```
692
- */
693
- enableCustomColumnGroups?: boolean;
694
668
  /**
695
669
  * Flag to enable onBeforeSearchExecute Embed Event
696
670
  * @version: SDK: 1.29.0 | Thoughtspot: 10.1.0.cl
@@ -795,7 +769,11 @@ export declare enum Page {
795
769
  /**
796
770
  * SpotIQ listing page
797
771
  */
798
- SpotIQ = "insights"
772
+ SpotIQ = "insights",
773
+ /**
774
+ * Monitor Alerts Page
775
+ */
776
+ Monitor = "monitor"
799
777
  }
800
778
  /**
801
779
  * Define the initial state os column custom group accordions
@@ -1006,19 +984,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1006
984
  * ```
1007
985
  */
1008
986
  fullHeight?: boolean;
1009
- /**
1010
- * Flag to control Data panel experience
1011
- * @default true
1012
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1013
- * @example
1014
- * ```js
1015
- * const embed = new AppEmbed('#tsEmbed', {
1016
- * ... // other options
1017
- * dataPanelV2: true,
1018
- * })
1019
- * ```
1020
- */
1021
- dataPanelV2?: boolean;
1022
987
  /**
1023
988
  * Show or hide Liveboard header
1024
989
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
@@ -1096,19 +1061,6 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1096
1061
  * @deprecated Use {@link collapseSearchBar} instead
1097
1062
  */
1098
1063
  collapseSearchBarInitially?: boolean;
1099
- /**
1100
- * To enable custom column groups in data panel v2.
1101
- * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
1102
- * @default false
1103
- * @example
1104
- * ```js
1105
- * const embed = new AppEmbed('#embed', {
1106
- * ... // other app view config
1107
- * enableCustomColumnGroups: true,
1108
- * });
1109
- * ```
1110
- */
1111
- enableCustomColumnGroups?: boolean;
1112
1064
  /**
1113
1065
  * This controls the initial behaviour of custom column groups accordion.
1114
1066
  * It takes DataPanelCustomColumnGroupsAccordionState enum values as input.
@@ -1152,6 +1104,48 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1152
1104
  * @version SDK : 1.33.0 | Thoughtspot : 10.2.0.cl
1153
1105
  */
1154
1106
  homePageSearchBarMode?: HomePageSearchBarMode;
1107
+ /**
1108
+ * This flag is used to enable the compact header in liveboard
1109
+ * @type {boolean}
1110
+ * @default false
1111
+ * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
1112
+ * @example
1113
+ * ```js
1114
+ * const embed = new AppEmbed('#embed-container', {
1115
+ * ... // other options
1116
+ * isLiveboardCompactHeaderEnabled: true,
1117
+ * })
1118
+ * ```
1119
+ */
1120
+ isLiveboardCompactHeaderEnabled?: boolean;
1121
+ /**
1122
+ * This flag is used to show/hide verified Icon in liveboard compact header
1123
+ * @type {boolean}
1124
+ * @default true
1125
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1126
+ * @example
1127
+ * ```js
1128
+ * const embed = new AppEmbed('#embed-container', {
1129
+ * ... // other options
1130
+ * showLiveboardVerifiedBadge: true,
1131
+ * })
1132
+ * ```
1133
+ */
1134
+ showLiveboardVerifiedBadge?: boolean;
1135
+ /**
1136
+ * This flag is used to show/hide re-verify banner in liveboard compact header
1137
+ * @type {boolean}
1138
+ * @default true
1139
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1140
+ * @example
1141
+ * ```js
1142
+ * const embed = new AppEmbed('#embed-container', {
1143
+ * ... // other options
1144
+ * showLiveboardReverifyBanner: true,
1145
+ * })
1146
+ * ```
1147
+ */
1148
+ showLiveboardReverifyBanner?: boolean;
1155
1149
  }
1156
1150
  /**
1157
1151
  * Embeds full ThoughtSpot experience in a host application.
@@ -1461,6 +1455,48 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
1461
1455
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
1462
1456
  */
1463
1457
  showPreviewLoader?: boolean;
1458
+ /**
1459
+ * This flag is used to enable the compact header in liveboard
1460
+ * @type {boolean}
1461
+ * @default false
1462
+ * @version SDK: 1.35.0 | ThoughtSpot:10.3.0.cl
1463
+ * @example
1464
+ * ```js
1465
+ * const embed = new LiveboardEmbed('#embed-container', {
1466
+ * ... // other options
1467
+ * isLiveboardCompactHeaderEnabled: true,
1468
+ * })
1469
+ * ```
1470
+ */
1471
+ isLiveboardCompactHeaderEnabled?: boolean;
1472
+ /**
1473
+ * This flag is used to show/hide verified Icon in liveboard compact header
1474
+ * @type {boolean}
1475
+ * @default true
1476
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1477
+ * @example
1478
+ * ```js
1479
+ * const embed = new LiveboardEmbed('#embed-container', {
1480
+ * ... // other options
1481
+ * showLiveboardVerifiedBadge: true,
1482
+ * })
1483
+ * ```
1484
+ */
1485
+ showLiveboardVerifiedBadge?: boolean;
1486
+ /**
1487
+ * This flag is used to show/hide re-verify banner in liveboard compact header
1488
+ * @type {boolean}
1489
+ * @default true
1490
+ * @version SDK: 1.35.0 | ThoughtSpot:10.4.0.cl
1491
+ * @example
1492
+ * ```js
1493
+ * const embed = new LiveboardEmbed('#embed-container', {
1494
+ * ... // other options
1495
+ * showLiveboardReverifyBanner: true,
1496
+ * })
1497
+ * ```
1498
+ */
1499
+ showLiveboardReverifyBanner?: boolean;
1464
1500
  }
1465
1501
  /**
1466
1502
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
@@ -1602,22 +1638,23 @@ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise
1602
1638
  /**
1603
1639
  * Imports TML representation of the metadata objects into ThoughtSpot.
1604
1640
  * @param data
1641
+ * @returns imports TML data into ThoughtSpot
1605
1642
  * @example
1606
1643
  * ```js
1607
- * executeTML({
1608
- * //Array of metadata Tmls
1609
- metadata_tmls: [
1610
- "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
1611
- \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
1612
- ],
1613
- import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
1614
- create_new: false, // If selected, creates TML objects with new GUIDs.
1615
- }).then(result => {
1616
- console.log(result);
1617
- }).catch(error => {
1618
- console.error(error);
1619
- });
1620
- *
1644
+ * executeTML({
1645
+ * //Array of metadata Tmls in string format
1646
+ * metadata_tmls: [
1647
+ * "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\",
1648
+ * \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''"
1649
+ * ],
1650
+ * import_policy: 'PARTIAL', // Specifies the import policy for the TML import.
1651
+ * create_new: false, // If selected, creates TML objects with new GUIDs.
1652
+ * }).then(result => {
1653
+ * console.log(result);
1654
+ * }).catch(error => {
1655
+ * console.error(error);
1656
+ * });
1657
+ *```
1621
1658
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1622
1659
  * @group Global methods
1623
1660
  */
@@ -1626,27 +1663,28 @@ export declare const executeTML: (data: executeTMLInput) => Promise<any>;
1626
1663
  * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML
1627
1664
  * format.
1628
1665
  * @param data
1666
+ * @returns exports TML data
1629
1667
  * @example
1630
1668
  * ```js
1631
- exportTML({
1632
- metadata: [
1633
- {
1634
- type: "LIVEBOARD", //Metadata Type
1635
- identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
1636
- }
1637
- ],
1638
- export_associated: false,//indicates whether to export associated metadata objects
1639
- export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
1640
- //exporting a Liveboard and its associated objects, the API
1641
- //returns the Liveboard TML data with the FQNs of the referenced
1642
- //worksheet. If the exported TML data includes FQNs, you don't need
1643
- //to manually add FQNs of the referenced objects during TML import.
1644
- edoc_format: "JSON" //It takes JSON or YAML value
1645
- }).then(result => {
1646
- console.log(result);
1647
- }).catch(error => {
1648
- console.error(error);
1649
- });
1669
+ * exportTML({
1670
+ * metadata: [
1671
+ * {
1672
+ * type: "LIVEBOARD", //Metadata Type
1673
+ * identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id
1674
+ * }
1675
+ * ],
1676
+ * export_associated: false,//indicates whether to export associated metadata objects
1677
+ * export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are
1678
+ * //exporting a Liveboard and its associated objects, the API
1679
+ * //returns the Liveboard TML data with the FQNs of the referenced
1680
+ * //worksheet. If the exported TML data includes FQNs, you don't need
1681
+ * //to manually add FQNs of the referenced objects during TML import.
1682
+ * edoc_format: "JSON" //It takes JSON or YAML value
1683
+ * }).then(result => {
1684
+ * console.log(result);
1685
+ * }).catch(error => {
1686
+ * console.error(error);
1687
+ * });
1650
1688
  * ```
1651
1689
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1652
1690
  * @group Global methods
@@ -2320,13 +2358,6 @@ export interface EmbedConfig {
2320
2358
  * @default false
2321
2359
  */
2322
2360
  queueMultiRenders?: boolean;
2323
- /**
2324
- * Dynamic CSS URL to be injected in the loaded application.
2325
- * You would also need to set `style-src` in the CSP settings.
2326
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2327
- * @default ''
2328
- */
2329
- customCssUrl?: string;
2330
2361
  /**
2331
2362
  * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
2332
2363
  * additional call. This is slower and should be avoided. Listen to the
@@ -2455,6 +2486,12 @@ export interface EmbedConfig {
2455
2486
  * @version SDK: 1.28.5 | Thoughtspot: *
2456
2487
  */
2457
2488
  disableTokenVerification?: boolean;
2489
+ /**
2490
+ * This flag is used to disable showing the login failure page in the embedded app.
2491
+ *
2492
+ * @version SDK 1.32.3 | Thoughtspot: *
2493
+ */
2494
+ disableLoginFailurePage?: boolean;
2458
2495
  }
2459
2496
  export interface LayoutConfig {
2460
2497
  }
@@ -2577,11 +2614,12 @@ export interface ViewConfig {
2577
2614
  */
2578
2615
  visibleActions?: Action[];
2579
2616
  /**
2580
- * Show alert messages and toast messages in the embedded view.
2617
+ * Show alert messages and toast messages in the embedded
2618
+ * view in full app embed.
2581
2619
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2582
2620
  * @example
2583
2621
  * ```js
2584
- * const embed = new LiveboardEmbed('#embed-container', {
2622
+ * const embed = new AppEmbed('#embed-container', {
2585
2623
  * ... // other options
2586
2624
  * showAlerts:true,
2587
2625
  * })
@@ -2902,6 +2940,32 @@ export interface ViewConfig {
2902
2940
  * @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
2903
2941
  */
2904
2942
  disableRedirectionLinksInNewTab?: boolean;
2943
+ /**
2944
+ * Flag to control Data panel experience
2945
+ * @default true
2946
+ * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
2947
+ * @example
2948
+ * ```js
2949
+ * const embed = new AppEmbed('#tsEmbed', {
2950
+ * ... // other options
2951
+ * dataPanelV2: true,
2952
+ * })
2953
+ * ```
2954
+ */
2955
+ dataPanelV2?: boolean;
2956
+ /**
2957
+ * To enable custom column groups in data panel v2
2958
+ * @version SDK: 1.32.0 | Thoughtspot: 10.0.0.cl
2959
+ * @default false
2960
+ * @example
2961
+ * ```js
2962
+ * const embed = new SearchEmbed('#tsEmbed', {
2963
+ * ... // other options
2964
+ * enableCustomColumnGroups: true,
2965
+ * });
2966
+ * ```
2967
+ */
2968
+ enableCustomColumnGroups?: boolean;
2905
2969
  }
2906
2970
  /**
2907
2971
  * MessagePayload: Embed event payload: message type, data and status (start/end)
@@ -3098,6 +3162,28 @@ export interface RuntimeParameter {
3098
3162
  * console.log('Drilldown event', drilldown);
3099
3163
  * }));
3100
3164
  * ```
3165
+ *
3166
+ * If you are using React components for embedding, you can register to any
3167
+ * events from the `EmbedEvent` list by using the `on<EventName>` convention.
3168
+ * For example,`onAlert`, `onCopyToClipboard` and so on.
3169
+ *
3170
+ * @example
3171
+ * ```js
3172
+ * // ...
3173
+ * const MyComponent = ({ dataSources }) => {
3174
+ * const onLoad = () => {
3175
+ * console.log(EmbedEvent.Load, {});
3176
+ * };
3177
+ *
3178
+ * return (
3179
+ * <SearchEmbed
3180
+ * dataSources={dataSources}
3181
+ * onLoad = {logEvent("Load")}
3182
+ * />
3183
+ * );
3184
+ * };
3185
+ * ```
3186
+ *
3101
3187
  * @group Events
3102
3188
  */
3103
3189
  export declare enum EmbedEvent {
@@ -3966,21 +4052,61 @@ export declare enum EmbedEvent {
3966
4052
  */
3967
4053
  Rename = "rename",
3968
4054
  /**
3969
- * Emitted when user wants to intercept the search execution
4055
+ * Emitted if the user wants to intercept the search execution
4056
+ * and implement logic to decide whether to run the search or not
4057
+ *
4058
+ * Prerequisite: Set isOnBeforeGetVizDataInterceptEnabled : true
4059
+ * for this embed event to get emitted.
4060
+ *
4061
+ * @param: payload
4062
+ * @param: responder
4063
+ * Contains elements that lets developers define whether ThoughtSpot
4064
+ * will run the search or not, and if not, which error message to provide.
3970
4065
  *
3971
- * Set IsOnBeforeGetVizDataInterceptEnabled : true to use
3972
- * this embed event
4066
+ * execute: When execute returns true, the search will be run.
4067
+ * When execute returns false, the search will not be executed.
4068
+ *
4069
+ * error: Developers can customize the user facing message when execute is
4070
+ * set to false using the error parameter in responder
4071
+ *
4072
+ * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
3973
4073
  *
4074
+ * @example
3974
4075
  *```js
3975
- * searchEmbed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
4076
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
3976
4077
  * (payload, responder) => {
3977
4078
  * responder({
3978
4079
  * data: {
3979
- * execute: true,
3980
- * }})
4080
+ * execute:false,
4081
+ * error: {
4082
+ * //Provide a custom error message to explain to your end user
4083
+ * //why their search did not run
4084
+ * errorText: "This search query cannot be run.
4085
+ * Please contact your administrator for more details."
4086
+ * }
4087
+ * }})
4088
+ * })
4089
+ * ```
4090
+ *
4091
+ *```js
4092
+ * .on(EmbedEvent.OnBeforeGetVizDataIntercept,
4093
+ * (payload, responder) => {
4094
+ * const query = payload.data.data.answer.search_query
4095
+ * responder({
4096
+ * data: {
4097
+ * // returns true as long as the query does not include
4098
+ * // both the 'sales' AND the 'county' column
4099
+ * execute: !(query.includes("sales")&&query.includes("county")),
4100
+ * error: {
4101
+ * //Provide a custom error message to explain to your end user
4102
+ * // why their search did not run, and which searches are accepted by your custom logic.
4103
+ * errorText: "You can't use this query :" + query + ".
4104
+ * The 'sales' measures can never be used at the 'county' level.
4105
+ * Please try another measure, or remove 'county' from your search."
4106
+ * }
4107
+ * }})
3981
4108
  * })
3982
4109
  *```
3983
- * @version SDK : 1.29.0 | Thoughtspot : 10.2.0.cl
3984
4110
  */
3985
4111
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
3986
4112
  /**
@@ -3998,7 +4124,7 @@ export declare enum EmbedEvent {
3998
4124
  }
3999
4125
  /**
4000
4126
  * Event types that can be triggered by the host application
4001
- * to the embedded ThoughtSpot app
4127
+ * to the embedded ThoughtSpot app.
4002
4128
  *
4003
4129
  * To trigger an event use the corresponding
4004
4130
  * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
@@ -4015,6 +4141,40 @@ export declare enum EmbedEvent {
4015
4141
  * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
4016
4142
  * ]);
4017
4143
  * ```
4144
+ * @example
4145
+ * If using React components to embed, use the format shown in this example:
4146
+ *
4147
+ * ```js
4148
+ * const selectVizs = () => {
4149
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, [
4150
+ * "715e4613-c891-4884-be44-aa8d13701c06",
4151
+ * "3f84d633-e325-44b2-be25-c6650e5a49cf"
4152
+ * ]);
4153
+ * };
4154
+ * ```
4155
+ *
4156
+ *
4157
+ * You can also attach an Embed event to a Host event to trigger
4158
+ * a specific action as shown in this example:
4159
+ *
4160
+ * @example
4161
+ * ```js
4162
+ * const EmbeddedComponent = () => {
4163
+ * const embedRef = useRef(null); // import { useRef } from react
4164
+ * const onLiveboardRendered = () => {
4165
+ * embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
4166
+ * };
4167
+ *
4168
+ * return (
4169
+ * <LiveboardEmbed
4170
+ * ref={embedRef}
4171
+ * liveboardId="<liveboard-guid>"
4172
+ * onLiveboardRendered={onLiveboardRendered}
4173
+ * />
4174
+ * );
4175
+ * }
4176
+ * ```
4177
+ *
4018
4178
  * @group Events
4019
4179
  */
4020
4180
  export declare enum HostEvent {
@@ -4098,6 +4258,15 @@ export declare enum HostEvent {
4098
4258
  * @hidden
4099
4259
  */
4100
4260
  Reload = "reload",
4261
+ /**
4262
+ * Get current iframe src
4263
+ * @example
4264
+ * ```js
4265
+ * const frameUrl = AppEmbed.trigger(HostEvent.GetIframeUrl)
4266
+ * ```
4267
+ * @version SDK: 1.35.0 | Thoughtspot: 10.4.0.cl
4268
+ */
4269
+ GetIframeUrl = "GetIframeUrl",
4101
4270
  /**
4102
4271
  * Display specific visualizations on a Liveboard.
4103
4272
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
@@ -4699,11 +4868,24 @@ export declare enum HostEvent {
4699
4868
  * filter: {
4700
4869
  * column: "item type",
4701
4870
  * oper: "IN",
4702
- * values: ["bags","shirts"],
4871
+ * values: ["bags","shirts"]
4703
4872
  * }
4704
4873
  * });
4705
4874
  * ```
4706
4875
  * @example
4876
+ * ```js
4877
+ *
4878
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
4879
+ * filter: {
4880
+ * column: "date",
4881
+ * oper: "EQ",
4882
+ * values: ["JULY","2023"],
4883
+ * type: "MONTH_YEAR"
4884
+ * }
4885
+ * });
4886
+ * ```
4887
+ *
4888
+ * @example
4707
4889
  *
4708
4890
  * ```js
4709
4891
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
@@ -4720,7 +4902,8 @@ export declare enum HostEvent {
4720
4902
  * {
4721
4903
  * column: "Date",
4722
4904
  * oper: 'EQ',
4723
- * values: ["1656680400"]
4905
+ * values: ["2023-07-31"],
4906
+ * types: "EXACT_DATE"
4724
4907
  * }]
4725
4908
  * });
4726
4909
  * ```
@@ -4906,7 +5089,6 @@ export declare enum Param {
4906
5089
  ViewPortHeight = "viewPortHeight",
4907
5090
  ViewPortWidth = "viewPortWidth",
4908
5091
  VisibleActions = "visibleAction",
4909
- CustomCSSUrl = "customCssUrl",
4910
5092
  DisableLoginRedirect = "disableLoginRedirect",
4911
5093
  visibleVizs = "pinboardVisibleVizs",
4912
5094
  LiveboardV2Enabled = "isPinboardV2Enabled",
@@ -4963,7 +5145,10 @@ export declare enum Param {
4963
5145
  IsOnBeforeGetVizDataInterceptEnabled = "isOnBeforeGetVizDataInterceptEnabled",
4964
5146
  FocusSearchBarOnRender = "focusSearchBarOnRender",
4965
5147
  DisableRedirectionLinksInNewTab = "disableRedirectionLinksInNewTab",
4966
- HomePageSearchBarMode = "homePageSearchBarMode"
5148
+ HomePageSearchBarMode = "homePageSearchBarMode",
5149
+ ShowLiveboardVerifiedBadge = "showLiveboardVerifiedBadge",
5150
+ ShowLiveboardReverifyBanner = "showLiveboardReverifyBanner",
5151
+ LiveboardHeaderV2 = "isLiveboardHeaderV2Enabled"
4967
5152
  }
4968
5153
  /**
4969
5154
  * ThoughtSpot application pages include actions and menu commands
@@ -5885,7 +6070,7 @@ export declare enum Action {
5885
6070
  *
5886
6071
  * @version SDK: 1.32.0 | Thoughtspot: 10.1.0.cl
5887
6072
  */
5888
- CreateLiveboard = "CreateLiveboard",
6073
+ CreateLiveboard = "createLiveboard",
5889
6074
  /**
5890
6075
  * Action ID for to hide Verified Liveboard Banner
5891
6076
  * @example
@@ -5976,6 +6161,16 @@ export declare enum Action {
5976
6161
  * @version SDK: 1.34.0 | Thoughtspot: 10.3.0.cl
5977
6162
  */
5978
6163
  UnsubscribeScheduleHomepage = "unsubscribeScheduleHomepage",
6164
+ /**
6165
+ * The **Manage Tags** action on Homepage Favourite Module.
6166
+ *
6167
+ * @example
6168
+ * ```js
6169
+ * disabledActions: [Action.ManageTags]
6170
+ * ```
6171
+ * @version SDK : 1.34.0 | Thoughtspot: 10.3.0.cl
6172
+ */
6173
+ ManageTags = "manageTags",
5979
6174
  /**
5980
6175
  * Action ID for delete schedule action on schedule on homepage
5981
6176
  * @example
@@ -6149,9 +6344,12 @@ export interface CustomCssVariables {
6149
6344
  */
6150
6345
  '--ts-var-root-text-transform'?: string;
6151
6346
  /**
6152
- * application color, it replaces #2770EF which is rd-color(blue,base) and
6153
- * its similar colors like rd-color(blue,60), rd-color(accent, base) and
6154
- * rd-color(text, accent) in the app.
6347
+ * Font color of the text on toggle buttons such as
6348
+ * **All**, **Answers**, and **Liveboards** on the Home page (Classic experience),
6349
+ * the text color of the chart and table tiles on Home page (New modular Homepage experience),
6350
+ * and title text on the AI-generated charts and tables.
6351
+ * The default color code is #2770EF.
6352
+ *
6155
6353
  */
6156
6354
  '--ts-var-application-color'?: string;
6157
6355
  /**
@@ -6262,6 +6460,10 @@ export interface CustomCssVariables {
6262
6460
  * Background color of the primary buttons on hover.
6263
6461
  */
6264
6462
  '--ts-var-button--primary--hover-background'?: string;
6463
+ /**
6464
+ * Backgroud color of the primary buttons when active.
6465
+ */
6466
+ '--ts-var-button--primary--active-background'?: string;
6265
6467
  /**
6266
6468
  * Font color of the text on the secondary buttons.
6267
6469
  */
@@ -6278,6 +6480,10 @@ export interface CustomCssVariables {
6278
6480
  * Background color of the secondary button on hover.
6279
6481
  */
6280
6482
  '--ts-var-button--secondary--hover-background'?: string;
6483
+ /**
6484
+ * Backgroud color of the secondary buttons when active.
6485
+ */
6486
+ '--ts-var-button--secondary--active-background'?: string;
6281
6487
  /**
6282
6488
  * Font color of the tertiary button. For example, the *Undo*, *Redo*, and *Reset*
6283
6489
  * buttons on the *Search* page.
@@ -6291,6 +6497,10 @@ export interface CustomCssVariables {
6291
6497
  * Background color of the tertiary button when a user hovers over these buttons.
6292
6498
  */
6293
6499
  '--ts-var-button--tertiary--hover-background'?: string;
6500
+ /**
6501
+ * Backgroud color of the tertiary buttons when active.
6502
+ */
6503
+ '--ts-var-button--tertiary--active-background'?: string;
6294
6504
  /**
6295
6505
  * Font color of the title text of a visualization or Answer.
6296
6506
  */
@@ -6466,6 +6676,34 @@ export interface CustomCssVariables {
6466
6676
  * Background for favorite carousel find your favorites card in modular home.
6467
6677
  */
6468
6678
  '--ts-var-home-favorite-suggestion-card-background'?: string;
6679
+ /**
6680
+ * Border color of checkbox in error state.
6681
+ */
6682
+ '--ts-var-checkbox-error-border'?: string;
6683
+ /**
6684
+ * Border color of checkbox.
6685
+ */
6686
+ '--ts-var-checkbox-border-color'?: string;
6687
+ /**
6688
+ * Border color of checkbox in hover state.
6689
+ */
6690
+ '--ts-var-checkbox-hover-border'?: string;
6691
+ /**
6692
+ * Border and font color of checkbox in active state.
6693
+ */
6694
+ '--ts-var-checkbox-active-color'?: string;
6695
+ /**
6696
+ * Border color and font color of checkbox in checked state.
6697
+ */
6698
+ '--ts-var-checkbox-checked-color'?: string;
6699
+ /**
6700
+ * Border and font color of checkbox in disabled state.
6701
+ */
6702
+ '--ts-var-checkbox-checked-disabled'?: string;
6703
+ /**
6704
+ * Background color of checkbox.
6705
+ */
6706
+ '--ts-var-checkbox-background-color'?: string;
6469
6707
  }
6470
6708
 
6471
6709
  export interface SessionInterface {
@@ -6561,6 +6799,7 @@ export declare class AnswerService {
6561
6799
  * @returns
6562
6800
  */
6563
6801
  addFilter(columnName: string, operator: RuntimeFilterOp, values: RuntimeFilter['values']): Promise<any>;
6802
+ getSQLQuery(): Promise<string>;
6564
6803
  /**
6565
6804
  * Fetch data from the answer.
6566
6805
  * @param offset
@@ -6579,6 +6818,15 @@ export declare class AnswerService {
6579
6818
  * @returns Response
6580
6819
  */
6581
6820
  fetchCSVBlob(userLocale?: string, includeInfo?: boolean): Promise<Response>;
6821
+ /**
6822
+ * Fetch the data for the answer as a PNG blob. This might be
6823
+ * quicker for larger data.
6824
+ * @param userLocale
6825
+ * @param omitBackground Omit the background in the PNG
6826
+ * @param deviceScaleFactor The scale factor for the PNG
6827
+ * @return Response
6828
+ */
6829
+ fetchPNGBlob(userLocale?: string, omitBackground?: boolean, deviceScaleFactor?: number): Promise<Response>;
6582
6830
  /**
6583
6831
  * Just get the internal URL for this answer's data
6584
6832
  * as a CSV blob.
@@ -6587,6 +6835,11 @@ export declare class AnswerService {
6587
6835
  * @returns
6588
6836
  */
6589
6837
  getFetchCSVBlobUrl(userLocale?: string, includeInfo?: boolean): string;
6838
+ /**
6839
+ * Just get the internal URL for this answer's data
6840
+ * as a PNG blob.
6841
+ */
6842
+ getFetchPNGBlobUrl(userLocale?: string, omitBackground?: boolean, deviceScaleFactor?: number): string;
6590
6843
  /**
6591
6844
  * Get underlying data given a point and the output column names.
6592
6845
  * In case of a context menu action, the selectedPoints are
@@ -6639,6 +6892,10 @@ export declare const setEmbedConfig: (newConfig: EmbedConfig) => EmbedConfig;
6639
6892
  export declare const EndPoints: {
6640
6893
  CONFIG: string;
6641
6894
  };
6895
+ /**
6896
+ * Enum of mixpanel events
6897
+ * @hidden
6898
+ */
6642
6899
  export declare const MIXPANEL_EVENT: {
6643
6900
  VISUAL_SDK_RENDER_START: string;
6644
6901
  VISUAL_SDK_CALLED_INIT: string;
@@ -6979,7 +7236,6 @@ export declare class V1Embed extends TsEmbed {
6979
7236
  on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
6980
7237
  /**
6981
7238
  * Only for testing purposes.
6982
- *
6983
7239
  * @hidden
6984
7240
  */
6985
7241
  test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;