@thoughtspot/visual-embed-sdk 1.35.2 → 1.35.5-hostEvent.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.spec.js +12 -0
  3. package/cjs/src/auth.spec.js.map +1 -1
  4. package/cjs/src/authToken.spec.js +1 -1
  5. package/cjs/src/authToken.spec.js.map +1 -1
  6. package/cjs/src/embed/bodyless-conversation.spec.js +0 -1
  7. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  8. package/cjs/src/embed/hostEventClient/contracts.d.ts +97 -0
  9. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -0
  10. package/cjs/src/embed/hostEventClient/contracts.js +16 -0
  11. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -0
  12. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +14 -0
  13. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -0
  14. package/cjs/src/embed/hostEventClient/host-event-client.js +50 -0
  15. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -0
  16. package/cjs/src/embed/hostEventClient/host-event-client.spec.d.ts +2 -0
  17. package/cjs/src/embed/hostEventClient/host-event-client.spec.d.ts.map +1 -0
  18. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +171 -0
  19. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -0
  20. package/cjs/src/embed/liveboard.d.ts +2 -1
  21. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  22. package/cjs/src/embed/liveboard.js +1 -1
  23. package/cjs/src/embed/liveboard.js.map +1 -1
  24. package/cjs/src/embed/liveboard.spec.js +30 -0
  25. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  26. package/cjs/src/embed/search.spec.js +11 -0
  27. package/cjs/src/embed/search.spec.js.map +1 -1
  28. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  29. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  30. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
  31. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  32. package/cjs/src/embed/ts-embed.d.ts +13 -1
  33. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  34. package/cjs/src/embed/ts-embed.js +19 -3
  35. package/cjs/src/embed/ts-embed.js.map +1 -1
  36. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  37. package/cjs/src/embed/ts-embed.spec.js +38 -1
  38. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  39. package/cjs/src/hostEventsTypeMapping.d.ts +2 -0
  40. package/cjs/src/hostEventsTypeMapping.d.ts.map +1 -0
  41. package/cjs/src/hostEventsTypeMapping.js +4 -0
  42. package/cjs/src/hostEventsTypeMapping.js.map +1 -0
  43. package/cjs/src/index.d.ts +2 -1
  44. package/cjs/src/index.d.ts.map +1 -1
  45. package/cjs/src/index.js +3 -1
  46. package/cjs/src/index.js.map +1 -1
  47. package/cjs/src/react/all-types-export.d.ts +1 -1
  48. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  49. package/cjs/src/react/all-types-export.js +2 -1
  50. package/cjs/src/react/all-types-export.js.map +1 -1
  51. package/cjs/src/types.d.ts +13 -3
  52. package/cjs/src/types.d.ts.map +1 -1
  53. package/cjs/src/types.js +12 -2
  54. package/cjs/src/types.js.map +1 -1
  55. package/cjs/src/utils/embedApi/contracts.d.ts +101 -0
  56. package/cjs/src/utils/embedApi/contracts.d.ts.map +1 -0
  57. package/cjs/src/utils/embedApi/contracts.js +17 -0
  58. package/cjs/src/utils/embedApi/contracts.js.map +1 -0
  59. package/cjs/src/utils/embedApi/embedApiClient.d.ts +12 -0
  60. package/cjs/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  61. package/cjs/src/utils/embedApi/embedApiClient.js +46 -0
  62. package/cjs/src/utils/embedApi/embedApiClient.js.map +1 -0
  63. package/cjs/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  64. package/cjs/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  65. package/cjs/src/utils/embedApi/processEmbedApi.js +18 -0
  66. package/cjs/src/utils/embedApi/processEmbedApi.js.map +1 -0
  67. package/dist/{index-DoPTJLbd.js → index-CbltIawo.js} +1 -1
  68. package/dist/index-CzwzS0P4.js +7370 -0
  69. package/dist/src/embed/hostEventClient/contracts.d.ts +97 -0
  70. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -0
  71. package/dist/src/embed/hostEventClient/host-event-client.d.ts +14 -0
  72. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -0
  73. package/dist/src/embed/hostEventClient/host-event-client.spec.d.ts +2 -0
  74. package/dist/src/embed/hostEventClient/host-event-client.spec.d.ts.map +1 -0
  75. package/dist/src/embed/liveboard.d.ts +2 -1
  76. package/dist/src/embed/liveboard.d.ts.map +1 -1
  77. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  78. package/dist/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  79. package/dist/src/embed/ts-embed.d.ts +13 -1
  80. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  81. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  82. package/dist/src/hostEventsTypeMapping.d.ts +2 -0
  83. package/dist/src/hostEventsTypeMapping.d.ts.map +1 -0
  84. package/dist/src/index.d.ts +2 -1
  85. package/dist/src/index.d.ts.map +1 -1
  86. package/dist/src/react/all-types-export.d.ts +1 -1
  87. package/dist/src/react/all-types-export.d.ts.map +1 -1
  88. package/dist/src/types.d.ts +13 -3
  89. package/dist/src/types.d.ts.map +1 -1
  90. package/dist/src/utils/embedApi/contracts.d.ts +101 -0
  91. package/dist/src/utils/embedApi/contracts.d.ts.map +1 -0
  92. package/dist/src/utils/embedApi/embedApiClient.d.ts +12 -0
  93. package/dist/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  94. package/dist/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  95. package/dist/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  96. package/dist/tsembed-react.es.js +89 -8
  97. package/dist/tsembed-react.js +88 -7
  98. package/dist/tsembed.es.js +90 -9
  99. package/dist/tsembed.js +88 -7
  100. package/dist/visual-embed-sdk-react-full.d.ts +134 -6
  101. package/dist/visual-embed-sdk-react.d.ts +134 -6
  102. package/dist/visual-embed-sdk.d.ts +134 -6
  103. package/lib/package.json +1 -1
  104. package/lib/src/auth.spec.js +12 -0
  105. package/lib/src/auth.spec.js.map +1 -1
  106. package/lib/src/authToken.spec.js +1 -1
  107. package/lib/src/authToken.spec.js.map +1 -1
  108. package/lib/src/embed/bodyless-conversation.spec.js +0 -1
  109. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  110. package/lib/src/embed/hostEventClient/contracts.d.ts +97 -0
  111. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -0
  112. package/lib/src/embed/hostEventClient/contracts.js +13 -0
  113. package/lib/src/embed/hostEventClient/contracts.js.map +1 -0
  114. package/lib/src/embed/hostEventClient/host-event-client.d.ts +14 -0
  115. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -0
  116. package/lib/src/embed/hostEventClient/host-event-client.js +46 -0
  117. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -0
  118. package/lib/src/embed/hostEventClient/host-event-client.spec.d.ts +2 -0
  119. package/lib/src/embed/hostEventClient/host-event-client.spec.d.ts.map +1 -0
  120. package/lib/src/embed/hostEventClient/host-event-client.spec.js +169 -0
  121. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -0
  122. package/lib/src/embed/liveboard.d.ts +2 -1
  123. package/lib/src/embed/liveboard.d.ts.map +1 -1
  124. package/lib/src/embed/liveboard.js +1 -1
  125. package/lib/src/embed/liveboard.js.map +1 -1
  126. package/lib/src/embed/liveboard.spec.js +30 -0
  127. package/lib/src/embed/liveboard.spec.js.map +1 -1
  128. package/lib/src/embed/search.spec.js +11 -0
  129. package/lib/src/embed/search.spec.js.map +1 -1
  130. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  131. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  132. package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
  133. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  134. package/lib/src/embed/ts-embed.d.ts +13 -1
  135. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  136. package/lib/src/embed/ts-embed.js +19 -3
  137. package/lib/src/embed/ts-embed.js.map +1 -1
  138. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  139. package/lib/src/embed/ts-embed.spec.js +40 -3
  140. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  141. package/lib/src/hostEventsTypeMapping.d.ts +2 -0
  142. package/lib/src/hostEventsTypeMapping.d.ts.map +1 -0
  143. package/lib/src/hostEventsTypeMapping.js +2 -0
  144. package/lib/src/hostEventsTypeMapping.js.map +1 -0
  145. package/lib/src/index.d.ts +2 -1
  146. package/lib/src/index.d.ts.map +1 -1
  147. package/lib/src/index.js +2 -1
  148. package/lib/src/index.js.map +1 -1
  149. package/lib/src/react/all-types-export.d.ts +1 -1
  150. package/lib/src/react/all-types-export.d.ts.map +1 -1
  151. package/lib/src/react/all-types-export.js +1 -1
  152. package/lib/src/react/all-types-export.js.map +1 -1
  153. package/lib/src/types.d.ts +13 -3
  154. package/lib/src/types.d.ts.map +1 -1
  155. package/lib/src/types.js +12 -2
  156. package/lib/src/types.js.map +1 -1
  157. package/lib/src/utils/embedApi/contracts.d.ts +101 -0
  158. package/lib/src/utils/embedApi/contracts.d.ts.map +1 -0
  159. package/lib/src/utils/embedApi/contracts.js +14 -0
  160. package/lib/src/utils/embedApi/contracts.js.map +1 -0
  161. package/lib/src/utils/embedApi/embedApiClient.d.ts +12 -0
  162. package/lib/src/utils/embedApi/embedApiClient.d.ts.map +1 -0
  163. package/lib/src/utils/embedApi/embedApiClient.js +42 -0
  164. package/lib/src/utils/embedApi/embedApiClient.js.map +1 -0
  165. package/lib/src/utils/embedApi/processEmbedApi.d.ts +9 -0
  166. package/lib/src/utils/embedApi/processEmbedApi.d.ts.map +1 -0
  167. package/lib/src/utils/embedApi/processEmbedApi.js +14 -0
  168. package/lib/src/utils/embedApi/processEmbedApi.js.map +1 -0
  169. package/lib/src/visual-embed-sdk.d.ts +145 -6
  170. package/package.json +1 -1
  171. package/src/auth.spec.ts +13 -0
  172. package/src/authToken.spec.ts +1 -1
  173. package/src/embed/bodyless-conversation.spec.ts +0 -1
  174. package/src/embed/hostEventClient/contracts.ts +108 -0
  175. package/src/embed/hostEventClient/host-event-client.spec.ts +234 -0
  176. package/src/embed/hostEventClient/host-event-client.ts +81 -0
  177. package/src/embed/liveboard.spec.ts +32 -0
  178. package/src/embed/liveboard.ts +5 -1
  179. package/src/embed/search.spec.ts +15 -0
  180. package/src/embed/ts-embed.spec.ts +53 -1
  181. package/src/embed/ts-embed.ts +29 -5
  182. package/src/index.ts +2 -0
  183. package/src/react/all-types-export.ts +1 -0
  184. package/src/types.ts +12 -2
package/dist/tsembed.js CHANGED
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.35.2 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.35.5-hostEvent.1 */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -1069,8 +1069,8 @@
1069
1069
  *
1070
1070
  * **Note**: This event is deprecated in v1.21.0.
1071
1071
  * To fire an event when a download action is initiated on a chart or table,
1072
- * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
1073
- * or `EmbedEvent.DownloadAsXLSX`
1072
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`,
1073
+ * `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
1074
1074
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1075
1075
  * @example
1076
1076
  *```js
@@ -2554,6 +2554,16 @@
2554
2554
  * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
2555
2555
  */
2556
2556
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
2557
+ /**
2558
+ * Triggers the action to get the current view of the liveboard
2559
+ * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
2560
+ */
2561
+ HostEvent["SaveAnswer"] = "saveAnswer";
2562
+ /**
2563
+ * EmbedApi
2564
+ * @hidden
2565
+ */
2566
+ HostEvent["UiPassthrough"] = "UiPassthrough";
2557
2567
  })(exports.HostEvent || (exports.HostEvent = {}));
2558
2568
  /**
2559
2569
  * The different visual modes that the data sources panel within
@@ -14741,6 +14751,8 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14741
14751
  return e;
14742
14752
  }
14743
14753
 
14754
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.5-hostEvent.1";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14755
+
14744
14756
  /**
14745
14757
  * Reloads the ThoughtSpot iframe.
14746
14758
  * @param iFrame
@@ -14799,7 +14811,60 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14799
14811
  });
14800
14812
  }
14801
14813
 
14802
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.35.2";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports$1={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p . --incremental false; tsc -p . --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle --name @thoughtspot/visual-embed-sdk --out visual-embed-sdk.d.ts --main lib/src/index.d.ts","bundle-dts":"dts-bundle --name ../../dist/visual-embed-sdk --main lib/src/index.d.ts --outputAsModuleFolder=true","bundle-dts-react":"dts-bundle --name ../../../dist/visual-embed-sdk-react --main lib/src/react/index.d.ts --outputAsModuleFolder=true","bundle-dts-react-full":"dts-bundle --name ../../../dist/visual-embed-sdk-react-full --main lib/src/react/all-types-export.d.ts --outputAsModuleFolder=true",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | coveralls","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={algoliasearch:"^4.10.5",classnames:"^2.3.1",dompurify:"^2.3.4",eventemitter3:"^4.0.7","gatsby-plugin-vercel":"^1.0.3","html-react-parser":"^1.4.12",lodash:"^4.17.21","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^8.2.6","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^22.2.3","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^4.6.0","@typescript-eslint/parser":"^4.6.0",asciidoctor:"^2.2.1","babel-jest":"^26.6.3","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1",coveralls:"^3.1.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle":"^0.7.3",eslint:"^7.12.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.15.0","eslint-import-resolver-typescript":"^2.3.0","eslint-plugin-import":"^2.22.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react-hooks":"^4.2.0","eslint-plugin-comment-length":"1.7.3","eslint-plugin-jsdoc":"^46.9.0","fs-extra":"^10.0.0","gh-pages":"^3.1.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^1.1.1",jest:"^26.6.3","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0","node-sass":"^8.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^26.5.5","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^5.3.4"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports$1,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"31 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
14814
+ exports.UiPassthroughEvent = void 0;
14815
+ (function (UiPassthroughEvent) {
14816
+ UiPassthroughEvent["addVizToPinboard"] = "addVizToPinboard";
14817
+ UiPassthroughEvent["saveAnswer"] = "saveAnswer";
14818
+ UiPassthroughEvent["getA3AnalysisColumns"] = "getA3AnalysisColumns";
14819
+ UiPassthroughEvent["getDiscoverabilityStatus"] = "getDiscoverabilityStatus";
14820
+ UiPassthroughEvent["getAvailableUiPassthroughs"] = "getAvailableUiPassthroughs";
14821
+ UiPassthroughEvent["getAnswerPageConfig"] = "getAnswerPageConfig";
14822
+ UiPassthroughEvent["getPinboardPageConfig"] = "getPinboardPageConfig";
14823
+ UiPassthroughEvent["UiPassthroughEventNotFound"] = "UiPassthroughEventNotFound";
14824
+ })(exports.UiPassthroughEvent || (exports.UiPassthroughEvent = {}));
14825
+
14826
+ class HostEventClient {
14827
+ constructor(thoughtSpotHost) {
14828
+ this.executeUiPassthroughApi = async (iFrame, apiName, parameters) => {
14829
+ const res = await processTrigger(iFrame, exports.HostEvent.UiPassthrough, this.thoughtSpotHost, {
14830
+ type: apiName,
14831
+ parameters,
14832
+ });
14833
+ return res;
14834
+ };
14835
+ this.handleUiPassthroughForHostEvent = async (iFrame, apiName, parameters) => {
14836
+ var _a, _b, _c;
14837
+ const response = (_b = (_a = (await this.executeUiPassthroughApi(iFrame, apiName, parameters))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
14838
+ if (!response) {
14839
+ const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
14840
+ // eslint-disable-next-line no-throw-literal
14841
+ throw { error };
14842
+ }
14843
+ const errors = response.error || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors);
14844
+ if (errors) {
14845
+ // eslint-disable-next-line no-throw-literal
14846
+ throw { error: response.error };
14847
+ }
14848
+ return { ...response.value };
14849
+ };
14850
+ this.thoughtSpotHost = thoughtSpotHost;
14851
+ }
14852
+ async hostEventFallback(iFrame, hostEvent, data) {
14853
+ return processTrigger(iFrame, hostEvent, this.thoughtSpotHost, data);
14854
+ }
14855
+ async executeHostEvent(iFrame, hostEvent, payload) {
14856
+ if (hostEvent === exports.HostEvent.Pin && (payload === null || payload === void 0 ? void 0 : payload.newVizName)) {
14857
+ return this.handleUiPassthroughForHostEvent(iFrame, exports.UiPassthroughEvent.addVizToPinboard, payload);
14858
+ }
14859
+ if (hostEvent === exports.HostEvent.SaveAnswer && (payload === null || payload === void 0 ? void 0 : payload.name)) {
14860
+ return this.handleUiPassthroughForHostEvent(iFrame, exports.UiPassthroughEvent.saveAnswer, payload);
14861
+ }
14862
+ // fallback for save answer is Save
14863
+ if (hostEvent === exports.HostEvent.SaveAnswer)
14864
+ hostEvent = exports.HostEvent.Save;
14865
+ return this.hostEventFallback(iFrame, hostEvent, payload);
14866
+ }
14867
+ }
14803
14868
 
14804
14869
  /**
14805
14870
  * Copyright (c) 2022
@@ -14914,6 +14979,17 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14914
14979
  this.on(exports.EmbedEvent.AuthExpire, this.updateAuthToken, { start: false }, true);
14915
14980
  };
14916
14981
  this.showPreRenderByDefault = false;
14982
+ /**
14983
+ * Triggers an event to the embedded app, skipping the UI flow.
14984
+ * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
14985
+ * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
14986
+ * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
14987
+ * from the embedded app.
14988
+ */
14989
+ // eslint-disable-next-line arrow-body-style
14990
+ this.triggerUiPassThrough = (apiName, parameters) => {
14991
+ return this.hostEventClient.executeUiPassthroughApi(this.iFrame, apiName, parameters);
14992
+ };
14917
14993
  this.validatePreRenderViewConfig = (viewConfig) => {
14918
14994
  var _a;
14919
14995
  const preRenderAllowedKeys = ['preRenderId', 'vizId', 'liveboardId'];
@@ -14955,6 +15031,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
14955
15031
  uploadMixpanelEvent(MIXPANEL_EVENT.VISUAL_SDK_EMBED_CREATE, {
14956
15032
  ...viewConfig,
14957
15033
  });
15034
+ this.hostEventClient = new HostEventClient(this.embedConfig.thoughtSpotHost);
14958
15035
  }
14959
15036
  /**
14960
15037
  * Throws error encountered during initialization.
@@ -15229,6 +15306,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15229
15306
  setAttributes(iFrame, restParams);
15230
15307
  iFrame.style.width = `${width}`;
15231
15308
  iFrame.style.height = `${height}`;
15309
+ // Set minimum height to the frame so that,
15310
+ // scaling down on the fullheight doesn't make it too small.
15311
+ iFrame.style.minHeight = `${height}`;
15232
15312
  iFrame.style.border = '0';
15233
15313
  iFrame.name = 'ThoughtSpot Embedded Analytics';
15234
15314
  return iFrame;
@@ -15570,8 +15650,9 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15570
15650
  * Triggers an event to the embedded app
15571
15651
  * @param messageType The event type
15572
15652
  * @param data The payload to send with the message
15653
+ * @returns A promise that resolves with the response from the embedded app
15573
15654
  */
15574
- trigger(messageType, data = {}) {
15655
+ trigger(messageType, data) {
15575
15656
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
15576
15657
  if (!this.isRendered) {
15577
15658
  this.handleError('Please call render before triggering events');
@@ -15581,7 +15662,7 @@ mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies:
15581
15662
  this.handleError('Host event type is undefined');
15582
15663
  return null;
15583
15664
  }
15584
- return processTrigger(this.iFrame, messageType, this.thoughtSpotHost, data);
15665
+ return this.hostEventClient.executeHostEvent(this.iFrame, messageType, data);
15585
15666
  }
15586
15667
  /**
15587
15668
  * Marks the ThoughtSpot object to have been rendered
@@ -16395,7 +16476,7 @@ query GetEurekaVizSnapshots(
16395
16476
  * @param messageType The event type
16396
16477
  * @param data The payload to send with the message
16397
16478
  */
16398
- trigger(messageType, data = {}) {
16479
+ trigger(messageType, data) {
16399
16480
  const dataWithVizId = data;
16400
16481
  if (messageType === exports.HostEvent.SetActiveTab) {
16401
16482
  this.setActiveTab(data);
@@ -259,7 +259,7 @@ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<
259
259
  * @summary ThoughtSpot Visual Embed SDK
260
260
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
261
261
  */
262
- export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, };
262
+ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, UiPassthroughEvent, };
263
263
 
264
264
  /**
265
265
  * @group Embed components
@@ -1641,7 +1641,7 @@ export declare class LiveboardEmbed extends V1Embed {
1641
1641
  * @param messageType The event type
1642
1642
  * @param data The payload to send with the message
1643
1643
  */
1644
- trigger(messageType: HostEvent, data?: any): Promise<any>;
1644
+ trigger<HostEventT extends HostEvent>(messageType: HostEventT, data?: HostEventRequest<HostEventT>): Promise<HostEventResponse<HostEventT>>;
1645
1645
  /**
1646
1646
  * Render an embedded ThoughtSpot Liveboard or visualization
1647
1647
  * @param renderOptions An object specifying the Liveboard ID,
@@ -3821,8 +3821,8 @@ export declare enum EmbedEvent {
3821
3821
  *
3822
3822
  * **Note**: This event is deprecated in v1.21.0.
3823
3823
  * To fire an event when a download action is initiated on a chart or table,
3824
- * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
3825
- * or `EmbedEvent.DownloadAsXLSX`
3824
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`,
3825
+ * `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
3826
3826
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3827
3827
  * @example
3828
3828
  *```js
@@ -5303,7 +5303,17 @@ export declare enum HostEvent {
5303
5303
  * ```
5304
5304
  * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
5305
5305
  */
5306
- UpdatePersonalisedView = "UpdatePersonalisedView"
5306
+ UpdatePersonalisedView = "UpdatePersonalisedView",
5307
+ /**
5308
+ * Triggers the action to get the current view of the liveboard
5309
+ * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
5310
+ */
5311
+ SaveAnswer = "saveAnswer",
5312
+ /**
5313
+ * EmbedApi
5314
+ * @hidden
5315
+ */
5316
+ UiPassthrough = "UiPassthrough"
5307
5317
  }
5308
5318
  /**
5309
5319
  * The different visual modes that the data sources panel within
@@ -7316,6 +7326,102 @@ export declare const getAnswerFromQuery: (query: string, worksheetId: string) =>
7316
7326
  */
7317
7327
  export declare const createLiveboardWithAnswers: (answers: AnswerService[], name: string) => Promise<any>;
7318
7328
 
7329
+ export declare enum UiPassthroughEvent {
7330
+ addVizToPinboard = "addVizToPinboard",
7331
+ saveAnswer = "saveAnswer",
7332
+ getA3AnalysisColumns = "getA3AnalysisColumns",
7333
+ getDiscoverabilityStatus = "getDiscoverabilityStatus",
7334
+ getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
7335
+ getAnswerPageConfig = "getAnswerPageConfig",
7336
+ getPinboardPageConfig = "getPinboardPageConfig",
7337
+ UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
7338
+ }
7339
+ export type UiPassthroughContractBase = {
7340
+ [UiPassthroughEvent.addVizToPinboard]: {
7341
+ request: {
7342
+ vizId?: string;
7343
+ newVizName: string;
7344
+ newVizDescription?: string;
7345
+ pinboardId?: string;
7346
+ tabId?: string;
7347
+ newPinboardName?: string;
7348
+ newTabName?: string;
7349
+ };
7350
+ response: {
7351
+ pinboardId: string;
7352
+ tabId: string;
7353
+ vizId: string;
7354
+ };
7355
+ };
7356
+ [UiPassthroughEvent.saveAnswer]: {
7357
+ request: {
7358
+ name: string;
7359
+ description: string;
7360
+ vizId: string;
7361
+ isDiscoverable?: boolean;
7362
+ };
7363
+ response: {
7364
+ answerId: string;
7365
+ errors?: any;
7366
+ };
7367
+ };
7368
+ [UiPassthroughEvent.getA3AnalysisColumns]: {
7369
+ request: {
7370
+ vizId?: string;
7371
+ };
7372
+ response: {
7373
+ data?: any;
7374
+ errors?: any;
7375
+ };
7376
+ };
7377
+ [UiPassthroughEvent.getDiscoverabilityStatus]: {
7378
+ request: any;
7379
+ response: {
7380
+ shouldShowDiscoverability: boolean;
7381
+ isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
7382
+ };
7383
+ };
7384
+ [UiPassthroughEvent.getAvailableUiPassthroughs]: {
7385
+ request: any;
7386
+ response: {
7387
+ keys: string[];
7388
+ };
7389
+ };
7390
+ [UiPassthroughEvent.getAnswerPageConfig]: {
7391
+ request: {
7392
+ vizId?: string;
7393
+ };
7394
+ response: any;
7395
+ };
7396
+ [UiPassthroughEvent.getPinboardPageConfig]: {
7397
+ request: any;
7398
+ response: any;
7399
+ };
7400
+ [UiPassthroughEvent.UiPassthroughEventNotFound]: {
7401
+ request: any;
7402
+ response: any;
7403
+ };
7404
+ };
7405
+ export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['request'];
7406
+ export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['response'];
7407
+ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
7408
+ redId?: string;
7409
+ value?: UiPassthroughResponse<ApiName>;
7410
+ error?: any;
7411
+ }>>;
7412
+ export type EmbedApiHostEventMapping = {
7413
+ [HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
7414
+ [HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
7415
+ 'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
7416
+ };
7417
+ export type FlattenType<T> = T extends infer R ? {
7418
+ [K in keyof R]: R[K];
7419
+ } : never;
7420
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
7421
+ export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
7422
+ value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
7423
+ } : any;
7424
+
7319
7425
  /**
7320
7426
  *
7321
7427
  * @param embedConfig
@@ -7381,6 +7487,7 @@ export declare class TsEmbed {
7381
7487
  * A flag that is set to true post render.
7382
7488
  */
7383
7489
  protected isRendered: boolean;
7490
+ protected hostEventClient: HostEventClient;
7384
7491
  constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
7385
7492
  /**
7386
7493
  * Handles errors within the SDK
@@ -7502,8 +7609,17 @@ export declare class TsEmbed {
7502
7609
  * Triggers an event to the embedded app
7503
7610
  * @param messageType The event type
7504
7611
  * @param data The payload to send with the message
7612
+ * @returns A promise that resolves with the response from the embedded app
7505
7613
  */
7506
- trigger(messageType: HostEvent, data?: any): Promise<any>;
7614
+ trigger<HostEventT extends HostEvent>(messageType: HostEventT, data?: HostEventRequest<HostEventT>): Promise<HostEventResponse<HostEventT>>;
7615
+ /**
7616
+ * Triggers an event to the embedded app, skipping the UI flow.
7617
+ * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
7618
+ * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
7619
+ * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
7620
+ * from the embedded app.
7621
+ */
7622
+ triggerUiPassThrough: UiPassthroughHandler;
7507
7623
  /**
7508
7624
  * Marks the ThoughtSpot object to have been rendered
7509
7625
  * Needs to be overridden by subclasses to do the actual
@@ -7622,3 +7738,15 @@ export declare class V1Embed extends TsEmbed {
7622
7738
  test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
7623
7739
  }
7624
7740
 
7741
+ type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
7742
+ export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
7743
+ export declare class HostEventClient {
7744
+ thoughtSpotHost: string;
7745
+ constructor(thoughtSpotHost: string);
7746
+ executeUiPassthroughApi: UiPassthroughHandlerWithIframe;
7747
+ handleUiPassthroughForHostEvent: UiPassthroughHandlerWithIframe;
7748
+ hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
7749
+ executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
7750
+ }
7751
+ export {};
7752
+
@@ -1631,7 +1631,7 @@ export declare class LiveboardEmbed extends V1Embed {
1631
1631
  * @param messageType The event type
1632
1632
  * @param data The payload to send with the message
1633
1633
  */
1634
- trigger(messageType: HostEvent, data?: any): Promise<any>;
1634
+ trigger<HostEventT extends HostEvent>(messageType: HostEventT, data?: HostEventRequest<HostEventT>): Promise<HostEventResponse<HostEventT>>;
1635
1635
  /**
1636
1636
  * Render an embedded ThoughtSpot Liveboard or visualization
1637
1637
  * @param renderOptions An object specifying the Liveboard ID,
@@ -1744,7 +1744,7 @@ export declare class ConversationEmbed extends TsEmbed {
1744
1744
  * @summary ThoughtSpot Visual Embed SDK
1745
1745
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
1746
1746
  */
1747
- export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, };
1747
+ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, BodylessConversation, BodylessConversationViewConfig, ConversationEmbed, ConversationViewConfig, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, VizPoint, CustomActionPayload, UiPassthroughEvent, };
1748
1748
 
1749
1749
  /**
1750
1750
  * Copyright (c) 2023
@@ -3413,8 +3413,8 @@ export declare enum EmbedEvent {
3413
3413
  *
3414
3414
  * **Note**: This event is deprecated in v1.21.0.
3415
3415
  * To fire an event when a download action is initiated on a chart or table,
3416
- * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
3417
- * or `EmbedEvent.DownloadAsXLSX`
3416
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`,
3417
+ * `EmbedEvent.DownloadAsCSV`, or `EmbedEvent.DownloadAsXLSX`
3418
3418
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3419
3419
  * @example
3420
3420
  *```js
@@ -4895,7 +4895,17 @@ export declare enum HostEvent {
4895
4895
  * ```
4896
4896
  * @version SDK: 1.36.0 | Thoughtspot: 10.6.0.cl
4897
4897
  */
4898
- UpdatePersonalisedView = "UpdatePersonalisedView"
4898
+ UpdatePersonalisedView = "UpdatePersonalisedView",
4899
+ /**
4900
+ * Triggers the action to get the current view of the liveboard
4901
+ * @version SDK: 1.34.0 | Thoughtspot: 10.6.0.cl
4902
+ */
4903
+ SaveAnswer = "saveAnswer",
4904
+ /**
4905
+ * EmbedApi
4906
+ * @hidden
4907
+ */
4908
+ UiPassthrough = "UiPassthrough"
4899
4909
  }
4900
4910
  /**
4901
4911
  * The different visual modes that the data sources panel within
@@ -6301,6 +6311,7 @@ export declare class TsEmbed {
6301
6311
  * A flag that is set to true post render.
6302
6312
  */
6303
6313
  protected isRendered: boolean;
6314
+ protected hostEventClient: HostEventClient;
6304
6315
  constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
6305
6316
  /**
6306
6317
  * Handles errors within the SDK
@@ -6422,8 +6433,17 @@ export declare class TsEmbed {
6422
6433
  * Triggers an event to the embedded app
6423
6434
  * @param messageType The event type
6424
6435
  * @param data The payload to send with the message
6436
+ * @returns A promise that resolves with the response from the embedded app
6437
+ */
6438
+ trigger<HostEventT extends HostEvent>(messageType: HostEventT, data?: HostEventRequest<HostEventT>): Promise<HostEventResponse<HostEventT>>;
6439
+ /**
6440
+ * Triggers an event to the embedded app, skipping the UI flow.
6441
+ * @param {UiPassthroughEvent} apiName - The name of the API to be triggered.
6442
+ * @param {UiPassthroughRequest} parameters - The parameters to be passed to the API.
6443
+ * @returns {Promise<UiPassthroughRequest>} - A promise that resolves with the response
6444
+ * from the embedded app.
6425
6445
  */
6426
- trigger(messageType: HostEvent, data?: any): Promise<any>;
6446
+ triggerUiPassThrough: UiPassthroughHandler;
6427
6447
  /**
6428
6448
  * Marks the ThoughtSpot object to have been rendered
6429
6449
  * Needs to be overridden by subclasses to do the actual
@@ -6542,6 +6562,102 @@ export declare class V1Embed extends TsEmbed {
6542
6562
  test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void;
6543
6563
  }
6544
6564
 
6565
+ export declare enum UiPassthroughEvent {
6566
+ addVizToPinboard = "addVizToPinboard",
6567
+ saveAnswer = "saveAnswer",
6568
+ getA3AnalysisColumns = "getA3AnalysisColumns",
6569
+ getDiscoverabilityStatus = "getDiscoverabilityStatus",
6570
+ getAvailableUiPassthroughs = "getAvailableUiPassthroughs",
6571
+ getAnswerPageConfig = "getAnswerPageConfig",
6572
+ getPinboardPageConfig = "getPinboardPageConfig",
6573
+ UiPassthroughEventNotFound = "UiPassthroughEventNotFound"
6574
+ }
6575
+ export type UiPassthroughContractBase = {
6576
+ [UiPassthroughEvent.addVizToPinboard]: {
6577
+ request: {
6578
+ vizId?: string;
6579
+ newVizName: string;
6580
+ newVizDescription?: string;
6581
+ pinboardId?: string;
6582
+ tabId?: string;
6583
+ newPinboardName?: string;
6584
+ newTabName?: string;
6585
+ };
6586
+ response: {
6587
+ pinboardId: string;
6588
+ tabId: string;
6589
+ vizId: string;
6590
+ };
6591
+ };
6592
+ [UiPassthroughEvent.saveAnswer]: {
6593
+ request: {
6594
+ name: string;
6595
+ description: string;
6596
+ vizId: string;
6597
+ isDiscoverable?: boolean;
6598
+ };
6599
+ response: {
6600
+ answerId: string;
6601
+ errors?: any;
6602
+ };
6603
+ };
6604
+ [UiPassthroughEvent.getA3AnalysisColumns]: {
6605
+ request: {
6606
+ vizId?: string;
6607
+ };
6608
+ response: {
6609
+ data?: any;
6610
+ errors?: any;
6611
+ };
6612
+ };
6613
+ [UiPassthroughEvent.getDiscoverabilityStatus]: {
6614
+ request: any;
6615
+ response: {
6616
+ shouldShowDiscoverability: boolean;
6617
+ isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
6618
+ };
6619
+ };
6620
+ [UiPassthroughEvent.getAvailableUiPassthroughs]: {
6621
+ request: any;
6622
+ response: {
6623
+ keys: string[];
6624
+ };
6625
+ };
6626
+ [UiPassthroughEvent.getAnswerPageConfig]: {
6627
+ request: {
6628
+ vizId?: string;
6629
+ };
6630
+ response: any;
6631
+ };
6632
+ [UiPassthroughEvent.getPinboardPageConfig]: {
6633
+ request: any;
6634
+ response: any;
6635
+ };
6636
+ [UiPassthroughEvent.UiPassthroughEventNotFound]: {
6637
+ request: any;
6638
+ response: any;
6639
+ };
6640
+ };
6641
+ export type UiPassthroughRequest<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['request'];
6642
+ export type UiPassthroughResponse<T extends keyof UiPassthroughContractBase> = UiPassthroughContractBase[T]['response'];
6643
+ export type UiPassthroughArrayResponse<ApiName extends keyof UiPassthroughContractBase> = Promise<Array<{
6644
+ redId?: string;
6645
+ value?: UiPassthroughResponse<ApiName>;
6646
+ error?: any;
6647
+ }>>;
6648
+ export type EmbedApiHostEventMapping = {
6649
+ [HostEvent.Pin]: UiPassthroughEvent.addVizToPinboard;
6650
+ [HostEvent.SaveAnswer]: UiPassthroughEvent.saveAnswer;
6651
+ 'hostEventNotMapped': UiPassthroughEvent.UiPassthroughEventNotFound;
6652
+ };
6653
+ export type FlattenType<T> = T extends infer R ? {
6654
+ [K in keyof R]: R[K];
6655
+ } : never;
6656
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? FlattenType<UiPassthroughRequest<EmbedApiHostEventMapping[HostEventT]>> : any;
6657
+ export type HostEventResponse<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? {
6658
+ value?: UiPassthroughResponse<EmbedApiHostEventMapping[HostEventT]>;
6659
+ } : any;
6660
+
6545
6661
  export interface executeTMLInput {
6546
6662
  metadata_tmls: string[];
6547
6663
  import_policy?: 'PARTIAL' | 'ALL_OR_NONE' | 'VALIDATE_ONLY';
@@ -7622,3 +7738,15 @@ export declare function getAuthenticationToken(embedConfig: EmbedConfig): Promis
7622
7738
  */
7623
7739
  export declare const resetCachedAuthToken: () => void;
7624
7740
 
7741
+ type UiPassthroughHandlerWithIframe = <UiPassthroughEventT extends UiPassthroughEvent>(iFrame: HTMLIFrameElement, apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
7742
+ export type UiPassthroughHandler = <UiPassthroughEventT extends UiPassthroughEvent>(apiName: UiPassthroughEventT, parameters: FlattenType<UiPassthroughRequest<UiPassthroughEventT>>) => UiPassthroughArrayResponse<UiPassthroughEventT>;
7743
+ export declare class HostEventClient {
7744
+ thoughtSpotHost: string;
7745
+ constructor(thoughtSpotHost: string);
7746
+ executeUiPassthroughApi: UiPassthroughHandlerWithIframe;
7747
+ handleUiPassthroughForHostEvent: UiPassthroughHandlerWithIframe;
7748
+ hostEventFallback(iFrame: HTMLIFrameElement, hostEvent: HostEvent, data: any): Promise<any>;
7749
+ executeHostEvent<T extends HostEvent>(iFrame: HTMLIFrameElement, hostEvent: HostEvent, payload?: HostEventRequest<T>): Promise<HostEventResponse<HostEvent>>;
7750
+ }
7751
+ export {};
7752
+