@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.
- package/README.md +1 -1
- package/cjs/package.json +2 -2
- package/cjs/src/auth.d.ts +35 -2
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +36 -3
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +6 -6
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +87 -119
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +1 -1
- package/cjs/src/embed/liveboard.d.ts +2 -2
- package/cjs/src/embed/liveboard.js +2 -2
- package/cjs/src/embed/search.d.ts +3 -2
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +3 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +1 -1
- package/cjs/src/embed/ts-embed.js +1 -1
- package/cjs/src/react/index.d.ts +1 -1
- package/cjs/src/types.d.ts +408 -66
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +116 -52
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-BuwECGdm.js → index-Vyh6Ha5f.js} +1 -1
- package/dist/src/auth.d.ts +35 -2
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +1 -1
- package/dist/src/embed/liveboard.d.ts +2 -2
- package/dist/src/embed/search.d.ts +3 -2
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +1 -1
- package/dist/src/react/index.d.ts +1 -1
- package/dist/src/types.d.ts +408 -66
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +167 -69
- package/dist/tsembed-react.js +166 -68
- package/dist/tsembed.es.js +167 -69
- package/dist/tsembed.js +166 -68
- package/dist/visual-embed-sdk-react-full.d.ts +446 -71
- package/dist/visual-embed-sdk-react.d.ts +439 -67
- package/dist/visual-embed-sdk.d.ts +445 -70
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +35 -2
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +36 -3
- package/lib/src/auth.js.map +1 -1
- package/lib/src/embed/app.d.ts +1 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +6 -6
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +87 -119
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +1 -1
- package/lib/src/embed/liveboard.d.ts +2 -2
- package/lib/src/embed/liveboard.js +2 -2
- package/lib/src/embed/search.d.ts +3 -2
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +3 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +1 -1
- package/lib/src/embed/ts-embed.js +1 -1
- package/lib/src/react/index.d.ts +1 -1
- package/lib/src/types.d.ts +408 -66
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +116 -52
- package/lib/src/types.js.map +1 -1
- package/package.json +2 -2
- package/src/auth.ts +36 -3
- package/src/embed/app.spec.ts +171 -211
- package/src/embed/app.ts +16 -11
- package/src/embed/conversation.ts +1 -1
- package/src/embed/liveboard.ts +2 -2
- package/src/embed/search.ts +3 -2
- package/src/embed/ts-embed.ts +1 -1
- package/src/react/index.tsx +1 -1
- package/src/types.ts +409 -67
|
@@ -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 {
|
|
1552
|
+
* import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk';
|
|
1553
1553
|
* init({
|
|
1554
1554
|
* ... // other embed config options
|
|
1555
1555
|
* customActions: [
|
|
1556
1556
|
* {
|
|
1557
|
-
*
|
|
1558
|
-
* id: '
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1962
|
-
* id: '
|
|
1963
|
-
*
|
|
1964
|
-
*
|
|
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
|
/**
|
|
@@ -2210,7 +2488,7 @@ export interface SearchLiveboardCommonViewConfig {
|
|
|
2210
2488
|
*
|
|
2211
2489
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
2212
2490
|
* @default true
|
|
2213
|
-
* @
|
|
2491
|
+
* @deprecated from SDK 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
2214
2492
|
* @example
|
|
2215
2493
|
* ```js
|
|
2216
2494
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -3666,65 +3944,67 @@ export declare enum EmbedEvent {
|
|
|
3666
3944
|
Rename = "rename",
|
|
3667
3945
|
/**
|
|
3668
3946
|
*
|
|
3669
|
-
* This event
|
|
3670
|
-
*
|
|
3671
|
-
*
|
|
3672
|
-
* restricted due to your application or business requirements.
|
|
3673
|
-
|
|
3674
|
-
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3675
|
-
* for this embed event to get emitted.
|
|
3676
|
-
* @param - Includes the following event listener parameters:
|
|
3677
|
-
* - `payload`: The payload received from the embed related to the Data API call.
|
|
3678
|
-
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
3679
|
-
* should run the search, and if not, what error message
|
|
3680
|
-
* should be shown to the user.
|
|
3681
|
-
*
|
|
3682
|
-
* `execute` - When `execute` returns `true`, the search will be run.
|
|
3683
|
-
* When `execute` returns `false`, the search will not be executed.
|
|
3947
|
+
* This event allows developers to intercept search execution
|
|
3948
|
+
* and implement logic that decides whether Search Data should return
|
|
3949
|
+
* data or block the search operation.
|
|
3684
3950
|
*
|
|
3685
|
-
* `
|
|
3686
|
-
*
|
|
3951
|
+
* **Prerequisite**: Set`isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3952
|
+
* to ensure that `EmbedEvent.OnBeforeGetVizDataIntercept` is emitted
|
|
3953
|
+
* when the embedding application user tries to run a search query.
|
|
3687
3954
|
*
|
|
3688
|
-
*
|
|
3689
|
-
*
|
|
3955
|
+
* This framework applies only to `AppEmbed` and `SearchEmbed`.
|
|
3956
|
+
* @param - Includes the following parameters:
|
|
3957
|
+
* - `payload`: The payload received from the embed related to the Data API call.
|
|
3958
|
+
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
3959
|
+
* will run or block the search operation, and if blocked, which error message to provide.
|
|
3960
|
+
* - `execute` - When `execute` returns `true`, the search is run.
|
|
3961
|
+
* When `execute` returns `false`, the search is not executed.
|
|
3962
|
+
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
3963
|
+
* is `false` by using the `error` parameters in `responder`.
|
|
3964
|
+
* - `errorText` - The error message text shown to the user.
|
|
3690
3965
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
3691
3966
|
* @example
|
|
3692
|
-
|
|
3693
|
-
*
|
|
3694
|
-
*
|
|
3695
|
-
*
|
|
3696
|
-
*
|
|
3697
|
-
*
|
|
3698
|
-
*
|
|
3699
|
-
*
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
*
|
|
3703
|
-
*
|
|
3704
|
-
*
|
|
3967
|
+
*
|
|
3968
|
+
* This example blocks search operation and returns a custom error message:
|
|
3969
|
+
* ```js
|
|
3970
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
|
|
3971
|
+
* responder({
|
|
3972
|
+
* data: {
|
|
3973
|
+
* execute: false,
|
|
3974
|
+
* error: {
|
|
3975
|
+
* // Provide a custom error message to explain why the search did not run.
|
|
3976
|
+
* errorText: 'This search query cannot be run. Please contact your administrator for more details.',
|
|
3977
|
+
* },
|
|
3978
|
+
* },
|
|
3979
|
+
* });
|
|
3705
3980
|
* })
|
|
3706
3981
|
* ```
|
|
3982
|
+
* @example
|
|
3707
3983
|
*
|
|
3708
|
-
|
|
3709
|
-
*
|
|
3710
|
-
*
|
|
3711
|
-
*
|
|
3712
|
-
* responder
|
|
3713
|
-
*
|
|
3714
|
-
*
|
|
3715
|
-
*
|
|
3716
|
-
*
|
|
3717
|
-
*
|
|
3718
|
-
*
|
|
3719
|
-
*
|
|
3720
|
-
*
|
|
3721
|
-
*
|
|
3722
|
-
*
|
|
3723
|
-
*
|
|
3724
|
-
*
|
|
3725
|
-
*
|
|
3984
|
+
* This example allows the search operation to run
|
|
3985
|
+
* unless the query contains both `sales` and `county`,
|
|
3986
|
+
* and returns a custom error message if the query is rejected:
|
|
3987
|
+
* ```js
|
|
3988
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => {
|
|
3989
|
+
* // Record the search query submitted by the end user.
|
|
3990
|
+
* const query = payload.data.data.answer.search_query;
|
|
3991
|
+
*
|
|
3992
|
+
* responder({
|
|
3993
|
+
* data: {
|
|
3994
|
+
* // Returns true as long as the query does not include both `sales` and `county`.
|
|
3995
|
+
* execute: !(query.includes('sales') && query.includes('county')),
|
|
3996
|
+
* error: {
|
|
3997
|
+
* // Provide a custom error message when the query is blocked by your logic.
|
|
3998
|
+
* errorText:
|
|
3999
|
+
* "You can't use this query: "
|
|
4000
|
+
* + query
|
|
4001
|
+
* + ". The 'sales' measure can never be used at the 'county' level. "
|
|
4002
|
+
* + "Please try another measure or remove 'county' from your search.",
|
|
4003
|
+
* },
|
|
4004
|
+
* },
|
|
4005
|
+
* });
|
|
3726
4006
|
* })
|
|
3727
|
-
|
|
4007
|
+
* ```
|
|
3728
4008
|
*/
|
|
3729
4009
|
OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept",
|
|
3730
4010
|
/**
|
|
@@ -7023,14 +7303,73 @@ export interface CustomAction {
|
|
|
7023
7303
|
* positions in the application.
|
|
7024
7304
|
*/
|
|
7025
7305
|
export declare enum CustomActionsPosition {
|
|
7306
|
+
/**
|
|
7307
|
+
* Shows the action as a primary button
|
|
7308
|
+
* in the toolbar area of the embed.
|
|
7309
|
+
*/
|
|
7026
7310
|
PRIMARY = "PRIMARY",
|
|
7311
|
+
/**
|
|
7312
|
+
* Shows the action inside the "More" menu
|
|
7313
|
+
* (three-dot overflow menu).
|
|
7314
|
+
*/
|
|
7027
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
|
+
*/
|
|
7028
7323
|
CONTEXTMENU = "CONTEXTMENU"
|
|
7029
7324
|
}
|
|
7030
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
|
+
*/
|
|
7031
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
|
+
*/
|
|
7032
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
|
+
*/
|
|
7033
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
|
+
*/
|
|
7034
7373
|
SPOTTER = "SPOTTER"
|
|
7035
7374
|
}
|
|
7036
7375
|
/**
|
|
@@ -7384,11 +7723,44 @@ export interface ContextObject {
|
|
|
7384
7723
|
};
|
|
7385
7724
|
}
|
|
7386
7725
|
declare enum AuthFailureType {
|
|
7726
|
+
/**
|
|
7727
|
+
* Authentication failed in the SDK authentication flow.
|
|
7728
|
+
*
|
|
7729
|
+
* Emitted when `init()` or auto-authentication cannot establish a logged-in session.
|
|
7730
|
+
* For example, this can happen because of an invalid token, an auth request failure,
|
|
7731
|
+
* or an auth promise rejection.
|
|
7732
|
+
*/
|
|
7387
7733
|
SDK = "SDK",
|
|
7734
|
+
/**
|
|
7735
|
+
* Browser cookie access is blocked for the embedded app.
|
|
7736
|
+
*
|
|
7737
|
+
* Emitted when the iframe reports that required cookies
|
|
7738
|
+
* cannot be read or sent, commonly due to third-party cookie restrictions.
|
|
7739
|
+
*/
|
|
7388
7740
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
7741
|
+
/**
|
|
7742
|
+
* The current authentication token or session has expired.
|
|
7743
|
+
*
|
|
7744
|
+
* Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
|
|
7745
|
+
*/
|
|
7389
7746
|
EXPIRY = "EXPIRY",
|
|
7747
|
+
/**
|
|
7748
|
+
* A generic authentication failure that does not match a more specific type.
|
|
7749
|
+
*
|
|
7750
|
+
* Emitted as a fallback for app-reported auth failures in standard auth flows.
|
|
7751
|
+
*/
|
|
7390
7752
|
OTHER = "OTHER",
|
|
7753
|
+
/**
|
|
7754
|
+
* The user session timed out due to inactivity.
|
|
7755
|
+
*
|
|
7756
|
+
* Emitted when the app reports an idle-session timeout.
|
|
7757
|
+
*/
|
|
7391
7758
|
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
|
|
7759
|
+
/**
|
|
7760
|
+
* The app reports that the user is unauthenticated.
|
|
7761
|
+
*
|
|
7762
|
+
* Used primarily to classify unauthenticated failures in Embedded SSO flows.
|
|
7763
|
+
*/
|
|
7392
7764
|
UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
|
|
7393
7765
|
}
|
|
7394
7766
|
declare enum AuthStatus {
|
|
@@ -8781,7 +9153,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
8781
9153
|
*
|
|
8782
9154
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
8783
9155
|
* @default true
|
|
8784
|
-
* @
|
|
9156
|
+
* @deprecated from SDK 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
8785
9157
|
* @example
|
|
8786
9158
|
* ```js
|
|
8787
9159
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -10329,7 +10701,7 @@ export interface PreRenderProps {
|
|
|
10329
10701
|
* return <LiveboardEmbed preRenderId="someId" liveboardId="libId" />
|
|
10330
10702
|
* }
|
|
10331
10703
|
* ```
|
|
10332
|
-
* @version SDK: 1.25.0 |
|
|
10704
|
+
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl
|
|
10333
10705
|
*/
|
|
10334
10706
|
preRenderId: string;
|
|
10335
10707
|
}
|