@thoughtspot/visual-embed-sdk 1.45.1 → 1.45.3-mcp.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 (320) hide show
  1. package/cjs/package.json +2 -2
  2. package/cjs/src/authToken.d.ts +1 -1
  3. package/cjs/src/authToken.d.ts.map +1 -1
  4. package/cjs/src/authToken.js +2 -2
  5. package/cjs/src/authToken.js.map +1 -1
  6. package/cjs/src/authToken.spec.js +71 -0
  7. package/cjs/src/authToken.spec.js.map +1 -1
  8. package/cjs/src/css-variables.d.ts +48 -0
  9. package/cjs/src/css-variables.d.ts.map +1 -1
  10. package/cjs/src/embed/app.d.ts +37 -0
  11. package/cjs/src/embed/app.d.ts.map +1 -1
  12. package/cjs/src/embed/app.js +37 -1
  13. package/cjs/src/embed/app.js.map +1 -1
  14. package/cjs/src/embed/app.spec.js +24 -0
  15. package/cjs/src/embed/app.spec.js.map +1 -1
  16. package/cjs/src/embed/auto-frame-renderer.d.ts +3 -0
  17. package/cjs/src/embed/auto-frame-renderer.d.ts.map +1 -0
  18. package/cjs/src/embed/auto-frame-renderer.js +60 -0
  19. package/cjs/src/embed/auto-frame-renderer.js.map +1 -0
  20. package/cjs/src/embed/base.d.ts.map +1 -1
  21. package/cjs/src/embed/base.js.map +1 -1
  22. package/cjs/src/embed/conversation.d.ts +128 -10
  23. package/cjs/src/embed/conversation.d.ts.map +1 -1
  24. package/cjs/src/embed/conversation.js +41 -18
  25. package/cjs/src/embed/conversation.js.map +1 -1
  26. package/cjs/src/embed/conversation.spec.js +96 -3
  27. package/cjs/src/embed/conversation.spec.js.map +1 -1
  28. package/cjs/src/embed/hostEventClient/contracts.d.ts +3 -3
  29. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  30. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  31. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +8 -8
  32. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  33. package/cjs/src/embed/hostEventClient/host-event-client.js +18 -18
  34. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  35. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +7 -7
  36. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  37. package/cjs/src/embed/liveboard.d.ts +40 -3
  38. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  39. package/cjs/src/embed/liveboard.js +40 -12
  40. package/cjs/src/embed/liveboard.js.map +1 -1
  41. package/cjs/src/embed/liveboard.spec.js +180 -8
  42. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  43. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  44. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  45. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +104 -0
  46. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  47. package/cjs/src/embed/ts-embed.d.ts +23 -2
  48. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  49. package/cjs/src/embed/ts-embed.js +64 -22
  50. package/cjs/src/embed/ts-embed.js.map +1 -1
  51. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
  52. package/cjs/src/embed/ts-embed.spec.js +138 -19
  53. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  54. package/cjs/src/errors.d.ts +1 -0
  55. package/cjs/src/errors.d.ts.map +1 -1
  56. package/cjs/src/errors.js +1 -0
  57. package/cjs/src/errors.js.map +1 -1
  58. package/cjs/src/index.d.ts +4 -3
  59. package/cjs/src/index.d.ts.map +1 -1
  60. package/cjs/src/index.js +5 -2
  61. package/cjs/src/index.js.map +1 -1
  62. package/cjs/src/types.d.ts +360 -43
  63. package/cjs/src/types.d.ts.map +1 -1
  64. package/cjs/src/types.js +228 -20
  65. package/cjs/src/types.js.map +1 -1
  66. package/cjs/src/utils/answerService/answerService.d.ts +34 -0
  67. package/cjs/src/utils/answerService/answerService.d.ts.map +1 -0
  68. package/cjs/src/utils/answerService/answerService.js +142 -0
  69. package/cjs/src/utils/answerService/answerService.js.map +1 -0
  70. package/cjs/src/utils/answerService/answerService.spec.d.ts +1 -0
  71. package/cjs/src/utils/answerService/answerService.spec.d.ts.map +1 -0
  72. package/cjs/src/utils/answerService/answerService.spec.js +1 -0
  73. package/cjs/src/utils/answerService/answerService.spec.js.map +1 -0
  74. package/cjs/src/utils/answerService/graphql-queries.d.ts +6 -0
  75. package/cjs/src/utils/answerService/graphql-queries.d.ts.map +1 -0
  76. package/cjs/src/utils/answerService/graphql-queries.js +123 -0
  77. package/cjs/src/utils/answerService/graphql-queries.js.map +1 -0
  78. package/cjs/src/utils/answerService.d.ts +10 -0
  79. package/cjs/src/utils/answerService.d.ts.map +1 -0
  80. package/cjs/src/utils/answerService.js +61 -0
  81. package/cjs/src/utils/answerService.js.map +1 -0
  82. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  83. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  84. package/cjs/src/utils/answerService.spec.js +31 -0
  85. package/cjs/src/utils/answerService.spec.js.map +1 -0
  86. package/cjs/src/utils/authService.d.ts +37 -0
  87. package/cjs/src/utils/authService.d.ts.map +1 -0
  88. package/cjs/src/utils/authService.js +106 -0
  89. package/cjs/src/utils/authService.js.map +1 -0
  90. package/cjs/src/utils/authService.spec.d.ts +2 -0
  91. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  92. package/cjs/src/utils/authService.spec.js +72 -0
  93. package/cjs/src/utils/authService.spec.js.map +1 -0
  94. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  95. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  96. package/cjs/src/utils/graphql/answerService/answer-queries.js +23 -1
  97. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  98. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -1
  99. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  100. package/cjs/src/utils/graphql/answerService/answerService.js +9 -1
  101. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  102. package/cjs/src/utils/graphql/answerService/answerService.spec.js +73 -0
  103. package/cjs/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  104. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts +5 -0
  105. package/cjs/src/utils/graphql/answerService/graphql-queries.d.ts.map +1 -0
  106. package/cjs/src/utils/graphql/answerService/graphql-queries.js +80 -0
  107. package/cjs/src/utils/graphql/answerService/graphql-queries.js.map +1 -0
  108. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  109. package/cjs/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  110. package/cjs/src/utils/graphql/conversationService/conversation-queries.js +318 -0
  111. package/cjs/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  112. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  113. package/cjs/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  114. package/cjs/src/utils/graphql/conversationService/conversation-service.js +89 -0
  115. package/cjs/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  116. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  117. package/cjs/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  118. package/cjs/src/utils/graphql/spotterService/conversation-queries.js +318 -0
  119. package/cjs/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  120. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  121. package/cjs/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  122. package/cjs/src/utils/graphql/spotterService/conversation-service.js +89 -0
  123. package/cjs/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  124. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  125. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  126. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js +403 -0
  127. package/cjs/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  128. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  129. package/cjs/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  130. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js +55 -0
  131. package/cjs/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  132. package/cjs/src/utils/processTrigger.d.ts +3 -2
  133. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  134. package/cjs/src/utils/processTrigger.js +4 -2
  135. package/cjs/src/utils/processTrigger.js.map +1 -1
  136. package/cjs/src/utils.d.ts +20 -1
  137. package/cjs/src/utils.d.ts.map +1 -1
  138. package/cjs/src/utils.js +40 -1
  139. package/cjs/src/utils.js.map +1 -1
  140. package/cjs/src/utils.spec.js +49 -0
  141. package/cjs/src/utils.spec.js.map +1 -1
  142. package/dist/{index-Dgzjq7qH.js → index-0serzuii.js} +1 -1
  143. package/dist/index-CqrIh3Vj.js +7370 -0
  144. package/dist/src/authToken.d.ts +1 -1
  145. package/dist/src/authToken.d.ts.map +1 -1
  146. package/dist/src/css-variables.d.ts +48 -0
  147. package/dist/src/css-variables.d.ts.map +1 -1
  148. package/dist/src/embed/app.d.ts +37 -0
  149. package/dist/src/embed/app.d.ts.map +1 -1
  150. package/dist/src/embed/auto-frame-renderer.d.ts +3 -0
  151. package/dist/src/embed/auto-frame-renderer.d.ts.map +1 -0
  152. package/dist/src/embed/base.d.ts.map +1 -1
  153. package/dist/src/embed/conversation.d.ts +128 -10
  154. package/dist/src/embed/conversation.d.ts.map +1 -1
  155. package/dist/src/embed/hostEventClient/contracts.d.ts +3 -3
  156. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  157. package/dist/src/embed/hostEventClient/host-event-client.d.ts +8 -8
  158. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  159. package/dist/src/embed/liveboard.d.ts +40 -3
  160. package/dist/src/embed/liveboard.d.ts.map +1 -1
  161. package/dist/src/embed/ts-embed.d.ts +23 -2
  162. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  163. package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
  164. package/dist/src/errors.d.ts +1 -0
  165. package/dist/src/errors.d.ts.map +1 -1
  166. package/dist/src/index.d.ts +4 -3
  167. package/dist/src/index.d.ts.map +1 -1
  168. package/dist/src/types.d.ts +360 -43
  169. package/dist/src/types.d.ts.map +1 -1
  170. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  171. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  172. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -1
  173. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  174. package/dist/src/utils/processTrigger.d.ts +3 -2
  175. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  176. package/dist/src/utils.d.ts +20 -1
  177. package/dist/src/utils.d.ts.map +1 -1
  178. package/dist/tsembed-react.es.js +502 -98
  179. package/dist/tsembed-react.js +501 -97
  180. package/dist/tsembed.es.js +570 -113
  181. package/dist/tsembed.js +30011 -29553
  182. package/dist/visual-embed-sdk-react-full.d.ts +820 -283
  183. package/dist/visual-embed-sdk-react.d.ts +819 -282
  184. package/dist/visual-embed-sdk.d.ts +886 -322
  185. package/lib/package.json +2 -2
  186. package/lib/src/authToken.d.ts +1 -1
  187. package/lib/src/authToken.d.ts.map +1 -1
  188. package/lib/src/authToken.js +2 -2
  189. package/lib/src/authToken.js.map +1 -1
  190. package/lib/src/authToken.spec.js +72 -1
  191. package/lib/src/authToken.spec.js.map +1 -1
  192. package/lib/src/css-variables.d.ts +48 -0
  193. package/lib/src/css-variables.d.ts.map +1 -1
  194. package/lib/src/embed/app.d.ts +37 -0
  195. package/lib/src/embed/app.d.ts.map +1 -1
  196. package/lib/src/embed/app.js +39 -3
  197. package/lib/src/embed/app.js.map +1 -1
  198. package/lib/src/embed/app.spec.js +24 -0
  199. package/lib/src/embed/app.spec.js.map +1 -1
  200. package/lib/src/embed/auto-frame-renderer.d.ts +3 -0
  201. package/lib/src/embed/auto-frame-renderer.d.ts.map +1 -0
  202. package/lib/src/embed/auto-frame-renderer.js +56 -0
  203. package/lib/src/embed/auto-frame-renderer.js.map +1 -0
  204. package/lib/src/embed/base.d.ts.map +1 -1
  205. package/lib/src/embed/base.js.map +1 -1
  206. package/lib/src/embed/conversation.d.ts +128 -10
  207. package/lib/src/embed/conversation.d.ts.map +1 -1
  208. package/lib/src/embed/conversation.js +42 -19
  209. package/lib/src/embed/conversation.js.map +1 -1
  210. package/lib/src/embed/conversation.spec.js +96 -3
  211. package/lib/src/embed/conversation.spec.js.map +1 -1
  212. package/lib/src/embed/hostEventClient/contracts.d.ts +3 -3
  213. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  214. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  215. package/lib/src/embed/hostEventClient/host-event-client.d.ts +8 -8
  216. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  217. package/lib/src/embed/hostEventClient/host-event-client.js +18 -18
  218. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  219. package/lib/src/embed/hostEventClient/host-event-client.spec.js +7 -7
  220. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  221. package/lib/src/embed/liveboard.d.ts +40 -3
  222. package/lib/src/embed/liveboard.d.ts.map +1 -1
  223. package/lib/src/embed/liveboard.js +41 -13
  224. package/lib/src/embed/liveboard.js.map +1 -1
  225. package/lib/src/embed/liveboard.spec.js +180 -8
  226. package/lib/src/embed/liveboard.spec.js.map +1 -1
  227. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  228. package/lib/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  229. package/lib/src/embed/searchEmbed-basic-auth.spec.js +101 -0
  230. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  231. package/lib/src/embed/ts-embed.d.ts +23 -2
  232. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  233. package/lib/src/embed/ts-embed.js +64 -22
  234. package/lib/src/embed/ts-embed.js.map +1 -1
  235. package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
  236. package/lib/src/embed/ts-embed.spec.js +139 -20
  237. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  238. package/lib/src/errors.d.ts +1 -0
  239. package/lib/src/errors.d.ts.map +1 -1
  240. package/lib/src/errors.js +1 -0
  241. package/lib/src/errors.js.map +1 -1
  242. package/lib/src/index.d.ts +4 -3
  243. package/lib/src/index.d.ts.map +1 -1
  244. package/lib/src/index.js +3 -2
  245. package/lib/src/index.js.map +1 -1
  246. package/lib/src/types.d.ts +360 -43
  247. package/lib/src/types.d.ts.map +1 -1
  248. package/lib/src/types.js +227 -19
  249. package/lib/src/types.js.map +1 -1
  250. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  251. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  252. package/lib/src/utils/graphql/answerService/answer-queries.js +22 -0
  253. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  254. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -1
  255. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  256. package/lib/src/utils/graphql/answerService/answerService.js +9 -1
  257. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  258. package/lib/src/utils/graphql/answerService/answerService.spec.js +73 -0
  259. package/lib/src/utils/graphql/answerService/answerService.spec.js.map +1 -1
  260. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts +3 -0
  261. package/lib/src/utils/graphql/conversationService/conversation-queries.d.ts.map +1 -0
  262. package/lib/src/utils/graphql/conversationService/conversation-queries.js +315 -0
  263. package/lib/src/utils/graphql/conversationService/conversation-queries.js.map +1 -0
  264. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts +12 -0
  265. package/lib/src/utils/graphql/conversationService/conversation-service.d.ts.map +1 -0
  266. package/lib/src/utils/graphql/conversationService/conversation-service.js +84 -0
  267. package/lib/src/utils/graphql/conversationService/conversation-service.js.map +1 -0
  268. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts +3 -0
  269. package/lib/src/utils/graphql/spotterService/conversation-queries.d.ts.map +1 -0
  270. package/lib/src/utils/graphql/spotterService/conversation-queries.js +315 -0
  271. package/lib/src/utils/graphql/spotterService/conversation-queries.js.map +1 -0
  272. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts +12 -0
  273. package/lib/src/utils/graphql/spotterService/conversation-service.d.ts.map +1 -0
  274. package/lib/src/utils/graphql/spotterService/conversation-service.js +84 -0
  275. package/lib/src/utils/graphql/spotterService/conversation-service.js.map +1 -0
  276. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts +2 -0
  277. package/lib/src/utils/graphql/spotterService/nls-answer-queries.d.ts.map +1 -0
  278. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js +400 -0
  279. package/lib/src/utils/graphql/spotterService/nls-answer-queries.js.map +1 -0
  280. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts +12 -0
  281. package/lib/src/utils/graphql/spotterService/nls-answer-service.d.ts.map +1 -0
  282. package/lib/src/utils/graphql/spotterService/nls-answer-service.js +50 -0
  283. package/lib/src/utils/graphql/spotterService/nls-answer-service.js.map +1 -0
  284. package/lib/src/utils/processTrigger.d.ts +3 -2
  285. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  286. package/lib/src/utils/processTrigger.js +4 -2
  287. package/lib/src/utils/processTrigger.js.map +1 -1
  288. package/lib/src/utils.d.ts +20 -1
  289. package/lib/src/utils.d.ts.map +1 -1
  290. package/lib/src/utils.js +36 -0
  291. package/lib/src/utils.js.map +1 -1
  292. package/lib/src/utils.spec.js +50 -1
  293. package/lib/src/utils.spec.js.map +1 -1
  294. package/lib/src/visual-embed-sdk.d.ts +7186 -0
  295. package/package.json +3 -3
  296. package/src/authToken.spec.ts +91 -2
  297. package/src/authToken.ts +2 -2
  298. package/src/css-variables.ts +60 -0
  299. package/src/embed/app.spec.ts +32 -0
  300. package/src/embed/app.ts +97 -1
  301. package/src/embed/auto-frame-renderer.ts +65 -0
  302. package/src/embed/base.ts +1 -0
  303. package/src/embed/conversation.spec.ts +117 -3
  304. package/src/embed/conversation.ts +189 -30
  305. package/src/embed/hostEventClient/contracts.ts +4 -4
  306. package/src/embed/hostEventClient/host-event-client.spec.ts +7 -1
  307. package/src/embed/hostEventClient/host-event-client.ts +22 -11
  308. package/src/embed/liveboard.spec.ts +264 -10
  309. package/src/embed/liveboard.ts +105 -14
  310. package/src/embed/ts-embed.spec.ts +184 -8
  311. package/src/embed/ts-embed.ts +81 -24
  312. package/src/errors.ts +1 -0
  313. package/src/index.ts +10 -1
  314. package/src/types.ts +368 -41
  315. package/src/utils/graphql/answerService/answer-queries.ts +23 -0
  316. package/src/utils/graphql/answerService/answerService.spec.ts +87 -0
  317. package/src/utils/graphql/answerService/answerService.ts +13 -1
  318. package/src/utils/processTrigger.ts +6 -3
  319. package/src/utils.spec.ts +56 -0
  320. package/src/utils.ts +44 -0
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.45.1 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.45.3-mcp.1 */
2
2
  'use client';
3
3
  import * as React from 'react';
4
4
  import React__default, { useRef, useCallback } from 'react';
@@ -1845,6 +1845,54 @@ var EmbedEvent;
1845
1845
  * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
1846
1846
  */
1847
1847
  EmbedEvent["ApiIntercept"] = "ApiIntercept";
1848
+ /**
1849
+ * Emitted when a Spotter conversation is renamed.
1850
+ * @example
1851
+ * ```js
1852
+ * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => {
1853
+ * console.log('Conversation renamed', payload);
1854
+ * // payload: { convId: string, oldTitle: string, newTitle: string }
1855
+ * })
1856
+ * ```
1857
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1858
+ */
1859
+ EmbedEvent["SpotterConversationRenamed"] = "spotterConversationRenamed";
1860
+ /**
1861
+ * Emitted when a Spotter conversation is deleted.
1862
+ * @example
1863
+ * ```js
1864
+ * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => {
1865
+ * console.log('Conversation deleted', payload);
1866
+ * // payload: { convId: string, title: string }
1867
+ * })
1868
+ * ```
1869
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1870
+ */
1871
+ EmbedEvent["SpotterConversationDeleted"] = "spotterConversationDeleted";
1872
+ /**
1873
+ * Emitted when a Spotter conversation is selected/clicked.
1874
+ * @example
1875
+ * ```js
1876
+ * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => {
1877
+ * console.log('Conversation selected', payload);
1878
+ * // payload: { convId: string, title: string, worksheetId: string }
1879
+ * })
1880
+ * ```
1881
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
1882
+ */
1883
+ EmbedEvent["SpotterConversationSelected"] = "spotterConversationSelected";
1884
+ /**
1885
+ * @hidden
1886
+ * Emitted when the auth token is about to get expired and needs to be refreshed.
1887
+ * @example
1888
+ * ```js
1889
+ * embed.on(EmbedEvent.RefreshAuthToken, (payload) => {
1890
+ * console.log('payload', payload);
1891
+ * })
1892
+ * ```
1893
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
1894
+ */
1895
+ EmbedEvent["RefreshAuthToken"] = "RefreshAuthToken";
1848
1896
  })(EmbedEvent || (EmbedEvent = {}));
1849
1897
  /**
1850
1898
  * Event types that can be triggered by the host application
@@ -3228,6 +3276,17 @@ var HostEvent;
3228
3276
  * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
3229
3277
  */
3230
3278
  HostEvent["StartNewSpotterConversation"] = "StartNewSpotterConversation";
3279
+ /**
3280
+ * @hidden
3281
+ * Get the current context of the embedded page.
3282
+ *
3283
+ * @example
3284
+ * ```js
3285
+ * const context = await liveboardEmbed.trigger(HostEvent.GetPageContext);
3286
+ * ```
3287
+ * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
3288
+ */
3289
+ HostEvent["GetPageContext"] = "GetPageContext";
3231
3290
  })(HostEvent || (HostEvent = {}));
3232
3291
  /**
3233
3292
  * The different visual modes that the data sources panel within
@@ -3254,6 +3313,7 @@ var DataSourceVisualMode;
3254
3313
  */
3255
3314
  var Param;
3256
3315
  (function (Param) {
3316
+ Param["Tsmcp"] = "tsmcp";
3257
3317
  Param["EmbedApp"] = "embedApp";
3258
3318
  Param["DataSources"] = "dataSources";
3259
3319
  Param["DataSourceMode"] = "dataSourceMode";
@@ -3384,7 +3444,19 @@ var Param;
3384
3444
  Param["isLinkParametersEnabled"] = "isLinkParametersEnabled";
3385
3445
  Param["EnablePastConversationsSidebar"] = "enablePastConversationsSidebar";
3386
3446
  Param["UpdatedSpotterChatPrompt"] = "updatedSpotterChatPrompt";
3447
+ Param["SpotterSidebarTitle"] = "spotterSidebarTitle";
3448
+ Param["SpotterSidebarDefaultExpanded"] = "spotterSidebarDefaultExpanded";
3449
+ Param["SpotterChatRenameLabel"] = "spotterChatRenameLabel";
3450
+ Param["SpotterChatDeleteLabel"] = "spotterChatDeleteLabel";
3451
+ Param["SpotterDeleteConversationModalTitle"] = "spotterDeleteConversationModalTitle";
3452
+ Param["SpotterPastConversationAlertMessage"] = "spotterPastConversationAlertMessage";
3453
+ Param["SpotterDocumentationUrl"] = "spotterDocumentationUrl";
3454
+ Param["SpotterBestPracticesLabel"] = "spotterBestPracticesLabel";
3455
+ Param["SpotterConversationsBatchSize"] = "spotterConversationsBatchSize";
3456
+ Param["SpotterNewChatButtonTitle"] = "spotterNewChatButtonTitle";
3387
3457
  Param["IsThisPeriodInDateFiltersEnabled"] = "isThisPeriodInDateFiltersEnabled";
3458
+ Param["HideToolResponseCardBranding"] = "hideToolResponseCardBranding";
3459
+ Param["ToolResponseCardBrandingLabel"] = "toolResponseCardBrandingLabel";
3388
3460
  })(Param || (Param = {}));
3389
3461
  /**
3390
3462
  * ThoughtSpot application pages include actions and menu commands
@@ -4810,6 +4882,96 @@ var Action;
4810
4882
  * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl
4811
4883
  */
4812
4884
  Action["UngroupLiveboardGroup"] = "ungroupLiveboardGroup";
4885
+ /**
4886
+ * Controls visibility of the sidebar header (title and toggle button)
4887
+ * in the Spotter past conversations sidebar.
4888
+ * @example
4889
+ * ```js
4890
+ * hiddenActions: [Action.SpotterSidebarHeader]
4891
+ * ```
4892
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4893
+ */
4894
+ Action["SpotterSidebarHeader"] = "spotterSidebarHeader";
4895
+ /**
4896
+ * Controls visibility of the sidebar footer (documentation link)
4897
+ * in the Spotter past conversations sidebar.
4898
+ * @example
4899
+ * ```js
4900
+ * hiddenActions: [Action.SpotterSidebarFooter]
4901
+ * ```
4902
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4903
+ */
4904
+ Action["SpotterSidebarFooter"] = "spotterSidebarFooter";
4905
+ /**
4906
+ * Controls visibility and disable state of the sidebar toggle/expand button
4907
+ * in the Spotter past conversations sidebar.
4908
+ * @example
4909
+ * ```js
4910
+ * disabledActions: [Action.SpotterSidebarToggle]
4911
+ * ```
4912
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4913
+ */
4914
+ Action["SpotterSidebarToggle"] = "spotterSidebarToggle";
4915
+ /**
4916
+ * Controls visibility and disable state of the "New Chat" button
4917
+ * in the Spotter past conversations sidebar.
4918
+ * @example
4919
+ * ```js
4920
+ * disabledActions: [Action.SpotterNewChat]
4921
+ * ```
4922
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4923
+ */
4924
+ Action["SpotterNewChat"] = "spotterNewChat";
4925
+ /**
4926
+ * Controls visibility of the past conversation banner alert
4927
+ * in the Spotter interface.
4928
+ * @example
4929
+ * ```js
4930
+ * hiddenActions: [Action.SpotterPastChatBanner]
4931
+ * ```
4932
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4933
+ */
4934
+ Action["SpotterPastChatBanner"] = "spotterPastChatBanner";
4935
+ /**
4936
+ * Controls visibility and disable state of the conversation edit menu
4937
+ * (three-dot menu) in the Spotter past conversations sidebar.
4938
+ * @example
4939
+ * ```js
4940
+ * disabledActions: [Action.SpotterChatMenu]
4941
+ * ```
4942
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4943
+ */
4944
+ Action["SpotterChatMenu"] = "spotterChatMenu";
4945
+ /**
4946
+ * Controls visibility and disable state of the rename action
4947
+ * in the Spotter conversation edit menu.
4948
+ * @example
4949
+ * ```js
4950
+ * disabledActions: [Action.SpotterChatRename]
4951
+ * ```
4952
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4953
+ */
4954
+ Action["SpotterChatRename"] = "spotterChatRename";
4955
+ /**
4956
+ * Controls visibility and disable state of the delete action
4957
+ * in the Spotter conversation edit menu.
4958
+ * @example
4959
+ * ```js
4960
+ * disabledActions: [Action.SpotterChatDelete]
4961
+ * ```
4962
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4963
+ */
4964
+ Action["SpotterChatDelete"] = "spotterChatDelete";
4965
+ /**
4966
+ * Controls visibility and disable state of the documentation/best practices
4967
+ * link in the Spotter sidebar footer.
4968
+ * @example
4969
+ * ```js
4970
+ * disabledActions: [Action.SpotterDocs]
4971
+ * ```
4972
+ * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4973
+ */
4974
+ Action["SpotterDocs"] = "spotterDocs";
4813
4975
  /**
4814
4976
  * The **Include current period** checkbox for date filters.
4815
4977
  * Controls the visibility and availability of the option to include
@@ -4948,13 +5110,30 @@ var LogLevel;
4948
5110
  * Error types emitted by embedded components.
4949
5111
  *
4950
5112
  * These enum values categorize different types of errors that can occur during
4951
- * the lifecycle of an embedded ThoughtSpot component. Use these values to implement
4952
- * specific error handling logic based on the error category.
4953
- *
4954
- * @see {@link EmbedErrorDetailsEvent} - The error event object structure
4955
- * @see {@link EmbedEvent.Error} - The event that emits these errors
5113
+ * the lifecycle of an embedded ThoughtSpot component.
5114
+ * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors.
4956
5115
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4957
5116
  * @group Error Handling
5117
+ *
5118
+ * @example
5119
+ * Handle specific error types
5120
+ * ```js
5121
+ * embed.on(EmbedEvent.Error, (error) => {
5122
+ * switch (error.errorType) {
5123
+ * case ErrorDetailsTypes.API:
5124
+ * console.error('API error:', error.message);
5125
+ * break;
5126
+ * case ErrorDetailsTypes.VALIDATION_ERROR:
5127
+ * console.error('Validation error:', error.message);
5128
+ * break;
5129
+ * case ErrorDetailsTypes.NETWORK:
5130
+ * console.error('Network error:', error.message);
5131
+ * break;
5132
+ * default:
5133
+ * console.error('Unknown error:', error);
5134
+ * }
5135
+ * });
5136
+ * ```
4958
5137
  */
4959
5138
  var ErrorDetailsTypes;
4960
5139
  (function (ErrorDetailsTypes) {
@@ -4966,35 +5145,43 @@ var ErrorDetailsTypes;
4966
5145
  ErrorDetailsTypes["NETWORK"] = "NETWORK";
4967
5146
  })(ErrorDetailsTypes || (ErrorDetailsTypes = {}));
4968
5147
  /**
4969
- * Error codes for identifying specific issues in embedded ThoughtSpot components.
4970
- *
4971
- * Use these codes for precise error handling and debugging. Each code maps to a
4972
- * distinct failure scenario, enabling targeted recovery strategies.
5148
+ * Error codes for identifying specific issues in embedded ThoughtSpot components. Use {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error handling and debugging.
4973
5149
  *
4974
5150
  * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl
4975
5151
  * @group Error Handling
4976
- *
4977
- * @see {@link EmbedErrorDetailsEvent} - The error event object that includes these codes
4978
- * @see {@link ErrorDetailsTypes} - General error type categories
4979
- *
5152
+
4980
5153
  * @example
4981
5154
  * Handle specific error codes in the error event handler
4982
- *
5155
+ * ```js
4983
5156
  * embed.on(EmbedEvent.Error, (error) => {
4984
- * if (error.code === EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND) {
4985
- * console.error('Worksheet ID not found:', error.message);
5157
+ * switch (error.code) {
5158
+ * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND:
5159
+ * console.error('Worksheet ID not found:', error.message);
5160
+ * break;
5161
+ * case EmbedErrorCodes.LIVEBOARD_ID_MISSING:
5162
+ * console.error('Liveboard ID is missing:', error.message);
5163
+ * break;
5164
+ * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG:
5165
+ * console.error('Conflicting actions configuration:', error.message);
5166
+ * break;
5167
+ * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG:
5168
+ * console.error('Conflicting tabs configuration:', error.message);
5169
+ * break;
5170
+ * default:
5171
+ * console.error('Unknown error:', error);
4986
5172
  * }
4987
5173
  * });
4988
- * */
5174
+ * ```
5175
+ * */
4989
5176
  var EmbedErrorCodes;
4990
5177
  (function (EmbedErrorCodes) {
4991
5178
  /** Worksheet ID not found or does not exist */
4992
5179
  EmbedErrorCodes["WORKSHEET_ID_NOT_FOUND"] = "WORKSHEET_ID_NOT_FOUND";
4993
5180
  /** Required Liveboard ID is missing from configuration */
4994
5181
  EmbedErrorCodes["LIVEBOARD_ID_MISSING"] = "LIVEBOARD_ID_MISSING";
4995
- /** Conflicting action configuration detected (e.g., both hiddenActions and visibleActions specified) */
5182
+ /** Conflicting action configuration detected */
4996
5183
  EmbedErrorCodes["CONFLICTING_ACTIONS_CONFIG"] = "CONFLICTING_ACTIONS_CONFIG";
4997
- /** Conflicting tab configuration detected (e.g., both hiddenTabs and visibleTabs specified) */
5184
+ /** Conflicting tab configuration detected */
4998
5185
  EmbedErrorCodes["CONFLICTING_TABS_CONFIG"] = "CONFLICTING_TABS_CONFIG";
4999
5186
  /** Error during component initialization */
5000
5187
  EmbedErrorCodes["INIT_ERROR"] = "INIT_ERROR";
@@ -5012,7 +5199,28 @@ var EmbedErrorCodes;
5012
5199
  EmbedErrorCodes["PARSING_API_INTERCEPT_BODY_ERROR"] = "PARSING_API_INTERCEPT_BODY_ERROR";
5013
5200
  /** Failed to update embed parameters during pre-render */
5014
5201
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5202
+ /** Invalid URL provided in configuration */
5203
+ EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5015
5204
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
5205
+ var ContextType;
5206
+ (function (ContextType) {
5207
+ /**
5208
+ * Search answer context for search page or edit viz dialog on liveboard page.
5209
+ */
5210
+ ContextType["Search"] = "search-answer";
5211
+ /**
5212
+ * Liveboard context for liveboard page.
5213
+ */
5214
+ ContextType["Liveboard"] = "liveboard";
5215
+ /**
5216
+ * Answer context for explore modal/page on liveboard page.
5217
+ */
5218
+ ContextType["Answer"] = "answer";
5219
+ /**
5220
+ * Spotter context for spotter modal/page.
5221
+ */
5222
+ ContextType["Spotter"] = "spotter";
5223
+ })(ContextType || (ContextType = {}));
5016
5224
  /**
5017
5225
  * Enum for the type of API intercepted
5018
5226
  */
@@ -5133,6 +5341,7 @@ const ERROR_MESSAGE = {
5133
5341
  ERROR_PARSING_API_INTERCEPT_BODY: 'Error parsing api intercept body',
5134
5342
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5135
5343
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5344
+ INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
5136
5345
  };
5137
5346
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5138
5347
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5599,6 +5808,12 @@ const formatTemplate = (template, values) => {
5599
5808
  return values[key] !== undefined ? String(values[key]) : match;
5600
5809
  });
5601
5810
  };
5811
+ const getHostEventsConfig = (viewConfig) => {
5812
+ return {
5813
+ shouldBypassPayloadValidation: viewConfig.shouldBypassPayloadValidation,
5814
+ useHostEventsV2: viewConfig.useHostEventsV2,
5815
+ };
5816
+ };
5602
5817
  /**
5603
5818
  * Check if the window is undefined
5604
5819
  * If the window is undefined, it means the code is running in a SSR environment.
@@ -5611,6 +5826,36 @@ const isWindowUndefined = () => {
5611
5826
  return true;
5612
5827
  }
5613
5828
  return false;
5829
+ };
5830
+ /**
5831
+ * Validates that a URL uses only http: or https: protocols.
5832
+ * Returns a tuple of [isValid, error] so the caller can handle validation errors.
5833
+ * @param url - The URL string to validate
5834
+ * @returns [true, null] if valid, [false, Error] if invalid
5835
+ */
5836
+ const validateHttpUrl = (url) => {
5837
+ try {
5838
+ const parsedUrl = new URL(url);
5839
+ if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') {
5840
+ return [false, new Error(`Invalid protocol: ${parsedUrl.protocol}. Only http: and https: are allowed.`)];
5841
+ }
5842
+ return [true, null];
5843
+ }
5844
+ catch (error) {
5845
+ return [false, error instanceof Error ? error : new Error(String(error))];
5846
+ }
5847
+ };
5848
+ /**
5849
+ * Sets a query parameter if the value is defined.
5850
+ * @param queryParams - The query params object to modify
5851
+ * @param param - The parameter key
5852
+ * @param value - The value to set
5853
+ * @param asBoolean - If true, coerces value to boolean
5854
+ */
5855
+ const setParamIfDefined = (queryParams, param, value, asBoolean = false) => {
5856
+ if (value !== undefined) {
5857
+ queryParams[param] = asBoolean ? !!value : value;
5858
+ }
5614
5859
  };
5615
5860
 
5616
5861
  /**
@@ -8022,11 +8267,11 @@ const storeAuthTokenInCache = (token) => {
8022
8267
  *
8023
8268
  * @param embedConfig
8024
8269
  */
8025
- async function getAuthenticationToken(embedConfig) {
8270
+ async function getAuthenticationToken(embedConfig, skipvalidation = false) {
8026
8271
  const cachedAuthToken = getCacheAuthToken();
8027
8272
  // Since we don't have token validation enabled , we cannot tell if the
8028
8273
  // cached token is valid or not. So we will always fetch a new token.
8029
- if (cachedAuthToken && !embedConfig.disableTokenVerification) {
8274
+ if (cachedAuthToken && !embedConfig.disableTokenVerification && !skipvalidation) {
8030
8275
  let isCachedTokenStillValid;
8031
8276
  try {
8032
8277
  isCachedTokenStillValid = await validateAuthToken(embedConfig, cachedAuthToken, true);
@@ -8471,6 +8716,28 @@ const getSQLQuery = `
8471
8716
  }
8472
8717
  }
8473
8718
  `;
8719
+ const updateDisplayMode = `
8720
+ mutation UpdateDisplayMode(
8721
+ $session: BachSessionIdInput!
8722
+ $displayMode: DisplayMode
8723
+ ) {
8724
+ Answer__updateProperties(session: $session, displayMode: $displayMode) {
8725
+ id {
8726
+ sessionId
8727
+ genNo
8728
+ acSession {
8729
+ sessionId
8730
+ genNo
8731
+ }
8732
+ }
8733
+ answer {
8734
+ id
8735
+ displayMode
8736
+ suggestedDisplayMode
8737
+ }
8738
+ }
8739
+ }
8740
+ `;
8474
8741
  const getAnswerTML = `
8475
8742
  mutation GetUnsavedAnswerTML($session: BachSessionIdInput!, $exportDependencies: Boolean, $formatType: EDocFormatType, $exportPermissions: Boolean, $exportFqn: Boolean) {
8476
8743
  UnsavedAnswer_getTML(
@@ -8638,7 +8905,15 @@ class AnswerService {
8638
8905
  },
8639
8906
  });
8640
8907
  }
8641
- async getSQLQuery() {
8908
+ async updateDisplayMode(displayMode = "TABLE_MODE") {
8909
+ return this.executeQuery(updateDisplayMode, {
8910
+ displayMode,
8911
+ });
8912
+ }
8913
+ async getSQLQuery(fetchSQLWithAllColumns = false) {
8914
+ if (fetchSQLWithAllColumns) {
8915
+ await this.updateDisplayMode("TABLE_MODE");
8916
+ }
8642
8917
  const { sql } = await this.executeQuery(getSQLQuery, {});
8643
8918
  return sql;
8644
8919
  }
@@ -8794,7 +9069,7 @@ class AnswerService {
8794
9069
  async getTML() {
8795
9070
  const { object } = await this.executeQuery(getAnswerTML, {});
8796
9071
  const edoc = object[0].edoc;
8797
- const YAML = await import('./index-Dgzjq7qH.js');
9072
+ const YAML = await import('./index-0serzuii.js');
8798
9073
  const parsedDoc = YAML.parse(edoc);
8799
9074
  return {
8800
9075
  answer: {
@@ -17656,6 +17931,7 @@ const reload = (iFrame) => {
17656
17931
  * @param message
17657
17932
  * @param message.type
17658
17933
  * @param message.data
17934
+ * @param message.context
17659
17935
  * @param thoughtSpotHost
17660
17936
  * @param channel
17661
17937
  */
@@ -17670,8 +17946,9 @@ const TRIGGER_TIMEOUT = 30000;
17670
17946
  * @param messageType
17671
17947
  * @param thoughtSpotHost
17672
17948
  * @param data
17949
+ * @param context
17673
17950
  */
17674
- function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17951
+ function processTrigger(iFrame, messageType, thoughtSpotHost, data, context) {
17675
17952
  return new Promise((res, rej) => {
17676
17953
  var _a;
17677
17954
  if (messageType === HostEvent.Reload) {
@@ -17705,7 +17982,7 @@ function processTrigger(iFrame, messageType, thoughtSpotHost, data) {
17705
17982
  channel.port1.close();
17706
17983
  res(new Error(ERROR_MESSAGE.TRIGGER_TIMED_OUT));
17707
17984
  }, TRIGGER_TIMEOUT);
17708
- return postIframeMessage(iFrame, { type: messageType, data }, thoughtSpotHost, channel);
17985
+ return postIframeMessage(iFrame, { type: messageType, data, context }, thoughtSpotHost, channel);
17709
17986
  });
17710
17987
  }
17711
17988
 
@@ -18051,7 +18328,7 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
18051
18328
  return eventData;
18052
18329
  }
18053
18330
 
18054
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.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={".":{"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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","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":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.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":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
18331
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.45.3-mcp.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={".":{"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 tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.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 | npx coveralls-next","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && 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={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","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":"^11.2.0","@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":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.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":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};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,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 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};
18055
18332
 
18056
18333
  class HostEventClient {
18057
18334
  constructor(iFrame) {
@@ -18063,16 +18340,16 @@ class HostEventClient {
18063
18340
  * @param {any} data Data to send with the host event
18064
18341
  * @returns {Promise<any>} - the response from the process trigger
18065
18342
  */
18066
- async processTrigger(message, data) {
18343
+ async processTrigger(message, data, context) {
18067
18344
  if (!this.iFrame) {
18068
18345
  throw new Error('Iframe element is not set');
18069
18346
  }
18070
18347
  const thoughtspotHost = getEmbedConfig().thoughtSpotHost;
18071
- return processTrigger(this.iFrame, message, thoughtspotHost, data);
18348
+ return processTrigger(this.iFrame, message, thoughtspotHost, data, context);
18072
18349
  }
18073
- async handleHostEventWithParam(apiName, parameters) {
18350
+ async handleHostEventWithParam(apiName, parameters, context) {
18074
18351
  var _a, _b, _c, _d;
18075
- const response = (_b = (_a = (await this.triggerUIPassthroughApi(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];
18352
+ const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
18076
18353
  if (!response) {
18077
18354
  const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
18078
18355
  // eslint-disable-next-line no-throw-literal
@@ -18087,8 +18364,8 @@ class HostEventClient {
18087
18364
  }
18088
18365
  return { ...response.value };
18089
18366
  }
18090
- async hostEventFallback(hostEvent, data) {
18091
- return this.processTrigger(hostEvent, data);
18367
+ async hostEventFallback(hostEvent, data, context) {
18368
+ return this.processTrigger(hostEvent, data, context);
18092
18369
  }
18093
18370
  /**
18094
18371
  * Setter for the iframe element used for host events
@@ -18097,49 +18374,49 @@ class HostEventClient {
18097
18374
  setIframeElement(iFrame) {
18098
18375
  this.iFrame = iFrame;
18099
18376
  }
18100
- async triggerUIPassthroughApi(apiName, parameters) {
18377
+ async triggerUIPassthroughApi(apiName, parameters, context) {
18101
18378
  const res = await this.processTrigger(HostEvent.UIPassthrough, {
18102
18379
  type: apiName,
18103
18380
  parameters,
18104
- });
18381
+ }, context);
18105
18382
  return res;
18106
18383
  }
18107
- async handlePinEvent(payload) {
18384
+ async handlePinEvent(payload, context) {
18108
18385
  var _a, _b;
18109
18386
  if (!payload || !('newVizName' in payload)) {
18110
- return this.hostEventFallback(HostEvent.Pin, payload);
18387
+ return this.hostEventFallback(HostEvent.Pin, payload, context);
18111
18388
  }
18112
18389
  const formattedPayload = {
18113
18390
  ...payload,
18114
18391
  pinboardId: (_a = payload.liveboardId) !== null && _a !== void 0 ? _a : payload.pinboardId,
18115
18392
  newPinboardName: (_b = payload.newLiveboardName) !== null && _b !== void 0 ? _b : payload.newPinboardName,
18116
18393
  };
18117
- const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload);
18394
+ const data = await this.handleHostEventWithParam(UIPassthroughEvent.PinAnswerToLiveboard, formattedPayload, context);
18118
18395
  return {
18119
18396
  ...data,
18120
18397
  liveboardId: data.pinboardId,
18121
18398
  };
18122
18399
  }
18123
- async handleSaveAnswerEvent(payload) {
18400
+ async handleSaveAnswerEvent(payload, context) {
18124
18401
  var _a, _b, _c, _d;
18125
18402
  if (!payload || !('name' in payload) || !('description' in payload)) {
18126
18403
  // Save is the fallback for SaveAnswer
18127
- return this.hostEventFallback(HostEvent.Save, payload);
18404
+ return this.hostEventFallback(HostEvent.Save, payload, context);
18128
18405
  }
18129
- const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload);
18406
+ const data = await this.handleHostEventWithParam(UIPassthroughEvent.SaveAnswer, payload, context);
18130
18407
  return {
18131
18408
  ...data,
18132
18409
  answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
18133
18410
  };
18134
18411
  }
18135
- async triggerHostEvent(hostEvent, payload) {
18412
+ async triggerHostEvent(hostEvent, payload, context) {
18136
18413
  switch (hostEvent) {
18137
18414
  case HostEvent.Pin:
18138
- return this.handlePinEvent(payload);
18415
+ return this.handlePinEvent(payload, context);
18139
18416
  case HostEvent.SaveAnswer:
18140
- return this.handleSaveAnswerEvent(payload);
18417
+ return this.handleSaveAnswerEvent(payload, context);
18141
18418
  default:
18142
- return this.hostEventFallback(hostEvent, payload);
18419
+ return this.hostEventFallback(hostEvent, payload, context);
18143
18420
  }
18144
18421
  }
18145
18422
  }
@@ -18400,31 +18677,39 @@ class TsEmbed {
18400
18677
  logger$3.error(`AppInit failed, Error : ${e === null || e === void 0 ? void 0 : e.message}`);
18401
18678
  }
18402
18679
  };
18680
+ this.handleAuthFailure = (error) => {
18681
+ logger$3.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${error === null || error === void 0 ? void 0 : error.message}`);
18682
+ processAuthFailure(error, this.isPreRendered ? this.preRenderWrapper : this.el);
18683
+ };
18684
+ /**
18685
+ * Refresh the auth token if the autoLogin is true and the authType is TrustedAuthTokenCookieless
18686
+ * @param _
18687
+ * @param responder
18688
+ */
18689
+ this.tokenRefresh = async (_, responder) => {
18690
+ try {
18691
+ await this.refreshAuthTokenForCookieless(responder, EmbedEvent.RefreshAuthToken, true);
18692
+ }
18693
+ catch (e) {
18694
+ this.handleAuthFailure(e);
18695
+ }
18696
+ };
18403
18697
  /**
18404
18698
  * Sends updated auth token to the iFrame to avoid user logout
18405
18699
  * @param _
18406
18700
  * @param responder
18407
18701
  */
18408
18702
  this.updateAuthToken = async (_, responder) => {
18409
- const { authType } = this.embedConfig;
18410
- let { autoLogin } = this.embedConfig;
18411
- // Default autoLogin: true for cookieless if undefined/null, otherwise
18412
- // false
18413
- autoLogin = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === AuthType.TrustedAuthTokenCookieless);
18414
- if (autoLogin && authType === AuthType.TrustedAuthTokenCookieless) {
18415
- try {
18416
- const authToken = await getAuthenticationToken(this.embedConfig);
18417
- responder({
18418
- type: EmbedEvent.AuthExpire,
18419
- data: { authToken },
18420
- });
18421
- }
18422
- catch (e) {
18423
- logger$3.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
18424
- processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
18425
- }
18703
+ const { authType, autoLogin: autoLoginConfig } = this.embedConfig;
18704
+ // Default autoLogin: true for cookieless if undefined/null, otherwise false
18705
+ const autoLogin = autoLoginConfig !== null && autoLoginConfig !== void 0 ? autoLoginConfig : (authType === AuthType.TrustedAuthTokenCookieless);
18706
+ try {
18707
+ await this.refreshAuthTokenForCookieless(responder, EmbedEvent.AuthExpire, false);
18708
+ }
18709
+ catch (e) {
18710
+ this.handleAuthFailure(e);
18426
18711
  }
18427
- else if (autoLogin) {
18712
+ if (autoLogin && authType !== AuthType.TrustedAuthTokenCookieless) {
18428
18713
  handleAuth();
18429
18714
  }
18430
18715
  notifyAuthFailure(AuthFailureType.EXPIRY);
@@ -18445,8 +18730,7 @@ class TsEmbed {
18445
18730
  });
18446
18731
  }
18447
18732
  catch (e) {
18448
- logger$3.error(`${ERROR_MESSAGE.INVALID_TOKEN_ERROR} Error : ${e === null || e === void 0 ? void 0 : e.message}`);
18449
- processAuthFailure(e, this.isPreRendered ? this.preRenderWrapper : this.el);
18733
+ this.handleAuthFailure(e);
18450
18734
  }
18451
18735
  }).catch((e) => {
18452
18736
  logger$3.error(`Auto Login failed, Error : ${e === null || e === void 0 ? void 0 : e.message}`);
@@ -18464,6 +18748,7 @@ class TsEmbed {
18464
18748
  this.on(EmbedEvent.EmbedListenerReady, embedListenerReadyHandler, { start: false }, true);
18465
18749
  const authInitHandler = this.createEmbedContainerHandler(EmbedEvent.AuthInit);
18466
18750
  this.on(EmbedEvent.AuthInit, authInitHandler, { start: false }, true);
18751
+ this.on(EmbedEvent.RefreshAuthToken, this.tokenRefresh, { start: false }, true);
18467
18752
  };
18468
18753
  this.showPreRenderByDefault = false;
18469
18754
  /**
@@ -18773,13 +19058,33 @@ class TsEmbed {
18773
19058
  customVariablesForThirdPartyTools: this.embedConfig.customVariablesForThirdPartyTools || {},
18774
19059
  hiddenListColumns: this.viewConfig.hiddenListColumns || [],
18775
19060
  customActions: customActionsResult.actions,
19061
+ embedExpiryInAuthToken: this.viewConfig.refreshAuthTokenOnNearExpiry,
18776
19062
  ...getInterceptInitData(this.viewConfig),
19063
+ ...getHostEventsConfig(this.viewConfig),
18777
19064
  };
18778
19065
  return baseInitData;
18779
19066
  }
18780
19067
  async getAppInitData() {
18781
19068
  return this.getDefaultAppInitData();
18782
19069
  }
19070
+ /**
19071
+ * Helper method to refresh/update auth token for TrustedAuthTokenCookieless auth type
19072
+ * @param responder - Function to send response back
19073
+ * @param eventType - The embed event type to send
19074
+ * @param forceRefresh - Whether to force refresh the token
19075
+ * @returns Promise that resolves if token was refreshed, rejects otherwise
19076
+ */
19077
+ async refreshAuthTokenForCookieless(responder, eventType, forceRefresh = false) {
19078
+ const { authType, autoLogin } = this.embedConfig;
19079
+ const isAutoLoginTrue = autoLogin !== null && autoLogin !== void 0 ? autoLogin : (authType === AuthType.TrustedAuthTokenCookieless);
19080
+ if (isAutoLoginTrue && authType === AuthType.TrustedAuthTokenCookieless) {
19081
+ const authToken = await getAuthenticationToken(this.embedConfig, forceRefresh);
19082
+ responder({
19083
+ type: eventType,
19084
+ data: { authToken },
19085
+ });
19086
+ }
19087
+ }
18783
19088
  /**
18784
19089
  * Constructs the base URL string to load the ThoughtSpot app.
18785
19090
  * @param query
@@ -19398,7 +19703,7 @@ class TsEmbed {
19398
19703
  * @param {any} data The payload to send with the message
19399
19704
  * @returns A promise that resolves with the response from the embedded app
19400
19705
  */
19401
- async trigger(messageType, data = {}) {
19706
+ async trigger(messageType, data = {}, context) {
19402
19707
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
19403
19708
  if (!this.isRendered) {
19404
19709
  this.handleError({
@@ -19425,7 +19730,7 @@ class TsEmbed {
19425
19730
  return null;
19426
19731
  }
19427
19732
  // send an empty object, this is needed for liveboard default handlers
19428
- return this.hostEventClient.triggerHostEvent(messageType, data);
19733
+ return this.hostEventClient.triggerHostEvent(messageType, data, context);
19429
19734
  }
19430
19735
  /**
19431
19736
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -19458,6 +19763,19 @@ class TsEmbed {
19458
19763
  handleRenderForPrerender() {
19459
19764
  return this.render();
19460
19765
  }
19766
+ /**
19767
+ * Get the current context of the embedded TS component.
19768
+ * @returns The current context object containing the page type and object ids.
19769
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
19770
+ */
19771
+ async getCurrentContext() {
19772
+ return new Promise((resolve) => {
19773
+ this.executeAfterEmbedContainerLoaded(async () => {
19774
+ const context = await this.trigger(HostEvent.GetPageContext, {});
19775
+ resolve(context);
19776
+ });
19777
+ });
19778
+ }
19461
19779
  /**
19462
19780
  * Creates the preRender shell
19463
19781
  * @param showPreRenderByDefault - Show the preRender after render, hidden by default
@@ -20316,7 +20634,7 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
20316
20634
  * embedded Liveboard or visualization.
20317
20635
  */
20318
20636
  getEmbedParams() {
20319
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20637
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20320
20638
  let params = {};
20321
20639
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20322
20640
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20340,6 +20658,41 @@ let AppEmbed$1 = class AppEmbed extends V1Embed {
20340
20658
  if (!isUndefined$1(updatedSpotterChatPrompt)) {
20341
20659
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20342
20660
  }
20661
+ // Handle spotterSidebarConfig params
20662
+ if (spotterSidebarConfig) {
20663
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20664
+ setParamIfDefined(params, Param.EnablePastConversationsSidebar, enablePastConversationsSidebar, true);
20665
+ setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20666
+ setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20667
+ setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20668
+ setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20669
+ setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20670
+ setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20671
+ setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20672
+ setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20673
+ setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20674
+ // URL param with validation
20675
+ if (spotterDocumentationUrl !== undefined) {
20676
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20677
+ if (isValid) {
20678
+ params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20679
+ }
20680
+ else {
20681
+ this.handleError({
20682
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20683
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20684
+ code: EmbedErrorCodes.INVALID_URL,
20685
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20686
+ });
20687
+ }
20688
+ }
20689
+ }
20690
+ // Handle spotterChatConfig params
20691
+ if (spotterChatConfig) {
20692
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
20693
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
20694
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
20695
+ }
20343
20696
  if (hideObjectSearch) {
20344
20697
  params[Param.HideObjectSearch] = !!hideObjectSearch;
20345
20698
  }
@@ -20737,6 +21090,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20737
21090
  liveboardId: this.viewConfig.liveboardId,
20738
21091
  vizId: this.viewConfig.vizId,
20739
21092
  activeTabId: this.viewConfig.activeTabId,
21093
+ personalizedViewId: this.viewConfig.personalizedViewId,
20740
21094
  };
20741
21095
  if (this.viewConfig.fullHeight === true) {
20742
21096
  if (this.viewConfig.vizId) {
@@ -20761,7 +21115,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20761
21115
  getEmbedParamsObject() {
20762
21116
  let params = {};
20763
21117
  params = this.getBaseQueryParams(params);
20764
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
21118
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
20765
21119
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20766
21120
  || this.viewConfig.preventPinboardFilterRemoval;
20767
21121
  if (fullHeight === true) {
@@ -20835,6 +21189,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20835
21189
  if (showSpotterLimitations !== undefined) {
20836
21190
  params[Param.ShowSpotterLimitations] = showSpotterLimitations;
20837
21191
  }
21192
+ // Handle spotterChatConfig params
21193
+ if (spotterChatConfig) {
21194
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
21195
+ setParamIfDefined(params, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
21196
+ setParamIfDefined(params, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21197
+ }
20838
21198
  if (isLinkParametersEnabled !== undefined) {
20839
21199
  params[Param.isLinkParametersEnabled] = isLinkParametersEnabled;
20840
21200
  }
@@ -20858,15 +21218,31 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20858
21218
  getQueryParamString(params, true);
20859
21219
  return params;
20860
21220
  }
20861
- getIframeSuffixSrc(liveboardId, vizId, activeTabId) {
20862
- let suffix = `/embed/viz/${liveboardId}`;
21221
+ getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
21222
+ // Extract view from liveboardId if passed along with it (legacy approach)
21223
+ // View must be appended as query param at the end, not embedded in path
21224
+ let liveboardGuid = liveboardId;
21225
+ let legacyViewId;
21226
+ if (liveboardId === null || liveboardId === void 0 ? void 0 : liveboardId.includes('?')) {
21227
+ const [id, query] = liveboardId.split('?');
21228
+ liveboardGuid = id;
21229
+ const params = new URLSearchParams(query);
21230
+ legacyViewId = params.get('view') || undefined;
21231
+ }
21232
+ // personalizedViewId takes precedence over legacyViewId (when passed as part of liveboardId)
21233
+ const effectiveViewId = personalizedViewId || legacyViewId;
21234
+ let suffix = `/embed/viz/${liveboardGuid}`;
20863
21235
  if (activeTabId) {
20864
- suffix = `${suffix}/tab/${activeTabId} `;
21236
+ suffix = `${suffix}/tab/${activeTabId}`;
20865
21237
  }
20866
21238
  if (vizId) {
20867
21239
  suffix = `${suffix}/${vizId}`;
20868
21240
  }
20869
- const tsPostHashParams = this.getThoughtSpotPostUrlParams();
21241
+ const additionalParams = {};
21242
+ if (effectiveViewId) {
21243
+ additionalParams.view = effectiveViewId;
21244
+ }
21245
+ const tsPostHashParams = this.getThoughtSpotPostUrlParams(additionalParams);
20870
21246
  suffix = `${suffix}${tsPostHashParams}`;
20871
21247
  return suffix;
20872
21248
  }
@@ -20876,7 +21252,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20876
21252
  */
20877
21253
  getIFrameSrc() {
20878
21254
  var _a;
20879
- const { vizId, activeTabId } = this.viewConfig;
21255
+ const { vizId, activeTabId, personalizedViewId } = this.viewConfig;
20880
21256
  const liveboardId = (_a = this.viewConfig.liveboardId) !== null && _a !== void 0 ? _a : this.viewConfig.pinboardId;
20881
21257
  if (!liveboardId) {
20882
21258
  this.handleError({
@@ -20886,7 +21262,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20886
21262
  error: ERROR_MESSAGE.LIVEBOARD_VIZ_ID_VALIDATION,
20887
21263
  });
20888
21264
  }
20889
- return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId)}`;
21265
+ return `${this.getRootIframeSrc()}${this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId)}`;
20890
21266
  }
20891
21267
  setActiveTab(data) {
20892
21268
  if (!this.viewConfig.vizId) {
@@ -20925,12 +21301,13 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20925
21301
  beforePrerenderVisible() {
20926
21302
  const embedObj = this.getPreRenderObj();
20927
21303
  this.executeAfterEmbedContainerLoaded(() => {
20928
- this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId);
21304
+ this.navigateToLiveboard(this.viewConfig.liveboardId, this.viewConfig.vizId, this.viewConfig.activeTabId, this.viewConfig.personalizedViewId);
20929
21305
  if (embedObj) {
20930
21306
  embedObj.currentLiveboardState = {
20931
21307
  liveboardId: this.viewConfig.liveboardId,
20932
21308
  vizId: this.viewConfig.vizId,
20933
21309
  activeTabId: this.viewConfig.activeTabId,
21310
+ personalizedViewId: this.viewConfig.personalizedViewId,
20934
21311
  };
20935
21312
  }
20936
21313
  });
@@ -20947,7 +21324,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20947
21324
  * @param {any} data The payload to send with the message
20948
21325
  * @returns A promise that resolves with the response from the embedded app
20949
21326
  */
20950
- trigger(messageType, data = {}) {
21327
+ trigger(messageType, data = {}, context) {
20951
21328
  const dataWithVizId = data;
20952
21329
  if (messageType === HostEvent.SetActiveTab) {
20953
21330
  this.setActiveTab(data);
@@ -20956,7 +21333,7 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20956
21333
  if (typeof dataWithVizId === 'object' && this.viewConfig.vizId) {
20957
21334
  dataWithVizId.vizId = this.viewConfig.vizId;
20958
21335
  }
20959
- return super.trigger(messageType, dataWithVizId);
21336
+ return super.trigger(messageType, dataWithVizId, context);
20960
21337
  }
20961
21338
  /**
20962
21339
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
@@ -20995,11 +21372,12 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
20995
21372
  this.postRender();
20996
21373
  return this;
20997
21374
  }
20998
- navigateToLiveboard(liveboardId, vizId, activeTabId) {
20999
- const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId);
21375
+ navigateToLiveboard(liveboardId, vizId, activeTabId, personalizedViewId) {
21376
+ const path = this.getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId);
21000
21377
  this.viewConfig.liveboardId = liveboardId;
21001
21378
  this.viewConfig.activeTabId = activeTabId;
21002
21379
  this.viewConfig.vizId = vizId;
21380
+ this.viewConfig.personalizedViewId = personalizedViewId;
21003
21381
  if (this.isRendered) {
21004
21382
  this.trigger(HostEvent.Navigate, path.substring(1));
21005
21383
  }
@@ -21023,6 +21401,9 @@ let LiveboardEmbed$1 = class LiveboardEmbed extends V1Embed {
21023
21401
  if (this.viewConfig.vizId) {
21024
21402
  url = `${url}/${this.viewConfig.vizId}`;
21025
21403
  }
21404
+ if (this.viewConfig.personalizedViewId) {
21405
+ url = `${url}?view=${this.viewConfig.personalizedViewId}`;
21406
+ }
21026
21407
  return url;
21027
21408
  }
21028
21409
  };
@@ -21591,7 +21972,9 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
21591
21972
  this.viewConfig = viewConfig;
21592
21973
  }
21593
21974
  getEmbedParamsObject() {
21594
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, enablePastConversationsSidebar, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, } = this.viewConfig;
21975
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
21976
+ // Extract sidebar config properties
21977
+ const { enablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
21595
21978
  if (!worksheetId) {
21596
21979
  this.handleError({
21597
21980
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -21602,30 +21985,51 @@ let SpotterEmbed$1 = class SpotterEmbed extends TsEmbed {
21602
21985
  }
21603
21986
  const queryParams = this.getBaseQueryParams();
21604
21987
  queryParams[Param.SpotterEnabled] = true;
21605
- if (!isUndefined_1(disableSourceSelection)) {
21606
- queryParams[Param.DisableSourceSelection] = !!disableSourceSelection;
21607
- }
21608
- if (!isUndefined_1(hideSourceSelection)) {
21609
- queryParams[Param.HideSourceSelection] = !!hideSourceSelection;
21610
- }
21611
- if (!isUndefined_1(dataPanelV2)) {
21612
- queryParams[Param.DataPanelV2Enabled] = !!dataPanelV2;
21613
- }
21614
- if (!isUndefined_1(showSpotterLimitations)) {
21615
- queryParams[Param.ShowSpotterLimitations] = !!showSpotterLimitations;
21616
- }
21617
- if (!isUndefined_1(hideSampleQuestions)) {
21618
- queryParams[Param.HideSampleQuestions] = !!hideSampleQuestions;
21988
+ // Boolean params
21989
+ setParamIfDefined(queryParams, Param.DisableSourceSelection, disableSourceSelection, true);
21990
+ setParamIfDefined(queryParams, Param.HideSourceSelection, hideSourceSelection, true);
21991
+ setParamIfDefined(queryParams, Param.DataPanelV2Enabled, dataPanelV2, true);
21992
+ setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
21993
+ setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
21994
+ setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
21995
+ setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
21996
+ // String params
21997
+ setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
21998
+ setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
21999
+ setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
22000
+ setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22001
+ setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22002
+ setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22003
+ setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22004
+ setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22005
+ // URL param with validation
22006
+ if (spotterDocumentationUrl !== undefined) {
22007
+ const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22008
+ if (isValid) {
22009
+ queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22010
+ }
22011
+ else {
22012
+ this.handleError({
22013
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22014
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22015
+ code: EmbedErrorCodes.INVALID_URL,
22016
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22017
+ });
22018
+ }
21619
22019
  }
21620
- if (!isUndefined_1(updatedSpotterChatPrompt)) {
21621
- queryParams[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
22020
+ // Handle spotterChatConfig params
22021
+ if (spotterChatConfig) {
22022
+ const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
22023
+ setParamIfDefined(queryParams, Param.HideToolResponseCardBranding, hideToolResponseCardBranding, true);
22024
+ setParamIfDefined(queryParams, Param.ToolResponseCardBrandingLabel, toolResponseCardBrandingLabel);
21622
22025
  }
21623
22026
  return queryParams;
21624
22027
  }
21625
22028
  getIframeSrc() {
21626
- const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, enablePastConversationsSidebar, } = this.viewConfig;
22029
+ const { worksheetId, searchOptions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, spotterSidebarConfig, } = this.viewConfig;
21627
22030
  const path = 'insights/conv-assist';
21628
22031
  const queryParams = this.getEmbedParamsObject();
22032
+ const enablePastConversationsSidebar = spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar;
21629
22033
  if (!isUndefined_1(enablePastConversationsSidebar)) {
21630
22034
  queryParams[Param.EnablePastConversationsSidebar] = !!enablePastConversationsSidebar;
21631
22035
  }