@thoughtspot/visual-embed-sdk 1.45.3 → 1.46.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 (81) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +2 -2
  3. package/cjs/src/auth.d.ts +35 -2
  4. package/cjs/src/auth.d.ts.map +1 -1
  5. package/cjs/src/auth.js +36 -3
  6. package/cjs/src/auth.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +1 -1
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +6 -6
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/app.spec.js +87 -119
  12. package/cjs/src/embed/app.spec.js.map +1 -1
  13. package/cjs/src/embed/conversation.d.ts +1 -1
  14. package/cjs/src/embed/liveboard.d.ts +2 -2
  15. package/cjs/src/embed/liveboard.js +2 -2
  16. package/cjs/src/embed/search.d.ts +3 -2
  17. package/cjs/src/embed/search.d.ts.map +1 -1
  18. package/cjs/src/embed/search.js +3 -2
  19. package/cjs/src/embed/search.js.map +1 -1
  20. package/cjs/src/embed/ts-embed.d.ts +1 -1
  21. package/cjs/src/embed/ts-embed.js +1 -1
  22. package/cjs/src/react/index.d.ts +1 -1
  23. package/cjs/src/types.d.ts +408 -66
  24. package/cjs/src/types.d.ts.map +1 -1
  25. package/cjs/src/types.js +116 -52
  26. package/cjs/src/types.js.map +1 -1
  27. package/dist/{index-BuwECGdm.js → index-Vyh6Ha5f.js} +1 -1
  28. package/dist/src/auth.d.ts +35 -2
  29. package/dist/src/auth.d.ts.map +1 -1
  30. package/dist/src/embed/app.d.ts +1 -1
  31. package/dist/src/embed/app.d.ts.map +1 -1
  32. package/dist/src/embed/conversation.d.ts +1 -1
  33. package/dist/src/embed/liveboard.d.ts +2 -2
  34. package/dist/src/embed/search.d.ts +3 -2
  35. package/dist/src/embed/search.d.ts.map +1 -1
  36. package/dist/src/embed/ts-embed.d.ts +1 -1
  37. package/dist/src/react/index.d.ts +1 -1
  38. package/dist/src/types.d.ts +408 -66
  39. package/dist/src/types.d.ts.map +1 -1
  40. package/dist/tsembed-react.es.js +167 -69
  41. package/dist/tsembed-react.js +166 -68
  42. package/dist/tsembed.es.js +167 -69
  43. package/dist/tsembed.js +166 -68
  44. package/dist/visual-embed-sdk-react-full.d.ts +446 -71
  45. package/dist/visual-embed-sdk-react.d.ts +439 -67
  46. package/dist/visual-embed-sdk.d.ts +445 -70
  47. package/lib/package.json +2 -2
  48. package/lib/src/auth.d.ts +35 -2
  49. package/lib/src/auth.d.ts.map +1 -1
  50. package/lib/src/auth.js +36 -3
  51. package/lib/src/auth.js.map +1 -1
  52. package/lib/src/embed/app.d.ts +1 -1
  53. package/lib/src/embed/app.d.ts.map +1 -1
  54. package/lib/src/embed/app.js +6 -6
  55. package/lib/src/embed/app.js.map +1 -1
  56. package/lib/src/embed/app.spec.js +87 -119
  57. package/lib/src/embed/app.spec.js.map +1 -1
  58. package/lib/src/embed/conversation.d.ts +1 -1
  59. package/lib/src/embed/liveboard.d.ts +2 -2
  60. package/lib/src/embed/liveboard.js +2 -2
  61. package/lib/src/embed/search.d.ts +3 -2
  62. package/lib/src/embed/search.d.ts.map +1 -1
  63. package/lib/src/embed/search.js +3 -2
  64. package/lib/src/embed/search.js.map +1 -1
  65. package/lib/src/embed/ts-embed.d.ts +1 -1
  66. package/lib/src/embed/ts-embed.js +1 -1
  67. package/lib/src/react/index.d.ts +1 -1
  68. package/lib/src/types.d.ts +408 -66
  69. package/lib/src/types.d.ts.map +1 -1
  70. package/lib/src/types.js +116 -52
  71. package/lib/src/types.js.map +1 -1
  72. package/package.json +2 -2
  73. package/src/auth.ts +36 -3
  74. package/src/embed/app.spec.ts +171 -211
  75. package/src/embed/app.ts +16 -11
  76. package/src/embed/conversation.ts +1 -1
  77. package/src/embed/liveboard.ts +2 -2
  78. package/src/embed/search.ts +3 -2
  79. package/src/embed/ts-embed.ts +1 -1
  80. package/src/react/index.tsx +1 -1
  81. package/src/types.ts +409 -67
@@ -1600,18 +1600,154 @@ export interface EmbedConfig {
1600
1600
  * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
1601
1601
  * @example
1602
1602
  * ```js
1603
- * import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1603
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1604
1604
  * init({
1605
1605
  * ... // other embed config options
1606
1606
  * customActions: [
1607
1607
  * {
1608
- * name: 'customAction',
1609
- * id: 'customAction',
1608
+ * // Unique identifier for the custom action
1609
+ * id: 'my-custom-action',
1610
+ *
1611
+ * // Display name shown to users in the UI
1612
+ * name: 'My Custom Action',
1613
+ *
1614
+ * // Where the action appears in the UI
1615
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1616
+ * // MENU: Shows in the "More" menu (three dots menu)
1617
+ * // CONTEXTMENU: Shows in the right-click context menu
1618
+ * position: CustomActionsPosition.PRIMARY,
1619
+ *
1620
+ * // What type of content this action applies to
1621
+ * // ANSWER: Available on answer pages
1622
+ * target: CustomActionTarget.ANSWER,
1623
+ *
1624
+ * // Optional: Restrict where this action appears based on data models
1625
+ * // dataModelIds: {
1626
+ * // // Restrict to specific data models
1627
+ * // modelIds: ['model-id-1', 'model-id-2'],
1628
+ * // // Restrict to specific columns within models
1629
+ * // modelColumnNames: ['model-id::column-name']
1630
+ * // },
1631
+ *
1632
+ * // Optional: Restrict where this action appears based on metadata
1633
+ * // metadataIds: {
1634
+ * // // Restrict to specific answers
1635
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
1636
+ * // },
1637
+ * // // Restrict to specific groups (for group-based access control)
1638
+ * // groupIds: ['group-id-1', 'group-id-2'],
1639
+ * // // Restrict to specific organizations (for multi-org deployments)
1640
+ * // orgIds: ['org-id-1', 'org-id-2'],
1641
+ * }
1642
+ * ],
1643
+ * })
1644
+ * ```
1645
+ * @example
1646
+ * ```js
1647
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1648
+ * init({
1649
+ * ... // other embed config options
1650
+ * customActions: [
1651
+ * {
1652
+ * // Unique identifier for the custom action
1653
+ * id: 'my-custom-action',
1654
+ *
1655
+ * // Display name shown to users in the UI
1656
+ * name: 'My Custom Action',
1657
+ *
1658
+ * // Where the action appears in the UI
1659
+ * // MENU: Shows in the "More" menu (three dots menu)
1660
+ * // CONTEXTMENU: Shows in the right-click context menu
1661
+ * position: CustomActionsPosition.MENU,
1662
+ *
1663
+ * // What type of content this action applies to
1664
+ * // SPOTTER: Available in Spotter (AI-powered search)
1665
+ * target: CustomActionTarget.SPOTTER,
1666
+ *
1667
+ * // Optional: Restrict where this action appears based on data models
1668
+ * // dataModelIds: {
1669
+ * // // Restrict to specific data models
1670
+ * // modelIds: ['model-id-1', 'model-id-2'],
1671
+ * // },
1672
+ * // // Restrict to specific groups (for group-based access control)
1673
+ * // groupIds: ['group-id-1'],
1674
+ * // // Restrict to specific organizations (for multi-org deployments)
1675
+ * // orgIds: ['org-id-1'],
1676
+ * }
1677
+ * ],
1678
+ * })
1679
+ * ```
1680
+ * @example
1681
+ * ```js
1682
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1683
+ * init({
1684
+ * ... // other embed config options
1685
+ * customActions: [
1686
+ * {
1687
+ * // Unique identifier for the custom action
1688
+ * id: 'my-liveboard-custom-action',
1689
+ *
1690
+ * // Display name shown to users in the UI
1691
+ * name: 'My Liveboard Custom Action',
1692
+ *
1693
+ * // Where the action appears in the UI
1694
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1695
+ * // MENU: Shows in the "More" menu (three dots menu)
1696
+ * position: CustomActionsPosition.PRIMARY,
1697
+ *
1698
+ * // What type of content this action applies to
1699
+ * // LIVEBOARD: Available on liveboard pages
1700
+ * target: CustomActionTarget.LIVEBOARD,
1701
+ *
1702
+ * // Optional: Restrict where this action appears based on metadata
1703
+ * // metadataIds: {
1704
+ * // // Restrict to specific liveboards
1705
+ * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
1706
+ * // },
1707
+ * // // Restrict to specific groups (for group-based access control)
1708
+ * // groupIds: ['group-id-1', 'group-id-2'],
1709
+ * // // Restrict to specific organizations (for multi-org deployments)
1710
+ * // orgIds: ['org-id-1', 'org-id-2'],
1711
+ * },
1712
+ * {
1713
+ * // Unique identifier for the custom action
1714
+ * id: 'my-viz-custom-action',
1715
+ *
1716
+ * // Display name shown to users in the UI
1717
+ * name: 'My Viz Custom Action',
1718
+ *
1719
+ * // Where the action appears in the UI
1720
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1721
+ * // MENU: Shows in the "More" menu (three dots menu)
1722
+ * // CONTEXTMENU: Shows in the right-click context menu
1723
+ * position: CustomActionsPosition.PRIMARY,
1724
+ *
1725
+ * // What type of content this action applies to
1726
+ * // VIZ: Available on individual visualizations
1610
1727
  * target: CustomActionTarget.VIZ,
1611
- * position: CustomActionPosition.PRIMARY,
1612
- * }
1728
+ *
1729
+ * // Optional: Restrict where this action appears based on metadata
1730
+ * // metadataIds: {
1731
+ * // // Restrict to specific answers
1732
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
1733
+ * // // Restrict to specific liveboard. If liveboardId is
1734
+ * // // passed, custom actions will appear on all vizzes of liveboard
1735
+ * // liveboardIds: ['liveboard-id-1'],
1736
+ * // // Restrict to specific vizIds
1737
+ * // vizIds: ['viz-id-1']
1738
+ * // },
1739
+ * // dataModelIds: {
1740
+ * // // Restrict to specific data models
1741
+ * // modelIds: ['model-id-1', 'model-id-2'],
1742
+ * // // Restrict to specific columns within models
1743
+ * // modelColumnNames: ['model-id::column-name']
1744
+ * // },
1745
+ * // // Restrict to specific groups (for group-based access control)
1746
+ * // groupIds: ['group-id-1', 'group-id-2'],
1747
+ * // // Restrict to specific organizations (for multi-org deployments)
1748
+ * // orgIds: ['org-id-1', 'org-id-2'],
1613
1749
  * }
1614
- * ]
1750
+ * ],
1615
1751
  * })
1616
1752
  * ```
1617
1753
  */
@@ -2001,7 +2137,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2001
2137
  * ```ts
2002
2138
  * import {
2003
2139
  * CustomActionPayload,
2004
- * CustomActionPosition,
2140
+ * CustomActionsPosition,
2005
2141
  * CustomActionTarget,
2006
2142
  * } from '@thoughtspot/visual-embed-sdk';
2007
2143
  * // Use supported embed types such as AppEmbed or LiveboardEmbed
@@ -2009,13 +2145,41 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2009
2145
  * ... // other embed config options
2010
2146
  * customActions: [
2011
2147
  * {
2012
- * name: 'customAction',
2013
- * id: 'customAction',
2014
- * target: CustomActionTarget.VIZ,
2015
- * position: CustomActionPosition.PRIMARY,
2016
- * }
2148
+ * // Unique identifier for the custom action
2149
+ * id: 'my-custom-action',
2150
+ *
2151
+ * // Display name shown to users in the UI
2152
+ * name: 'My Custom Action',
2153
+ *
2154
+ * // Where the action appears in the UI
2155
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2156
+ * // MENU: Shows in the "More" menu (three dots menu)
2157
+ * // CONTEXTMENU: Shows in the right-click context menu
2158
+ * position: CustomActionsPosition.PRIMARY,
2159
+ *
2160
+ * // What type of content this action applies to
2161
+ * // ANSWER: Available on answer pages
2162
+ * target: CustomActionTarget.ANSWER,
2163
+ *
2164
+ * // Optional: Restrict where this action appears based on data models
2165
+ * // dataModelIds: {
2166
+ * // // Restrict to specific data models
2167
+ * // modelIds: ['model-id-1', 'model-id-2'],
2168
+ * // // Restrict to specific columns within models
2169
+ * // modelColumnNames: ['model-id::column-name']
2170
+ * // },
2171
+ *
2172
+ * // Optional: Restrict where this action appears based on metadata
2173
+ * // metadataIds: {
2174
+ * // // Restrict to specific answers
2175
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
2176
+ * // },
2177
+ * // // Restrict to specific groups (for group-based access control)
2178
+ * // groupIds: ['group-id-1', 'group-id-2'],
2179
+ * // // Restrict to specific organizations (for multi-org deployments)
2180
+ * // orgIds: ['org-id-1', 'org-id-2'],
2017
2181
  * }
2018
- * ]
2182
+ * ],
2019
2183
  * })
2020
2184
  *
2021
2185
  * // to trigger a custom flow on custom action click listen to Custom action embed event
@@ -2023,6 +2187,120 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2023
2187
  * console.log('Custom Action event:', payload);
2024
2188
  * })
2025
2189
  * ```
2190
+ * @example
2191
+ * ```ts
2192
+ * import {
2193
+ * CustomActionsPosition,
2194
+ * CustomActionTarget,
2195
+ * } from '@thoughtspot/visual-embed-sdk';
2196
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2197
+ * ... // other embed config options
2198
+ * customActions: [
2199
+ * {
2200
+ * // Unique identifier for the custom action
2201
+ * id: 'my-custom-action',
2202
+ *
2203
+ * // Display name shown to users in the UI
2204
+ * name: 'My Custom Action',
2205
+ *
2206
+ * // Where the action appears in the UI
2207
+ * // MENU: Shows in the "More" menu (three dots menu)
2208
+ * // CONTEXTMENU: Shows in the right-click context menu
2209
+ * position: CustomActionsPosition.MENU,
2210
+ *
2211
+ * // What type of content this action applies to
2212
+ * // SPOTTER: Available in Spotter (AI-powered search)
2213
+ * target: CustomActionTarget.SPOTTER,
2214
+ *
2215
+ * // Optional: Restrict where this action appears based on data models
2216
+ * // dataModelIds: {
2217
+ * // // Restrict to specific data models
2218
+ * // modelIds: ['model-id-1', 'model-id-2'],
2219
+ * // },
2220
+ * // // Restrict to specific groups (for group-based access control)
2221
+ * // groupIds: ['group-id-1'],
2222
+ * // // Restrict to specific organizations (for multi-org deployments)
2223
+ * // orgIds: ['org-id-1'],
2224
+ * }
2225
+ * ],
2226
+ * })
2227
+ * ```
2228
+ * @example
2229
+ * ```ts
2230
+ * import {
2231
+ * CustomActionsPosition,
2232
+ * CustomActionTarget,
2233
+ * } from '@thoughtspot/visual-embed-sdk';
2234
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2235
+ * ... // other embed config options
2236
+ * customActions: [
2237
+ * {
2238
+ * // Unique identifier for the custom action
2239
+ * id: 'my-liveboard-custom-action',
2240
+ *
2241
+ * // Display name shown to users in the UI
2242
+ * name: 'My Liveboard Custom Action',
2243
+ *
2244
+ * // Where the action appears in the UI
2245
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2246
+ * // MENU: Shows in the "More" menu (three dots menu)
2247
+ * position: CustomActionsPosition.PRIMARY,
2248
+ *
2249
+ * // What type of content this action applies to
2250
+ * // LIVEBOARD: Available on liveboard pages
2251
+ * target: CustomActionTarget.LIVEBOARD,
2252
+ *
2253
+ * // Optional: Restrict where this action appears based on metadata
2254
+ * // metadataIds: {
2255
+ * // // Restrict to specific liveboards
2256
+ * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
2257
+ * // },
2258
+ * // // Restrict to specific groups (for group-based access control)
2259
+ * // groupIds: ['group-id-1', 'group-id-2'],
2260
+ * // // Restrict to specific organizations (for multi-org deployments)
2261
+ * // orgIds: ['org-id-1', 'org-id-2'],
2262
+ * },
2263
+ * {
2264
+ * // Unique identifier for the custom action
2265
+ * id: 'my-viz-custom-action',
2266
+ *
2267
+ * // Display name shown to users in the UI
2268
+ * name: 'My Viz Custom Action',
2269
+ *
2270
+ * // Where the action appears in the UI
2271
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2272
+ * // MENU: Shows in the "More" menu (three dots menu)
2273
+ * // CONTEXTMENU: Shows in the right-click context menu
2274
+ * position: CustomActionsPosition.PRIMARY,
2275
+ *
2276
+ * // What type of content this action applies to
2277
+ * // VIZ: Available on individual visualizations
2278
+ * target: CustomActionTarget.VIZ,
2279
+ *
2280
+ * // Optional: Restrict where this action appears based on metadata
2281
+ * // metadataIds: {
2282
+ * // // Restrict to specific answers
2283
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
2284
+ * // // Restrict to specific liveboard. If liveboardId is
2285
+ * // // passed, custom actions will appear on all vizzes of liveboard
2286
+ * // liveboardIds: ['liveboard-id-1'],
2287
+ * // // Restrict to specific vizIds
2288
+ * // vizIds: ['viz-id-1']
2289
+ * // },
2290
+ * // dataModelIds: {
2291
+ * // // Restrict to specific data models
2292
+ * // modelIds: ['model-id-1', 'model-id-2'],
2293
+ * // // Restrict to specific columns within models
2294
+ * // modelColumnNames: ['model-id::column-name']
2295
+ * // },
2296
+ * // // Restrict to specific groups (for group-based access control)
2297
+ * // groupIds: ['group-id-1', 'group-id-2'],
2298
+ * // // Restrict to specific organizations (for multi-org deployments)
2299
+ * // orgIds: ['org-id-1', 'org-id-2'],
2300
+ * }
2301
+ * ],
2302
+ * })
2303
+ * ```
2026
2304
  */
2027
2305
  customActions?: CustomAction[];
2028
2306
  /**
@@ -2261,7 +2539,7 @@ export interface SearchLiveboardCommonViewConfig {
2261
2539
  *
2262
2540
  * Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
2263
2541
  * @default true
2264
- * @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
2542
+ * @deprecated from SDK 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
2265
2543
  * @example
2266
2544
  * ```js
2267
2545
  * // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
@@ -3717,65 +3995,67 @@ export declare enum EmbedEvent {
3717
3995
  Rename = "rename",
3718
3996
  /**
3719
3997
  *
3720
- * This event can be emitted to intercept search execution initiated by
3721
- * users and implement logic to allow or restrict search execution.
3722
- * You can also show custom error text if the search query must be
3723
- * restricted due to your application or business requirements.
3724
-
3725
- * Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
3726
- * for this embed event to get emitted.
3727
- * @param - Includes the following event listener parameters:
3728
- * - `payload`: The payload received from the embed related to the Data API call.
3729
- * - `responder`: Contains elements that let developers define whether ThoughtSpot
3730
- * should run the search, and if not, what error message
3731
- * should be shown to the user.
3732
- *
3733
- * `execute` - When `execute` returns `true`, the search will be run.
3734
- * When `execute` returns `false`, the search will not be executed.
3998
+ * This event allows developers to intercept search execution
3999
+ * and implement logic that decides whether Search Data should return
4000
+ * data or block the search operation.
3735
4001
  *
3736
- * `error` - Developers can customize the error message text when `execute`
3737
- * is `false` using the `errorText` and `errorDescription` parameters in responder.
4002
+ * **Prerequisite**: Set`isOnBeforeGetVizDataInterceptEnabled` to `true`
4003
+ * to ensure that `EmbedEvent.OnBeforeGetVizDataIntercept` is emitted
4004
+ * when the embedding application user tries to run a search query.
3738
4005
  *
3739
- * `errorText` - The error message text to be shown to the user.
3740
- * `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
4006
+ * This framework applies only to `AppEmbed` and `SearchEmbed`.
4007
+ * @param - Includes the following parameters:
4008
+ * - `payload`: The payload received from the embed related to the Data API call.
4009
+ * - `responder`: Contains elements that let developers define whether ThoughtSpot
4010
+ * will run or block the search operation, and if blocked, which error message to provide.
4011
+ * - `execute` - When `execute` returns `true`, the search is run.
4012
+ * When `execute` returns `false`, the search is not executed.
4013
+ * - `error` - Developers can customize the user-facing error message when `execute`
4014
+ * is `false` by using the `error` parameters in `responder`.
4015
+ * - `errorText` - The error message text shown to the user.
3741
4016
  * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
3742
4017
  * @example
3743
- *```js
3744
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
3745
- * (payload, responder) => {
3746
- * responder({
3747
- * data: {
3748
- * execute:false,
3749
- * error: {
3750
- * //Provide a custom error message to explain to your end user
3751
- * //why their search did not run
3752
- * errorText: "This search query cannot be run.
3753
- * Please contact your administrator for more details."
3754
- * }
3755
- * }})
4018
+ *
4019
+ * This example blocks search operation and returns a custom error message:
4020
+ * ```js
4021
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
4022
+ * responder({
4023
+ * data: {
4024
+ * execute: false,
4025
+ * error: {
4026
+ * // Provide a custom error message to explain why the search did not run.
4027
+ * errorText: 'This search query cannot be run. Please contact your administrator for more details.',
4028
+ * },
4029
+ * },
4030
+ * });
3756
4031
  * })
3757
4032
  * ```
4033
+ * @example
3758
4034
  *
3759
- *```js
3760
- * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
3761
- * (payload, responder) => {
3762
- * const query = payload.data.data.answer.search_query
3763
- * responder({
3764
- * data: {
3765
- * // returns true as long as the query does not include
3766
- * // both the 'sales' AND the 'county' column
3767
- * execute: !(query.includes("sales")&&query.includes("county")),
3768
- * error: {
3769
- * //Provide a custom error message to explain to your end user
3770
- * // why their search did not run, and which searches are accepted by your custom logic.
3771
- * errorText: "Error Occurred",
3772
- * errorDescription: "You can't use this query :" + query + ".
3773
- * The 'sales' measures can never be used at the 'county' level.
3774
- * Please try another measure, or remove 'county' from your search."
3775
- * }
3776
- * }})
4035
+ * This example allows the search operation to run
4036
+ * unless the query contains both `sales` and `county`,
4037
+ * and returns a custom error message if the query is rejected:
4038
+ * ```js
4039
+ * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
4040
+ * // Record the search query submitted by the end user.
4041
+ * const query = payload.data.data.answer.search_query;
4042
+ *
4043
+ * responder({
4044
+ * data: {
4045
+ * // Returns true as long as the query does not include both `sales` and `county`.
4046
+ * execute: !(query.includes('sales') && query.includes('county')),
4047
+ * error: {
4048
+ * // Provide a custom error message when the query is blocked by your logic.
4049
+ * errorText:
4050
+ * "You can't use this query: "
4051
+ * + query
4052
+ * + ". The 'sales' measure can never be used at the 'county' level. "
4053
+ * + "Please try another measure or remove 'county' from your search.",
4054
+ * },
4055
+ * },
4056
+ * });
3777
4057
  * })
3778
- *```
4058
+ * ```
3779
4059
  */
3780
4060
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
3781
4061
  /**
@@ -7125,17 +7405,79 @@ export interface CustomAction {
7125
7405
  * positions in the application.
7126
7406
  */
7127
7407
  export declare enum CustomActionsPosition {
7408
+ /**
7409
+ * Shows the action as a primary button
7410
+ * in the toolbar area of the embed.
7411
+ */
7128
7412
  PRIMARY = "PRIMARY",
7413
+ /**
7414
+ * Shows the action inside the "More" menu
7415
+ * (three-dot overflow menu).
7416
+ */
7129
7417
  MENU = "MENU",
7418
+ /**
7419
+ * Shows the action in the right-click
7420
+ * context menu. Only supported for
7421
+ * {@link CustomActionTarget.VIZ},
7422
+ * {@link CustomActionTarget.ANSWER}, and
7423
+ * {@link CustomActionTarget.SPOTTER} targets.
7424
+ */
7130
7425
  CONTEXTMENU = "CONTEXTMENU"
7131
7426
  }
7132
7427
  /**
7133
- * Enum options to mention the target of the custom action.
7428
+ * Enum options to mention the target of the code-based custom action.
7429
+ * The target determines which type of ThoughtSpot object the action is
7430
+ * associated with, and also controls which positions and scoping options
7431
+ * are available.
7134
7432
  */
7135
7433
  export declare enum CustomActionTarget {
7434
+ /**
7435
+ * Action applies at the Liveboard level.
7436
+ * Supported positions:
7437
+ * {@link CustomActionsPosition.PRIMARY},
7438
+ * {@link CustomActionsPosition.MENU}.
7439
+ * Can be scoped with
7440
+ * `metadataIds.liveboardIds`,
7441
+ * `orgIds`, and `groupIds`.
7442
+ */
7136
7443
  LIVEBOARD = "LIVEBOARD",
7444
+ /**
7445
+ * Action applies to individual
7446
+ * visualizations (charts/tables).
7447
+ * Supported positions:
7448
+ * {@link CustomActionsPosition.PRIMARY},
7449
+ * {@link CustomActionsPosition.MENU},
7450
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7451
+ * Can be scoped with `metadataIds`
7452
+ * (answerIds, liveboardIds, vizIds),
7453
+ * `dataModelIds` (modelIds,
7454
+ * modelColumnNames), `orgIds`,
7455
+ * and `groupIds`.
7456
+ */
7137
7457
  VIZ = "VIZ",
7458
+ /**
7459
+ * Action applies to saved or unsaved
7460
+ * Answers. Supported positions:
7461
+ * {@link CustomActionsPosition.PRIMARY},
7462
+ * {@link CustomActionsPosition.MENU},
7463
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7464
+ * Can be scoped with
7465
+ * `metadataIds.answerIds`,
7466
+ * `dataModelIds` (modelIds,
7467
+ * modelColumnNames), `orgIds`,
7468
+ * and `groupIds`.
7469
+ */
7138
7470
  ANSWER = "ANSWER",
7471
+ /**
7472
+ * Action applies to Spotter
7473
+ * (AI-powered search).
7474
+ * Supported positions:
7475
+ * {@link CustomActionsPosition.MENU},
7476
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7477
+ * Can be scoped with
7478
+ * `dataModelIds.modelIds`,
7479
+ * `orgIds`, and `groupIds`.
7480
+ */
7139
7481
  SPOTTER = "SPOTTER"
7140
7482
  }
7141
7483
  /**
@@ -8284,7 +8626,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
8284
8626
  *
8285
8627
  * Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
8286
8628
  * @default true
8287
- * @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
8629
+ * @deprecated from SDK 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
8288
8630
  * @example
8289
8631
  * ```js
8290
8632
  * // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
@@ -8531,7 +8873,7 @@ export declare enum Page {
8531
8873
  Monitor = "monitor"
8532
8874
  }
8533
8875
  /**
8534
- * Define the initial state os column custom group accordions
8876
+ * Define the initial state of column custom group accordions
8535
8877
  * in data panel v2.
8536
8878
  */
8537
8879
  export declare enum DataPanelCustomColumnGroupsAccordionState {
@@ -9258,16 +9600,49 @@ export declare class AppEmbed extends V1Embed {
9258
9600
  render(): Promise<AppEmbed>;
9259
9601
  }
9260
9602
  /**
9261
- * Enum for auth failure types. This is the parameter passed to the listner
9262
- * of {@link AuthStatus.FAILURE}.
9603
+ * Enum for auth failure types.
9604
+ * This value is passed to the listener for {@link AuthStatus.FAILURE}.
9263
9605
  * @group Authentication / Init
9264
9606
  */
9265
9607
  export declare enum AuthFailureType {
9608
+ /**
9609
+ * Authentication failed in the SDK authentication flow.
9610
+ *
9611
+ * Emitted when `init()` or auto-authentication cannot establish a logged-in session.
9612
+ * For example, this can happen because of an invalid token, an auth request failure,
9613
+ * or an auth promise rejection.
9614
+ */
9266
9615
  SDK = "SDK",
9616
+ /**
9617
+ * Browser cookie access is blocked for the embedded app.
9618
+ *
9619
+ * Emitted when the iframe reports that required cookies
9620
+ * cannot be read or sent, commonly due to third-party cookie restrictions.
9621
+ */
9267
9622
  NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
9623
+ /**
9624
+ * The current authentication token or session has expired.
9625
+ *
9626
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
9627
+ */
9268
9628
  EXPIRY = "EXPIRY",
9629
+ /**
9630
+ * A generic authentication failure that does not match a more specific type.
9631
+ *
9632
+ * Emitted as a fallback for app-reported auth failures in standard auth flows.
9633
+ */
9269
9634
  OTHER = "OTHER",
9635
+ /**
9636
+ * The user session timed out due to inactivity.
9637
+ *
9638
+ * Emitted when the app reports an idle-session timeout.
9639
+ */
9270
9640
  IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
9641
+ /**
9642
+ * The app reports that the user is unauthenticated.
9643
+ *
9644
+ * Used primarily to classify unauthenticated failures in Embedded SSO flows.
9645
+ */
9271
9646
  UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
9272
9647
  }
9273
9648
  /**
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.45.3",
3
+ "version": "1.46.1",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
@@ -55,7 +55,7 @@
55
55
  "docgen": "typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck",
56
56
  "test-sdk": "jest -c jest.config.sdk.js --runInBand",
57
57
  "test": "npm run test-sdk",
58
- "posttest": "cat ./coverage/sdk/lcov.info | npx coveralls-next",
58
+ "posttest": "cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'",
59
59
  "is-publish-allowed": "node scripts/is-publish-allowed.js",
60
60
  "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",
61
61
  "check-size": "npm run build && size-limit",