@thoughtspot/visual-embed-sdk 1.46.0 → 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 (61) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +2 -2
  3. package/cjs/src/auth.js +1 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/embed/app.d.ts +1 -1
  6. package/cjs/src/embed/app.js +1 -1
  7. package/cjs/src/embed/liveboard.d.ts +2 -2
  8. package/cjs/src/embed/liveboard.js +2 -2
  9. package/cjs/src/embed/search.d.ts +3 -2
  10. package/cjs/src/embed/search.d.ts.map +1 -1
  11. package/cjs/src/embed/search.js +3 -2
  12. package/cjs/src/embed/search.js.map +1 -1
  13. package/cjs/src/embed/ts-embed.d.ts +1 -1
  14. package/cjs/src/embed/ts-embed.js +1 -1
  15. package/cjs/src/react/index.d.ts +1 -1
  16. package/cjs/src/types.d.ts +359 -21
  17. package/cjs/src/types.d.ts.map +1 -1
  18. package/cjs/src/types.js +68 -8
  19. package/cjs/src/types.js.map +1 -1
  20. package/dist/{index-BQvLEoxp.js → index-Vyh6Ha5f.js} +1 -1
  21. package/dist/src/embed/app.d.ts +1 -1
  22. package/dist/src/embed/liveboard.d.ts +2 -2
  23. package/dist/src/embed/search.d.ts +3 -2
  24. package/dist/src/embed/search.d.ts.map +1 -1
  25. package/dist/src/embed/ts-embed.d.ts +1 -1
  26. package/dist/src/react/index.d.ts +1 -1
  27. package/dist/src/types.d.ts +359 -21
  28. package/dist/src/types.d.ts.map +1 -1
  29. package/dist/tsembed-react.es.js +79 -18
  30. package/dist/tsembed-react.js +78 -17
  31. package/dist/tsembed.es.js +79 -18
  32. package/dist/tsembed.js +78 -17
  33. package/dist/visual-embed-sdk-react-full.d.ts +361 -23
  34. package/dist/visual-embed-sdk-react.d.ts +356 -21
  35. package/dist/visual-embed-sdk.d.ts +360 -22
  36. package/lib/package.json +2 -2
  37. package/lib/src/auth.js +1 -1
  38. package/lib/src/auth.js.map +1 -1
  39. package/lib/src/embed/app.d.ts +1 -1
  40. package/lib/src/embed/app.js +1 -1
  41. package/lib/src/embed/liveboard.d.ts +2 -2
  42. package/lib/src/embed/liveboard.js +2 -2
  43. package/lib/src/embed/search.d.ts +3 -2
  44. package/lib/src/embed/search.d.ts.map +1 -1
  45. package/lib/src/embed/search.js +3 -2
  46. package/lib/src/embed/search.js.map +1 -1
  47. package/lib/src/embed/ts-embed.d.ts +1 -1
  48. package/lib/src/embed/ts-embed.js +1 -1
  49. package/lib/src/react/index.d.ts +1 -1
  50. package/lib/src/types.d.ts +359 -21
  51. package/lib/src/types.d.ts.map +1 -1
  52. package/lib/src/types.js +68 -8
  53. package/lib/src/types.js.map +1 -1
  54. package/package.json +2 -2
  55. package/src/auth.ts +1 -1
  56. package/src/embed/app.ts +1 -1
  57. package/src/embed/liveboard.ts +2 -2
  58. package/src/embed/search.ts +3 -2
  59. package/src/embed/ts-embed.ts +1 -1
  60. package/src/react/index.tsx +1 -1
  61. package/src/types.ts +359 -21
@@ -1549,18 +1549,154 @@ export interface EmbedConfig {
1549
1549
  * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl
1550
1550
  * @example
1551
1551
  * ```js
1552
- * import { CustomActionPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1552
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1553
1553
  * init({
1554
1554
  * ... // other embed config options
1555
1555
  * customActions: [
1556
1556
  * {
1557
- * name: 'customAction',
1558
- * id: 'customAction',
1557
+ * // Unique identifier for the custom action
1558
+ * id: 'my-custom-action',
1559
+ *
1560
+ * // Display name shown to users in the UI
1561
+ * name: 'My Custom Action',
1562
+ *
1563
+ * // Where the action appears in the UI
1564
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1565
+ * // MENU: Shows in the "More" menu (three dots menu)
1566
+ * // CONTEXTMENU: Shows in the right-click context menu
1567
+ * position: CustomActionsPosition.PRIMARY,
1568
+ *
1569
+ * // What type of content this action applies to
1570
+ * // ANSWER: Available on answer pages
1571
+ * target: CustomActionTarget.ANSWER,
1572
+ *
1573
+ * // Optional: Restrict where this action appears based on data models
1574
+ * // dataModelIds: {
1575
+ * // // Restrict to specific data models
1576
+ * // modelIds: ['model-id-1', 'model-id-2'],
1577
+ * // // Restrict to specific columns within models
1578
+ * // modelColumnNames: ['model-id::column-name']
1579
+ * // },
1580
+ *
1581
+ * // Optional: Restrict where this action appears based on metadata
1582
+ * // metadataIds: {
1583
+ * // // Restrict to specific answers
1584
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
1585
+ * // },
1586
+ * // // Restrict to specific groups (for group-based access control)
1587
+ * // groupIds: ['group-id-1', 'group-id-2'],
1588
+ * // // Restrict to specific organizations (for multi-org deployments)
1589
+ * // orgIds: ['org-id-1', 'org-id-2'],
1590
+ * }
1591
+ * ],
1592
+ * })
1593
+ * ```
1594
+ * @example
1595
+ * ```js
1596
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1597
+ * init({
1598
+ * ... // other embed config options
1599
+ * customActions: [
1600
+ * {
1601
+ * // Unique identifier for the custom action
1602
+ * id: 'my-custom-action',
1603
+ *
1604
+ * // Display name shown to users in the UI
1605
+ * name: 'My Custom Action',
1606
+ *
1607
+ * // Where the action appears in the UI
1608
+ * // MENU: Shows in the "More" menu (three dots menu)
1609
+ * // CONTEXTMENU: Shows in the right-click context menu
1610
+ * position: CustomActionsPosition.MENU,
1611
+ *
1612
+ * // What type of content this action applies to
1613
+ * // SPOTTER: Available in Spotter (AI-powered search)
1614
+ * target: CustomActionTarget.SPOTTER,
1615
+ *
1616
+ * // Optional: Restrict where this action appears based on data models
1617
+ * // dataModelIds: {
1618
+ * // // Restrict to specific data models
1619
+ * // modelIds: ['model-id-1', 'model-id-2'],
1620
+ * // },
1621
+ * // // Restrict to specific groups (for group-based access control)
1622
+ * // groupIds: ['group-id-1'],
1623
+ * // // Restrict to specific organizations (for multi-org deployments)
1624
+ * // orgIds: ['org-id-1'],
1625
+ * }
1626
+ * ],
1627
+ * })
1628
+ * ```
1629
+ * @example
1630
+ * ```js
1631
+ * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
1632
+ * init({
1633
+ * ... // other embed config options
1634
+ * customActions: [
1635
+ * {
1636
+ * // Unique identifier for the custom action
1637
+ * id: 'my-liveboard-custom-action',
1638
+ *
1639
+ * // Display name shown to users in the UI
1640
+ * name: 'My Liveboard Custom Action',
1641
+ *
1642
+ * // Where the action appears in the UI
1643
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1644
+ * // MENU: Shows in the "More" menu (three dots menu)
1645
+ * position: CustomActionsPosition.PRIMARY,
1646
+ *
1647
+ * // What type of content this action applies to
1648
+ * // LIVEBOARD: Available on liveboard pages
1649
+ * target: CustomActionTarget.LIVEBOARD,
1650
+ *
1651
+ * // Optional: Restrict where this action appears based on metadata
1652
+ * // metadataIds: {
1653
+ * // // Restrict to specific liveboards
1654
+ * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
1655
+ * // },
1656
+ * // // Restrict to specific groups (for group-based access control)
1657
+ * // groupIds: ['group-id-1', 'group-id-2'],
1658
+ * // // Restrict to specific organizations (for multi-org deployments)
1659
+ * // orgIds: ['org-id-1', 'org-id-2'],
1660
+ * },
1661
+ * {
1662
+ * // Unique identifier for the custom action
1663
+ * id: 'my-viz-custom-action',
1664
+ *
1665
+ * // Display name shown to users in the UI
1666
+ * name: 'My Viz Custom Action',
1667
+ *
1668
+ * // Where the action appears in the UI
1669
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
1670
+ * // MENU: Shows in the "More" menu (three dots menu)
1671
+ * // CONTEXTMENU: Shows in the right-click context menu
1672
+ * position: CustomActionsPosition.PRIMARY,
1673
+ *
1674
+ * // What type of content this action applies to
1675
+ * // VIZ: Available on individual visualizations
1559
1676
  * target: CustomActionTarget.VIZ,
1560
- * position: CustomActionPosition.PRIMARY,
1561
- * }
1677
+ *
1678
+ * // Optional: Restrict where this action appears based on metadata
1679
+ * // metadataIds: {
1680
+ * // // Restrict to specific answers
1681
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
1682
+ * // // Restrict to specific liveboard. If liveboardId is
1683
+ * // // passed, custom actions will appear on all vizzes of liveboard
1684
+ * // liveboardIds: ['liveboard-id-1'],
1685
+ * // // Restrict to specific vizIds
1686
+ * // vizIds: ['viz-id-1']
1687
+ * // },
1688
+ * // dataModelIds: {
1689
+ * // // Restrict to specific data models
1690
+ * // modelIds: ['model-id-1', 'model-id-2'],
1691
+ * // // Restrict to specific columns within models
1692
+ * // modelColumnNames: ['model-id::column-name']
1693
+ * // },
1694
+ * // // Restrict to specific groups (for group-based access control)
1695
+ * // groupIds: ['group-id-1', 'group-id-2'],
1696
+ * // // Restrict to specific organizations (for multi-org deployments)
1697
+ * // orgIds: ['org-id-1', 'org-id-2'],
1562
1698
  * }
1563
- * ]
1699
+ * ],
1564
1700
  * })
1565
1701
  * ```
1566
1702
  */
@@ -1950,7 +2086,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1950
2086
  * ```ts
1951
2087
  * import {
1952
2088
  * CustomActionPayload,
1953
- * CustomActionPosition,
2089
+ * CustomActionsPosition,
1954
2090
  * CustomActionTarget,
1955
2091
  * } from '@thoughtspot/visual-embed-sdk';
1956
2092
  * // Use supported embed types such as AppEmbed or LiveboardEmbed
@@ -1958,13 +2094,41 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1958
2094
  * ... // other embed config options
1959
2095
  * customActions: [
1960
2096
  * {
1961
- * name: 'customAction',
1962
- * id: 'customAction',
1963
- * target: CustomActionTarget.VIZ,
1964
- * position: CustomActionPosition.PRIMARY,
1965
- * }
2097
+ * // Unique identifier for the custom action
2098
+ * id: 'my-custom-action',
2099
+ *
2100
+ * // Display name shown to users in the UI
2101
+ * name: 'My Custom Action',
2102
+ *
2103
+ * // Where the action appears in the UI
2104
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2105
+ * // MENU: Shows in the "More" menu (three dots menu)
2106
+ * // CONTEXTMENU: Shows in the right-click context menu
2107
+ * position: CustomActionsPosition.PRIMARY,
2108
+ *
2109
+ * // What type of content this action applies to
2110
+ * // ANSWER: Available on answer pages
2111
+ * target: CustomActionTarget.ANSWER,
2112
+ *
2113
+ * // Optional: Restrict where this action appears based on data models
2114
+ * // dataModelIds: {
2115
+ * // // Restrict to specific data models
2116
+ * // modelIds: ['model-id-1', 'model-id-2'],
2117
+ * // // Restrict to specific columns within models
2118
+ * // modelColumnNames: ['model-id::column-name']
2119
+ * // },
2120
+ *
2121
+ * // Optional: Restrict where this action appears based on metadata
2122
+ * // metadataIds: {
2123
+ * // // Restrict to specific answers
2124
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
2125
+ * // },
2126
+ * // // Restrict to specific groups (for group-based access control)
2127
+ * // groupIds: ['group-id-1', 'group-id-2'],
2128
+ * // // Restrict to specific organizations (for multi-org deployments)
2129
+ * // orgIds: ['org-id-1', 'org-id-2'],
1966
2130
  * }
1967
- * ]
2131
+ * ],
1968
2132
  * })
1969
2133
  *
1970
2134
  * // to trigger a custom flow on custom action click listen to Custom action embed event
@@ -1972,6 +2136,120 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1972
2136
  * console.log('Custom Action event:', payload);
1973
2137
  * })
1974
2138
  * ```
2139
+ * @example
2140
+ * ```ts
2141
+ * import {
2142
+ * CustomActionsPosition,
2143
+ * CustomActionTarget,
2144
+ * } from '@thoughtspot/visual-embed-sdk';
2145
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2146
+ * ... // other embed config options
2147
+ * customActions: [
2148
+ * {
2149
+ * // Unique identifier for the custom action
2150
+ * id: 'my-custom-action',
2151
+ *
2152
+ * // Display name shown to users in the UI
2153
+ * name: 'My Custom Action',
2154
+ *
2155
+ * // Where the action appears in the UI
2156
+ * // MENU: Shows in the "More" menu (three dots menu)
2157
+ * // CONTEXTMENU: Shows in the right-click context menu
2158
+ * position: CustomActionsPosition.MENU,
2159
+ *
2160
+ * // What type of content this action applies to
2161
+ * // SPOTTER: Available in Spotter (AI-powered search)
2162
+ * target: CustomActionTarget.SPOTTER,
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
+ * // },
2169
+ * // // Restrict to specific groups (for group-based access control)
2170
+ * // groupIds: ['group-id-1'],
2171
+ * // // Restrict to specific organizations (for multi-org deployments)
2172
+ * // orgIds: ['org-id-1'],
2173
+ * }
2174
+ * ],
2175
+ * })
2176
+ * ```
2177
+ * @example
2178
+ * ```ts
2179
+ * import {
2180
+ * CustomActionsPosition,
2181
+ * CustomActionTarget,
2182
+ * } from '@thoughtspot/visual-embed-sdk';
2183
+ * const embed = new LiveboardEmbed('#tsEmbed', {
2184
+ * ... // other embed config options
2185
+ * customActions: [
2186
+ * {
2187
+ * // Unique identifier for the custom action
2188
+ * id: 'my-liveboard-custom-action',
2189
+ *
2190
+ * // Display name shown to users in the UI
2191
+ * name: 'My Liveboard Custom Action',
2192
+ *
2193
+ * // Where the action appears in the UI
2194
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2195
+ * // MENU: Shows in the "More" menu (three dots menu)
2196
+ * position: CustomActionsPosition.PRIMARY,
2197
+ *
2198
+ * // What type of content this action applies to
2199
+ * // LIVEBOARD: Available on liveboard pages
2200
+ * target: CustomActionTarget.LIVEBOARD,
2201
+ *
2202
+ * // Optional: Restrict where this action appears based on metadata
2203
+ * // metadataIds: {
2204
+ * // // Restrict to specific liveboards
2205
+ * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'],
2206
+ * // },
2207
+ * // // Restrict to specific groups (for group-based access control)
2208
+ * // groupIds: ['group-id-1', 'group-id-2'],
2209
+ * // // Restrict to specific organizations (for multi-org deployments)
2210
+ * // orgIds: ['org-id-1', 'org-id-2'],
2211
+ * },
2212
+ * {
2213
+ * // Unique identifier for the custom action
2214
+ * id: 'my-viz-custom-action',
2215
+ *
2216
+ * // Display name shown to users in the UI
2217
+ * name: 'My Viz Custom Action',
2218
+ *
2219
+ * // Where the action appears in the UI
2220
+ * // PRIMARY: Shows as a primary button (e.g., in the toolbar)
2221
+ * // MENU: Shows in the "More" menu (three dots menu)
2222
+ * // CONTEXTMENU: Shows in the right-click context menu
2223
+ * position: CustomActionsPosition.PRIMARY,
2224
+ *
2225
+ * // What type of content this action applies to
2226
+ * // VIZ: Available on individual visualizations
2227
+ * target: CustomActionTarget.VIZ,
2228
+ *
2229
+ * // Optional: Restrict where this action appears based on metadata
2230
+ * // metadataIds: {
2231
+ * // // Restrict to specific answers
2232
+ * // answerIds: ['answer-id-1', 'answer-id-2'],
2233
+ * // // Restrict to specific liveboard. If liveboardId is
2234
+ * // // passed, custom actions will appear on all vizzes of liveboard
2235
+ * // liveboardIds: ['liveboard-id-1'],
2236
+ * // // Restrict to specific vizIds
2237
+ * // vizIds: ['viz-id-1']
2238
+ * // },
2239
+ * // dataModelIds: {
2240
+ * // // Restrict to specific data models
2241
+ * // modelIds: ['model-id-1', 'model-id-2'],
2242
+ * // // Restrict to specific columns within models
2243
+ * // modelColumnNames: ['model-id::column-name']
2244
+ * // },
2245
+ * // // Restrict to specific groups (for group-based access control)
2246
+ * // groupIds: ['group-id-1', 'group-id-2'],
2247
+ * // // Restrict to specific organizations (for multi-org deployments)
2248
+ * // orgIds: ['org-id-1', 'org-id-2'],
2249
+ * }
2250
+ * ],
2251
+ * })
2252
+ * ```
1975
2253
  */
1976
2254
  customActions?: CustomAction[];
1977
2255
  /**
@@ -3679,13 +3957,11 @@ export declare enum EmbedEvent {
3679
3957
  * - `payload`: The payload received from the embed related to the Data API call.
3680
3958
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
3681
3959
  * will run or block the search operation, and if blocked, which error message to provide.
3682
- *
3683
- * `execute` - When `execute` returns `true`, the search is run.
3960
+ * - `execute` - When `execute` returns `true`, the search is run.
3684
3961
  * When `execute` returns `false`, the search is not executed.
3685
- *
3686
- * `error` - Developers can customize the user-facing error message when `execute`
3962
+ * - `error` - Developers can customize the user-facing error message when `execute`
3687
3963
  * is `false` by using the `error` parameters in `responder`.
3688
- * `errorText` - The error message text shown to the user.
3964
+ * - `errorText` - The error message text shown to the user.
3689
3965
  * @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
3690
3966
  * @example
3691
3967
  *
@@ -3701,7 +3977,7 @@ export declare enum EmbedEvent {
3701
3977
  * },
3702
3978
  * },
3703
3979
  * });
3704
- * });
3980
+ * })
3705
3981
  * ```
3706
3982
  * @example
3707
3983
  *
@@ -3727,7 +4003,7 @@ export declare enum EmbedEvent {
3727
4003
  * },
3728
4004
  * },
3729
4005
  * });
3730
- * });
4006
+ * })
3731
4007
  * ```
3732
4008
  */
3733
4009
  OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
@@ -7027,14 +7303,73 @@ export interface CustomAction {
7027
7303
  * positions in the application.
7028
7304
  */
7029
7305
  export declare enum CustomActionsPosition {
7306
+ /**
7307
+ * Shows the action as a primary button
7308
+ * in the toolbar area of the embed.
7309
+ */
7030
7310
  PRIMARY = "PRIMARY",
7311
+ /**
7312
+ * Shows the action inside the "More" menu
7313
+ * (three-dot overflow menu).
7314
+ */
7031
7315
  MENU = "MENU",
7316
+ /**
7317
+ * Shows the action in the right-click
7318
+ * context menu. Only supported for
7319
+ * {@link CustomActionTarget.VIZ},
7320
+ * {@link CustomActionTarget.ANSWER}, and
7321
+ * {@link CustomActionTarget.SPOTTER} targets.
7322
+ */
7032
7323
  CONTEXTMENU = "CONTEXTMENU"
7033
7324
  }
7034
7325
  declare enum CustomActionTarget {
7326
+ /**
7327
+ * Action applies at the Liveboard level.
7328
+ * Supported positions:
7329
+ * {@link CustomActionsPosition.PRIMARY},
7330
+ * {@link CustomActionsPosition.MENU}.
7331
+ * Can be scoped with
7332
+ * `metadataIds.liveboardIds`,
7333
+ * `orgIds`, and `groupIds`.
7334
+ */
7035
7335
  LIVEBOARD = "LIVEBOARD",
7336
+ /**
7337
+ * Action applies to individual
7338
+ * visualizations (charts/tables).
7339
+ * Supported positions:
7340
+ * {@link CustomActionsPosition.PRIMARY},
7341
+ * {@link CustomActionsPosition.MENU},
7342
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7343
+ * Can be scoped with `metadataIds`
7344
+ * (answerIds, liveboardIds, vizIds),
7345
+ * `dataModelIds` (modelIds,
7346
+ * modelColumnNames), `orgIds`,
7347
+ * and `groupIds`.
7348
+ */
7036
7349
  VIZ = "VIZ",
7350
+ /**
7351
+ * Action applies to saved or unsaved
7352
+ * Answers. Supported positions:
7353
+ * {@link CustomActionsPosition.PRIMARY},
7354
+ * {@link CustomActionsPosition.MENU},
7355
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7356
+ * Can be scoped with
7357
+ * `metadataIds.answerIds`,
7358
+ * `dataModelIds` (modelIds,
7359
+ * modelColumnNames), `orgIds`,
7360
+ * and `groupIds`.
7361
+ */
7037
7362
  ANSWER = "ANSWER",
7363
+ /**
7364
+ * Action applies to Spotter
7365
+ * (AI-powered search).
7366
+ * Supported positions:
7367
+ * {@link CustomActionsPosition.MENU},
7368
+ * {@link CustomActionsPosition.CONTEXTMENU}.
7369
+ * Can be scoped with
7370
+ * `dataModelIds.modelIds`,
7371
+ * `orgIds`, and `groupIds`.
7372
+ */
7038
7373
  SPOTTER = "SPOTTER"
7039
7374
  }
7040
7375
  /**
@@ -10366,7 +10701,7 @@ export interface PreRenderProps {
10366
10701
  * return <LiveboardEmbed preRenderId="someId" liveboardId="libId" />
10367
10702
  * }
10368
10703
  * ```
10369
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
10704
+ * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
10370
10705
  */
10371
10706
  preRenderId: string;
10372
10707
  }