@thoughtspot/visual-embed-sdk 1.49.3 → 1.50.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 (241) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/authToken.spec.js +5 -0
  3. package/cjs/src/authToken.spec.js.map +1 -1
  4. package/cjs/src/css-variables.d.ts +59 -0
  5. package/cjs/src/css-variables.d.ts.map +1 -1
  6. package/cjs/src/embed/app.d.ts +31 -2
  7. package/cjs/src/embed/app.d.ts.map +1 -1
  8. package/cjs/src/embed/app.js +19 -2
  9. package/cjs/src/embed/app.js.map +1 -1
  10. package/cjs/src/embed/app.spec.js +112 -2
  11. package/cjs/src/embed/app.spec.js.map +1 -1
  12. package/cjs/src/embed/conversation.d.ts +38 -0
  13. package/cjs/src/embed/conversation.d.ts.map +1 -1
  14. package/cjs/src/embed/conversation.js +12 -2
  15. package/cjs/src/embed/conversation.js.map +1 -1
  16. package/cjs/src/embed/conversation.spec.js +53 -0
  17. package/cjs/src/embed/conversation.spec.js.map +1 -1
  18. package/cjs/src/embed/embedConfig.spec.d.ts +2 -0
  19. package/cjs/src/embed/embedConfig.spec.d.ts.map +1 -0
  20. package/cjs/src/embed/embedConfig.spec.js +74 -0
  21. package/cjs/src/embed/embedConfig.spec.js.map +1 -0
  22. package/cjs/src/embed/events.spec.js +593 -0
  23. package/cjs/src/embed/events.spec.js.map +1 -1
  24. package/cjs/src/embed/host-events.spec.d.ts +2 -0
  25. package/cjs/src/embed/host-events.spec.d.ts.map +1 -0
  26. package/cjs/src/embed/host-events.spec.js +1325 -0
  27. package/cjs/src/embed/host-events.spec.js.map +1 -0
  28. package/cjs/src/embed/hostEventClient/contracts.d.ts +36 -14
  29. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  30. package/cjs/src/embed/hostEventClient/contracts.js +10 -1
  31. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  32. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  33. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  34. package/cjs/src/embed/hostEventClient/host-event-client.js +8 -0
  35. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  36. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +209 -0
  37. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  38. package/cjs/src/embed/hostEventClient/utils.d.ts +2 -0
  39. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  40. package/cjs/src/embed/hostEventClient/utils.js +32 -2
  41. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  42. package/cjs/src/embed/hostEventClient/utils.spec.js +178 -0
  43. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  44. package/cjs/src/embed/liveboard.d.ts +6 -0
  45. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  46. package/cjs/src/embed/liveboard.js.map +1 -1
  47. package/cjs/src/embed/spotter-viz-utils.d.ts +34 -0
  48. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -1
  49. package/cjs/src/embed/spotter-viz-utils.js.map +1 -1
  50. package/cjs/src/embed/spotter-viz-utils.spec.js +17 -0
  51. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  53. package/cjs/src/embed/ts-embed.js +14 -7
  54. package/cjs/src/embed/ts-embed.js.map +1 -1
  55. package/cjs/src/embed/ts-embed.spec.js +146 -0
  56. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  57. package/cjs/src/errors.d.ts +1 -0
  58. package/cjs/src/errors.d.ts.map +1 -1
  59. package/cjs/src/errors.js +1 -0
  60. package/cjs/src/errors.js.map +1 -1
  61. package/cjs/src/index.d.ts +2 -2
  62. package/cjs/src/index.d.ts.map +1 -1
  63. package/cjs/src/index.js +3 -2
  64. package/cjs/src/index.js.map +1 -1
  65. package/cjs/src/mixpanel-service.spec.js +14 -0
  66. package/cjs/src/mixpanel-service.spec.js.map +1 -1
  67. package/cjs/src/react/util.spec.js +251 -0
  68. package/cjs/src/react/util.spec.js.map +1 -1
  69. package/cjs/src/types.d.ts +212 -8
  70. package/cjs/src/types.d.ts.map +1 -1
  71. package/cjs/src/types.js +185 -3
  72. package/cjs/src/types.js.map +1 -1
  73. package/cjs/src/utils/custom-actions.spec.js +26 -0
  74. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  75. package/cjs/src/utils/processData.spec.js +123 -0
  76. package/cjs/src/utils/processData.spec.js.map +1 -1
  77. package/cjs/src/utils/processTrigger.spec.js +61 -0
  78. package/cjs/src/utils/processTrigger.spec.js.map +1 -1
  79. package/cjs/src/utils/reporting.spec.js +21 -0
  80. package/cjs/src/utils/reporting.spec.js.map +1 -1
  81. package/cjs/src/utils/sessionInfoService.spec.d.ts +2 -0
  82. package/cjs/src/utils/sessionInfoService.spec.d.ts.map +1 -0
  83. package/cjs/src/utils/sessionInfoService.spec.js +130 -0
  84. package/cjs/src/utils/sessionInfoService.spec.js.map +1 -0
  85. package/cjs/src/utils.spec.js +158 -0
  86. package/cjs/src/utils.spec.js.map +1 -1
  87. package/dist/{index-DsSQndIB.js → index-fCne7kmU.js} +1 -1
  88. package/dist/src/css-variables.d.ts +59 -0
  89. package/dist/src/css-variables.d.ts.map +1 -1
  90. package/dist/src/embed/app.d.ts +31 -2
  91. package/dist/src/embed/app.d.ts.map +1 -1
  92. package/dist/src/embed/conversation.d.ts +38 -0
  93. package/dist/src/embed/conversation.d.ts.map +1 -1
  94. package/dist/src/embed/embedConfig.spec.d.ts +2 -0
  95. package/dist/src/embed/embedConfig.spec.d.ts.map +1 -0
  96. package/dist/src/embed/host-events.spec.d.ts +2 -0
  97. package/dist/src/embed/host-events.spec.d.ts.map +1 -0
  98. package/dist/src/embed/hostEventClient/contracts.d.ts +36 -14
  99. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  100. package/dist/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  101. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  102. package/dist/src/embed/hostEventClient/utils.d.ts +2 -0
  103. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  104. package/dist/src/embed/liveboard.d.ts +6 -0
  105. package/dist/src/embed/liveboard.d.ts.map +1 -1
  106. package/dist/src/embed/spotter-viz-utils.d.ts +34 -0
  107. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -1
  108. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  109. package/dist/src/errors.d.ts +1 -0
  110. package/dist/src/errors.d.ts.map +1 -1
  111. package/dist/src/index.d.ts +2 -2
  112. package/dist/src/index.d.ts.map +1 -1
  113. package/dist/src/types.d.ts +212 -8
  114. package/dist/src/types.d.ts.map +1 -1
  115. package/dist/src/utils/sessionInfoService.spec.d.ts +2 -0
  116. package/dist/src/utils/sessionInfoService.spec.d.ts.map +1 -0
  117. package/dist/tsembed-react.es.js +482 -86
  118. package/dist/tsembed-react.js +481 -85
  119. package/dist/tsembed.es.js +483 -87
  120. package/dist/tsembed.js +481 -85
  121. package/dist/visual-embed-sdk-react-full.d.ts +407 -23
  122. package/dist/visual-embed-sdk-react.d.ts +407 -23
  123. package/dist/visual-embed-sdk.d.ts +411 -23
  124. package/lib/package.json +1 -1
  125. package/lib/src/authToken.spec.js +5 -0
  126. package/lib/src/authToken.spec.js.map +1 -1
  127. package/lib/src/css-variables.d.ts +59 -0
  128. package/lib/src/css-variables.d.ts.map +1 -1
  129. package/lib/src/embed/app.d.ts +31 -2
  130. package/lib/src/embed/app.d.ts.map +1 -1
  131. package/lib/src/embed/app.js +19 -2
  132. package/lib/src/embed/app.js.map +1 -1
  133. package/lib/src/embed/app.spec.js +112 -2
  134. package/lib/src/embed/app.spec.js.map +1 -1
  135. package/lib/src/embed/conversation.d.ts +38 -0
  136. package/lib/src/embed/conversation.d.ts.map +1 -1
  137. package/lib/src/embed/conversation.js +11 -1
  138. package/lib/src/embed/conversation.js.map +1 -1
  139. package/lib/src/embed/conversation.spec.js +54 -1
  140. package/lib/src/embed/conversation.spec.js.map +1 -1
  141. package/lib/src/embed/embedConfig.spec.d.ts +2 -0
  142. package/lib/src/embed/embedConfig.spec.d.ts.map +1 -0
  143. package/lib/src/embed/embedConfig.spec.js +72 -0
  144. package/lib/src/embed/embedConfig.spec.js.map +1 -0
  145. package/lib/src/embed/events.spec.js +593 -0
  146. package/lib/src/embed/events.spec.js.map +1 -1
  147. package/lib/src/embed/host-events.spec.d.ts +2 -0
  148. package/lib/src/embed/host-events.spec.d.ts.map +1 -0
  149. package/lib/src/embed/host-events.spec.js +1322 -0
  150. package/lib/src/embed/host-events.spec.js.map +1 -0
  151. package/lib/src/embed/hostEventClient/contracts.d.ts +36 -14
  152. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  153. package/lib/src/embed/hostEventClient/contracts.js +9 -0
  154. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  155. package/lib/src/embed/hostEventClient/host-event-client.d.ts +1 -0
  156. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  157. package/lib/src/embed/hostEventClient/host-event-client.js +9 -1
  158. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  159. package/lib/src/embed/hostEventClient/host-event-client.spec.js +209 -0
  160. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  161. package/lib/src/embed/hostEventClient/utils.d.ts +2 -0
  162. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  163. package/lib/src/embed/hostEventClient/utils.js +28 -1
  164. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  165. package/lib/src/embed/hostEventClient/utils.spec.js +179 -1
  166. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  167. package/lib/src/embed/liveboard.d.ts +6 -0
  168. package/lib/src/embed/liveboard.d.ts.map +1 -1
  169. package/lib/src/embed/liveboard.js.map +1 -1
  170. package/lib/src/embed/spotter-viz-utils.d.ts +34 -0
  171. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -1
  172. package/lib/src/embed/spotter-viz-utils.js.map +1 -1
  173. package/lib/src/embed/spotter-viz-utils.spec.js +17 -0
  174. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -1
  175. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  176. package/lib/src/embed/ts-embed.js +14 -7
  177. package/lib/src/embed/ts-embed.js.map +1 -1
  178. package/lib/src/embed/ts-embed.spec.js +146 -0
  179. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  180. package/lib/src/errors.d.ts +1 -0
  181. package/lib/src/errors.d.ts.map +1 -1
  182. package/lib/src/errors.js +1 -0
  183. package/lib/src/errors.js.map +1 -1
  184. package/lib/src/index.d.ts +2 -2
  185. package/lib/src/index.d.ts.map +1 -1
  186. package/lib/src/index.js +2 -2
  187. package/lib/src/index.js.map +1 -1
  188. package/lib/src/mixpanel-service.spec.js +14 -0
  189. package/lib/src/mixpanel-service.spec.js.map +1 -1
  190. package/lib/src/react/util.spec.js +251 -0
  191. package/lib/src/react/util.spec.js.map +1 -1
  192. package/lib/src/types.d.ts +212 -8
  193. package/lib/src/types.d.ts.map +1 -1
  194. package/lib/src/types.js +185 -3
  195. package/lib/src/types.js.map +1 -1
  196. package/lib/src/utils/custom-actions.spec.js +26 -0
  197. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  198. package/lib/src/utils/processData.spec.js +123 -0
  199. package/lib/src/utils/processData.spec.js.map +1 -1
  200. package/lib/src/utils/processTrigger.spec.js +61 -0
  201. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  202. package/lib/src/utils/reporting.spec.js +21 -0
  203. package/lib/src/utils/reporting.spec.js.map +1 -1
  204. package/lib/src/utils/sessionInfoService.spec.d.ts +2 -0
  205. package/lib/src/utils/sessionInfoService.spec.d.ts.map +1 -0
  206. package/lib/src/utils/sessionInfoService.spec.js +127 -0
  207. package/lib/src/utils/sessionInfoService.spec.js.map +1 -0
  208. package/lib/src/utils.spec.js +159 -1
  209. package/lib/src/utils.spec.js.map +1 -1
  210. package/lib/src/visual-embed-sdk.d.ts +411 -23
  211. package/package.json +1 -1
  212. package/src/authToken.spec.ts +6 -0
  213. package/src/css-variables.ts +73 -0
  214. package/src/embed/app.spec.ts +155 -2
  215. package/src/embed/app.ts +44 -2
  216. package/src/embed/conversation.spec.ts +64 -1
  217. package/src/embed/conversation.ts +41 -0
  218. package/src/embed/embedConfig.spec.ts +79 -0
  219. package/src/embed/events.spec.ts +705 -1
  220. package/src/embed/host-events.spec.ts +1759 -0
  221. package/src/embed/hostEventClient/contracts.ts +41 -14
  222. package/src/embed/hostEventClient/host-event-client.spec.ts +326 -0
  223. package/src/embed/hostEventClient/host-event-client.ts +15 -0
  224. package/src/embed/hostEventClient/utils.spec.ts +204 -0
  225. package/src/embed/hostEventClient/utils.ts +37 -10
  226. package/src/embed/liveboard.ts +6 -0
  227. package/src/embed/spotter-viz-utils.spec.ts +17 -0
  228. package/src/embed/spotter-viz-utils.ts +34 -0
  229. package/src/embed/ts-embed.spec.ts +186 -0
  230. package/src/embed/ts-embed.ts +12 -4
  231. package/src/errors.ts +1 -0
  232. package/src/index.ts +2 -1
  233. package/src/mixpanel-service.spec.ts +15 -0
  234. package/src/react/util.spec.tsx +255 -0
  235. package/src/types.ts +215 -6
  236. package/src/utils/custom-actions.spec.ts +28 -0
  237. package/src/utils/processData.spec.ts +129 -0
  238. package/src/utils/processTrigger.spec.ts +91 -0
  239. package/src/utils/reporting.spec.ts +27 -0
  240. package/src/utils/sessionInfoService.spec.ts +151 -0
  241. package/src/utils.spec.ts +195 -0
@@ -84,5 +84,260 @@ describe('React util functions', () => {
84
84
  [EmbedEvent.QueryChanged]: onQueryChanged,
85
85
  });
86
86
  });
87
+
88
+ test('all onX props map to their correct EmbedEvent listener keys', () => {
89
+ const onDrilldown: MessageCallback = jest.fn();
90
+ const onDataSourceSelected: MessageCallback = jest.fn();
91
+ const onAddRemoveColumns: MessageCallback = jest.fn();
92
+ const onVizPointDoubleClick: MessageCallback = jest.fn();
93
+ const onVizPointClick: MessageCallback = jest.fn();
94
+ const onAlert: MessageCallback = jest.fn();
95
+ const onGetDataClick: MessageCallback = jest.fn();
96
+ const onDialogClose: MessageCallback = jest.fn();
97
+ const onDownload: MessageCallback = jest.fn();
98
+ const onDownloadAsPng: MessageCallback = jest.fn();
99
+ const onDownloadAsPdf: MessageCallback = jest.fn();
100
+ const onDownloadAsCsv: MessageCallback = jest.fn();
101
+ const onDownloadAsXlsx: MessageCallback = jest.fn();
102
+ const onDownloadLiveboardAsContinuousPDF: MessageCallback = jest.fn();
103
+ const onAnswerDelete: MessageCallback = jest.fn();
104
+ const onAIHighlights: MessageCallback = jest.fn();
105
+ const onPin: MessageCallback = jest.fn();
106
+ const onSpotIQAnalyze: MessageCallback = jest.fn();
107
+ const onShare: MessageCallback = jest.fn();
108
+ const onDrillInclude: MessageCallback = jest.fn();
109
+ const onDrillExclude: MessageCallback = jest.fn();
110
+ const onCopyToClipboard: MessageCallback = jest.fn();
111
+ const onUpdateTML: MessageCallback = jest.fn();
112
+ const onEditTML: MessageCallback = jest.fn();
113
+ const onExportTML: MessageCallback = jest.fn();
114
+ const onSaveAsView: MessageCallback = jest.fn();
115
+ const onCopyAEdit: MessageCallback = jest.fn();
116
+ const onShowUnderlyingData: MessageCallback = jest.fn();
117
+ const onAnswerChartSwitcher: MessageCallback = jest.fn();
118
+ const onLiveboardInfo: MessageCallback = jest.fn();
119
+ const onAddToFavorites: MessageCallback = jest.fn();
120
+ const onSchedule: MessageCallback = jest.fn();
121
+ const onEdit: MessageCallback = jest.fn();
122
+ const onMakeACopy: MessageCallback = jest.fn();
123
+ const onPresent: MessageCallback = jest.fn();
124
+ const onDelete: MessageCallback = jest.fn();
125
+ const onSchedulesList: MessageCallback = jest.fn();
126
+ const onCancel: MessageCallback = jest.fn();
127
+ const onExplore: MessageCallback = jest.fn();
128
+ const onCopyLink: MessageCallback = jest.fn();
129
+ const onCrossFilterChanged: MessageCallback = jest.fn();
130
+ const onVizPointRightClick: MessageCallback = jest.fn();
131
+ const onInsertIntoSlide: MessageCallback = jest.fn();
132
+ const onFilterChanged: MessageCallback = jest.fn();
133
+ const onUpdateConnection: MessageCallback = jest.fn();
134
+ const onCreateConnection: MessageCallback = jest.fn();
135
+ const onResetLiveboard: MessageCallback = jest.fn();
136
+ const onChangePersonalizedView: MessageCallback = jest.fn();
137
+ const onCreateWorksheet: MessageCallback = jest.fn();
138
+ const onAskSageInit: MessageCallback = jest.fn();
139
+ const onRename: MessageCallback = jest.fn();
140
+ const onParameterChanged: MessageCallback = jest.fn();
141
+ const onTableVizRendered: MessageCallback = jest.fn();
142
+ const onCreateLiveboard: MessageCallback = jest.fn();
143
+ const onCreateModel: MessageCallback = jest.fn();
144
+ const onSpotterData: MessageCallback = jest.fn();
145
+ const onPreviewSpotterData: MessageCallback = jest.fn();
146
+ const onAddToCoaching: MessageCallback = jest.fn();
147
+ const onDataModelInstructions: MessageCallback = jest.fn();
148
+ const onSpotterQueryTriggered: MessageCallback = jest.fn();
149
+ const onLastPromptEdited: MessageCallback = jest.fn();
150
+ const onLastPromptDeleted: MessageCallback = jest.fn();
151
+ const onResetSpotterConversation: MessageCallback = jest.fn();
152
+ const onSpotterInit: MessageCallback = jest.fn();
153
+ const onSpotterLoadComplete: MessageCallback = jest.fn();
154
+ const onOrgSwitched: MessageCallback = jest.fn();
155
+ const onSpotterConversationRenamed: MessageCallback = jest.fn();
156
+ const onSpotterConversationDeleted: MessageCallback = jest.fn();
157
+ const onSpotterConversationSelected: MessageCallback = jest.fn();
158
+ const onEmbedPageContextChanged: MessageCallback = jest.fn();
159
+ const onSubscribed: MessageCallback = jest.fn();
160
+ const onSendTestScheduleEmail: MessageCallback = jest.fn();
161
+ const onSpotterVizInit: MessageCallback = jest.fn();
162
+ const onSpotterVizQueryTriggered: MessageCallback = jest.fn();
163
+ const onSpotterVizResponseComplete: MessageCallback = jest.fn();
164
+ const onSpotterVizCheckpointCreated: MessageCallback = jest.fn();
165
+ const onSpotterVizCheckpointRestored: MessageCallback = jest.fn();
166
+ const onSpotterVizError: MessageCallback = jest.fn();
167
+ const onSpotterVizClosed: MessageCallback = jest.fn();
168
+ const onRefreshLiveboardBrowserCache: MessageCallback = jest.fn();
169
+ const onV1Data: MessageCallback = jest.fn();
170
+
171
+ const props = {
172
+ onDrilldown,
173
+ onDataSourceSelected,
174
+ onAddRemoveColumns,
175
+ onVizPointDoubleClick,
176
+ onVizPointClick,
177
+ onAlert,
178
+ onGetDataClick,
179
+ onDialogClose,
180
+ onDownload,
181
+ onDownloadAsPng,
182
+ onDownloadAsPdf,
183
+ onDownloadAsCsv,
184
+ onDownloadAsXlsx,
185
+ onDownloadLiveboardAsContinuousPDF,
186
+ onAnswerDelete,
187
+ onAIHighlights,
188
+ onPin,
189
+ onSpotIQAnalyze,
190
+ onShare,
191
+ onDrillInclude,
192
+ onDrillExclude,
193
+ onCopyToClipboard,
194
+ onUpdateTML,
195
+ onEditTML,
196
+ onExportTML,
197
+ onSaveAsView,
198
+ onCopyAEdit,
199
+ onShowUnderlyingData,
200
+ onAnswerChartSwitcher,
201
+ onLiveboardInfo,
202
+ onAddToFavorites,
203
+ onSchedule,
204
+ onEdit,
205
+ onMakeACopy,
206
+ onPresent,
207
+ onDelete,
208
+ onSchedulesList,
209
+ onCancel,
210
+ onExplore,
211
+ onCopyLink,
212
+ onCrossFilterChanged,
213
+ onVizPointRightClick,
214
+ onInsertIntoSlide,
215
+ onFilterChanged,
216
+ onUpdateConnection,
217
+ onCreateConnection,
218
+ onResetLiveboard,
219
+ onChangePersonalizedView,
220
+ onCreateWorksheet,
221
+ onAskSageInit,
222
+ onRename,
223
+ onParameterChanged,
224
+ onTableVizRendered,
225
+ onCreateLiveboard,
226
+ onCreateModel,
227
+ onSpotterData,
228
+ onPreviewSpotterData,
229
+ onAddToCoaching,
230
+ onDataModelInstructions,
231
+ onSpotterQueryTriggered,
232
+ onLastPromptEdited,
233
+ onLastPromptDeleted,
234
+ onResetSpotterConversation,
235
+ onSpotterInit,
236
+ onSpotterLoadComplete,
237
+ onOrgSwitched,
238
+ onSpotterConversationRenamed,
239
+ onSpotterConversationDeleted,
240
+ onSpotterConversationSelected,
241
+ onEmbedPageContextChanged,
242
+ onSubscribed,
243
+ onSendTestScheduleEmail,
244
+ onSpotterVizInit,
245
+ onSpotterVizQueryTriggered,
246
+ onSpotterVizResponseComplete,
247
+ onSpotterVizCheckpointCreated,
248
+ onSpotterVizCheckpointRestored,
249
+ onSpotterVizError,
250
+ onSpotterVizClosed,
251
+ onRefreshLiveboardBrowserCache,
252
+ onV1Data,
253
+ };
254
+
255
+ const result = getViewPropsAndListeners(props);
256
+
257
+ expect(result.viewConfig).toEqual({});
258
+ expect(result.listeners).toEqual({
259
+ [EmbedEvent.Drilldown]: onDrilldown,
260
+ [EmbedEvent.DataSourceSelected]: onDataSourceSelected,
261
+ [EmbedEvent.AddRemoveColumns]: onAddRemoveColumns,
262
+ [EmbedEvent.VizPointDoubleClick]: onVizPointDoubleClick,
263
+ [EmbedEvent.VizPointClick]: onVizPointClick,
264
+ [EmbedEvent.Alert]: onAlert,
265
+ [EmbedEvent.GetDataClick]: onGetDataClick,
266
+ [EmbedEvent.DialogClose]: onDialogClose,
267
+ [EmbedEvent.Download]: onDownload,
268
+ [EmbedEvent.DownloadAsPng]: onDownloadAsPng,
269
+ [EmbedEvent.DownloadAsPdf]: onDownloadAsPdf,
270
+ [EmbedEvent.DownloadAsCsv]: onDownloadAsCsv,
271
+ [EmbedEvent.DownloadAsXlsx]: onDownloadAsXlsx,
272
+ [EmbedEvent.DownloadLiveboardAsContinuousPDF]: onDownloadLiveboardAsContinuousPDF,
273
+ [EmbedEvent.AnswerDelete]: onAnswerDelete,
274
+ [EmbedEvent.AIHighlights]: onAIHighlights,
275
+ [EmbedEvent.Pin]: onPin,
276
+ [EmbedEvent.SpotIQAnalyze]: onSpotIQAnalyze,
277
+ [EmbedEvent.Share]: onShare,
278
+ [EmbedEvent.DrillInclude]: onDrillInclude,
279
+ [EmbedEvent.DrillExclude]: onDrillExclude,
280
+ [EmbedEvent.CopyToClipboard]: onCopyToClipboard,
281
+ [EmbedEvent.UpdateTML]: onUpdateTML,
282
+ [EmbedEvent.EditTML]: onEditTML,
283
+ [EmbedEvent.ExportTML]: onExportTML,
284
+ [EmbedEvent.SaveAsView]: onSaveAsView,
285
+ [EmbedEvent.CopyAEdit]: onCopyAEdit,
286
+ [EmbedEvent.ShowUnderlyingData]: onShowUnderlyingData,
287
+ [EmbedEvent.AnswerChartSwitcher]: onAnswerChartSwitcher,
288
+ [EmbedEvent.LiveboardInfo]: onLiveboardInfo,
289
+ [EmbedEvent.AddToFavorites]: onAddToFavorites,
290
+ [EmbedEvent.Schedule]: onSchedule,
291
+ [EmbedEvent.Edit]: onEdit,
292
+ [EmbedEvent.MakeACopy]: onMakeACopy,
293
+ [EmbedEvent.Present]: onPresent,
294
+ [EmbedEvent.Delete]: onDelete,
295
+ [EmbedEvent.SchedulesList]: onSchedulesList,
296
+ [EmbedEvent.Cancel]: onCancel,
297
+ [EmbedEvent.Explore]: onExplore,
298
+ [EmbedEvent.CopyLink]: onCopyLink,
299
+ [EmbedEvent.CrossFilterChanged]: onCrossFilterChanged,
300
+ [EmbedEvent.VizPointRightClick]: onVizPointRightClick,
301
+ [EmbedEvent.InsertIntoSlide]: onInsertIntoSlide,
302
+ [EmbedEvent.FilterChanged]: onFilterChanged,
303
+ [EmbedEvent.UpdateConnection]: onUpdateConnection,
304
+ [EmbedEvent.CreateConnection]: onCreateConnection,
305
+ [EmbedEvent.ResetLiveboard]: onResetLiveboard,
306
+ [EmbedEvent.ChangePersonalizedView]: onChangePersonalizedView,
307
+ [EmbedEvent.CreateWorksheet]: onCreateWorksheet,
308
+ [EmbedEvent.AskSageInit]: onAskSageInit,
309
+ [EmbedEvent.Rename]: onRename,
310
+ [EmbedEvent.ParameterChanged]: onParameterChanged,
311
+ [EmbedEvent.TableVizRendered]: onTableVizRendered,
312
+ [EmbedEvent.CreateLiveboard]: onCreateLiveboard,
313
+ [EmbedEvent.CreateModel]: onCreateModel,
314
+ [EmbedEvent.SpotterData]: onSpotterData,
315
+ [EmbedEvent.PreviewSpotterData]: onPreviewSpotterData,
316
+ [EmbedEvent.AddToCoaching]: onAddToCoaching,
317
+ [EmbedEvent.DataModelInstructions]: onDataModelInstructions,
318
+ [EmbedEvent.SpotterQueryTriggered]: onSpotterQueryTriggered,
319
+ [EmbedEvent.LastPromptEdited]: onLastPromptEdited,
320
+ [EmbedEvent.LastPromptDeleted]: onLastPromptDeleted,
321
+ [EmbedEvent.ResetSpotterConversation]: onResetSpotterConversation,
322
+ [EmbedEvent.SpotterInit]: onSpotterInit,
323
+ [EmbedEvent.SpotterLoadComplete]: onSpotterLoadComplete,
324
+ [EmbedEvent.OrgSwitched]: onOrgSwitched,
325
+ [EmbedEvent.SpotterConversationRenamed]: onSpotterConversationRenamed,
326
+ [EmbedEvent.SpotterConversationDeleted]: onSpotterConversationDeleted,
327
+ [EmbedEvent.SpotterConversationSelected]: onSpotterConversationSelected,
328
+ [EmbedEvent.EmbedPageContextChanged]: onEmbedPageContextChanged,
329
+ [EmbedEvent.Subscribed]: onSubscribed,
330
+ [EmbedEvent.SendTestScheduleEmail]: onSendTestScheduleEmail,
331
+ [EmbedEvent.SpotterVizInit]: onSpotterVizInit,
332
+ [EmbedEvent.SpotterVizQueryTriggered]: onSpotterVizQueryTriggered,
333
+ [EmbedEvent.SpotterVizResponseComplete]: onSpotterVizResponseComplete,
334
+ [EmbedEvent.SpotterVizCheckpointCreated]: onSpotterVizCheckpointCreated,
335
+ [EmbedEvent.SpotterVizCheckpointRestored]: onSpotterVizCheckpointRestored,
336
+ [EmbedEvent.SpotterVizError]: onSpotterVizError,
337
+ [EmbedEvent.SpotterVizClosed]: onSpotterVizClosed,
338
+ [EmbedEvent.RefreshLiveboardBrowserCache]: onRefreshLiveboardBrowserCache,
339
+ [EmbedEvent.V1Data]: onV1Data,
340
+ });
341
+ });
87
342
  });
88
343
  });
package/src/types.ts CHANGED
@@ -244,6 +244,13 @@ export enum HomeLeftNavItem {
244
244
  * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
245
245
  */
246
246
  Favorites = 'favorites',
247
+ /**
248
+ * The *Collections* menu option in
249
+ * the *Insights* left navigation panel.
250
+ * Shown when collections are enabled on the cluster.
251
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
252
+ */
253
+ Collections = 'collections',
247
254
  }
248
255
  export type DOMSelector = string | HTMLElement;
249
256
 
@@ -963,7 +970,8 @@ export interface BaseViewConfig extends ApiInterceptFlags {
963
970
  * The list of actions to completely remove from the embedded view.
964
971
  * Hidden actions are not visible to the user at all (fully removed from the UI).
965
972
  * Use this when you want to remove an action entirely.
966
- * To keep an action visible but non-interactive (grayed out), use {@link disabledActions} instead.
973
+ * To keep an action visible but non-interactive (grayed out), use {@link
974
+ * disabledActions} instead.
967
975
  *
968
976
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
969
977
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -983,7 +991,8 @@ export interface BaseViewConfig extends ApiInterceptFlags {
983
991
  * (...), and the contextual menu. These will be only actions that
984
992
  * are visible to the user.
985
993
  * Use this as an allowlist — only the actions listed here will be shown.
986
- * All other actions will be hidden. Use either this or {@link hiddenActions}, not both.
994
+ * All other actions will be hidden. Use either this or {@link hiddenActions}, not
995
+ * both.
987
996
  *
988
997
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
989
998
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -1218,6 +1227,26 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1218
1227
  * ```
1219
1228
  */
1220
1229
  overrideOrgId?: number;
1230
+ /**
1231
+ * Overrides the browser history behavior for embedding application users.
1232
+ * This parameter changes standard history navigation (pushState) into a
1233
+ * state replacement (replaceState), preventing users from getting trapped in
1234
+ * back-button loops inside the embedded iframe environment.
1235
+ * The overrideHistoryState setting is honored only if the
1236
+ * application is running within an embedded context.
1237
+ *
1238
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
1239
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
1240
+ * @example
1241
+ * ```js
1242
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
1243
+ * const embed = new <EmbedComponent>('#tsEmbed', {
1244
+ * // ... other embed view config
1245
+ * overrideHistoryState: true,
1246
+ * });
1247
+ * ```
1248
+ */
1249
+ overrideHistoryState?: boolean;
1221
1250
  /**
1222
1251
  * Flag to override the *Open Link in New Tab* context
1223
1252
  * menu option.
@@ -3734,6 +3763,31 @@ export enum EmbedEvent {
3734
3763
  */
3735
3764
  SpotterConversationSelected = 'spotterConversationSelected',
3736
3765
 
3766
+ /**
3767
+ * Emitted when the Spotter agent finishes streaming/rendering a response.
3768
+ * Includes the conversation and message identifiers so the host app can
3769
+ * fetch the full conversation history via the REST API if needed.
3770
+ *
3771
+ * The payload data has the shape `{ convId: string, messageId: string }`.
3772
+ *
3773
+ * Works with SpotterEmbed as well as AppEmbed (when Spotter is reached
3774
+ * inside the full application).
3775
+ * @example
3776
+ * ```js
3777
+ * spotterEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
3778
+ * console.log('Spotter response complete', payload);
3779
+ * })
3780
+ * ```
3781
+ * @example
3782
+ * ```js
3783
+ * appEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => {
3784
+ * console.log('Spotter response complete', payload);
3785
+ * })
3786
+ * ```
3787
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.9.0.cl
3788
+ */
3789
+ SpotterResponseComplete = 'spotterResponseComplete',
3790
+
3737
3791
  /**
3738
3792
  * @hidden
3739
3793
  * Emitted when the auth token is about to get expired and needs to be refreshed.
@@ -3760,10 +3814,11 @@ export enum EmbedEvent {
3760
3814
  EmbedPageContextChanged = 'EmbedPageContextChanged',
3761
3815
 
3762
3816
  /**
3763
- * Represents a special embed event that is triggered whenever any host event is subscribed.
3817
+ * Represents a special embed event that is triggered whenever any host event is
3818
+ * subscribed.
3764
3819
  *
3765
- * You can listen to this event when you need to dispatch a host event during load or render,
3766
- * particularly in situations where timing issues may occur.
3820
+ * You can listen to this event when you need to dispatch a host event during load or
3821
+ * render, particularly in situations where timing issues may occur.
3767
3822
  *
3768
3823
  * @example
3769
3824
  * ```js
@@ -5309,6 +5364,14 @@ export enum HostEvent {
5309
5364
  /**
5310
5365
  * Get details of filters applied on the Liveboard.
5311
5366
  * Returns arrays containing Liveboard filter and runtime filter elements.
5367
+ * Each Liveboard filter may include an `applicability` attribute
5368
+ * indicating the scope of the filter. It contains a `level`
5369
+ * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
5370
+ * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
5371
+ * level there is no `targetId`, since the filter applies to the
5372
+ * whole Liveboard.
5373
+ * The `applicability` attribute is available from SDK: 1.51.0 |
5374
+ * ThoughtSpot: 26.10.0.cl.
5312
5375
  * @example
5313
5376
  * ```js
5314
5377
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -5348,6 +5411,16 @@ export enum HostEvent {
5348
5411
  *
5349
5412
  * `type` - To update filters for date time, specify the date format type.
5350
5413
  * For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters].
5414
+ *
5415
+ * `applicability` - Optional. Scopes the filter to a specific target,
5416
+ * for example, a single Liveboard tab. Available from SDK: 1.51.0 |
5417
+ * ThoughtSpot: 26.10.0.cl. Includes the following attributes:
5418
+ *
5419
+ * - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`.
5420
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
5421
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
5422
+ * `level` is `LIVEBOARD`, since the filter applies to the whole
5423
+ * Liveboard.
5351
5424
  * @example
5352
5425
  * ```js
5353
5426
  *
@@ -5424,6 +5497,21 @@ export enum HostEvent {
5424
5497
  * }
5425
5498
  * }, ContextType.Liveboard);
5426
5499
  * ```
5500
+ * @example
5501
+ * ```js
5502
+ * // Scope the filter to a specific Liveboard tab
5503
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
5504
+ * filter: {
5505
+ * column: "item type",
5506
+ * oper: "IN",
5507
+ * values: ["bags", "shirts"],
5508
+ * applicability: {
5509
+ * level: "TAB",
5510
+ * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058"
5511
+ * }
5512
+ * }
5513
+ * });
5514
+ * ```
5427
5515
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5428
5516
  */
5429
5517
  UpdateFilters = 'updateFilters',
@@ -5575,6 +5663,15 @@ export enum HostEvent {
5575
5663
  * - `name`: Name of the parameter.
5576
5664
  * - `value`: The value to set for the parameter.
5577
5665
  * - `isVisibleToUser`: Optional. To control the visibility of the parameter chip.
5666
+ * - `applicability`: Optional. Scopes the parameter to a specific target,
5667
+ * for example, a single Liveboard tab. Available from SDK: 1.51.0 |
5668
+ * ThoughtSpot: 26.10.0.cl. Includes the following attributes:
5669
+ *
5670
+ * - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`.
5671
+ * - `targetId`: The GUID of the target, for example, the tab GUID.
5672
+ * Required when `level` is `TAB` or `GROUP`. Do not pass it when
5673
+ * `level` is `LIVEBOARD`, since the parameter applies to the whole
5674
+ * Liveboard.
5578
5675
  *
5579
5676
  * @example
5580
5677
  * ```js
@@ -5586,6 +5683,18 @@ export enum HostEvent {
5586
5683
  * ```
5587
5684
  * @example
5588
5685
  * ```js
5686
+ * // Scope the parameter to a specific Liveboard tab
5687
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
5688
+ * name: "Integer Range Param",
5689
+ * value: 10,
5690
+ * applicability: {
5691
+ * level: "TAB",
5692
+ * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058"
5693
+ * }
5694
+ * }])
5695
+ * ```
5696
+ * @example
5697
+ * ```js
5589
5698
  * // Update parameters from liveboard context
5590
5699
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5591
5700
  * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
@@ -5599,6 +5708,14 @@ export enum HostEvent {
5599
5708
  UpdateParameters = 'UpdateParameters',
5600
5709
  /**
5601
5710
  * Triggers GetParameters to fetch the runtime Parameters.
5711
+ * Each parameter may include an `applicability` attribute
5712
+ * indicating the scope of the parameter. It contains a `level`
5713
+ * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or
5714
+ * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD`
5715
+ * level there is no `targetId`, since the parameter applies to the
5716
+ * whole Liveboard.
5717
+ * The `applicability` attribute is available from SDK: 1.51.0 |
5718
+ * ThoughtSpot: 26.10.0.cl.
5602
5719
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
5603
5720
  * ```js
5604
5721
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -6016,6 +6133,27 @@ export enum HostEvent {
6016
6133
  * ```
6017
6134
  */
6018
6135
  InitSpotterVizConversation = 'InitSpotterVizConversation',
6136
+
6137
+ /**
6138
+ * Opens the SpotterViz panel.
6139
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
6140
+ * @example
6141
+ * ```js
6142
+ * liveboardEmbed.trigger(HostEvent.OpenSpotterVizPanel);
6143
+ * ```
6144
+ */
6145
+ OpenSpotterVizPanel = 'OpenSpotterVizPanel',
6146
+
6147
+ /**
6148
+ * Closes the SpotterViz panel.
6149
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
6150
+ * @example
6151
+ * ```js
6152
+ * liveboardEmbed.trigger(HostEvent.CloseSpotterVizPanel);
6153
+ * ```
6154
+ */
6155
+ CloseSpotterVizPanel = 'CloseSpotterVizPanel',
6156
+
6019
6157
  /**
6020
6158
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
6021
6159
  * Requires `enableLiveboardDataCache` to be enabled.
@@ -6169,6 +6307,7 @@ export enum Param {
6169
6307
  SpotterEnabled = 'isSpotterExperienceEnabled',
6170
6308
  IsUnifiedSearchExperienceEnabled = 'isUnifiedSearchExperienceEnabled',
6171
6309
  OverrideOrgId = 'orgId',
6310
+ OverrideHistoryState = 'overrideHistoryState',
6172
6311
  OauthPollingInterval = 'oAuthPollingInterval',
6173
6312
  IsForceRedirect = 'isForceRedirect',
6174
6313
  DataSourceId = 'dataSourceId',
@@ -6189,6 +6328,7 @@ export enum Param {
6189
6328
  isLinkParametersEnabled = 'isLinkParametersEnabled',
6190
6329
  EnablePastConversationsSidebar = 'enablePastConversationsSidebar',
6191
6330
  UpdatedSpotterChatPrompt = 'updatedSpotterChatPrompt',
6331
+ DefaultQueryMode = 'defaultQueryMode',
6192
6332
  EnableStopAnswerGenerationEmbed = 'enableStopAnswerGenerationEmbed',
6193
6333
  SpotterSidebarTitle = 'spotterSidebarTitle',
6194
6334
  SpotterSidebarDefaultExpanded = 'spotterSidebarDefaultExpanded',
@@ -7972,7 +8112,73 @@ export enum Action {
7972
8112
  * ```
7973
8113
  * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
7974
8114
  */
7975
- RefreshLiveboardBrowserCache = 'refreshLiveboardBrowserCache',
8115
+ RefreshLiveboardBrowserCache = 'refreshLiveboardBrowserCache',
8116
+ /**
8117
+ * Controls visibility and disable state of the share action
8118
+ * in the Spotter Analyst interface.
8119
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8120
+ * @example
8121
+ * ```js
8122
+ * hiddenActions: [Action.SpotterAnalystShare]
8123
+ * disabledActions: [Action.SpotterAnalystShare]
8124
+ * ```
8125
+ */
8126
+ SpotterAnalystShare = 'spotterAnalystShare',
8127
+ /**
8128
+ * Controls visibility and disable state of the edit action
8129
+ * in the Spotter Analyst interface.
8130
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8131
+ * @example
8132
+ * ```js
8133
+ * hiddenActions: [Action.SpotterAnalystEdit]
8134
+ * disabledActions: [Action.SpotterAnalystEdit]
8135
+ * ```
8136
+ */
8137
+ SpotterAnalystEdit = 'spotterAnalystEdit',
8138
+ /**
8139
+ * Controls visibility and disable state of the create action
8140
+ * in the Spotter Analyst interface.
8141
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8142
+ * @example
8143
+ * ```js
8144
+ * hiddenActions: [Action.SpotterAnalystCreate]
8145
+ * disabledActions: [Action.SpotterAnalystCreate]
8146
+ * ```
8147
+ */
8148
+ SpotterAnalystCreate = 'spotterAnalystCreate',
8149
+ /**
8150
+ * Controls visibility and disable state of the delete action
8151
+ * in the Spotter Analyst interface.
8152
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8153
+ * @example
8154
+ * ```js
8155
+ * hiddenActions: [Action.SpotterAnalystDelete]
8156
+ * disabledActions: [Action.SpotterAnalystDelete]
8157
+ * ```
8158
+ */
8159
+ SpotterAnalystDelete = 'spotterAnalystDelete',
8160
+ /**
8161
+ * Controls visibility and disable state of the make a copy action
8162
+ * in the Spotter Analyst interface.
8163
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8164
+ * @example
8165
+ * ```js
8166
+ * hiddenActions: [Action.SpotterAnalystMakeACopy]
8167
+ * disabledActions: [Action.SpotterAnalystMakeACopy]
8168
+ * ```
8169
+ */
8170
+ SpotterAnalystMakeACopy = 'spotterAnalystMakeACopy',
8171
+ /**
8172
+ * Controls visibility and disable state of the sidebar
8173
+ * in the Spotter Analyst interface.
8174
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
8175
+ * @example
8176
+ * ```js
8177
+ * hiddenActions: [Action.SpotterAnalystSidebar]
8178
+ * disabledActions: [Action.SpotterAnalystSidebar]
8179
+ * ```
8180
+ */
8181
+ SpotterAnalystSidebar = 'spotterAnalystSidebar',
7976
8182
  }
7977
8183
  export interface AnswerServiceType {
7978
8184
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -8346,6 +8552,9 @@ export enum EmbedErrorCodes {
8346
8552
 
8347
8553
  /** DrillDown payload is invalid - missing or malformed points */
8348
8554
  DRILLDOWN_INVALID_PAYLOAD = 'DRILLDOWN_INVALID_PAYLOAD',
8555
+
8556
+ /** UpdateParameters payload is invalid - malformed applicability */
8557
+ UPDATEPARAMETERS_INVALID_PAYLOAD = 'UPDATEPARAMETERS_INVALID_PAYLOAD',
8349
8558
  }
8350
8559
 
8351
8560
  /**
@@ -429,6 +429,34 @@ describe('getCustomActions function', () => {
429
429
  });
430
430
  });
431
431
 
432
+ describe('Empty allowed IDs edge cases', () => {
433
+ test('should show "none" as supported metadata IDs when target has no allowed metadata IDs (SPOTTER)', () => {
434
+ const action = {
435
+ id: 'test-id',
436
+ name: 'Test Action',
437
+ target: CustomActionTarget.SPOTTER,
438
+ position: CustomActionsPosition.MENU,
439
+ metadataIds: { liveboardIds: ['lb-1'] },
440
+ } as any;
441
+ const result = getCustomActions([action]);
442
+ // Expect an error containing 'none' for unsupported metadataIds on SPOTTER
443
+ expect(result.errors.some((e) => e.includes('none'))).toBe(true);
444
+ });
445
+
446
+ test('should show "none" as supported data model IDs when target has no allowed data model IDs (LIVEBOARD)', () => {
447
+ const action = {
448
+ id: 'test-id',
449
+ name: 'Test Action',
450
+ target: CustomActionTarget.LIVEBOARD,
451
+ position: CustomActionsPosition.PRIMARY,
452
+ dataModelIds: { modelIds: ['model-1'] },
453
+ } as any;
454
+ const result = getCustomActions([action]);
455
+ // Expect an error containing 'none' for unsupported dataModelIds on LIVEBOARD
456
+ expect(result.errors.some((e) => e.includes('none'))).toBe(true);
457
+ });
458
+ });
459
+
432
460
  describe('Warnings', () => {
433
461
  test('should warn when action name length exceeds 30 characters', () => {
434
462
  // Arrange