// Generated by dts-bundle-generator v9.5.1 /** * The list of customization css variables. These * are the only allowed variables possible. */ export interface CustomCssVariables { /** * Background color of the Liveboard, visualization, Search, and Answer pages. */ "--ts-var-root-background"?: string; /** * Color of the text on application pages. */ "--ts-var-root-color"?: string; /** * Font type for the text on application pages. */ "--ts-var-root-font-family"?: string; /** * Text transformation specification for UI elements in the app. */ "--ts-var-root-text-transform"?: string; /** * Font color of the text on toggle buttons such as * **All**, **Answers**, and **Liveboards** on the Home page (Classic experience), * the text color of the chart and table tiles on Home page (New modular Homepage * experience), title text on the AI-generated charts and tables, and object titles on * list pages such as *Liveboards* and *Answers*. * The default color code is #2770EF. * */ "--ts-var-application-color"?: string; /** * Background color of the top navigation panel. */ "--ts-var-nav-background"?: string; /** * Font color of the top navigation panel. */ "--ts-var-nav-color"?: string; /** * Background color of the left navigation panel. */ "--ts-var-left-nav-background"?: string; /** * Background color of the active tab in the left navigation panel. */ "--ts-var-left-nav-active-tab-background"?: string; /** * Border color of the active tab in the left navigation panel. */ "--ts-var-left-nav-active-tab-border-color"?: string; /** * Font color of the section title in the left navigation panel. */ "--ts-var-left-nav-section-title-color"?: string; /** * Font color of the items in the left navigation panel. */ "--ts-var-left-nav-item-color"?: string; /** * Font color of the selected item in the left navigation panel. */ "--ts-var-left-nav-item-selection-color"?: string; /** * Background color of the selected item in the left navigation panel. */ "--ts-var-left-nav-item-selection-background"?: string; /** * Color of the active tab icon in the left navigation panel. */ "--ts-var-left-nav-tab-icon-active-color"?: string; /** * Color of the inactive tab icon in the left navigation panel. */ "--ts-var-left-nav-tab-icon-inactive-color"?: string; /** * Background color of the *Search data* button. */ "--ts-var-search-data-button-background"?: string; /** * Color of the text on the *Search data* button. */ "--ts-var-search-data-button-font-color"?: string; /** * Font of the text on the *Search data* button. */ "--ts-var-search-data-button-font-family"?: string; /** * Font color of the text in the Search bar. */ "--ts-var-search-bar-text-font-color"?: string; /** * Font of the text in the Search bar. */ "--ts-var-search-bar-text-font-family"?: string; /** * Font style of the text in the Search bar. */ "--ts-var-search-bar-text-font-style"?: string; /** * Background color of the search bar. */ "--ts-var-search-bar-background"?: string; /** * Background color of the search suggestions panel. */ "--ts-var-search-auto-complete-background"?: string; /** * Background color of the navigation panel that allows you to undo, redo, and reset * search operations. */ "--ts-var-search-navigation-button-background"?: string; /** * Background color of the navigation help text that appears at the bottom of the * search suggestions panel. */ "--ts-var-search-bar-navigation-help-text-background"?: string; /** * Background color of the search suggestion block on hover. */ "--ts-var-search-bar-auto-complete-hover-background"?: string; /** * Font color of the text in the search suggestion panel. */ "--ts-var-search-auto-complete-font-color"?: string; /** * Font color of the sub-text that appears below the keyword in the search suggestion * panel. */ "--ts-var-search-auto-complete-subtext-font-color"?: string; /** * Background color of the input box in the Spotter page. */ "--ts-var-spotter-input-background"?: string; /** * Background color of the previously asked prompt message in the Spotter page. */ "--ts-var-spotter-prompt-background"?: string; /** * Background color of the data panel. */ "--ts-var-answer-data-panel-background-color"?: string; /** * Background color of the vertical panel on the right side of the Answer page, which * includes the options to edit charts and tables. */ "--ts-var-answer-edit-panel-background-color"?: string; /** * Background color of the chart switcher on search results and Answer pages. */ "--ts-var-answer-view-table-chart-switcher-background"?: string; /** * Background color of the currently selected chart type in the chart switcher. */ "--ts-var-answer-view-table-chart-switcher-active-background"?: string; /** * Border-radius of main buttons. * For example, the *Search data* button in the top navigation panel. */ "--ts-var-button-border-radius"?: string; /** * Border-radius of small buttons such as secondary buttons. * For example, share and favorite buttons. */ "--ts-var-button--icon-border-radius"?: string; /** * Font color of the text on primary buttons. For example, the primary buttons on * Liveboard*, Answer, *Data* workspace, *SpotIQ*, or *Home* page. */ "--ts-var-button--primary-color"?: string; /** * Font family specification for the text on primary buttons. */ "--ts-var-button--primary--font-family"?: string; /** * Background color of the primary buttons. For example, the primary buttons such as * Pin* and *Save*. */ "--ts-var-button--primary-background"?: string; /** * Background color of the primary buttons on hover. */ "--ts-var-button--primary--hover-background"?: string; /** * Backgroud color of the primary buttons when active. */ "--ts-var-button--primary--active-background"?: string; /** * Font color of the text on the secondary buttons. */ "--ts-var-button--secondary-color"?: string; /** * Font family specification for the text on the secondary buttons. */ "--ts-var-button--secondary--font-family"?: string; /** * Background color of the secondary buttons. */ "--ts-var-button--secondary-background"?: string; /** * Background color of the secondary button on hover. */ "--ts-var-button--secondary--hover-background"?: string; /** * Backgroud color of the secondary buttons when active. */ "--ts-var-button--secondary--active-background"?: string; /** * Font color of the tertiary button. For example, the *Undo*, *Redo*, and *Reset* * buttons on the *Search* page. */ "--ts-var-button--tertiary-color"?: string; /** * Background color of the tertiary button. */ "--ts-var-button--tertiary-background"?: string; /** * Background color of the tertiary button when a user hovers over these buttons. */ "--ts-var-button--tertiary--hover-background"?: string; /** * Backgroud color of the tertiary buttons when active. */ "--ts-var-button--tertiary--active-background"?: string; /** * Font color of the title text of a visualization or Answer. */ "--ts-var-viz-title-color"?: string; /** * Font family specification for the title text of a visualization/Answer. */ "--ts-var-viz-title-font-family"?: string; /** * Text transformation specification for visualization and Answer titles. */ "--ts-var-viz-title-text-transform"?: string; /** * Font color of the description text and subtitle of a visualization or Answer. */ "--ts-var-viz-description-color"?: string; /** * Font family specification of description text and subtitle of a visualization or * Answer. */ "--ts-var-viz-description-font-family"?: string; /** * Text transformation specification for description text and subtitle of a * visualization or Answer. */ "--ts-var-viz-description-text-transform"?: string; /** * Border-radius for the visualization tiles and header panel on a Liveboard. */ "--ts-var-viz-border-radius"?: string; /** * Box shadow property for the visualization tiles and header panel on a Liveboard. */ "--ts-var-viz-box-shadow"?: string; /** * Background color of the visualization tiles and header panel on a Liveboard. */ "--ts-var-viz-background"?: string; /** * Background color of the legend on a visualization or Answer. */ "--ts-var-viz-legend-hover-background"?: string; /** * Background color of the selected chart type on the chart selection widget. */ "--ts-var-answer-chart-select-background"?: string; /** * Background color of the chart type element when a user hovers over a chart type on * the chart selection widget. */ "--ts-var-answer-chart-hover-background"?: string; /** * Border-radius of filter chips. */ "--ts-var-chip-border-radius"?: string; /** * Shadow effect for filter chips. */ "--ts-var-chip-box-shadow"?: string; /** * Background color of filter chips. */ "--ts-var-chip-background"?: string; /** * Font color of the filter label when a filter chip is selected */ "--ts-var-chip--active-color"?: string; /** * Background color of the filter chips when selected. */ "--ts-var-chip--active-background"?: string; /** * Font color of the text on filter chips when hovered over. */ "--ts-var-chip--hover-color"?: string; /** * Background color of filter chips on hover. */ "--ts-var-chip--hover-background"?: string; /** * Font color of the text on filter chips. */ "--ts-var-chip-color"?: string; /** * Font family specification for the text on filter chips. */ "--ts-var-chip-title-font-family"?: string; /** * Font color of axis title on charts. */ "--ts-var-axis-title-color"?: string; /** * Font family specification for the X and Y axis title text. */ "--ts-var-axis-title-font-family"?: string; /** * Font color of the X and Y axis labels. */ "--ts-var-axis-data-label-color"?: string; /** * Font family specification for X and Y axis labels. */ "--ts-var-axis-data-label-font-family"?: string; /** * Font color of the menu items. */ "--ts-var-menu-color"?: string; /** * Background color of menu panels. */ "--ts-var-menu-background"?: string; /** * Font family specification for the menu items. */ "--ts-var-menu-font-family"?: string; /** * Text capitalization specification for the menu items. */ "--ts-var-menu-text-transform"?: string; /** * Background color for menu items on hover. */ "--ts-var-menu--hover-background"?: string; /** * Text color for selected menu items. */ "--ts-var-menu-selected-text-color"?: string; /** * Background color of the dialogs. */ "--ts-var-dialog-body-background"?: string; /** * Font color of the body text displayed on dialogs. */ "--ts-var-dialog-body-color"?: string; /** * Background color of the header text on dialogs. */ "--ts-var-dialog-header-background"?: string; /** * Font color of the header text on dialogs. */ "--ts-var-dialog-header-color"?: string; /** * Background color of the footer area on dialogs. */ "--ts-var-dialog-footer-background"?: string; /** * Background for selected state in list */ "--ts-var-list-selected-background"?: string; /** * Background for hover state in list */ "--ts-var-list-hover-background"?: string; /** * Background for hover state in segment control. */ "--ts-var-segment-control-hover-background"?: string; /** * Text color for slected item in modular home's watchlist. */ "--ts-var-home-watchlist-selected-text-color"?: string; /** * Text color for favorite carousel find your favorites card in modular home. */ "--ts-var-home-favorite-suggestion-card-text-color"?: string; /** * Icon color for favorite carousel find your favorites card in modular home. */ "--ts-var-home-favorite-suggestion-card-icon-color"?: string; /** * Background for favorite carousel find your favorites card in modular home. */ "--ts-var-home-favorite-suggestion-card-background"?: string; /** * Border color of checkbox in error state. */ "--ts-var-checkbox-error-border"?: string; /** * Border color of checkbox. */ "--ts-var-checkbox-border-color"?: string; /** * Border color of checkbox in hover state. */ "--ts-var-checkbox-hover-border"?: string; /** * Border and font color of checkbox in active state. */ "--ts-var-checkbox-active-color"?: string; /** * Border color and font color of checkbox in checked state. */ "--ts-var-checkbox-checked-color"?: string; /** * Border and font color of checkbox in disabled state. */ "--ts-var-checkbox-checked-disabled"?: string; /** * Background color of checkbox. */ "--ts-var-checkbox-background-color"?: string; /** * Background color of the layout in the Liveboard. */ "--ts-var-liveboard-layout-background"?: string; /** * Background color of the header in the Liveboard. */ "--ts-var-liveboard-header-background"?: string; /** * Font color of the header in the Liveboard. */ "--ts-var-liveboard-header-font-color"?: string; /** * Left and right margin of the header and the tab/filter section of an * embedded Liveboard. Use alongside the `liveboardGutter` view config to * keep the header aligned with a custom tile-grid gutter. * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl */ "--ts-var-liveboard-header-horizontal-margin"?: string; /** * Border color of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-border-color"?: string; /** * Background color of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-background"?: string; /** * Font color of the insight tiles in the Liveboard. */ "--ts-var-liveboard-insight-tile-font-color"?: string; /** * Background color of the insight tiles in the Liveboard. */ "--ts-var-liveboard-insight-tile-background"?: string; /** * Icon color of the insight tiles in the Liveboard. */ "--ts-var-liveboard-insight-tile-icon-color"?: string; /** * Font color of the success text in the insight tiles in the Liveboard. */ "--ts-var-liveboard-insight-tile-success-color"?: string; /** * Font color of the failure text in the insight tiles in the Liveboard. */ "--ts-var-liveboard-insight-tile-failure-color"?: string; /** * Border radius of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-border-radius"?: string; /** * Padding of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-padding"?: string; /** * Background color of the table header in the Liveboard. */ "--ts-var-liveboard-tile-table-header-background"?: string; /** * Padding of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-padding"?: string; /** * Font size of the title of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-title-font-size"?: string; /** * Font weight of the title of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-title-font-weight"?: string; /** * Font size of the title of the tiles inside the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-title-font-size"?: string; /** * Font weight of the title of the tiles inside the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-title-font-weight"?: string; /** * Padding of the group tiles in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-padding"?: string; /** * Padding of the answer viz in the Liveboard. */ "--ts-var-liveboard-answer-viz-padding"?: string; /** * Background color of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-background"?: string; /** * Border color of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-border-color"?: string; /** * Font color of the heading of the note title in the Liveboard. */ "--ts-var-liveboard-notetitle-heading-font-color"?: string; /** * Font color of the body of the note title in the Liveboard. */ "--ts-var-liveboard-notetitle-body-font-color"?: string; /** * Font color of the title of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-title-font-color"?: string; /** * Font color of the description of the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-description-font-color"?: string; /** * Font color of the title of the tiles inside the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-title-font-color"?: string; /** * Font color of the description of the tiles inside the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-description-font-color"?: string; /** * Background color of the tiles inside the groups in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-group-tile-background"?: string; /** * Background color of the filter chips in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-chip-background"?: string; /** * Font color of the filter chips in the Liveboard. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-chip-color"?: string; /** * Background color of the filter chips in the Liveboard on hover. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-chip--hover-background"?: string; /** * Background color of the filter chips in the Liveboard on active. * * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying * this CSS variable. */ "--ts-var-liveboard-chip--active-background"?: string; /** * Width of the side panel in the Liveboard. */ "--ts-var-side-panel-width"?: string; /** * Background color of the edit bar in the Liveboard. */ "--ts-var-liveboard-edit-bar-background"?: string; /** * Breakpoint for the dual column layout in the Liveboard. */ "--ts-var-liveboard-dual-column-breakpoint"?: string; /** * Breakpoint for the single column layout in the Liveboard. */ "--ts-var-liveboard-single-column-breakpoint"?: string; /** * Background color of the cross filter layout in the Liveboard. */ "--ts-var-liveboard-cross-filter-layout-background"?: string; /** * Border color of the active tab in the Liveboard. */ "--ts-var-liveboard-tab-active-border-color"?: string; /** * Font color of the hover tab in the Liveboard. */ "--ts-var-liveboard-tab-hover-color"?: string; /** * Font size of the title of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-title-fontsize"?: string; /** * Font weight of the title of the tiles in the Liveboard. */ "--ts-var-liveboard-tile-title-fontweight"?: string; /** * Background color of the parameter chips in the Liveboard. */ "--ts-var-parameter-chip-background"?: string; /** * Font color of the parameter chips in the Liveboard. */ "--ts-var-parameter-chip-text-color"?: string; /** * Background color of the parameter chips in the Liveboard on hover. */ "--ts-var-parameter-chip-hover-background"?: string; /** * Font color of the parameter chips in the Liveboard on hover. */ "--ts-var-parameter-chip-hover-text-color"?: string; /** * Background color of the parameter chips in the Liveboard on active. */ "--ts-var-parameter-chip-active-background"?: string; /** * Font color of the parameter chips in the Liveboard on active. */ "--ts-var-parameter-chip-active-text-color"?: string; /** * Color of the dot indicator shown on a filter or parameter chip in the * centralized filter modal on a Liveboard. The dot appears when the * filter or parameter value has been modified but the changes are not * yet applied to the Liveboard. * @version SDK: 1.52.0 | ThoughtSpot: 26.10.0.cl */ "--ts-var-unsaved-filter-indicator-color"?: string; /** * Background color of the action button in the Liveboard header. */ "--ts-var-liveboard-header-action-button-background"?: string; /** * Font color of the action button in the Liveboard header. */ "--ts-var-liveboard-header-action-button-font-color"?: string; /** * Font color of the action button in the Liveboard header on hover. */ "--ts-var-liveboard-header-action-button-hover-color"?: string; /** * Font color of the action button in the Liveboard header on active. */ "--ts-var-liveboard-header-action-button-active-color"?: string; /** * Background color of the badge in the Liveboard header. */ "--ts-var-liveboard-header-badge-background"?: string; /** * Font color of the badge in the Liveboard header. */ "--ts-var-liveboard-header-badge-font-color"?: string; /** * Background color of the modified badge in the Liveboard header. */ "--ts-var-liveboard-header-badge-modified-background"?: string; /** * Font color of the modified badge in the Liveboard header. */ "--ts-var-liveboard-header-badge-modified-font-color"?: string; /** * Font color of the badge in the Liveboard header on hover. */ "--ts-var-liveboard-header-badge-hover-color"?: string; /** * Font color of the badge in the Liveboard header on active. */ "--ts-var-liveboard-header-badge-active-color"?: string; /** * Font color of the hero text in the KPI widget. */ "--ts-var-kpi-hero-color"?: string; /** * Font color of the comparison text in the KPI widget. */ "--ts-var-kpi-comparison-color"?: string; /** * Font color of the analyze text in the KPI widget. */ "--ts-var-kpi-analyze-text-color"?: string; /** * Font color of the legend title in the heatmap chart. */ "--ts-var-chart-heatmap-legend-title-color"?: string; /** * Font color of the legend label in the heatmap chart. */ "--ts-var-chart-heatmap-legend-label-color"?: string; /** * Font color of the legend title in the treemap chart. */ "--ts-var-chart-treemap-legend-title-color"?: string; /** * Font color of the legend label in the treemap chart. */ "--ts-var-chart-treemap-legend-label-color"?: string; /** * Color of the positive change in the KPI. */ "--ts-var-kpi-positive-change-color"?: string; /** * Color of the negative change in the KPI. */ "--ts-var-kpi-negative-change-color"?: string; /** * Background color of the change analysis insights. */ "--ts-var-change-analysis-insights-background"?: string; /** * Background color of the forecasting card in the SpotIQ analyze. */ "--ts-var-spotiq-analyze-forecasting-card-background"?: string; /** * Background color of the outlier card in the SpotIQ analyze. */ "--ts-var-spotiq-analyze-outlier-card-background"?: string; /** * Background color of the trend card in the SpotIQ analyze. */ "--ts-var-spotiq-analyze-trend-card-background"?: string; /** * Background color of the crosscorrelation card in the SpotIQ analyze. */ "--ts-var-spotiq-analyze-crosscorrelation-card-background"?: string; /** * Background color of the summary header in the CCA modal. */ "--ts-var-cca-modal-summary-header-background"?: string; /** * Width of the Spotter chat window. */ "--ts-var-spotter-chat-width"?: string; /** * Border color for the saved chats sidebar container. */ "--ts-var-saved-chats-border-color"?: string; /** * Background color for the saved chats sidebar container. */ "--ts-var-saved-chats-bg"?: string; /** * Text color for the saved chats sidebar container. */ "--ts-var-saved-chats-text-color"?: string; /** * Border color for the saved chats sidebar header. */ "--ts-var-saved-chats-header-border"?: string; /** * Color for the saved chats sidebar title text. */ "--ts-var-saved-chats-title-color"?: string; /** * Background color for buttons (new chat, toggle, footer) in the saved chats sidebar. */ "--ts-var-saved-chats-btn-bg"?: string; /** * Hover background color for buttons in the saved chats sidebar. */ "--ts-var-saved-chats-btn-hover-bg"?: string; /** * Text color for conversation items in the saved chats sidebar. */ "--ts-var-saved-chats-conv-text-color"?: string; /** * Background color for conversation items on hover in the saved chats sidebar. */ "--ts-var-saved-chats-conv-hover-bg"?: string; /** * Background color for the active/selected conversation in the saved chats sidebar. */ "--ts-var-saved-chats-conv-active-bg"?: string; /** * Border color for the saved chats sidebar footer. */ "--ts-var-saved-chats-footer-border"?: string; /** * Color for section title text (e.g., "Recent", "Older") in the saved chats sidebar. */ "--ts-var-saved-chats-section-title-color"?: string; /** * Text color of the styling panel in the Liveboard. */ "--ts-var-liveboard-styling-panel-text-color"?: string; /** * Border color of the styling panel in the Liveboard. */ "--ts-var-liveboard-styling-panel-border-color"?: string; /** * Background color of the styling button in the Liveboard. */ "--ts-var-liveboard-styling-button-background"?: string; /** * Text color of the styling button in the Liveboard. */ "--ts-var-liveboard-styling-button-text-color"?: string; /** * Background color of the styling button in the Liveboard on hover. */ "--ts-var-liveboard-styling-button-hover-background"?: string; /** * Background color of the styling button in the Liveboard when active. */ "--ts-var-liveboard-styling-button-active-background"?: string; /** * Text color of the styling button in the Liveboard on hover. */ "--ts-var-liveboard-styling-button-hover-text-color"?: string; /** * Box shadow of the styling button in the Liveboard. */ "--ts-var-liveboard-styling-button-shadow"?: string; /** * Background color of the color palette in the Liveboard styling panel. */ "--ts-var-liveboard-styling-color-palette-background"?: string; /** * Main panel background of the SpotterViz. */ "--ts-var-spotterviz-panel-background"?: string; /** * Background color of the chat input field in SpotterViz. */ "--ts-var-spotterviz-input-background"?: string; /** * Placeholder text color of the chat input field in SpotterViz. */ "--ts-var-spotterviz-input-placeholder-color"?: string; /** * CTA color of the chat input field in SpotterViz. */ "--ts-var-spotterviz-input-cta-color"?: string; /** * CTA hover color of the chat input field in SpotterViz. */ "--ts-var-spotterviz-input-cta-hover-color"?: string; /** * Text color for the SpotterViz label in the empty state, displayed below * the SpotterViz icon. */ "--ts-var-spotterviz-emptystate-spotterviz-color"?: string; /** * Background color of the starter prompt cards in SpotterViz. */ "--ts-var-spotterviz-prompt-card-background"?: string; /** * Background hover color of the starter prompt cards in SpotterViz. */ "--ts-var-spotterviz-prompt-card-hover-background"?: string; /** * Primary text color in SpotterViz, also used for tool response text, * upvote/downvote buttons, and other primary content. */ "--ts-var-spotterviz-text-primary"?: string; /** * Secondary text color in SpotterViz. */ "--ts-var-spotterviz-text-secondary"?: string; /** * Background color of the user chat message bubble in SpotterViz. */ "--ts-var-spotterviz-message-background"?: string; /** * Hover color for the user chat message expand button in SpotterViz. */ "--ts-var-spotterviz-usermessage-icon-hover"?: string; /** * Background color of the user chat message expand button in SpotterViz. */ "--ts-var-spotterviz-usermessage-icon-background"?: string; /** * Color of the thinking step header when in progress in SpotterViz. */ "--ts-var-spotterviz-thinking-inprogress-header-color"?: string; /** * Color of the thinking step header when completed in SpotterViz. */ "--ts-var-spotterviz-thinking-completed-header-color"?: string; /** * Color of the final completion indicator icon shown when all work is done. * The last green dot which is shown when work is done. */ "--ts-var-spotterviz-thinking-work-done-icon-color"?: string; /** * Hover background color for the working/work done CTA in SpotterViz. */ "--ts-var-spotterviz-thinking-cta-hover-background"?: string; /** * Background color of tool call panels in SpotterViz. */ "--ts-var-spotterviz-tool-call-background"?: string; /** * Color of tool titles and icons in SpotterViz. */ "--ts-var-spotterviz-tool-title-color"?: string; /** * Border color of tool call panels in SpotterViz. */ "--ts-var-spotterviz-tool-border-color"?: string; /** * Background color of the JSON input panel inside a tool call in SpotterViz. */ "--ts-var-spotterviz-tool-json-input-background"?: string; /** * Background color of the upvote/downvote feedback buttons in SpotterViz. */ "--ts-var-spotterviz-tool-feedback-button-background"?: string; /** * Hover background color of the upvote/downvote feedback buttons in SpotterViz. */ "--ts-var-spotterviz-tool-feedback-button-hover"?: string; /** * Text color of the JSON input panel inside a tool call in SpotterViz. */ "--ts-var-spotterviz-tool-json-input-color"?: string; /** * Background color of the last checkpoint section in SpotterViz. */ "--ts-var-spotterviz-last-checkpoint-background"?: string; /** * Border color of the last checkpoint section in SpotterViz. */ "--ts-var-spotterviz-last-checkpoint-border"?: string; /** * Border color of the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-border"?: string; /** * Background color of the selected section in the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-selected-background"?: string; /** * Text color of the selected section in the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-selected-text-color"?: string; /** * Text color of unselected items in the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-text"?: string; /** * Hover background color of unselected items in the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-hover-background"?: string; /** * Hover text color of unselected items in the Liveboard edit header toolbar. */ "--ts-var-liveboard-edit-toolbar-hover-text-color"?: string; /** * Text color of the SpotterViz footer. */ "--ts-var-spotterviz-footer-text-color"?: string; /** * Shared border color used throughout SpotterViz: input box, user message, * header underline, left panel border, thinking step connector and dots. */ "--ts-var-spotterviz-border-color"?: string; /** * Expanded user chat message bubble border color in SpotterViz. */ "--ts-var-spotterviz-expanded-border-color"?: string; /** * Background color of the reference-mode toggle button in the SpotterViz * chat input when it is unselected and the user hovers over it. */ "--ts-var-spotterviz-reference-icon-hover-background"?: string; /** * Icon color for the reference-mode selected state — applies to * both the toggle button when active and the icon badge on each * referenced-entity chip in the chat input. */ "--ts-var-spotterviz-reference-icon-selected-color"?: string; /** * Background color for the reference-mode selected state — applies to * both the reference mode toggle button when active and the icon badge * on each referenced-entity chip in the chat input. */ "--ts-var-spotterviz-reference-icon-selected-background"?: string; /** * Background color of the shared conversation header (recipient's read-only view). */ "--ts-var-shared-conv-header-background"?: string; /** * Border color of the shared conversation header. */ "--ts-var-shared-conv-header-border-color"?: string; /** * Font color of the title text in the shared conversation header. */ "--ts-var-shared-conv-title-color"?: string; /** * Background gradient color-stop of the share chat header's outer container * (sender's pre-share header). Defaults to transparent. */ "--ts-var-share-chat-header-container-background"?: string; /** * Background color of the share chat header's inner title/actions row. * Defaults to transparent. */ "--ts-var-share-chat-header-background"?: string; /** * Font color of the title text in the share chat header. */ "--ts-var-share-chat-header-title-color"?: string; /** * Font color of the title input field in the share chat header. */ "--ts-var-share-chat-header-input-text-color"?: string; /** * Background color of the title input field in the share chat header. */ "--ts-var-share-chat-header-input-background"?: string; /** * Border color of the title input field in the share chat header. */ "--ts-var-share-chat-header-input-border-color"?: string; /** * Background color of the shimmer loading effect. Also affects the * saved chats sidebar's new-chat shimmer, which shares the same style. */ "--ts-var-shimmer-background"?: string; /** * Background color of the shimmer sweep animation's gradient mid-stop. */ "--ts-var-shimmer-sweep-background"?: string; } export interface SessionInterface { sessionId: string; genNo: number; acSession: { sessionId: string; genNo: number; }; } export interface UnderlyingDataPoint { columnId: string; dataValue: any; } /** * AnswerService provides a simple way to work with ThoughtSpot Answers. * * This service allows you to interact with ThoughtSpot Answers programmatically, * making it easy to customize visualizations, filter data, and extract insights * directly from your application. * * You can use this service to: * * - Add or remove columns from Answers (`addColumns`, `removeColumns`, * `addColumnsByName`) * - Apply filters to Answers (`addFilter`) * - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, * `fetchCSVBlob`, `fetchPNGBlob`) * - Get data for specific points in visualizations * (`getUnderlyingDataForPoint`) * - Run custom queries (`executeQuery`) * - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`) * * @example * ```js * // Get the answer service * embed.on(EmbedEvent.Data, async (e) => { * const service = await embed.getAnswerService(); * * // Add columns to the answer * await service.addColumnsByName(["Sales", "Region"]); * * // Get the data * const data = await service.fetchData(); * console.log(data); * }); * ``` * * @example * ```js * // Get data for a point in a visualization * embed.on(EmbedEvent.CustomAction, async (e) => { * const underlying = await e.answerService.getUnderlyingDataForPoint([ * 'Product Name', * 'Sales Amount' * ]); * * const data = await underlying.fetchData(0, 100); * console.log(data); * }); * ``` * * @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl * @group Events */ export declare class AnswerService { private session; private thoughtSpotHost; private selectedPoints?; private answer; private tmlOverride; /** * Should not need to be called directly. * @param session * @param answer * @param thoughtSpotHost * @param selectedPoints */ constructor(session: SessionInterface, answer: any, thoughtSpotHost: string, selectedPoints?: VizPoint[]); /** * Get the details about the source used in the answer. * This can be used to get the list of all columns in the data source for example. */ getSourceDetail(): Promise; /** * Remove columnIds and return updated answer session. * @param columnIds * @returns */ removeColumns(columnIds: string[]): Promise; /** * Add columnIds and return updated answer session. * @param columnIds * @returns */ addColumns(columnIds: string[]): Promise; /** * Add columns by names and return updated answer session. * @param columnNames * @returns * @example * ```js * embed.on(EmbedEvent.Data, async (e) => { * const service = await embed.getAnswerService(); * await service.addColumnsByName([ * "col name 1", * "col name 2" * ]); * console.log(await service.fetchData()); * }); * ``` */ addColumnsByName(columnNames: string[]): Promise; /** * Add a filter to the answer. * @param columnName * @param operator * @param values * @returns */ addFilter(columnName: string, operator: RuntimeFilterOp, values: RuntimeFilter["values"]): Promise; updateDisplayMode(displayMode?: string): Promise; getSQLQuery(fetchSQLWithAllColumns?: boolean): Promise; /** * Fetch data from the answer. * @param offset * @param size * @returns */ fetchData(offset?: number, size?: number): Promise<{ columns: any; data: any; }>; /** * Fetch the data for the answer as a CSV blob. This might be * quicker for larger data. * @param userLocale * @param includeInfo Include the CSV header in the output * @returns Response */ fetchCSVBlob(userLocale?: string, includeInfo?: boolean): Promise; /** * Fetch the data for the answer as a PNG blob. This might be * quicker for larger data. * @param userLocale * @param includeInfo * @param omitBackground Omit the background in the PNG * @param deviceScaleFactor The scale factor for the PNG * @return Response */ fetchPNGBlob(userLocale?: string, omitBackground?: boolean, deviceScaleFactor?: number): Promise; /** * Just get the internal URL for this answer's data * as a CSV blob. * @param userLocale * @param includeInfo * @returns */ getFetchCSVBlobUrl(userLocale?: string, includeInfo?: boolean): string; /** * Just get the internal URL for this answer's data * as a PNG blob. * @param userLocale * @param omitBackground * @param deviceScaleFactor */ getFetchPNGBlobUrl(userLocale?: string, omitBackground?: boolean, deviceScaleFactor?: number): string; /** * Get underlying data given a point and the output column names. * In case of a context menu action, the selectedPoints are * automatically passed. * @param outputColumnNames * @param selectedPoints * @example * ```js * embed.on(EmbedEvent.CustomAction, e => { * const underlying = await e.answerService.getUnderlyingDataForPoint([ * 'col name 1' // The column should exist in the data source. * ]); * const data = await underlying.fetchData(0, 100); * }) * ``` * @version SDK: 1.25.0 | ThoughtSpot: 9.10.0.cl */ getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise; /** * Execute a custom graphql query in the context of the answer. * @param query graphql query * @param variables graphql variables * @returns */ executeQuery(query: string, variables: any): Promise; /** * Get the internal session details for the answer. * @returns */ getSession(): SessionInterface; getAnswer(): Promise; getTML(): Promise; addDisplayedVizToLiveboard(liveboardId: string): Promise; setTMLOverride(override: any): void; } export interface LiveboardTab { id: string; name: string; [key: string]: any; } export interface LiveboardGroup { id: string; name: string; [key: string]: any; } /** * Levels at which a filter or parameter can be applied. */ export declare enum ApplicabilityLevel { Liveboard = "LIVEBOARD", Tab = "TAB", Group = "GROUP" } /** * Scopes a filter or parameter to a specific target. * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId` * is not required. `level` accepts the enum or its string value, e.g. `'TAB'`. */ export interface Applicability { level: ApplicabilityLevel | `${ApplicabilityLevel}`; targetId?: string; } export interface FilterUpdate { column: string; oper: string; values: string[]; type?: string; applicability?: Applicability; } export interface LiveboardFilter { applicability?: Applicability; [key: string]: any; } export interface LiveboardParameter { applicability?: Applicability; [key: string]: any; } export declare enum UIPassthroughEvent { PinAnswerToLiveboard = "addVizToPinboard", SaveAnswer = "saveAnswer", GetDiscoverabilityStatus = "getDiscoverabilityStatus", GetAvailableUIPassthroughs = "getAvailableUiPassthroughs", GetAnswerConfig = "getAnswerPageConfig", GetLiveboardConfig = "getPinboardPageConfig", GetUnsavedAnswerTML = "getUnsavedAnswerTML", UpdateFilters = "updateFilters", Drilldown = "drillDown", GetAnswerSession = "getAnswerSession", GetFilters = "getFilters", GetIframeUrl = "getIframeUrl", GetParameters = "getParameters", GetTML = "getTML", GetTabs = "getTabs", GetGroups = "getGroups", GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard" } /** * UI passthrough contract. Each event's request/response is a named interface so it * documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs. */ /** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */ export interface PinAnswerToLiveboardRequest { vizId?: string; newVizName: string; newVizDescription?: string; liveboardId?: string; tabId?: string; newLiveboardName?: string; newTabName?: string; } /** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */ export interface PinAnswerToLiveboardResponse { liveboardId: string; tabId: string; vizId: string; } /** Request for {@link UIPassthroughEvent.SaveAnswer}. */ export interface SaveAnswerRequest { name: string; description: string; vizId?: string; isDiscoverable?: boolean; } /** Response for {@link UIPassthroughEvent.SaveAnswer}. */ export interface SaveAnswerResponse { answerId: string; saveResponse?: any; shareResponse?: any; } /** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */ export interface GetDiscoverabilityStatusResponse { shouldShowDiscoverability: boolean; isDiscoverabilityCheckboxUnselectedPerOrg: boolean; } /** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */ export interface GetAvailableUIPassthroughsResponse { keys: string[]; } /** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */ export interface GetAnswerConfigRequest { vizId?: string; } /** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */ export interface GetUnsavedAnswerTMLRequest { sessionId?: string; vizId?: string; } /** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */ export interface GetUnsavedAnswerTMLResponse { tml: string; } /** Request for {@link UIPassthroughEvent.GetAnswerSession}. */ export interface GetAnswerSessionRequest { vizId?: string; } /** Response for {@link UIPassthroughEvent.GetAnswerSession}. */ export interface GetAnswerSessionResponse { session: SessionInterface; embedAnswerData?: Record; } /** Request for {@link UIPassthroughEvent.GetFilters}. */ export interface GetFiltersRequest { vizId?: string; } /** Response for {@link UIPassthroughEvent.GetFilters}. */ export interface GetFiltersResponse { liveboardFilters: LiveboardFilter[]; runtimeFilters: RuntimeFilter[]; } /** Response for {@link UIPassthroughEvent.GetIframeUrl}. */ export interface GetIframeUrlResponse { iframeUrl: string; } /** Response for {@link UIPassthroughEvent.GetParameters}. */ export interface GetParametersResponse { parameters: LiveboardParameter[]; } /** Request for {@link UIPassthroughEvent.GetTML}. */ export interface GetTMLRequest { vizId?: string; includeNonExecutedSearchTokens?: boolean; } /** Response for {@link UIPassthroughEvent.GetTabs}. */ export interface GetTabsResponse { orderedTabIds: string[]; numberOfTabs: number; Tabs: LiveboardTab[]; } /** Response for {@link UIPassthroughEvent.GetGroups}. */ export interface GetGroupsResponse { orderedGroupIds: string[]; numberOfGroups: number; Groups: LiveboardGroup[]; } /** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */ export interface GetExportRequestForCurrentPinboardResponse { data: { v2Content: string; }; type: UIPassthroughEvent.GetExportRequestForCurrentPinboard; } /** * Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event * `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape. */ export interface UpdateFiltersPassthroughRequest { filter?: FilterUpdate; filters?: FilterUpdate[]; } /** Request for {@link UIPassthroughEvent.Drilldown}. */ export interface DrilldownRequest { points: { selectedPoints?: string[]; clickedPoint?: string; }; columnGuid?: string; autoDrillDown?: boolean; vizId?: string; } /** Maps each UI passthrough event to its request/response pair. */ export type UIPassthroughContractBase = { [UIPassthroughEvent.PinAnswerToLiveboard]: { request: PinAnswerToLiveboardRequest; response: PinAnswerToLiveboardResponse; }; [UIPassthroughEvent.SaveAnswer]: { request: SaveAnswerRequest; response: SaveAnswerResponse; }; [UIPassthroughEvent.GetDiscoverabilityStatus]: { request: any; response: GetDiscoverabilityStatusResponse; }; [UIPassthroughEvent.GetAvailableUIPassthroughs]: { request: any; response: GetAvailableUIPassthroughsResponse; }; [UIPassthroughEvent.GetAnswerConfig]: { request: GetAnswerConfigRequest; response: any; }; [UIPassthroughEvent.GetLiveboardConfig]: { request: any; response: any; }; [UIPassthroughEvent.GetUnsavedAnswerTML]: { request: GetUnsavedAnswerTMLRequest; response: GetUnsavedAnswerTMLResponse; }; [UIPassthroughEvent.GetAnswerSession]: { request: GetAnswerSessionRequest; response: GetAnswerSessionResponse; }; [UIPassthroughEvent.GetFilters]: { request: GetFiltersRequest; response: GetFiltersResponse; }; [UIPassthroughEvent.GetIframeUrl]: { request: Record; response: GetIframeUrlResponse; }; [UIPassthroughEvent.GetParameters]: { request: Record; response: GetParametersResponse; }; [UIPassthroughEvent.GetTML]: { request: GetTMLRequest; response: Record; }; [UIPassthroughEvent.GetTabs]: { request: Record; response: GetTabsResponse; }; [UIPassthroughEvent.GetGroups]: { request: Record; response: GetGroupsResponse; }; [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: { request: Record; response: GetExportRequestForCurrentPinboardResponse; }; [UIPassthroughEvent.UpdateFilters]: { request: UpdateFiltersPassthroughRequest; response: unknown; }; [UIPassthroughEvent.Drilldown]: { request: DrilldownRequest; response: unknown; }; }; export type UIPassthroughRequest = UIPassthroughContractBase[T]["request"]; export type UIPassthroughResponse = UIPassthroughContractBase[T]["response"]; export type UIPassthroughArrayResponse = Array<{ refId?: string; value?: UIPassthroughResponse; error?: any; }>; export type EmbedApiHostEventMapping = { [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard; [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer; [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession; [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters; [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl; [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters; [HostEvent.GetTML]: UIPassthroughEvent.GetTML; [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs; [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups; [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard; }; /** * The authentication mechanism for allowing access to * the embedded app * @group Authentication / Init */ export declare enum AuthType { /** * No authentication on the SDK. Pass-through to the embedded App. Alias for * `Passthrough`. * @example * ```js * init({ * // ... * authType: AuthType.None, * }); * ``` */ None = "None", /** * Passthrough SSO to the embedded application within the iframe. Requires least * configuration, but may not be supported by all IDPs. This will behave like `None` * if SSO is not configured on ThoughtSpot. * * To use this: * Your SAML or OpenID provider must allow iframe redirects. * For example, if you are using Okta as IdP, you can enable iframe embedding. * @version SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl * @example * ```js * init({ * // ... * authType: AuthType.EmbeddedSSO, * }); * ``` */ EmbeddedSSO = "EmbeddedSSO", /** * SSO using SAML, Use {@link SAMLRedirect} instead * @deprecated This option is deprecated. * @hidden */ SSO = "SSO_SAML", /** * SSO using SAML, Use {@link SAMLRedirect} instead * @deprecated This option is deprecated. * @hidden */ SAML = "SSO_SAML", /** * SSO using SAML * Makes the host application redirect to the SAML IdP. Use this * if your IdP does not allow itself to be embedded. * * This redirects the host application to the SAML IdP. The host application * will be redirected back to the ThoughtSpot app after authentication. * @example * ```js * init({ * // ... * authType: AuthType.SAMLRedirect, * }); * ``` * * This opens the SAML IdP in a popup window. The popup is triggered * when the user clicks the trigger button. The popup window will be * closed automatically after authentication. * @example * ```js * init({ * // ... * authType: AuthType.SAMLRedirect, * authTriggerText: 'Login with SAML', * authTriggerContainer: '#tsEmbed', * inPopup: true, * }); * ``` * * Can also use the event to trigger the popup flow. Works the same * as the above example. * @example * ```js * const authEE = init({ * // ... * authType: AuthType.SAMLRedirect, * inPopup: true, * }); * * someButtonOnYourPage.addEventListener('click', () => { * authEE.emit(AuthEvent.TRIGGER_SSO_POPUP); * }); * ``` */ SAMLRedirect = "SSO_SAML", /** * SSO using OIDC * SSO using OIDC, Use {@link OIDCRedirect} instead * @deprecated This option is deprecated. * @hidden */ OIDC = "SSO_OIDC", /** * SSO using OIDC * Will make the host application redirect to the OIDC IdP. * See code samples in {@link SAMLRedirect}. */ OIDCRedirect = "SSO_OIDC", /** * Trusted authentication server * Use {@link TrustedAuth} instead * @deprecated This option is deprecated. * @hidden */ AuthServer = "AuthServer", /** * Trusted authentication server. Use your own authentication server * which returns a bearer token, generated using the `secret_key` obtained * from ThoughtSpot. * @example * ```js * init({ * // ... * authType: AuthType.TrustedAuthToken, * getAuthToken: () => { * return fetch('https://my-backend.app/ts-token') * .then((response) => response.json()) * .then((data) => data.token); * } * }); * ``` */ TrustedAuthToken = "AuthServer", /** * Trusted authentication server Cookieless, Use your own authentication * server which returns a bearer token, generated using the `secret_key` * obtained from ThoughtSpot. This uses a cookieless authentication * approach, recommended to bypass the third-party cookie-blocking restriction * implemented by some browsers. * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw * @example * ```js * init({ * // ... * authType: AuthType.TrustedAuthTokenCookieless, * getAuthToken: () => { * return fetch('https://my-backend.app/ts-token') * .then((response) => response.json()) * .then((data) => data.token); * } * }); * ``` */ TrustedAuthTokenCookieless = "AuthServerCookieless", /** * Use the ThoughtSpot login API to authenticate to the cluster directly. * * Warning: This feature is primarily intended for developer testing. It is * strongly advised not to use this authentication method in production. */ Basic = "Basic" } /** * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. This attribute applies to V3 (ModularWithStylingChanges) and * V4 (Focused) home page experiences. * */ export declare enum HomeLeftNavItem { /** * The *Search data* option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ SearchData = "search-data", /** * The *Home* menu option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ Home = "insights-home", /** * The *Liveboards* menu option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ Liveboards = "liveboards", /** * The *Answers* menu option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ Answers = "answers", /** * The *Monitor subscriptions* menu option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ MonitorSubscription = "monitor-alerts", /** * The *SpotIQ analysis* menu option in * the *Insights* left navigation panel. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl */ SpotIQAnalysis = "spotiq-analysis", /** * The *Liveboard schedules* menu option in * the *Insights* left navigation panel. * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl */ LiveboardSchedules = "liveboard-schedules", /** * The create option in the *Insights* * left navigation panel. * Available in the V3 navigation experience. * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ Create = "create", /** * The *Spotter* menu option in the *Insights* * left navigation panel. * Available in the V3 navigation experience. * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ Spotter = "spotter", /** * The *Favorites* section in the *Insights* * left navigation panel. * Available in the V3 navigation experience. * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl */ Favorites = "favorites", /** * The *Collections* menu option in * the *Insights* left navigation panel. * Shown when collections are enabled on the cluster. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ Collections = "collections" } export type DOMSelector = string | HTMLElement; /** * inline customCSS within the {@link CustomisationsInterface}. * Use {@link CustomCssVariables} or css rules. */ export interface customCssInterface { /** * The custom css variables, which can be set. * The variables are available in the {@link CustomCssVariables} * interface. For more information, see * link:https://developers.thoughtspot.com/docs/css-variables-reference[CSS variable reference]. */ variables?: CustomCssVariables; /** * Can be used to define a custom font face * like: * @example * ```js * rules_UNSTABLE?: { * "@font-face": { * "font-family": "custom-font", * "src": url("/path/") * }; * }; * ``` * * Also, custom css rules outside of variables. * @example * ```js * rules_UNSTABLE?: { * ".thoughtspot_class_name": { * "border-radius": "10px", * margin: "20px" * }; * }; * ``` */ rules_UNSTABLE?: { [selector: string]: { [declaration: string]: string; }; }; } /** * Styles within the {@link CustomisationsInterface}. */ export interface CustomStyles { customCSSUrl?: string; customCSS?: customCssInterface; } /** * Configuration to define the customization on the Embedded * ThoughtSpot components. * You can customize styles, text strings, and icons. * For more information, see link:https://developers.thoughtspot.com/docs/custom-css[CSS customization framework]. * @example * ```js * init({ * // ... * customizations: { * style: { * customCSS: { * variables: {}, * rules_UNSTABLE: {} * } * }, * content: { * strings: { * 'LIVEBOARDS': 'Dashboards', * 'ANSWERS': 'Visualizations', * 'Edit': 'Modify', * 'Show underlying data': 'Show source data', * 'SpotIQ': 'Insights', * 'Monitor': 'Alerts', * } * }, * iconSpriteUrl: 'https://my-custom-icon-sprite.svg' * } * }) * ``` */ export interface CustomisationsInterface { style?: CustomStyles; content?: { /** * @version SDK: 1.26.0 | 9.7.0.cl */ strings?: Record; stringIDs?: Record; stringIDsUrl?: string; [key: string]: any; }; iconSpriteUrl?: string; } /** * The configuration object for embedding ThoughtSpot content. * It includes the ThoughtSpot hostname or IP address, * the type of authentication, and the authentication endpoint * if a trusted authentication server is used. * @group Authentication / Init */ export interface EmbedConfig { /** * The ThoughtSpot cluster hostname or IP address. */ thoughtSpotHost: string; /** * The authentication mechanism to use. */ authType: AuthType; /** * [AuthServer] The trusted authentication endpoint to use to get the * authentication token. A `GET` request is made to the * authentication API endpoint, which returns the token * as a plaintext response. For trusted authentication, * the `authEndpoint` or `getAuthToken` attribute is required. */ authEndpoint?: string; /** * [AuthServer] A function that invokes the trusted authentication endpoint * and returns a Promise that resolves to the `auth token` string. * For trusted authentication, the `authEndpoint` or `getAuthToken` * attribute is required. * * It is advisable to fetch a new token inside this method and not * reuse the old issued token. When auth expires this method is * called again and if it is called with an older token, the authentication * will not succeed. */ getAuthToken?: () => Promise; /** * [AuthServer / Basic] The user name of the ThoughtSpot user. This * attribute is required for trusted authentication. */ username?: string; /** * [Basic] The ThoughtSpot login password corresponding to the username * * Warning: This feature is primarily intended for developer testing. It is * strongly advised not to use this authentication method in production. */ password?: string; /** * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will * open the SAML auth flow in a popup, instead of redirecting the browser in * place. * @deprecated This option is deprecated. * @default false */ noRedirect?: boolean; /** * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open * the SAML auth flow in a popup, instead of redirecting the browser in place. * * Need to use this with `authTriggerContainer`. Or manually trigger * the `AuthEvent.TRIGGER_SSO_POPUP` event on a user interaction. * @version SDK: 1.18.0 * @default false */ inPopup?: boolean; /** * [SSO] For SSO Authentication, one can supply an optional path param; * This will be the path on the host origin where the SAML flow will be * terminated. * * Eg: "/dashboard", "#/foo" [Do not include the host] * @version SDK: 1.10.2 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw */ redirectPath?: string; /** @internal */ basepath?: string; /** * Boolean to define if the query parameters in the ThoughtSpot URL * should be encoded in base64. This provides additional security to * ThoughtSpot clusters against cross-site scripting attacks. * @default false */ shouldEncodeUrlQueryParams?: boolean; /** * Suppress cookie access alert when third-party cookies are blocked by the * user's browser. Third-party cookie blocking is the default behaviour on * some web browsers like Safari. If you set this attribute to `true`, * you are encouraged to handle `noCookieAccess` event, to show your own treatment * in this case. * @default false */ suppressNoCookieAccessAlert?: boolean; /** * Ignore the cookie access alert when third-party cookies are blocked by the * user's browser. If you set this to `true`, the embedded iframe behaviour * persists even in the case of a non-logged-in user. * @default false */ ignoreNoCookieAccess?: boolean; /** * Re-login a user with the previous login options * when a user session expires. * @default false */ autoLogin?: boolean; /** * Disable redirection to the login page when the embedded session expires * This flag is typically used alongside the combination of authentication modes such * as {@link AuthType.AuthServer} and auto-login behavior {@link * EmbedConfig.autoLogin} * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @default false */ disableLoginRedirect?: boolean; /** * This message is displayed in the embedded view when a user login fails. * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw */ loginFailedMessage?: string; /** * Calls the prefetch method internally when set to `true` * @default false */ callPrefetch?: boolean; /** * When there are multiple objects embedded, queue the rendering of embedded objects * to start after the previous embed's render is complete. This helps improve * performance by decreasing the load on the browser. * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 * @default false */ queueMultiRenders?: boolean; /** * [AuthServer|Basic] Detect if third-party cookies are enabled by doing an * additional call. This is slower and should be avoided. Listen to the * `NO_COOKIE_ACCESS` event to handle the situation. * * This is slightly slower than letting the browser handle the cookie check, as it * involves an extra network call. * @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw */ detectCookieAccessSlow?: boolean; /** * Hide the `beta` alert warning message for SearchEmbed. * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw */ suppressSearchEmbedBetaWarning?: boolean; /** * Custom style params for embed Config. * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw */ customizations?: CustomisationsInterface; /** * For `inPopup` SAMLRedirect or OIDCRedirect authentication, we need a * button that the user can click to trigger the flow. * This attribute sets a containing element for that button. * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw * @example * ```js * init({ * authType: AuthType.SAMLRedirect, * inPopup: true, * authTriggerContainer: '#auth-trigger-container' * }) * ``` */ authTriggerContainer?: string | HTMLElement; /** * Specify that we want to use the `AuthEvent.TRIGGER_SSO_POPUP` event to trigger * SAML popup. This is useful when you want to trigger the popup on a custom user * action. * */ useEventForSAMLPopup?: boolean; /** * Text to show in the button which triggers the popup auth flow. * Default: `Authorize`. * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw */ authTriggerText?: string; /** * Prevent embedded application users from accessing ThoughtSpot * application pages outside of the iframe. * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw * @default true */ blockNonEmbedFullAppAccess?: boolean; /** * Host config in case embedded app is inside TS app itself * @hidden */ hostConfig?: { hostUserGuid: string; hostClusterId: string; hostClusterName: string; }; /** * Pendo API key to enable Pendo tracking to your own subscription, the key * is added as an additional key to the embed, as per this link:https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions[document]. * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl */ pendoTrackingKey?: string; /** * If passed as true all alerts will be suppressed in the embedded app. * @version SDK: 1.26.2 | ThoughtSpot: * */ suppressErrorAlerts?: boolean; /** * Suppress or show specific types of logs in the console output. * For example, `LogLevel.ERROR` shows only Visual Embed SDK and * ThoughtSpot application errors and suppresses * other logs such as warnings, information alerts, * and debug messages in the console output. * * @version SDK: 1.26.7 | ThoughtSpot: 9.10.0.cl * @default LogLevel.ERROR * @example * ```js * init({ * ...embedConfig, * logLevel: LogLevel.SILENT * }) * ``` */ logLevel?: LogLevel; /** * Disables the Mixpanel tracking from the SDK. * @version SDK: 1.27.9 * @hidden */ disableSDKTracking?: boolean; /** * Overrides default/user preferred locale for date formatting * @version SDK: 1.28.4 | ThoughtSpot: 10.0.0.cl, 9.5.0.sw */ dateFormatLocale?: string; /** * Overrides default/user preferred locale for number formatting * @version SDK: 1.28.4 | ThoughtSpot: 10.0.0.cl, 9.5.0.sw */ numberFormatLocale?: string; /** * Format to be used for currency when currency format is set to infer from browser * @version SDK: 1.28.4 | ThoughtSpot: 10.0.0.cl, 9.5.0.sw */ currencyFormat?: string; /** * This flag is used to disable the token verification in the SDK. * Enabling this flag will also disable the caching of the token. * @hidden * @version SDK: 1.28.5 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw * @example * ```js * init({ * ...embedConfig, * disableTokenVerification : true * }) * ``` */ disableTokenVerification?: boolean; /** * This flag is used to disable showing the login failure page in the embedded app. * @version SDK: 1.32.3 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw */ disableLoginFailurePage?: boolean; /** * This is an object (key/val) of override flags which will be applied * to the internal embedded object. This can be used to add any * URL flag. * Warning: This option is for advanced use only and is used internally * to control embed behavior in non-regular ways. We do not publish the * list of supported keys and values associated with each. * @version SDK: 1.33.5 | ThoughtSpot: * * @example * ```js * const embed = new LiveboardEmbed('#embed', { * ... // other liveboard view config * additionalFlags: { * flag1: 'value1', * flag2: 'value2' * } * }); * ``` */ additionalFlags?: { [key: string]: string | number | boolean; }; /** * This is an object (key/val) for customVariables being * used by the third party tool's script. * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl * @example * ```js * const embed = new LiveboardEmbed('#embed', { * ... // other liveboard view config * customVariablesForThirdPartyTools: { * key1: 'value1', * key2: 'value2' * } * }); * ``` */ customVariablesForThirdPartyTools?: Record; disablePreauthCache?: boolean; /** * Disable fullscreen presentation mode functionality. When enabled, prevents entering * and exiting fullscreen mode for embedded visualizations during presentations. * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @default true (feature is disabled by default) * @example * ```js * init({ * ... // other embed config options * disableFullscreenPresentation: false, // enables the feature * }) * ``` */ disableFullscreenPresentation?: boolean; /** * Custom Actions allows users to define interactive UI actions (like buttons or menu * items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These * actions enable users to trigger custom workflows — such as navigating to an * external app, calling an API, or opening a modal — based on the data context of * what they clicked can be used to trigger custom logic when the action is clicked. * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl * @example * ```js * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk'; * init({ * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-custom-action', * * // Display name shown to users in the UI * name: 'My Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // ANSWER: Available on answer pages * target: CustomActionTarget.ANSWER, * * // Optional: Restrict where this action appears based on data models * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // // Restrict to specific columns within models * // modelColumnNames: ['model-id::column-name'] * // }, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific answers * // answerIds: ['answer-id-1', 'answer-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * } * ], * }) * ``` * @example * ```js * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk'; * init({ * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-custom-action', * * // Display name shown to users in the UI * name: 'My Custom Action', * * // Where the action appears in the UI * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.MENU, * * // What type of content this action applies to * // SPOTTER: Available in Spotter (AI-powered search) * target: CustomActionTarget.SPOTTER, * * // Optional: Restrict where this action appears based on data models * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1'], * } * ], * }) * ``` * @example * ```js * import { CustomActionsPosition, CustomActionTarget } from '@thoughtspot/visual-embed-sdk'; * init({ * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-liveboard-custom-action', * * // Display name shown to users in the UI * name: 'My Liveboard Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // LIVEBOARD: Available on liveboard pages * target: CustomActionTarget.LIVEBOARD, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific liveboards * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * }, * { * // Unique identifier for the custom action * id: 'my-viz-custom-action', * * // Display name shown to users in the UI * name: 'My Viz Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // VIZ: Available on individual visualizations * target: CustomActionTarget.VIZ, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific answers * // answerIds: ['answer-id-1', 'answer-id-2'], * // // Restrict to specific liveboard. If liveboardId is * // // passed, custom actions will appear on all vizzes of liveboard * // liveboardIds: ['liveboard-id-1'], * // // Restrict to specific vizIds * // vizIds: ['viz-id-1'] * // }, * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // // Restrict to specific columns within models * // modelColumnNames: ['model-id::column-name'] * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * } * ], * }) * ``` */ customActions?: CustomAction[]; /** * Wait for the cleanup to be completed before destroying the embed. * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl * @default false */ waitForCleanupOnDestroy?: boolean; /** * The timeout for the cleanup to be completed before destroying the embed. * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl * @default 5000 */ cleanupTimeout?: number; } export interface LayoutConfig { } /** * Embedded iframe configuration * @group Embed components */ export interface FrameParams { /** * The width of the iframe (unit is pixels if numeric). */ width?: number | string; /** * The height of the iframe (unit is pixels if numeric). */ height?: number | string; /** * Set to 'lazy' to enable lazy loading of the embedded TS frame. * This will defer loading of the frame until it comes into the * viewport. This is useful for performance optimization. */ loading?: "lazy" | "eager" | "auto"; /** * These parameters will be passed to the iframe * as is. */ [key: string]: string | number | boolean | undefined; } /** * Configuration for the pre-render wrapper element. * Each property here supersedes its deprecated top-level counterpart on * {@link BaseViewConfig} — `id` over `preRenderId`, `containerSelector` over * `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` — * and takes precedence when both are set, so existing top-level usage continues * to work without any changes. * * @version SDK: 1.52.0 * @example * ```js * init({ thoughtSpotHost: '...', authType: AuthType.None }); * const embed = new LiveboardEmbed('#tsEmbed', { * preRenderConfig: { * id: 'my-liveboard', * containerSelector: '#my-scroll-container', * doNotTrackSize: false, * zIndex: -10, * }, * }); * embed.preRender(); * embed.showPreRender(); * ``` */ export interface PreRenderConfig { /** * Pre-render ID to identify the pre-render instance. * Takes precedence over the top-level `preRenderId` when both are set. * * Matches the embed warmed by `preRender()` to the one revealed by * `showPreRender()`. Embeds sharing an ID share one loaded frame: reuse the ID for * the same view, and give unrelated views their own or they will collide. * Required by `preRender()`, `showPreRender()`, and `hidePreRender()`, which log * and do nothing without it. * * @default undefined */ id?: string; /** * The DOM element or CSS selector string specifying the container into * which the pre-rendered wrapper is inserted. * Takes precedence over the top-level `preRenderContainer` when both are set. * * Set this when your app scrolls inside an element rather than the page (for * example `` has `overflow: hidden`). Point it at the element that actually * scrolls, keep that element mounted while the embed is warm, and prefer a * selector string — it is re-resolved on reposition and so survives a remount, * while a detached element reference cannot be recovered. An invalid selector is * logged and falls back to `document.body`. * See {@link BaseViewConfig.preRenderContainer} for details, including Shadow DOM. * * @default document.body */ containerSelector?: string | HTMLElement; /** * Disables the `ResizeObserver` that keeps the wrapper sized to the * placeholder element. * Takes precedence over the top-level `doNotTrackPreRenderSize` when both are set. * * Set this only when you size the embed yourself; you then own alignment and must * call `syncPreRenderStyle()` after any change that moves or resizes it. Tracking * already pauses while hidden, so this is not needed to avoid work then. * * @default false */ doNotTrackSize?: boolean; /** * CSS `z-index` value applied to the pre-render wrapper when hidden. * Override this when the host page's stacking context does not reach `-1000` * and the hidden wrapper still appears above other elements. * * A page that creates its own stacking context — a positioned app shell, a * transformed wrapper, a modal layer — can clamp `-1000`, and the hidden wrapper * then shows through or swallows clicks meant for your UI. Reach for this when you * see a faint panel behind your content, or clicks landing on nothing in the * region where the embed will eventually appear. * * @default -1000 */ zIndex?: number; } /** * The common configuration object for an embedded view. */ export interface BaseViewConfig extends ApiInterceptFlags { /** * @hidden */ layoutConfig?: LayoutConfig; /** * The width and height dimensions to render an embedded * object inside your app. Specify the values in pixels or percentage. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1 * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * frameParams: { * width: '500px' | '50%', * height: '400px' | '60%', * }, * }) * ``` */ frameParams?: FrameParams; /** * @hidden */ theme?: string; /** * @hidden */ styleSheet__unstable?: string; /** * The list of actions to disable from the primary menu, more menu * (...), and the contextual menu. Disabled actions are grayed out * and still visible to the user, but cannot be clicked. * Use this when you want to disable an action (keep it visible but non-interactive). * To completely remove an action from the UI, use {@link hiddenActions} instead. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * disabledActions: [Action.Download, Action.Save], * }); * ``` */ disabledActions?: Action[]; /** * The tooltip to display for disabled actions. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * disabledActions: [Action.Download, Action.Save], * disabledActionReason: "Reason for disabling", * }); * ``` */ disabledActionReason?: string; /** * The list of actions to completely remove from the embedded view. * Hidden actions are not visible to the user at all (fully removed from the UI). * Use this when you want to remove an action entirely. * To keep an action visible but non-interactive (grayed out), use {@link * disabledActions} instead. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * hiddenActions: [Action.Download, Action.ExportTML], * }); * ``` * @important */ hiddenActions?: Action[]; /** * The list of actions to display from the primary menu, more menu * (...), and the contextual menu. These will be only actions that * are visible to the user. * Use this as an allowlist — only the actions listed here will be shown. * All other actions will be hidden. Use either this or {@link hiddenActions}, not * both. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @important * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * visibleActions: [Action.Download, Action.ExportTML], * }); * ``` */ visibleActions?: Action[]; /** * The locale settings to apply to the embedded view. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.9.4 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * locale:'en', * }) * ``` */ locale?: string; /** * This is an object (key/val) of override flags which will be applied * to the internal embedded object. This can be used to add any * URL flag. * If the same flags are passed in init, they will be overridden by the values here. * Warning: This option is for advanced use only and is used internally * to control embed behavior in non-regular ways. We do not publish the * list of supported keys and values associated with each. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * additionalFlags: { * flag1: 'value1', * flag2: 'value2' * }, * }); * ``` */ additionalFlags?: { [key: string]: string | number | boolean; }; /** * Dynamic CSSUrl and customCSS to be injected in the loaded application. * You would also need to set `style-src` in the CSP settings. * @version SDK: 1.17.2 | ThoughtSpot: 8.4.1.sw, 8.4.0.cl * @default '' */ customizations?: CustomisationsInterface; /** * Insert as a sibling of the target container, instead of appending to a * child inside it. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * insertAsSibling:true, * }) * ``` */ insertAsSibling?: boolean; /** * Use a pre-rendered iframe from a pool of pre-rendered iframes * if available and matches the configuration. * @version SDK: 1.22.0 * @hidden * * See [docs]() on how to create a prerender pool. */ usePrerenderedIfAvailable?: boolean; /** * PreRender id to be used for PreRendering the embed. * Use PreRender to render the embed in the background and then * show or hide the rendered embed using showPreRender or hidePreRender respectively. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw * @deprecated Use {@link PreRenderConfig.id} via `preRenderConfig` instead. * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * preRenderId: "preRenderId-123", * }); * embed.showPreRender(); * ``` */ preRenderId?: string; /** * Determines if the PreRender component should dynamically track the size * of its embedding element and adjust its own size accordingly. * Enabling this option allows the PreRender component to automatically adapt * its dimensions based on changes to the size of the embedding element. * @type {boolean} * @default false * @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw * @deprecated Use {@link PreRenderConfig.doNotTrackSize} via `preRenderConfig` instead. * @example * ```js * // Disable tracking PreRender size in the configuration * const config = { * doNotTrackPreRenderSize: true, * }; * * // Instantiate an object with the configuration * const myComponent = new MyComponent(config); * ``` */ doNotTrackPreRenderSize?: boolean; /** * The DOM element or CSS selector string specifying the container into which * the pre-rendered wrapper is inserted. Defaults to `document.body` when not * specified. * * **When to use a target container:** set this when the pre-render should * live somewhere other than `document.body` — for example when `` has * `overflow: hidden` and scrolling is handled by an inner element, or when * you need the wrapper to sit inside a specific stacking/positioning context. * The wrapper is positioned to track the embedding element within this * container, so choose the scrollable/positioned ancestor you want it * aligned to. * * **Pass a stable container:** the wrapper is mounted into the resolved * container once, during `preRender()`. The container must stay mounted for * the lifetime of the pre-render — if the host app unmounts and remounts it * (for example React replacing the node), the wrapper is orphaned on the * detached node. Mount the container above the part of the tree that * re-renders so its identity is stable. Prefer a CSS selector string over a * raw element: a selector can be re-resolved to the fresh node on the next * reposition, whereas an element reference cannot be recovered once detached. * * When the embed host lives inside a Shadow DOM, a selector string is * resolved against that shadow root as well (since `document.querySelector` * cannot pierce shadow boundaries); pass the element directly if the * container lives in a different root. * * @type {string | HTMLElement} * @version SDK: 1.49.2 | ThoughtSpot: * * @deprecated Use {@link PreRenderConfig.containerSelector} via `preRenderConfig` instead. * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * preRenderId: 'my-liveboard', * // Prefer a selector for a stable, scrollable container. * preRenderContainer: '#my-scroll-container', * }); * ``` */ preRenderContainer?: string | HTMLElement; /** * Configuration for the pre-render wrapper element. * Each property here supersedes its deprecated top-level counterpart on * `BaseViewConfig` — `id` over `preRenderId`, `containerSelector` over * `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` — * and takes precedence when both are set, so existing top-level usage * continues to work without any changes. * See {@link PreRenderConfig} for available options. * * @version SDK: 1.52.0 * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * preRenderConfig: { * id: 'my-liveboard', * zIndex: -10, * }, * }); * embed.preRender(); * embed.showPreRender(); * ``` */ preRenderConfig?: PreRenderConfig; /** * Enable the V2 shell. This can provide performance benefits * due to a lighter-weight shell. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.31.2 | ThoughtSpot: 10.0.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * enableV2Shell_experimental: true, * }); * ``` */ enableV2Shell_experimental?: boolean; /** * For internal tracking of the embed component type. * @hidden */ embedComponentType?: string; /** * This flag can be used to expose translation IDs on the embedded app. * @default false * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl */ exposeTranslationIDs?: boolean; /** * This flag can be used to disable links inside the embedded app, * and disable redirection of links in a new tab. * * Note: When set to `true`, this flag automatically disables * {@link enableLinkOverridesV2} for the * embed session. The two features are mutually exclusive — link * overrides mutate anchors (delete `href`, attach a JS click handler), * which breaks native browser behavior (Cmd/Ctrl+Click, middle-click, * right-click "Open in new tab") when combined with the disable flag. * The disable flag preserves native anchor semantics instead. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * disableRedirectionLinksInNewTab: true, * }); * ``` */ disableRedirectionLinksInNewTab?: boolean; /** * Overrides an Org context for embedding application users. * This parameter allows a user authenticated to one Org to view the * objects from another Org. * The `overrideOrgId` setting is honoured only if the * Per Org URL feature is enabled on your ThoughtSpot instance. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.35.0 | ThoughtSpot: 10.5.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * overrideOrgId: 142536, * }); * ``` */ overrideOrgId?: number; /** * Overrides the browser history behavior for embedding application users. * This parameter changes standard history navigation (pushState) into a * state replacement (replaceState), preventing users from getting trapped in * back-button loops inside the embedded iframe environment. * The overrideHistoryState setting is honored only if the * application is running within an embedded context. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * // ... other embed view config * overrideHistoryState: true, * }); * ``` */ overrideHistoryState?: boolean; /** * Flag to override the *Open Link in New Tab* context * menu option. * * Note: Setting this flag implicitly enables * {@link enableLinkOverridesV2}. V1 is auto-upgraded to * V2 to ensure consistent link-override behavior; the * legacy V1-only path is no longer used in isolation. * * Note: This flag is ignored when * {@link disableRedirectionLinksInNewTab} is `true`. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, * `SearchEmbed`, `SpotterAgentEmbed`, * `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed view config * linkOverride: true, * }) * ``` */ linkOverride?: boolean; /** * Enables the V2 link override mechanism with improved * handling. When enabled, navigation links within the * embedded ThoughtSpot app are intercepted and routed * through the SDK via the `EmbedEvent.DialogOpen` * event. * * The SDK automatically sends {@link linkOverride} * alongside this flag for backward compatibility with * older ThoughtSpot versions. * * Note: This flag is ignored when * {@link disableRedirectionLinksInNewTab} is `true`. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, * `SearchEmbed`, `SpotterAgentEmbed`, * `SpotterEmbed`, `SearchBarEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.2.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed view config * enableLinkOverridesV2: true, * }); * * embed.on(EmbedEvent.DialogOpen, (payload) => { * console.log('Link clicked:', payload); * }); * ``` */ enableLinkOverridesV2?: boolean; /** * The primary action to display on top of the viz for Liveboard and App Embed. * Use this to set the primary action. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.39.0 | ThoughtSpot: 10.11.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * primaryAction: Action.Download * }); * ``` */ primaryAction?: Action | string; /** * flag to enable insert into slides action * @hidden * @private */ insertInToSlide?: boolean; /** * Show alert messages and toast messages in the embed. * Supported in all embed types. * * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * showAlerts:true, * }) * ``` */ showAlerts?: boolean; /** * Custom Actions allows users to define interactive UI actions (like buttons or menu * items) that appear in ThoughtSpot's visualizations, answers, and Liveboards. These * actions enable users to trigger custom workflows — such as navigating to an * external app, calling an API, or opening a modal — based on the data context of * what they clicked can be used to trigger custom logic when the action is clicked. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterEmbed` * @version SDK: 1.43.0 | ThoughtSpot: 10.14.0.cl * @example * ```ts * import { * CustomActionPayload, * CustomActionsPosition, * CustomActionTarget, * } from '@thoughtspot/visual-embed-sdk'; * // Use supported embed types such as AppEmbed or LiveboardEmbed * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-custom-action', * * // Display name shown to users in the UI * name: 'My Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // ANSWER: Available on answer pages * target: CustomActionTarget.ANSWER, * * // Optional: Restrict where this action appears based on data models * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // // Restrict to specific columns within models * // modelColumnNames: ['model-id::column-name'] * // }, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific answers * // answerIds: ['answer-id-1', 'answer-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * } * ], * }) * * // to trigger a custom flow on custom action click listen to Custom action embed event * embed.on(EmbedEvent.CustomAction, (payload: CustomActionPayload) => { * console.log('Custom Action event:', payload); * }) * ``` * @example * ```ts * import { * CustomActionsPosition, * CustomActionTarget, * } from '@thoughtspot/visual-embed-sdk'; * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-custom-action', * * // Display name shown to users in the UI * name: 'My Custom Action', * * // Where the action appears in the UI * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.MENU, * * // What type of content this action applies to * // SPOTTER: Available in Spotter (AI-powered search) * target: CustomActionTarget.SPOTTER, * * // Optional: Restrict where this action appears based on data models * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1'], * } * ], * }) * ``` * @example * ```ts * import { * CustomActionsPosition, * CustomActionTarget, * } from '@thoughtspot/visual-embed-sdk'; * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed config options * customActions: [ * { * // Unique identifier for the custom action * id: 'my-liveboard-custom-action', * * // Display name shown to users in the UI * name: 'My Liveboard Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // LIVEBOARD: Available on liveboard pages * target: CustomActionTarget.LIVEBOARD, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific liveboards * // liveboardIds: ['liveboard-id-1', 'liveboard-id-2'], * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * }, * { * // Unique identifier for the custom action * id: 'my-viz-custom-action', * * // Display name shown to users in the UI * name: 'My Viz Custom Action', * * // Where the action appears in the UI * // PRIMARY: Shows as a primary button (e.g., in the toolbar) * // MENU: Shows in the "More" menu (three dots menu) * // CONTEXTMENU: Shows in the right-click context menu * position: CustomActionsPosition.PRIMARY, * * // What type of content this action applies to * // VIZ: Available on individual visualizations * target: CustomActionTarget.VIZ, * * // Optional: Restrict where this action appears based on metadata * // metadataIds: { * // // Restrict to specific answers * // answerIds: ['answer-id-1', 'answer-id-2'], * // // Restrict to specific liveboard. If liveboardId is * // // passed, custom actions will appear on all vizzes of liveboard * // liveboardIds: ['liveboard-id-1'], * // // Restrict to specific vizIds * // vizIds: ['viz-id-1'] * // }, * // dataModelIds: { * // // Restrict to specific data models * // modelIds: ['model-id-1', 'model-id-2'], * // // Restrict to specific columns within models * // modelColumnNames: ['model-id::column-name'] * // }, * // // Restrict to specific groups (for group-based access control) * // groupIds: ['group-id-1', 'group-id-2'], * // // Restrict to specific organizations (for multi-org deployments) * // orgIds: ['org-id-1', 'org-id-2'], * } * ], * }) * ``` */ customActions?: CustomAction[]; /** * Refresh the auth token when the token is near expiry. * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * refreshAuthTokenOnNearExpiry: true, * }) * ``` */ refreshAuthTokenOnNearExpiry?: boolean; /** * This flag skips payload validation so events can be processed even if the payload is old, incomplete, or from a trusted system. * @default false * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * shouldBypassPayloadValidation:true, * }) * ``` */ shouldBypassPayloadValidation?: boolean; /** * Flag to use host events v2. This is used to enable the new host events v2 API. * @default false * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * useHostEventsV2:true, * }) * ``` */ useHostEventsV2?: boolean; } /** * Configuration for {@link startAutoMCPFrameRenderer}. * * Extends {@link BaseViewConfig} but omits params that are not applicable * to the auto-frame renderer: * - `preRenderId` / `usePrerenderedIfAvailable` / `doNotTrackPreRenderSize` — * the renderer always replaces a live iframe in-place; prerender pools are not used. * - `insertAsSibling` — insertion is always a same-position `replaceWith`; the * container-append path is never taken. * - `primaryAction` — a Liveboard/AppEmbed-specific feature; the renderer renders * whatever route the MCP server specifies. * - `enableV2Shell_experimental` — the renderer always uses the v2 URL format; * this flag has no effect. */ export type AutoMCPFrameRendererViewConfig = Omit; /** * The configuration object for Home page embeds configs. */ export interface HomePageConfig { /** * Hide columns on list pages such as * *Liveboards* and *Answers*. * For example: `hiddenListColumns = [ListPageColumns.Author]` * * **Note**: This option is available only in full app embedding and requires * importing the `ListPageColumns` enum. Starting with version 10.14.0.cl, you can * use this attribute to * hide the columns on all list pages in the *Insights* section. * * Supported embed types: `AppEmbed` * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl * @example * ```js * import { ListPageColumns } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * hiddenListColumns : [ListPageColumns.Favorites,ListPageColumns.Author], * }) * ``` */ hiddenListColumns?: ListPageColumns[]; /** * Control the visibility of home page modules. * To specify the modules, import the `HomepageModule` enum. * For example: `hiddenHomepageModules = [HomepageModule.MyLibrary]` * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. This attribute applies to V3 (ModularWithStylingChanges) * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw * @example * ```js * import { HomepageModule } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { * ... // V3 navigation and home page experience attributes * hiddenHomepageModules : [HomepageModule.Favorite,HomepageModule.Learning], * //...other embed view configuration attributes * }) * ``` */ hiddenHomepageModules?: HomepageModule[]; /** * Reorder home page modules. * To specify the modules, import the `HomepageModule` enum. * For example: `reorderedHomepageModules = [HomepageModule.MyLibrary, * HomepageModule.Watchlist]` * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. This attribute applies to V3 (ModularWithStylingChanges) * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw * @example * ```js * import { HomepageModule } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { * ...//V3 navigation and home page experience attributes * reorderedHomepageModules:[HomepageModule.Favorite,HomepageModule.MyLibrary], * //... other embed view configuration attributes * }) * ``` */ reorderedHomepageModules?: HomepageModule[]; /** * Controls the visibility of the menu items * on the home page left navigation panel. * To specify the menu items, import the `HomeLeftNavItem` enum. * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. This attribute applies to V3 (ModularWithStylingChanges) * and V4 (Focused) home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw * @example * ```js * import { HomeLeftNavItem } from '@thoughtspot/visual-embed-sdk'; * * const embed = new AppEmbed('#tsEmbed', { * //... V2/V3 experience attributes * hiddenHomeLeftNavItems : [HomeLeftNavItem.Home,HomeLeftNavItem.Answers], * ... //other embed view configuration attributes * }) * ``` */ hiddenHomeLeftNavItems?: HomeLeftNavItem[]; } /** * The configuration object for common Search and Liveboard embeds configs. */ export interface SearchLiveboardCommonViewConfig { /** * The list of runtime filters to apply to a search Answer, * visualization, or Liveboard. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed` * @version SDK: 1.9.4 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * runtimeFilters: [ * { * columnName: 'value', * operator: RuntimeFilterOp.EQ, * values: ['string' | 123 | true], * }, * ], * }) * ``` */ runtimeFilters?: RuntimeFilter[]; /** * The list of parameter overrides to apply to a search Answer, * visualization, or Liveboard. * * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed` * @version SDK: 1.25.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw * @example * ```js * // Replace with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * runtimeParameters: [ * { * name: 'value', * value: 'string' | 123 | true, * }, * ] * }) * ``` */ runtimeParameters?: RuntimeParameter[]; /** * flag to set ContextMenu Trigger to either left or right click. * * Supported embed types: `AppEmbed`, `SearchEmbed` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, or SearchEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * contextMenuTrigger:ContextMenuTriggerOptions.LEFT_CLICK || RIGHT_CLICK, * }) * ``` */ contextMenuTrigger?: ContextMenuTriggerOptions; /** * Boolean to exclude runtimeFilters in the URL * By default it is true, this flag removes runtime filters from the URL * (default behavior from SDK 1.45.0). * when set to false, runtime filters will be included in the URL * (default behavior before SDK 1.45.0). * * Irrespective of this flag, runtime filters ( if passed ) will be applied to the * embedded view. * @default true * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl */ excludeRuntimeFiltersfromURL?: boolean; /** * Boolean to exclude runtimeParameters from the URL * when set to true, this flag removes runtime parameters from the URL * (default behavior from SDK 1.45.0). * when set to false, runtime parameters will be included in the URL * (default behavior before SDK 1.45.0). * * Irrespective of this flag, runtime parameters (if passed) will be applied to the * embedded view. * @default true * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl */ excludeRuntimeParametersfromURL?: boolean; /** * To set the initial state of the search bar in case of saved Answers. * * Supported embed types: `AppEmbed`, `SearchBarEmbed` * @default true * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed, or SearchBarEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * collapseSearchBar: true, * }); * ``` */ collapseSearchBar?: boolean; /** * Flag to control Data panel experience * * Supported embed types: `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed` * @deprecated from SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed, or SearchBarEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * dataPanelV2: true, * }) * ``` */ dataPanelV2?: boolean; /** * To enable custom column groups in data panel v2 * * Supported embed types: `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl, 10.1.0.sw * @default false * @example * ```js * // Replace with embed component name. For example, SearchBarEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * enableCustomColumnGroups: true, * }); * ``` */ enableCustomColumnGroups?: boolean; /** * To enable **Include current period** checkbox for date filters. * Controls the visibility of the option to include * the current time period in filter results. * * Supported embed types: `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new ('#tsEmbed', { * ... // other embed view config * isThisPeriodInDateFiltersEnabled: true, * }) * ``` */ isThisPeriodInDateFiltersEnabled?: boolean; } /** * The configuration object for common Liveboard and App embeds configs. */ export interface LiveboardAppEmbedViewConfig { /** * Show or hide Liveboard header * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * hideLiveboardHeader : true, * }) * ``` */ hideLiveboardHeader?: boolean; /** * Show or hide Liveboard title * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * showLiveboardTitle:true, * }) * ``` */ showLiveboardTitle?: boolean; /** * Show or hide Liveboard description * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * showLiveboardDescription:true, * }) * ``` */ showLiveboardDescription?: boolean; /** * Boolean to control if Liveboard header is sticky or not. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed', { * ... // other app view config * isLiveboardHeaderSticky: true, * }); * ``` */ isLiveboardHeaderSticky?: boolean; /** * This attribute can be used to enable the two-column layout on an embedded Liveboard * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.32.0 | ThoughtSpot: 10.1.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * enable2ColumnLayout: true, * }) * ``` */ enable2ColumnLayout?: boolean; /** * This attribute keeps an embedded Liveboard on the 12-column layout at * every width, instead of switching to the two-column or single-column * layout as the container narrows. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardAlwaysOn12ColLayout: true, * }) * ``` */ isLiveboardAlwaysOn12ColLayout?: boolean; /** * This flag can be used to enable the compact header in Liveboard * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.35.0 | ThoughtSpot: 10.3.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardCompactHeaderEnabled: true, * }) * ``` */ isLiveboardCompactHeaderEnabled?: boolean; /** * This flag can be used to show or hide the Liveboard verified icon in the compact * header. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * showLiveboardVerifiedBadge: true, * }) * ``` */ showLiveboardVerifiedBadge?: boolean; /** * This flag is used to enable/disable hide irrelevant filters in Liveboard tab * * **Note**: This feature is supported only if compact header is enabled on your * Liveboard. To enable compact header, use the `isLiveboardCompactHeaderEnabled` * attribute. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * hideIrrelevantChipsInLiveboardTabs: true, * isLiveboardCompactHeaderEnabled: true, * }) * ``` */ hideIrrelevantChipsInLiveboardTabs?: boolean; /** * This flag can be used to show or hide the re-verify banner on the Liveboard * compact header * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * showLiveboardReverifyBanner: true, * }) * ``` */ showLiveboardReverifyBanner?: boolean; /** * enable or disable ask sage * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.29.0 | ThoughtSpot: 9.12.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed, SpotterEmbed, or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * enableAskSage:true, * }) * ``` */ enableAskSage?: boolean; /** * This flag is used to show or hide checkboxes for including or excluding * the cover and filters pages in the Liveboard PDF. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.8.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * coverAndFilterOptionInPDF: false, * }) * ``` */ coverAndFilterOptionInPDF?: boolean; /** * Sets the gutter space (in pixels) between the visualization tiles of * an embedded Liveboard grid layout and its outer layout padding. * Accepts a non-negative integer; `0` renders the tiles without any gap * and removes the outer padding. When omitted, the gutter saved in the * Liveboard's styling settings (or the ThoughtSpot default) applies. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {number} * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * liveboardGutter: 8, * }) * ``` */ liveboardGutter?: number; /** * This flag is used to enable or disable the new centralized Liveboard filter UX * (v2). When enabled, a unified modal is used to manage and update multiple filters * at once, replacing the older individual filter interactions. * To enable this feature on your instance, contact ThoughtSpot Support. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isCentralizedLiveboardFilterUXEnabled: true, * }) * ``` */ isCentralizedLiveboardFilterUXEnabled?: boolean; /** * This flag is used to enable or disable scoped Liveboard filtering. * When enabled, filters and parameters can be scoped to a group of * visualizations on a Liveboard, in addition to the Liveboard and * tab levels. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isScopedLiveboardFilteringEnabled: true, * }) * ``` */ isScopedLiveboardFilteringEnabled?: boolean; /** * This flag is used to enable or disable the link parameters in liveboard. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLinkParametersEnabled: true, * }) * ``` */ isLinkParametersEnabled?: boolean; /** * This flag is used to enable or disable the enhanced filter interactivity in * liveboard. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.42.0 | ThoughtSpot: 10.15.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isEnhancedFilterInteractivityEnabled: true, * }) * ``` */ isEnhancedFilterInteractivityEnabled?: boolean; /** * Show or hide masked filter chips * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * showMaskedFilterChip: true, * }) * ``` */ showMaskedFilterChip?: boolean; /** * Enable or disable Liveboard styling and grouping * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardMasterpiecesEnabled: true, * }) * ``` */ isLiveboardMasterpiecesEnabled?: boolean; /** * Enable or disable Muze chart phase 1 GA * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl * @default false * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * newChartsLibrary: true, * }) * ``` */ newChartsLibrary?: boolean; } export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig { } /** * MessagePayload: Embed event payload: message type, data and status (start/end) * @group Events */ export type MessagePayload = { type: string; data: any; status?: string; }; /** * MessageOptions: By providing options, getting specific event start / end based on * option * @group Events */ export type MessageOptions = { /** * A boolean value indicating that start status events of this type * will be dispatched. */ start?: boolean; }; /** * MessageCallback: Embed event message callback * @group Events */ export type MessageCallback = (payload: MessagePayload, /** * responder: Message callback function triggered when embed event * initiated */ responder?: (data: any) => void) => void; /** * A map of the supported runtime filter operations */ export declare enum RuntimeFilterOp { /** * Equals */ EQ = "EQ", /** * Does not equal */ NE = "NE", /** * Less than */ LT = "LT", /** * Less than or equal to */ LE = "LE", /** * Greater than */ GT = "GT", /** * Greater than or equal to */ GE = "GE", /** * Contains */ CONTAINS = "CONTAINS", /** * Begins with */ BEGINS_WITH = "BEGINS_WITH", /** * Ends with */ ENDS_WITH = "ENDS_WITH", /** * Between, inclusive of higher value */ BW_INC_MAX = "BW_INC_MAX", /** * Between, inclusive of lower value */ BW_INC_MIN = "BW_INC_MIN", /** * Between, inclusive of both higher and lower value */ BW_INC = "BW_INC", /** * Between, non-inclusive */ BW = "BW", /** * Is included in this list of values */ IN = "IN", /** * Is not included in this list of values */ NOT_IN = "NOT_IN" } /** * Home page modules that can be hidden * via `hiddenHomepageModules` and reordered via * `reorderedHomepageModules`. * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. These modules apply to V3 (ModularWithStylingChanges) and * V4 (Focused) home page experiences. * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw */ export declare enum HomepageModule { /** * Search bar */ Search = "SEARCH", /** * KPI watchlist module */ Watchlist = "WATCHLIST", /** * Favorite module */ Favorite = "FAVORITE", /** * List of answers and Liveboards */ MyLibrary = "MY_LIBRARY", /** * Trending list */ Trending = "TRENDING", /** * Learning videos */ Learning = "LEARNING" } /** * List page columns that can be hidden. * **Note**: This option is applicable to full app embedding only. * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl */ export declare enum ListPageColumns { /** * Favorites */ Favorites = "FAVOURITE", /** * Favourite Use {@link ListPageColumns.Favorites} instead. * @deprecated This option is deprecated. */ Favourite = "FAVOURITE", /** * Tags */ Tags = "TAGS", /** * Author */ Author = "AUTHOR", /** * Last viewed/Last modified */ DateSort = "DATE_SORT", /** * Share */ Share = "SHARE", /** * Verified badge/column */ Verified = "VERIFIED" } /** * A filter that can be applied to ThoughtSpot answers, Liveboards, or * visualizations at runtime. */ export interface RuntimeFilter { /** * The name of the column to filter on (case-sensitive) */ columnName: string; /** * The operator to apply */ operator: RuntimeFilterOp; /** * The list of operands. Some operators like EQ, LE accept * a single operand, whereas other operators like BW and IN accept multiple * operands. */ values: (number | boolean | string | bigint)[]; } /** * A filter that can be applied to ThoughtSpot Answers, Liveboards, or * visualizations at runtime. */ export interface RuntimeParameter { /** * The name of the runtime parameter to filter on (case-sensitive) */ name: string; /** * Values */ value: number | boolean | string; /** * Whether the parameter is visible to the user (`UpdateParameters` only). */ isVisibleToUser?: boolean; /** * Scope of the update (`UpdateParameters` only). Omitting it, or `level`, * targets the Liveboard level. */ applicability?: Applicability; } /** * Event types emitted by the embedded ThoughtSpot application. * * To add an event listener use the corresponding * {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method. * @example * ```js * import { EmbedEvent } from '@thoughtspot/visual-embed-sdk'; * // Or * // const { EmbedEvent } = window.tsembed; * * // create the liveboard embed. * * liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => { * console.log('Drilldown event', drilldown); * })); * ``` * * If you are using React components for embedding, you can register to any * events from the `EmbedEvent` list by using the `on` convention. * For example,`onAlert`, `onCopyToClipboard` and so on. * @example * ```js * // ... * const MyComponent = ({ dataSources }) => { * const onLoad = () => { * console.log(EmbedEvent.Load, {}); * }; * * return ( * * ); * }; * ``` * @group Events */ export declare enum EmbedEvent { /** * Rendering has initialized. * @example * ```js * liveboardEmbed.on(EmbedEvent.Init, showLoader) * //show a loader * function showLoader() { * document.getElementById("loader"); * } * ``` * @returns timestamp - The timestamp when the event was generated. */ Init = "init", /** * Authentication has either succeeded or failed. * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.AuthInit, payload => { * console.log('AuthInit', payload); * }) * ``` * @returns isLoggedIn - A Boolean specifying whether authentication was successful. */ AuthInit = "authInit", /** * The embed object container has loaded. * @returns timestamp - The timestamp when the event was generated. * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Load, hideLoader) * //hide loader * function hideLoader() { * document.getElementById("loader"); * } * ``` */ Load = "load", /** * Data pertaining to an Answer, Liveboard or Spotter visualization is received. * The event payload includes the raw data of the object. * @return data - Answer of Liveboard data * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Data, payload => { * console.log('data', payload); * }) * ``` * @important */ Data = "data", /** * Search query has been updated by the user. * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload)) * ``` */ QueryChanged = "queryChanged", /** * A drill-down operation has been performed. * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @returns additionalFilters - Any additional filters applied * @returns drillDownColumns - The columns on which drill down was performed * @returns nonFilteredColumns - The columns that were not filtered * @example * ```js * searchEmbed.on(EmbedEvent.Drilldown, { * points: { * clickedPoint, * selectedPoints: selectedPoint * }, * autoDrillDown: true, * }) * ``` * In this example, `VizPointDoubleClick` event is used for * triggering the `DrillDown` event when an area or specific * data point on a table or chart is double-clicked. * @example * ```js * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => { * console.log(payload); * const clickedPoint = payload.data.clickedPoint; * const selectedPoint = payload.data.selectedPoints; * console.log('>>> called', clickedPoint); * embed.trigger(HostEvent.DrillDown, { * points: { * clickedPoint, * selectedPoints: selectedPoint * }, * autoDrillDown: true, * }) * }) * ``` */ Drilldown = "drillDown", /** * One or more data sources have been selected. * @returns dataSourceIds - the list of data sources * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => { * console.log('DataSourceSelected', payload); * }) * ``` */ DataSourceSelected = "dataSourceSelected", /** * One or more data columns have been selected. * @returns columnIds - the list of columns * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => { * console.log('AddRemoveColumns', payload); * }) * ``` */ AddRemoveColumns = "addRemoveColumns", /** * A custom action has been triggered. * @returns actionId - ID of the custom action * @returns payload {@link CustomActionPayload} - Response payload with the * Answer or Liveboard data * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.CustomAction, payload => { * const data = payload.data; * if (data.id === 'insert Custom Action ID here') { * console.log('Custom Action event:', data.embedAnswerData); * } * }) * ``` */ CustomAction = "customAction", /** * Listen to double click actions on a visualization. * @return ContextMenuInputPoints - Data point that is double-clicked * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 * @example * ```js * LiveboardEmbed.on(EmbedEvent.VizPointDoubleClick, payload => { * console.log('VizPointDoubleClick', payload); * }) * ``` */ VizPointDoubleClick = "vizPointDoubleClick", /** * Listen to clicks on a visualization in a Liveboard or Search result. * @return viz, clickedPoint - metadata about the point that is clicked * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @important * @example * ```js * embed.on(EmbedEvent.VizPointClick, ({data}) => { * console.log( * data.vizId, // viz id * data.clickedPoint.selectedAttributes[0].value, * data.clickedPoint.selectedAttributes[0].column.name, * data.clickedPoint.selectedMeasures[0].value, * data.clickedPoint.selectedMeasures[0].column.name, * ) * }); * ``` */ VizPointClick = "vizPointClick", /** * Fired when an error occurs in the embedded component. * * **Important:** This event fires for many reasons — including internal * validation warnings (e.g. `HOST_EVENT_VALIDATION`), configuration issues, * and transient errors that ThoughtSpot already handles gracefully inside the * iframe. **Do not call `embed.destroy()` or unmount the embed component on * every error.** Doing so will tear down the iframe and abort all in-flight * requests, causing the embed to fail entirely. * * Only treat the following codes as unrecoverable: * - `INIT_ERROR` — SDK was not initialised before render * - `LOGIN_FAILED` — authentication could not be completed * * All other error codes should be logged and inspected, not acted upon * destructively. * * **Note:** There is currently no dedicated event for a true unrecoverable * crash. A future `EmbedEvent.FatalError` event is planned to give customers * a clean signal for when the embed cannot recover and needs to be torn down. * * Error types include: * `API` - API call failure. * `FULLSCREEN` - Error when presenting a Liveboard in full screen mode. * `VALIDATION_ERROR` - Internal host event or configuration validation warning. * * For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType * @returns error - An error object or message * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * // Recommended pattern — only destroy on truly fatal errors * embed.on(EmbedEvent.Error, (error) => { * const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED']; * if (FATAL_CODES.includes(error.data?.code)) { * embed.destroy(); * return; * } * // Log all other errors — do not destroy * console.warn('Embed error (non-fatal):', error); * }); * ``` * @example * ```js * // API error * SearchEmbed.on(EmbedEvent.Error, (error) => { * console.log(error); * // { errorType: "API", message: '...', code: '...' } * }); * ``` */ Error = "Error", /** * The embedded object has sent an alert. * @returns alert - An alert object * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.Alert) * ``` */ Alert = "alert", /** * The ThoughtSpot authentication session has expired. * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired) * //show auth expired banner * function showAuthExpired() { * document.getElementById("authExpiredBanner"); * } * ``` */ AuthExpire = "ThoughtspotAuthExpired", /** * ThoughtSpot failed to validate the auth session. * @hidden */ AuthFailure = "ThoughtspotAuthFailure", /** * ThoughtSpot failed to re validate the auth session. * @hidden */ IdleSessionTimeout = "IdleSessionTimeout", /** * ThoughtSpot failed to validate the auth session. * @hidden */ AuthLogout = "ThoughtspotAuthLogout", /** * The height of the embedded Liveboard or visualization has been computed. * @returns data - The height of the embedded Liveboard or visualization * @hidden */ EmbedHeight = "EMBED_HEIGHT", /** * The center of visible iframe viewport is calculated. * @returns data - The center of the visible Iframe viewport. * @hidden */ EmbedIframeCenter = "EmbedIframeCenter", /** * Emitted when the **Get Data** action is initiated. * Applicable to `SearchBarEmbed` only. * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw * @example * ```js * searchbarEmbed.on(EmbedEvent.GetDataClick) * .then(data => { * console.log('Answer Data:', data); * }) * ``` */ GetDataClick = "getDataClick", /** * Detects the route change. * @version SDK: 1.7.0 | ThoughtSpot: 8.0.0.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.RouteChange, payload => * console.log('data', payload)) * ``` */ RouteChange = "ROUTE_CHANGE", /** * The v1 event type for Data * @hidden */ V1Data = "exportVizDataToParent", /** * Emitted when the embed does not have cookie access. This happens * when third-party cookies are blocked by Safari or other * web browsers. `NoCookieAccess` can trigger. * @example * ```js * appEmbed.on(EmbedEvent.NoCookieAccess) * ``` * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw */ NoCookieAccess = "noCookieAccess", /** * Emitted when SAML is complete * @private * @hidden */ SAMLComplete = "samlComplete", /** * Emitted when any modal is opened in the app * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.DialogOpen, payload => { * console.log('dialog open', payload); * }) * ``` */ DialogOpen = "dialog-open", /** * Emitted when any modal is closed in the app * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.DialogClose, payload => { * console.log('dialog close', payload); * }) * ``` */ DialogClose = "dialog-close", /** * Emitted when the Liveboard shell loads. * You can use this event as a hook to trigger * other events on the rendered Liveboard. * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => { console.log('Liveboard is rendered', payload); }) * ``` * The following example shows how to trigger * `SetVisibleVizs` event using LiveboardRendered embed event: * @example * ```js * const embedRef = useEmbedRef(); * const onLiveboardRendered = () => { * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']); * }; * ``` */ LiveboardRendered = "PinboardRendered", /** * Emits all events. * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.ALL, payload => { * console.log('Embed Events', payload) * }) * ``` */ ALL = "*", /** * Emitted when an Answer is saved in the app. * Use start:true to subscribe to when save is initiated, or end:true to subscribe to when save is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //Emit when action starts * searchEmbed.on(EmbedEvent.Save, payload => { * console.log('Save', payload) * }, { * start: true * }) * //emit when action ends * searchEmbed.on(EmbedEvent.Save, payload => { * console.log('Save', payload) * }) * ``` */ Save = "save", /** * Emitted when the download action is triggered on an Answer. * * **Note**: This event is deprecated in v1.21.0. * To fire an event when a download action is initiated on a chart or table, * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPdf`, * `EmbedEvent.DownloadAsCsv`, or `EmbedEvent.DownloadAsXlsx` * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Download, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }) * ``` */ Download = "download", /** * Emitted when the download action is triggered on an Answer. * Payload varies by context: {@link VizScopedRequest} (Search, Answer, * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger() * accepts the union now; per-context enforced next release. * Use start:true to subscribe to when download is initiated, or end:true to * subscribe to when download is completed. Default is end:true. * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => { * console.log('download PNG', payload)}, {start: true }) * //emit when action ends * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => { * console.log('download PNG', payload)}) * ``` */ DownloadAsPng = "downloadAsPng", /** * Emitted when the Download as PDF action is triggered on an Answer * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger() * accepts the union now; per-context enforced next release. * Use start:true to subscribe to when download as PDF is initiated, or end:true to * subscribe to when download as PDF is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => { * console.log('download PDF', payload)}, {start: true }) * //emit when action ends * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => { * console.log('download PDF', payload)}) * ``` */ DownloadAsPdf = "downloadAsPdf", /** * Emitted when the Download as CSV action is triggered on an Answer. * Payload varies by context: {@link VizScopedRequest} (Search, Answer, * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger() * accepts the union now; per-context enforced next release. * Use start:true to subscribe to when download as CSV is initiated, or end:true to * subscribe to when download as CSV is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => { * console.log('download CSV', payload)}, {start: true }) * //emit when action ends * searchEmbed.on(EmbedEvent.DownloadAsCsv, payload => { * console.log('download CSV', payload)}) * ``` */ DownloadAsCsv = "downloadAsCsv", /** * Emitted when the Download as XLSX action is triggered on an Answer. * Payload varies by context: {@link VizScopedRequest} (Search, Answer, * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger() * accepts the union now; per-context enforced next release. * Use start:true to subscribe to when download as XLSX is initiated, or end:true to * subscribe to when download as XLSX is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => { * console.log('download Xlsx', payload)}, { start: true }) * //emit when action ends * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => { * console.log('download Xlsx', payload)}) * ``` */ DownloadAsXlsx = "downloadAsXlsx", /** * Emitted when the Download Liveboard as Continuous PDF action is triggered * on a Liveboard. * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => { * console.log('download liveboard as continuous PDF', payload)}) * ``` */ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF", /** * Emitted when an Answer is deleted in the app * Use start:true to subscribe to when delete is initiated, or end:true to subscribe * to when delete is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * appEmbed.on(EmbedEvent.AnswerDelete, payload => { * console.log('delete answer', payload)}, {start: true }) * //trigger when action is completed * appEmbed.on(EmbedEvent.AnswerDelete, payload => { * console.log('delete answer', payload)}) * ``` */ AnswerDelete = "answerDelete", /** * Emitted when the AI Highlights action is triggered on a Liveboard * @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => { * console.log('AI Highlights', payload); * }) * ``` */ AIHighlights = "AIHighlights", /** * Emitted when a user initiates the Pin action to * add an Answer to a Liveboard. * Use start:true to subscribe to when pin is initiated, or end:true to subscribe to * when pin is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.Pin, payload => { * console.log('pin', payload) * }, { * start: true * }) * //emit when action ends * searchEmbed.on(EmbedEvent.Pin, payload => { * console.log('pin', payload) * }) * ``` */ Pin = "pin", /** * Emitted when SpotIQ analysis is triggered * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => { * console.log('SpotIQAnalyze', payload) * }, { * start: true * }) * //emit when action ends * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => { * console.log('SpotIQ analyze', payload) * }) * ``` */ SpotIQAnalyze = "spotIQAnalyze", /** * Emitted when a user shares an object with another user or group * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.Share, payload => { * console.log('Share', payload) * }, { * start: true * }) * //emit when action ends * searchEmbed.on(EmbedEvent.Share, payload => { * console.log('Share', payload) * }) * ``` */ Share = "share", /** * Emitted when a user clicks the **Include** action to include a specific value or * data on a chart or table. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.DrillInclude, payload => { * console.log('Drill include', payload); * }) * ``` */ DrillInclude = "context-menu-item-include", /** * Emitted when a user clicks the **Exclude** action to exclude a specific value or * data on a chart or table * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.DrillExclude, payload => { * console.log('Drill exclude', payload); * }) * ``` */ DrillExclude = "context-menu-item-exclude", /** * Emitted when a column value is copied in the embedded app. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.CopyToClipboard, payload => { * console.log('copy to clipboard', payload); * }) * ``` */ CopyToClipboard = "context-menu-item-copy-to-clipboard", /** * Emitted when a user clicks the **Update TML** action on * embedded Liveboard. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.UpdateTML) * }) * ``` */ UpdateTML = "updateTSL", /** * Emitted when a user clicks the **Edit TML** action * on an embedded Liveboard. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.EditTML, payload => { * console.log('Edit TML', payload); * }) * ``` */ EditTML = "editTSL", /** * Emitted when the **Export TML** action is triggered on an * an embedded object in the app * Use start:true to subscribe to when export is initiated, or end:true to subscribe * to when export is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * searchEmbed.on(EmbedEvent.ExportTML, payload => { * console.log('Export TML', payload)}, { start: true }) * //emit when action ends * searchEmbed.on(EmbedEvent.ExportTML, payload => { * console.log('Export TML', payload)}) * ``` */ ExportTML = "exportTSL", /** * Emitted when an Answer is saved as a View. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * appEmbed.on(EmbedEvent.SaveAsView, payload => { * console.log('View', payload); * }) * ``` */ SaveAsView = "saveAsView", /** * Emitted when the user creates a copy of an Answer. * Use start:true to subscribe to when copy and edit is initiated, or end:true to * subscribe to when copy and edit is completed. Default is end:true. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * //emit when action starts * appEmbed.on(EmbedEvent.CopyAEdit, payload => { * console.log('Copy and edit', payload)}, {start: true }) * //emit when action ends * appEmbed.on(EmbedEvent.CopyAEdit, payload => { * console.log('Copy and edit', payload)}) * ``` */ CopyAEdit = "copyAEdit", /** * Emitted when a user clicks *Show underlying data* on an Answer. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => { * console.log('show data', payload); * }) * ``` */ ShowUnderlyingData = "showUnderlyingData", /** * Emitted when an Answer is switched to a chart or table view. * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @example * ```js * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => { * console.log('switch view', payload); * }) * ``` */ AnswerChartSwitcher = "answerChartSwitcher", /** * Internal event to communicate the initial settings back to the ThoughtSpot app * @hidden */ APP_INIT = "appInit", /** * Internal event to clear the cached info * @hidden */ CLEAR_INFO_CACHE = "clearInfoCache", /** * Emitted when a user clicks **Show Liveboard details** on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.LiveboardInfo, payload => { * console.log('Liveboard details', payload); * }) * ``` */ LiveboardInfo = "pinboardInfo", /** * Emitted when a user clicks on the Favorite icon on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => { * console.log('favorites', payload); * }) * ``` */ AddToFavorites = "addToFavorites", /** * Emitted when a user clicks **Schedule** on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Schedule, payload => { * console.log('Liveboard schedule', payload); * }) * ``` */ Schedule = "subscription", /** * Emitted when a user clicks **Edit** on a Liveboard or visualization * Payload varies by context: {@link VizScopedRequest} (Liveboard), * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the * union now; per-context enforced next release. * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Edit, payload => { * console.log('Liveboard edit', payload); * }) * ``` */ Edit = "edit", /** * Emitted when a user clicks *Make a copy* on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => { * console.log('Copy', payload); * }) * ``` */ MakeACopy = "makeACopy", /** * Emitted when a user clicks **Present** on a Liveboard or visualization * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Present) * ``` * @example * ```js * liveboardEmbed.on(EmbedEvent.Present, { * vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * }) * ``` */ Present = "present", /** * Emitted when a user clicks **Delete** on a visualization * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Delete, * {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` */ Delete = "delete", /** * Emitted when a user clicks Manage schedules on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.SchedulesList) * ``` */ SchedulesList = "schedule-list", /** * Emitted when a user clicks **Cancel** in edit mode on a Liveboard * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Cancel) * ``` */ Cancel = "cancel", /** * Emitted when a user clicks **Explore** on a visualization * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.Explore, { * vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` */ Explore = "explore", /** * Emitted when a user clicks **Copy link** action on a visualization. * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.CopyLink, { * vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` */ CopyLink = "embedDocument", /** * Emitted when a user interacts with cross filters on a * visualization or Liveboard. * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw * @example * ```js * liveboardEmbed.on(EmbedEvent.CrossFilterChanged, { * vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` */ CrossFilterChanged = "cross-filter-changed", /** * Emitted when a user right clicks on a visualization (chart or table) * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw * @example * ```js * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => { * console.log('VizPointClick', payload) * }) * ``` */ VizPointRightClick = "vizPointRightClick", /** * Emitted when a user clicks **Insert to slide** on a visualization * @hidden */ InsertIntoSlide = "insertInToSlide", /** * Emitted when a user changes any filter on a Liveboard. * Returns filter type and name, column name and ID, and runtime * filter details. * The payload includes an optional `applicability` attribute indicating the * scope of the changed filter. It contains a `level` (`LIVEBOARD`, * `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a * `targetId` with the GUID of the target. At `LIVEBOARD` level there * is no `targetId`, since the filter applies to the whole Liveboard. * The `applicability` attribute is available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. * @example * * ```js * LiveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => { * console.log('payload', payload); * // payload.data optionally includes applicability: { level, targetId } * }) * ``` * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw */ FilterChanged = "filterChanged", /** * Emitted when a user updates a connection on the **Data** page * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw */ UpdateConnection = "updateConnection", /** * Emitted when a user updates a connection on the **Data** page * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw */ CreateConnection = "createConnection", /** * Emitted when name, status (private or public) or filter values of a * Personalised view is updated. * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ UpdatePersonalisedView = "updatePersonalisedView", /** * Emitted when name, status (private or public) or filter values of a * Personalized view is updated. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ UpdatePersonalizedView = "updatePersonalisedView", /** * Emitted when a Personalised view is saved. * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ SavePersonalisedView = "savePersonalisedView", /** * Emitted when a Personalized view is saved. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ SavePersonalizedView = "savePersonalisedView", /** * Emitted when a Liveboard is reset. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw */ ResetLiveboard = "resetLiveboard", /** * Emitted when a PersonalisedView is deleted. * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead. * @returns views: string[] * @returns liveboardId: string * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DeletePersonalisedView = "deletePersonalisedView", /** * Emitted when a PersonalizedView is deleted. * @returns views: string[] * @returns liveboardId: string * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DeletePersonalizedView = "deletePersonalisedView", /** * Emitted when a user selects a different Personalized View or * resets to the original/default view on a Liveboard. * @example * ```js * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => { * console.log(data.viewName); // 'Q4 Revenue' or 'Original View' * console.log(data.viewId); // '2a021a12-...' or null (default) * console.log(data.liveboardId); // 'abc123...' * console.log(data.isPublic); // true | false * }) * ``` * @returns viewName: string - Name of the selected view, * or 'Original View' when reset to default. * @returns viewId: string | null - GUID of the selected view, * or null when reset to default. * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ ChangePersonalizedView = "changePersonalisedView", /** * Emitted when a user creates a Worksheet. * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw */ CreateWorksheet = "createWorksheet", /** * Emitted when the *Ask Sage* is initialized. * @returns viewName: string * @returns viewId: string * @returns liveboardId: string * @returns isPublic: boolean * @version SDK: 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl */ AskSageInit = "AskSageInit", /** * Emitted when a Liveboard or visualization is renamed. * @version SDK: 1.28.0 | ThoughtSpot: 9.10.5.cl, 10.1.0.sw */ Rename = "rename", /** * * This event allows developers to intercept search execution * and implement logic that decides whether Search Data should return * data or block the search operation. * * **Prerequisite**: Set`isOnBeforeGetVizDataInterceptEnabled` to `true` * to ensure that `EmbedEvent.OnBeforeGetVizDataIntercept` is emitted * when the embedding application user tries to run a search query. * * This framework applies only to `AppEmbed` and `SearchEmbed`. * @param - Includes the following parameters: * - `payload`: The payload received from the embed related to the Data API call. * - `responder`: Contains elements that let developers define whether ThoughtSpot * will run or block the search operation, and if blocked, which error message to * provide. * - `execute` - When `execute` returns `true`, the search is run. * When `execute` returns `false`, the search is not executed. * - `error` - Developers can customize the user-facing error message when `execute` * is `false` by using the `error` parameters in `responder`. * - `errorText` - The error message text shown to the user. * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl * @example * * This example blocks search operation and returns a custom error message: * ```js * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => { * responder({ * data: { * execute: false, * error: { * // Provide a custom error message to explain why the search did not run. * errorText: 'This search query cannot be run. Please contact your administrator for more details.', * }, * }, * }); * }) * ``` * @example * * This example allows the search operation to run * unless the query contains both `sales` and `county`, * and returns a custom error message if the query is rejected: * ```js * embed.on(EmbedEvent.OnBeforeGetVizDataIntercept, (payload, responder) => { * // Record the search query submitted by the end user. * const query = payload.data.data.answer.search_query; * * responder({ * data: { * // Returns true as long as the query does not include both `sales` and `county`. * execute: !(query.includes('sales') && query.includes('county')), * error: { * // Provide a custom error message when the query is blocked by your logic. * errorText: * "You can't use this query: " * + query * + ". The 'sales' measure can never be used at the 'county' level. " * + "Please try another measure or remove 'county' from your search.", * }, * }, * }); * }) * ``` */ OnBeforeGetVizDataIntercept = "onBeforeGetVizDataIntercept", /** * Emitted when parameter changes in an Answer * or Liveboard. * The payload includes an optional `applicability` attribute indicating the * scope of the changed parameter. It contains a `level` (`LIVEBOARD`, * `TAB`, or `GROUP`) and, when `level` is `TAB` or `GROUP`, a * `targetId` with the GUID of the target. At `LIVEBOARD` level there * is no `targetId`, since the parameter applies to the whole Liveboard. * The `applicability` attribute is available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. * ```js * liveboardEmbed.on(EmbedEvent.ParameterChanged, (payload) => { * console.log('payload', payload); * // payload.data optionally includes applicability: { level, targetId } * }) * ``` * @version SDK: 1.29.0 | ThoughtSpot: 10.3.0.cl */ ParameterChanged = "parameterChanged", /** * Emits when a table visualization is rendered in * the ThoughtSpot embedded app. * * You can also use this event as a hook to trigger host events * such as `HostEvent.TransformTableVizData` on the table visualization. * The event payload contains the data used in the rendered table. * You can extract the relevant data from the payload * stored in `payload.data.data.columnDataLite`. * * `columnDataLite` is a multidimensional array that contains * data values for each column, which was used in the query to * generate the table visualization. To find and modify specific cell data, * you can either loop through the array or directly access a cell if * you know its position and data index. * * In the following code sample, the first cell in the first column * (`columnDataLite[0].dataValue[0]`) is set to `new fob`. * Note that any changes made to the data in the payload will only update the * visual presentation and do not affect the underlying data. * To persist data value modifications after a reload or during chart * interactions such as drill down, ensure that the modified * payload in the `columnDataLite` is passed on to * `HostEvent.TransformTableVizData` and trigger an update to * the table visualization. * * If the Row-Level Security (RLS) rules are applied on the * Model, exercise caution when changing column * or table cell values to maintain data security. * * @example * ```js * searchEmbed.on(EmbedEvent.TableVizRendered, (payload) => { * console.log(payload); * const columnDataLite = payload.data.data.columnDataLite; * columnDataLite[0].dataValue[0]="new fob"; * console.log('>>> new Data', columnDataLite); * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite); * }) * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl */ TableVizRendered = "TableVizRendered", /** * Emitted when the liveboard is created from pin modal or Liveboard list page. * You can use this event as a hook to trigger * other events on liveboard creation. * * ```js * liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl */ CreateLiveboard = "createLiveboard", /** * Emitted when a user creates a Model. * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl */ CreateModel = "createModel", /** * @hidden * Emitted when a user exits present mode. * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ ExitPresentMode = "exitPresentMode", /** * Emitted when a user requests the full height lazy load data. * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * @hidden */ RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates", /** * Emitted when Spotter response is text data * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterData, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ SpotterData = "SpotterData", /** * Emitted when user opens up the data source preview modal in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.PreviewSpotterData, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ PreviewSpotterData = "PreviewSpotterData", /** * Emitted when user opens up the Add to Coaching modal on any visualization in Spotter Embed. * @example * ```js * spotterEmbed.on(EmbedEvent.AddToCoaching, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl */ AddToCoaching = "addToCoaching", /** * Emitted when user opens up the data model instructions modal in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.DataModelInstructions, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl */ DataModelInstructions = "DataModelInstructions", /** * Emitted when the Spotter query is triggered in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterQueryTriggered, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ SpotterQueryTriggered = "SpotterQueryTriggered", /** * Emitted when the last Spotter query is edited in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.LastPromptEdited, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ LastPromptEdited = "LastPromptEdited", /** * Emitted when the last Spotter query is deleted in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.LastPromptDeleted, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ LastPromptDeleted = "LastPromptDeleted", /** * Emitted when the conversation is reset in Spotter embed. * @example * ```js * spotterEmbed.on(EmbedEvent.ResetSpotterConversation, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ ResetSpotterConversation = "ResetSpotterConversation", /** * Emitted when the *Spotter* is initialized. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterInit, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl */ SpotterInit = "spotterInit", /** * Emitted when a *Spotter* conversation has been successfully created. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl */ SpotterLoadComplete = "spotterLoadComplete", /** * @hidden * Triggers when the embed listener is ready to receive events. * This is used to trigger events after the embed container is loaded. * @example * ```js * liveboardEmbed.on(EmbedEvent.EmbedListenerReady, () => { * console.log('EmbedListenerReady'); * }) * ``` */ EmbedListenerReady = "EmbedListenerReady", /** * Emitted when the organization is switched. * @example * ```js * appEmbed.on(EmbedEvent.OrgSwitched, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl */ OrgSwitched = "orgSwitched", /** * Emitted before the embedded ThoughtSpot app sends a network request whose * fully resolved URL matches one of the `interceptUrls` in the view config. * The request is held until you call `responder`, which decides whether the * real request goes out or a response you supply is used in its place. * * Setting `interceptUrls` is what enables this; there is no separate enable * flag. If `responder` is not called within `interceptTimeout` (30000 ms by * default) the request fails and `EmbedEvent.Error` is emitted. * * The payload is `{ input, init, urlType }`, where `input` is the request * URL and `init` is the `fetch` init object, with `init.body` parsed into an * object when it is valid JSON. `urlType` is the matching * `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside * the recognized API groups. * * Interception wraps the outermost layer of `fetch`, so `init` holds the * request as the application composed it, before ThoughtSpot attaches its * authentication headers. Those headers, and any token refresh and retry, * are applied afterwards and only when you pass `execute: true`. Only * requests made through `fetch` are intercepted. * * Pass `execute: true` to let the original request proceed untouched, in * which case any `response` you supply alongside it is ignored. With * `execute: false` the request is never sent, and your `response.body` is * returned to the app as JSON, defaulting to status 200 and a * `Content-Type: application/json` header. * * Supported on all embed types. * * @example * * ```js * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { * console.log('payload', payload); * responder({ * data: { * execute: false, * error: { * errorText: 'Error Occurred', * } * } * }) * }) * ``` * * ```js * // We can also send a response for the intercepted api * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { * console.log('payload', payload); * responder({ * data: { * execute: false, * response: { * body: { * data: { * // Some api response * }, * } * } * } * }) * }) * * // here embed will use the response from the responder as the response for the api * ``` * * ```js * // We can also send error in response for the intercepted api * embed.on(EmbedEvent.ApiIntercept, (payload, responder) => { * console.log('payload', payload); * responder({ * data: { * execute: false, * response: { * body: { * errors: [{ * title: 'Error Occurred', * description: 'Error Description', * isUserError: true, * }], * data: {}, * }, * } * } * }) * }) * ``` * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl */ ApiIntercept = "ApiIntercept", /** * Emitted when a Spotter conversation is renamed. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationRenamed, (payload) => { * console.log('Conversation renamed', payload); * // payload: { convId: string, oldTitle: string, newTitle: string } * }) * ``` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl */ SpotterConversationRenamed = "spotterConversationRenamed", /** * Emitted when a Spotter conversation is deleted. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationDeleted, (payload) => { * console.log('Conversation deleted', payload); * // payload: { convId: string, title: string } * }) * ``` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl */ SpotterConversationDeleted = "spotterConversationDeleted", /** * Emitted when the header Share button is clicked. Fires `Start` then `End` * to bracket the interaction. App→host counterpart of the * `ShareSpotterConversation` host event (user-driven vs programmatic open). * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareConversationButtonHeaderClicked, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareConversationButtonHeaderClicked = "spotterShareConversationButtonHeaderClicked", /** * Emitted when the sidebar Share item is clicked. Fires `Start` then `End` * to bracket the interaction. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareConversationMenuItemSidebarClicked, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareConversationMenuItemSidebarClicked = "spotterShareConversationMenuItemSidebarClicked", /** * Emitted when a Spotter conversation is shared (recipients added, or a new * share created). The host builds its own link from shareId/convId + its * configured CONVERSATION_URL — no link string is sent. Distinct from * `SpotterShareModalConfirmButtonClicked`, which fires at click time before * the save resolves. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationShared, (payload) => { * // payload: { convId: string, shareId: string, * // recipientsAdded: string[], recipientsRemoved: string[] } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterConversationShared = "spotterConversationShared", /** * Emitted when access to a shared Spotter conversation is revoked * (recipients removed). `fullyRevoked` is true when the last sharee is removed * and the share is deleted entirely. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationShareRevoked, (payload) => { * // payload: { convId: string, shareId: string, * // recipientsRemoved: string[], fullyRevoked: boolean } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterConversationShareRevoked = "spotterConversationShareRevoked", /** * Emitted when a recipient opens a shared Spotter conversation (read-only * view). No shareId available viewer-side. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterSharedConversationViewed, (payload) => { * // payload: { convId: string, sourceConvId: string } * // convId = resolved snapshot conv id; sourceConvId = the shared URL id * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterSharedConversationViewed = "spotterSharedConversationViewed", /** * Emitted when the user toggles the share-modal "include new messages since * last shared version" checkbox. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareIncludeNewMessagesCheckboxToggled, (payload) => { * // payload: { convId: string, includeNewMessages: boolean } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareIncludeNewMessagesCheckboxToggled = "spotterShareIncludeNewMessagesCheckboxToggled", /** * Emitted when the user dismisses the stale-snapshot info banner via its * cross (distinct from the include-new-messages checkbox toggle). * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareStaleInfoBannerDismissed, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareStaleInfoBannerDismissed = "spotterShareStaleInfoBannerDismissed", /** * Emitted when the modal Share (confirm) button is clicked — fires at click * time, before the save resolves. Distinct from the `SpotterConversationShared` * / `SpotterConversationShareRevoked` result events. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareModalConfirmButtonClicked, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareModalConfirmButtonClicked = "spotterShareModalConfirmButtonClicked", /** * Emitted when the share modal is dismissed via the Cancel button. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterShareModalCancelButtonClicked, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareModalCancelButtonClicked = "spotterShareModalCancelButtonClicked", /** * Emitted when a recipient leaves the read-only shared view via the Exit * button. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterSharedConversationExitButtonClicked, (payload) => { * // payload: { convId: string } * }) * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterSharedConversationExitButtonClicked = "spotterSharedConversationExitButtonClicked", /** * Emitted when a Spotter conversation is pinned. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationPinned, (payload) => { * console.log('Conversation pinned', payload); * // payload: { conversationId: string, pinnedAt: string (ISO 8601) } * }) * ``` */ SpotterConversationPinned = "spotterConversationPinned", /** * Emitted when a Spotter conversation is unpinned. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationUnpinned, (payload) => { * console.log('Conversation unpinned', payload); * // payload: { conversationId: string, unpinnedAt: string (ISO 8601) } * }) * ``` */ SpotterConversationUnpinned = "spotterConversationUnpinned", /** * Emitted when a Spotter conversation is selected/clicked. * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterConversationSelected, (payload) => { * console.log('Conversation selected', payload); * // payload: { convId: string, title: string, worksheetId: string } * }) * ``` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl */ SpotterConversationSelected = "spotterConversationSelected", /** * Emitted when the Spotter agent finishes streaming/rendering a response. * Includes the conversation and message identifiers so the host app can * fetch the full conversation history via the REST API if needed. * * The payload data has the shape `{ convId: string, messageId: string }`. * * Works with SpotterEmbed as well as AppEmbed (when Spotter is reached * inside the full application). * @example * ```js * spotterEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => { * console.log('Spotter response complete', payload); * }) * ``` * @example * ```js * appEmbed.on(EmbedEvent.SpotterResponseComplete, (payload) => { * console.log('Spotter response complete', payload); * }) * ``` * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterResponseComplete = "spotterResponseComplete", /** * @hidden * Emitted when the auth token is about to get expired and needs to be refreshed. * @example * ```js * embed.on(EmbedEvent.RefreshAuthToken, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl */ RefreshAuthToken = "RefreshAuthToken", /** * Triggered whenever the page context changes, returning the current context along with the navigation stack. * @example * ```js * embed.on(EmbedEvent.EmbedPageContextChanged, (payload) => { * console.log('payload', payload); * }) * ``` * @version SDK: 1.47.2 | ThoughtSpot: 26.3.0.cl */ EmbedPageContextChanged = "EmbedPageContextChanged", /** * Represents a special embed event that is triggered whenever any host event is * subscribed. * * You can listen to this event when you need to dispatch a host event during load or * render, particularly in situations where timing issues may occur. * * @example * ```js * embed.on(`${HostEvent.Save} Subscribed`, () => { * // make action * }); * ``` * * @example * ```js * embed.on(subscribedEvent(HostEvent.Save), () => { * // make action * }); * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.4.0.cl */ Subscribed = "Subscribed", /** * Emitted when a user clicks the **Send Test Email** button in the * Liveboard schedule modal. Requires `isSendNowLiveboardSchedulingEnabled` * to be enabled. * @example * ```js * liveboardEmbed.on(EmbedEvent.SendTestScheduleEmail, (payload) => { * console.log('Send test email', payload); * // payload: { liveboardId: string, sendToSelf: boolean } * }) * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SendTestScheduleEmail = "sendTestScheduleEmail", /** * Emitted when the SpotterViz panel mounts in embed mode. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => { * console.log('SpotterViz initialized', payload); * // payload: { liveboardId: string } * }) * ``` */ SpotterVizInit = "SpotterVizInit", /** * Emitted when the user submits a prompt in the SpotterViz panel. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => { * console.log('SpotterViz query triggered', payload); * // payload: { query: string, sessionId: string } * }) * ``` */ SpotterVizQueryTriggered = "SpotterVizQueryTriggered", /** * Emitted when the SpotterViz agent finishes responding. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => { * console.log('SpotterViz response complete', payload); * // payload: { sessionId: string, messageId: string } * }) * ``` */ SpotterVizResponseComplete = "SpotterVizResponseComplete", /** * Emitted when a checkpoint is created in the SpotterViz panel. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => { * console.log('SpotterViz checkpoint created', payload); * // payload: { checkpointId: string, source: string, label: string } * }) * ``` */ SpotterVizCheckpointCreated = "SpotterVizCheckpointCreated", /** * Emitted when a checkpoint is restored in the SpotterViz panel. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => { * console.log('SpotterViz checkpoint restored', payload); * // payload: { checkpointId: string, newGenNumber: number } * }) * ``` */ SpotterVizCheckpointRestored = "SpotterVizCheckpointRestored", /** * Emitted when an error occurs in the SpotterViz panel. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => { * console.log('SpotterViz error', payload); * }) * ``` */ SpotterVizError = "SpotterVizError", /** * Emitted when the SpotterViz panel is closed. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => { * console.log('SpotterViz panel closed', payload); * }) * ``` */ SpotterVizClosed = "SpotterVizClosed", /** * Emitted when a user clicks the **Refresh** button in the * Liveboard header. Requires `enableLiveboardDataCache` * to be enabled. * @example * ```js * liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => { * console.log('Liveboard browser cache refreshed', payload); * // payload: { liveboardId: string } * }) * ``` * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl */ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache" } /** * Event types that can be triggered by the host application * to the embedded ThoughtSpot app. * * To trigger an event use the corresponding * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link * SearchEmbed.trigger} method. * @example * ```js * import { HostEvent } from '@thoughtspot/visual-embed-sdk'; * // Or * // const { HostEvent } = window.tsembed; * * // create the liveboard embed. * * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [ * { columnName: 'state', operator: RuntimeFilterOp.EQ, values: ["california"]} * ]); * ``` * @example * If using React components to embed, use the format shown in this example: * * ```js * const selectVizs = () => { * embedRef.current.trigger(HostEvent.SetVisibleVizs, [ * "715e4613-c891-4884-be44-aa8d13701c06", * "3f84d633-e325-44b2-be25-c6650e5a49cf" * ]); * }; * ``` * * * You can also attach an Embed event to a Host event to trigger * a specific action as shown in this example: * @example * ```js * const EmbeddedComponent = () => { * const embedRef = useRef(null); // import { useRef } from react * const onLiveboardRendered = () => { * embedRef.current.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']); * }; * * return ( * * ); * } * ``` * * **Context Parameter (SDK: 1.45.2+)** * * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a * `ContextType` as the third parameter to the `trigger` method to specify the context * from which the event is triggered. This helps ThoughtSpot understand the current page * context (Search, Answer, Liveboard, or Spotter) for better event handling. * * @example * ```js * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk'; * * // Trigger Pin event with Search context * appEmbed.trigger(HostEvent.Pin, { * vizId: "123", * liveboardId: "456" * }, ContextType.Search); * ``` * * @group Events */ export declare enum HostEvent { /** * Triggers a search operation with the search tokens specified in * the search query string. * Supported in `AppEmbed` and `SearchEmbed` deployments. * Includes the following properties: * Payload: {@link SearchRequest}. * @param - Includes the following keys: * - `searchQuery`: Query string with search tokens. * - `dataSources`: Data source GUID to search on. * Although an array, only a single source is supported. * - `execute`: Executes search and updates the existing query. * @example * ```js * searchEmbed.trigger(HostEvent.Search, { searchQuery: "[sales] by [item type]", dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"], execute: true }); * ``` * @example * ```js * // Trigger search from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Search, { * searchQuery: "[revenue] by [region]", * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"], * execute: true * }, ContextType.Search); * ``` */ Search = "search", /** * Triggers a drill on certain points of the specified column * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context * enforced next release. * Includes the following properties: * @param - Includes the following keys: * - `points`: An object containing `selectedPoints` and/or `clickedPoint` * to drill to. For example, `{ selectedPoints: [] }`. * - `columnGuid`: Optional. GUID of the column to drill by. If not provided, * it will auto drill by the configured column. * - `autoDrillDown`: Optional. If `true`, the drill down will be done automatically * on the most popular column. * - `vizId` (TS >= 9.8.0): Optional. The GUID of the visualization to drill in case * of a Liveboard. In Spotter embed, `vizId` refers to the Answer ID and is * **required**. * @example * ```js * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => { * console.log(payload); * const clickedPoint = payload.data.clickedPoint; * const selectedPoint = payload.data.selectedPoints; * console.log('>>> called', clickedPoint); * searchEmbed.trigger(HostEvent.DrillDown, { * points: { * clickedPoint, * selectedPoints: selectedPoint * }, * autoDrillDown: true, * }); * }) * ``` * @example * ```js * // Works with TS 9.8.0 and above * * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => { * console.log(payload); * const clickedPoint = payload.data.clickedPoint; * const selectedPoint = payload.data.selectedPoints; * console.log('>>> called', clickedPoint); * liveboardEmbed.trigger(HostEvent.DrillDown, { * points: { * clickedPoint, * selectedPoints: selectedPoint * }, * columnGuid: "", * vizId: payload.data.vizId * }); * }) * ``` * @example * ```js * // Drill down from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.DrillDown, { * points: { clickedPoint, selectedPoints }, * autoDrillDown: true * }, ContextType.Answer); * ``` * @example * ```js * // Drill down from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.DrillDown, { * points: { clickedPoint, selectedPoints }, * columnGuid: "column-guid" * }, ContextType.Search); * ``` * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 */ DrillDown = "triggerDrillDown", /** * Apply filters * @hidden */ Filter = "filter", /** * Reload the Answer or visualization * @hidden */ Reload = "reload", /** * Get iframe URL for the current embed view. * Payload: none. * Response: {@link GetIframeUrlResponse}. * @example * ```js * const url = embed.trigger(HostEvent.GetIframeUrl); * console.log("iFrameURL",url); * ``` * @example * ```js * // Get iframe URL from specific context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer); * console.log("iFrameURL", url); * ``` * @returns iframeUrl - The URL currently loaded in the embedded iframe. * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl */ GetIframeUrl = "GetIframeUrl", /** * Display specific visualizations on a Liveboard. * Payload: `string[]`. * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed * in this parameter will be hidden. * @example * ```js * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [ * '730496d6-6903-4601-937e-2c691821af3c', * 'd547ec54-2a37-4516-a222-2b06719af726']) * ``` * @example * ```js * // Set visible vizs from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [ * '730496d6-6903-4601-937e-2c691821af3c', * 'd547ec54-2a37-4516-a222-2b06719af726' * ], ContextType.Liveboard); * ``` * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw */ SetVisibleVizs = "SetPinboardVisibleVizs", /** * Set a Liveboard tab as an active tab. * Payload: {@link SetActiveTabRequest}. * @param - tabId - string of id of Tab to show * @example * ```js * liveboardEmbed.trigger(HostEvent.SetActiveTab,{ * tabId:'730496d6-6903-4601-937e-2c691821af3c' * }) * ``` * @example * ```js * // Set active tab from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SetActiveTab, { * tabId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw */ SetActiveTab = "SetActiveTab", /** * Updates the runtime filters applied on a Liveboard. The filter * attributes passed with this event are appended to the existing runtime * filters applied on a Liveboard. * * **Note**: `HostEvent.UpdateRuntimeFilters` is supported in `LiveboardEmbed` * and `AppEmbed` only. In full application embedding, this event updates * the runtime filters applied on the Liveboard and saved Answer objects. * * Payload: {@link RuntimeFilter}[]. * @param - Array of {@link RuntimeFilter} objects. Each item includes: * - `columnName`: Name of the column to filter on. * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see * link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation]. * - `values`: List of operands. Some operators such as EQ and LE allow a single * value, whereas BW and IN accept multiple values. * * **Note**: Updating runtime filters resets the ThoughtSpot * object to its original state and applies new filter conditions. * Any user changes (like drilling into a visualization) * will be cleared, restoring the original visualization * with the updated filters. * * @example * ```js * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [ * {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]}, * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]} * ]) * ``` * @example * ```js * // Update runtime filters from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]}, * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]} * ], ContextType.Liveboard); * ``` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw * @important */ UpdateRuntimeFilters = "UpdateRuntimeFilters", /** * Navigate to a specific page in the embedded ThoughtSpot application. * This is the same as calling `appEmbed.navigateToPage(path, true)`. * * Accepts either a plain value or an object with `path` * and an optional `replace` flag. * * Payload: `string` | `number` | {@link NavigateRequest}. * @param data - A string path, a numeric history delta, or an object * `{ path: string | number, replace?: boolean }`. * - `path` — the route to navigate to, or a history delta such as `1` * or `-1` (calls `window.history.go()`). * - `replace` — when `true`, replaces the current history entry instead * of pushing a new one (uses `window.location.replace`). * * @example * ```js * // Preferred: use navigateToPage directly * appEmbed.navigateToPage(-1); * * // Numeric delta — go back one step * appEmbed.trigger(HostEvent.Navigate, -1); * * // String path — push a new history entry * appEmbed.trigger(HostEvent.Navigate, 'home'); * * // Object format — replace current history entry * appEmbed.trigger(HostEvent.Navigate, { path: 'home', replace: true }); // SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * ``` * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw */ Navigate = "Navigate", /** * Open the filter panel for a particular column. * Works with Search and Liveboard embed. * Payload: {@link OpenFilterRequest} (the cross-context superset). The * accepted fields vary by context: {@link OpenFilterLiveboardRequest}, * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}. * @param - { columnId: string, * name: string, * type: ATTRIBUTE/MEASURE, * dataType: INT64/CHAR/DATE } * * `applicability` - Optional. Scopes the filter to a specific target, * for example, a single Liveboard tab, so the panel for the correct * scoped filter is opened. Available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. Includes the following attributes: * * - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`. * - `targetId`: The GUID of the target, for example, the tab GUID. * Required when `level` is `TAB` or `GROUP`. Do not pass it when * `level` is `LIVEBOARD`, since the filter applies to the whole * Liveboard. Omitting `applicability` targets the `LIVEBOARD` level. * @example * ```js * searchEmbed.trigger(HostEvent.OpenFilter, * {column: { columnId: '', name: 'column name', type: 'ATTRIBUTE', dataType: 'INT64'}}) * ``` * @example * ```js * LiveboardEmbed.trigger(HostEvent.OpenFilter, * { column: {columnId: ''}}) * ``` * @example * ```js * // Open a filter scoped to a specific Liveboard tab * liveboardEmbed.trigger(HostEvent.OpenFilter, { * column: { columnId: '' }, * applicability: { level: 'TAB', targetId: '' } * }); * ``` * @example * ```js * // Open filter from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.OpenFilter, { * column: { columnId: '', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'} * }, ContextType.Search); * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl */ OpenFilter = "openFilter", /** * Open the add-filter modal of a Liveboard, the same dialog that the * *Add filter* button in the Liveboard edit header opens, so the host * app can start the add-filter flow from its own UI. * * The Liveboard must be in edit mode; the event is ignored otherwise. * Hiding the *Add filter* button with `hiddenActions: * [Action.AddFilter]` does not block this event, but disabling it with * `disabledActions` does. * * Unlike {@link HostEvent.OpenFilter}, which opens the panel of an * existing filter, this event starts the creation of a new filter. * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * liveboardEmbed.trigger(HostEvent.OpenAddFilterModal); * ``` */ OpenAddFilterModal = "openAddFilterModal", /** * Open the add-parameter panel of a Liveboard, the same panel that the * *Add parameter* button in the Liveboard edit header opens. * Mirrors {@link HostEvent.OpenAddFilterModal} for parameters. * * The Liveboard must be in edit mode; the event is ignored otherwise. * Hiding the *Add parameter* button with `hiddenActions: * [Action.AddParameter]` does not block this event, but disabling it * with `disabledActions` does. * @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * liveboardEmbed.trigger(HostEvent.OpenAddParameterModal); * ``` */ OpenAddParameterModal = "openAddParameterModal", /** * Open the parameter panel for a particular parameter on a Liveboard. * Mirrors {@link HostEvent.OpenFilter} for parameters. * Payload: {@link OpenParameterRequest}. * @param - Includes the following keys: * - `parameter`: An object identifying the parameter to open, for * example, `{ parameterId: '' }`. * - `applicability`: Optional. Scopes the parameter to a specific target, * for example, a single Liveboard tab, so the panel for the correct * scoped parameter is opened. Includes the following attributes: * * - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`. * - `targetId`: The GUID of the target, for example, the tab GUID. * Required when `level` is `TAB` or `GROUP`. Do not pass it when * `level` is `LIVEBOARD`, since the parameter applies to the whole * Liveboard. Omitting `applicability` targets the `LIVEBOARD` level. * @example * ```js * liveboardEmbed.trigger(HostEvent.OpenParameter, { * parameter: { parameterId: '' } * }); * ``` * @example * ```js * // Open a parameter scoped to a specific group * liveboardEmbed.trigger(HostEvent.OpenParameter, { * parameter: { parameterId: '' }, * applicability: { level: 'GROUP', targetId: '' } * }); * ``` * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl */ OpenParameter = "openParameter", /** * Add columns to the current search query. * Payload: `{ columnIds: string[] }`. * @param - { columnIds: string[] } * @example * ```js * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['',''] }) * ``` * @example * ```js * // Add columns from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.AddColumns, { * columnIds: ['col-guid-1', 'col-guid-2'] * }, ContextType.Search); * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl */ AddColumns = "addColumns", /** * Remove a column from the current search query. * Payload: `{ columnId: string }`. * @param - { columnId: string } * @example * ```js * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '' }) * ``` * @example * ```js * // Remove column from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.RemoveColumn, { * columnId: 'column-guid' * }, ContextType.Search); * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl */ RemoveColumn = "removeColumn", /** * Get the transient state of a Liveboard as encoded content. * This includes unsaved and ad hoc changes such as * Liveboard filters, runtime filters applied on visualizations on a * Liveboard, and Liveboard layout, changes to visualizations such as * sorting, toggling of legends, and data drill down. * For more information, see * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes]. * Payload: none. * Response: {@link GetExportRequestForCurrentPinboardResponse}. * @example * ```js * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then( * data=>console.log(data)) * ``` * @returns data - Object with a `v2Content` string: the export request * payload for the current Liveboard. * @returns type - The passthrough event name, * `getExportRequestForCurrentPinboard`. * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw */ getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard", /** * Trigger **Pin** action on an embedded object. * If no parameters are defined, the pin action is triggered * for the Answer that the user is currently on * and a modal opens for Liveboard selection. * To add an Answer or visualization to a Liveboard programmatically without * requiring additional user input via the *Pin to Liveboard* modal, define * the following parameters: * * Payload: {@link PinAnswerToLiveboardRequest}. * Response: {@link PinAnswerToLiveboardResponse}. * @param - Includes the following keys: * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a * Liveboard. * Optional when pinning a new chart or table generated from a Search query. * **Required** in Spotter Embed. * - `liveboardId`: GUID of the Liveboard to pin an Answer. If there is no Liveboard, * specify the `newLiveboardName` parameter to create a new Liveboard. * - `tabId`: GUID of the Liveboard tab. Adds the Answer to the Liveboard tab * specified in the code. * - `newVizName`: Name string for the Answer or visualization. If defined, * this parameter adds a new visualization object or creates a copy of the * Answer or visualization specified in `vizId`. * Required. * - `newLiveboardName`: Name string for the Liveboard. * Creates a new Liveboard object with the specified name. * - `newTabName`: Name of the tab. Adds a new tab Liveboard specified * in the code. * * @example * ```js * const pinResponse = await appEmbed.trigger(HostEvent.Pin, { * vizId: "123", * newVizName: "Sales by region", * liveboardId: "123", * tabId: "123" * }); * ``` * @example * ```js * const pinResponse = await appEmbed.trigger(HostEvent.Pin, { * newVizName: "Total sales of Jackets", * liveboardId: "123" * }); * ``` * * @example * ```js * const pinResponse = await searchEmbed.trigger(HostEvent.Pin, { * newVizName: "Sales by state", * newLiveboardName: "Sales", * newTabName: "Products" * }); * ``` * @example * ```js * appEmbed.trigger(HostEvent.Pin) * ``` * @example * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Using context parameter to specify the context type (SDK: 1.45.2+) * // Pin from a search answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Pin, { * vizId: "123", * newVizName: "Sales by region", * liveboardId: "456" * }, ContextType.Search); * ``` * @example * ```js * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+) * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Pin, { * vizId: "789", * newVizName: "Revenue trends", * liveboardId: "456" * }, ContextType.Answer); * ``` * @example * ```js * // Pin from a spotter context (SDK: 1.45.2+) * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Pin, { * vizId: latestSpotterVizId, * newVizName: "AI-generated insights", * liveboardId: "456" * }, ContextType.Spotter); * ``` * * @returns liveboardId - GUID of the Liveboard the Answer was pinned to. * @returns tabId - GUID of the tab within that Liveboard. * @returns vizId - GUID of the newly created visualization. * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ Pin = "pin", /** * Trigger the **Show Liveboard details** action * on an embedded Liveboard. * @example * ```js * liveboardEmbed.trigger(HostEvent.LiveboardInfo) *``` * @example * ```js * // Show liveboard info from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ LiveboardInfo = "pinboardInfo", /** * Trigger the **Schedule** action on an embedded Liveboard. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.Schedule) * ``` * @example * ```js * // Schedule from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ Schedule = "subscription", /** * Trigger the **Manage schedule** action on an embedded Liveboard * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.SchedulesList) * ``` * @example * ```js * // Manage schedules from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SchedulesList, {}, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ SchedulesList = "schedule-list", /** * Trigger the **Export TML** action on an embedded Liveboard or * Answer. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.ExportTML) * ``` * @example * ```js * // Export TML from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard); * ``` * @example * ```js * // Export TML from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ ExportTML = "exportTSL", /** * Trigger the **Edit TML** action on an embedded Liveboard or * saved Answers in the full application embedding. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.EditTML) * ``` * @example * ```js * // Edit TML from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard); * ``` * @example * ```js * // Edit TML from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ EditTML = "editTSL", /** * Trigger the **Update TML** action on an embedded Liveboard. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.UpdateTML) * ``` * @example * ```js * // Update TML from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ UpdateTML = "updateTSL", /** * Trigger the **Download PDF** action on an embedded Liveboard, * visualization or Answer. * * Payload: {@link VizScopedRequest} plus optional `liveboardId`. * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed. * * **NOTE**: The **Download** > **PDF** action is available on * visualizations and Answers if the data is in tabular format. * @example * ```js * liveboardEmbed.trigger(HostEvent.DownloadAsPdf) * ``` * @example * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Download as PDF from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search); * ``` * @example * ```js * // Download as PDF from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard); * ``` * * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ DownloadAsPdf = "downloadAsPdf", /** * Trigger the **Download Liveboard as Continuous PDF** action on an * embedded Liveboard. * * @example * ```js * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF) * ``` * * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF", /** * Trigger the **AI Highlights** action on an embedded Liveboard * * Payload: none. * @example * ```js * liveboardEmbed.trigger(HostEvent.AIHighlights) * ``` * @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl */ AIHighlights = "AIHighlights", /** * Trigger the **Make a copy** action on a Liveboard, * visualization, or Answer page. * @example * ```js * liveboardEmbed.trigger(HostEvent.MakeACopy) * ``` * @example * ```js * liveboardEmbed.trigger(HostEvent.MakeACopy, { * vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * @example * ```js * vizEmbed.trigger(HostEvent.MakeACopy) * ``` * @example * ```js * searchEmbed.trigger(HostEvent.MakeACopy) * ``` * @example * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Make a copy from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer); * ``` * @example * ```js * // Make a copy from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ MakeACopy = "makeACopy", /** * Trigger the **Delete** action for a Liveboard. * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId * required), {@link VizScopedRequest} (Search). trigger() accepts the union * now; per-context enforced next release. * @example * ```js * appEmbed.trigger(HostEvent.Remove) * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw * @example * ```js * liveboardEmbed.trigger(HostEvent.Remove) * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw */ Remove = "delete", /** * Trigger the **Explore** action on a visualization. * Payload: {@link RequiredVizRequest}. * @param - an object with `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * @example * ```js * // Explore from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Explore, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ Explore = "explore", /** * Trigger the **Create alert** action on a KPI chart * in a Liveboard or saved Answer. * Payload: {@link VizScopedRequest}. * @param - an object with `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.CreateMonitor, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }) * ``` * @example * ```js * searchEmbed.trigger(HostEvent.CreateMonitor) * ``` * @example * ```js * // Create monitor from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer); * ``` * @example * ```js * // Create monitor from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.CreateMonitor, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ CreateMonitor = "createMonitor", /** * Trigger the **Manage alerts** action on a KPI chart * in a visualization or saved Answer. * Payload: {@link VizScopedRequest}. * @param - an object with `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.ManageMonitor, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }) * ``` * @example * ```js * searchEmbed.trigger(HostEvent.ManageMonitor) * ``` * @example * ```js * vizEmbed.trigger(HostEvent.ManageMonitor) * ``` * @example * ```js * // Manage monitor from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer); * ``` * @example * ```js * // Manage monitor from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.ManageMonitor, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ ManageMonitor = "manageMonitor", /** * Trigger the **Edit** action on a Liveboard or a visualization * on a Liveboard. * * This event is not supported in visualization embed and search embed. * Payload: {@link VizScopedRequest}. * @param - Object parameter. Includes the following keys: * - `vizId`: To trigger the action for a specific visualization in Liveboard embed, * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and * is **required**. * * @example * ```js * liveboardEmbed.trigger(HostEvent.Edit) * ``` * ```js * liveboardEmbed.trigger(HostEvent.Edit, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * @example * ```js * spotterEmbed.trigger(HostEvent.Edit); * ``` * @example * ```js * // Using context parameter to edit liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard); * ``` * @example * ```js * // Edit from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search); * ``` * * @example * ```js * // Edit from spotter context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Edit, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Spotter); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ Edit = "edit", /** * Trigger the **Copy link** action on a Liveboard or visualization * Payload: {@link VizScopedRequest}. * @param - object - to trigger the action for a * specific visualization in Liveboard embed, pass in `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.CopyLink) * ``` * ```js * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.CopyLink) * ``` * @example * ```js * // Copy link from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard); * ``` * @example * ```js * // Copy link from liveboard visualization context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.CopyLink, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @example * ```js * // Copy link from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard); * ``` * @example * ```js * // Copy link from liveboard visualization context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.CopyLink, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ CopyLink = "embedDocument", /** * Trigger the **Present** action on a Liveboard or visualization * Payload: {@link VizScopedRequest}. * @param - object - to trigger the action for a specific visualization * in Liveboard embed, pass in `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.Present) * ``` * ```js * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.Present) * ``` * @example * ```js * // Present from liveboard visualization context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Present, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @example * ```js * // Present from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard); * ``` * @example * ```js * // Present from liveboard visualization context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Present, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @example * ```js * // Present from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard); * ``` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw */ Present = "present", /** * Get TML for the current search. * Payload: {@link GetTMLRequest}. * Response: `Record`. * @example * ```js * searchEmbed.trigger(HostEvent.GetTML).then((tml) => { * console.log( * tml.answer.search_query // TML representation of the search query * ); * }) * ``` * @example * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetTML host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.GetTML, { * vizId: latestSpotterVizId * }).then((tml) => { * console.log( * tml.answer.search_query // TML representation of the search query * ); * }) * ``` * @example * ```js * // Get TML from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => { * console.log(tml.answer.search_query); * }); * ``` * @example * ```js * // Get TML from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => { * console.log(tml.answer); * }); * ``` * @returns The TML representation of the current Answer, as an object. * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw * @important */ GetTML = "getTML", /** * Trigger the **Show underlying data** action on a * chart or table. * * Payload: {@link VizScopedRequest}. * @param - an object with vizId as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.ShowUnderlyingData) * ``` * ```js * searchEmbed.trigger(HostEvent.ShowUnderlyingData) * ``` * @example * ```js * // Show underlying data from liveboard visualization context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.ShowUnderlyingData, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @example * ```js * // Show underlying data from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ ShowUnderlyingData = "showUnderlyingData", /** * Trigger the **Delete** action for a visualization * in an embedded Liveboard, or a chart or table * generated from Search. * Payload: {@link VizScopedRequest}. * @param - Liveboard embed takes an object with `vizId` as a key. * Can be left empty if embedding Search or visualization. * @example * ```js * liveboardEmbed.trigger(HostEvent.Delete, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * searchEmbed.trigger(HostEvent.Delete) * ``` * @example * ```js * // Delete from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard); * ``` * @example * ```js * // Delete from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ Delete = "onDeleteAnswer", /** * Trigger the **SpotIQ analyze** action on a * chart or table. * Payload: {@link VizScopedRequest}. * @param - Liveboard embed takes `vizId` as a * key. Can be left undefined when embedding Search or * visualization. * @example * ```js * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.SpotIQAnalyze) * ``` * ```js * searchEmbed.trigger(HostEvent.SpotIQAnalyze) * ``` * @example * ```js * // SpotIQ analyze from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search); * ``` * @example * ```js * // SpotIQ analyze from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ SpotIQAnalyze = "spotIQAnalyze", /** * Trigger the **Download** action on charts in * the embedded view. * Use {@link HostEvent.DownloadAsPng} instead. * * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw * * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed. * @example * ```js * liveboardEmbed.trigger(HostEvent.Download, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * embed.trigger(HostEvent.Download) * ``` * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId }); * ``` */ Download = "downloadAsPng", /** * Trigger the **Download** > **PNG** action on * charts in the embedded view. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.DownloadAsPng, * {vizId:'730496d6-6903-4601-937e-2c691821af3c'}) * * vizEmbed.trigger(HostEvent.DownloadAsPng) * * searchEmbed.trigger(HostEvent.DownloadAsPng) * * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Download as PNG from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search); * ``` * * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw */ DownloadAsPng = "downloadAsPng", /** * Trigger the **Download** > **CSV** action on tables in * the embedded view. * Payload: {@link VizScopedRequest}. * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed. * @example * ```js * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.DownloadAsCsv) * ``` * ```js * searchEmbed.trigger(HostEvent.DownloadAsCsv) * ``` * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Download as CSV from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search); * ``` * @example * ```js * // Download as CSV from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ DownloadAsCsv = "downloadAsCSV", /** * Trigger the **Download** > **XLSX** action on tables * in the embedded view. * Payload: {@link VizScopedRequest}. * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed. * @example * ```js * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.DownloadAsXlsx) * ``` * ```js * searchEmbed.trigger(HostEvent.DownloadAsXlsx) * ``` * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Download as XLSX from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer); * ``` * @example * ```js * // Download as XLSX from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ DownloadAsXlsx = "downloadAsXLSX", /** * Trigger the **Share** action on an embedded * Liveboard or Answer. * Payload: {@link VizScopedRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.Share) * ``` * ```js * searchEmbed.trigger(HostEvent.Share) * ``` * @example * ```js * // Share from Liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard); * ``` * @example * ```js * // Share from search-answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ Share = "share", /** * Trigger the **Save** action on a Liveboard, Answer, or Spotter. * Saves the changes. * * Payload: {@link VizScopedRequest}. * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed. * It is required and can be retrieved from the data embed event. * * @example * ```js * // Save changes in a Liveboard * liveboardEmbed.trigger(HostEvent.Save) * ``` * * ```js * // Save the current Answer in Search embed * searchEmbed.trigger(HostEvent.Save) * ``` * * ```js * // Save a Visualization in Spotter (requires vizId) * spotterEmbed.trigger(HostEvent.Save, { * vizId: "730496d6-6903-4601-937e-2c691821af3c" * }) * ``` * * ```js * // How to get the vizId in Spotter? * * // You can use the Data event dispatched on each answer creation to get the vizId. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Save from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer); * ``` * @example * ```js * // Save from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search); * ``` * * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ Save = "save", /** * Trigger the **Sync to Sheets** action on an embedded visualization or Answer * Sends data from an Answer or Liveboard visualization to a Google sheet. * Payload: {@link VizScopedRequest}. * @param - an object with `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.SyncToSheets) * ``` * @example * ```js * // Sync to sheets from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer); * ``` * @example * ```js * // Sync to sheets from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SyncToSheets, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ SyncToSheets = "sync-to-sheets", /** * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer * Sends data from an Answer or Liveboard visualization to third-party apps such * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on. * Payload: {@link VizScopedRequest}. * @param - an object with vizId as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.SyncToOtherApps) * ``` * @example * ```js * // Sync to other apps from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer); * ``` * @example * ```js * // Sync to other apps from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ SyncToOtherApps = "sync-to-other-apps", /** * Trigger the **Manage pipelines** action on an embedded * visualization or Answer. * Allows users to manage ThoughtSpot Sync pipelines. * Payload: {@link VizScopedRequest}. * @param - an object with `vizId` as a key * @example * ```js * liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: * '730496d6-6903-4601-937e-2c691821af3c'}) * ``` * ```js * vizEmbed.trigger(HostEvent.ManagePipelines) * ``` * @example * ```js * // Manage pipelines from answer context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer); * ``` * @example * ```js * // Manage pipelines from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.ManagePipelines, { * vizId: '730496d6-6903-4601-937e-2c691821af3c' * }, ContextType.Liveboard); * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw */ ManagePipelines = "manage-pipeline", /** * Reset search operation on the Search or Answer page. * Payload: none. * @example * ```js * searchEmbed.trigger(HostEvent.ResetSearch) * ``` * ```js * appEmbed.trigger(HostEvent.ResetSearch) * ``` * @example * ```js * // Reset search from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search); * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw */ ResetSearch = "resetSearch", /** * Get details of filters applied on the Liveboard. * Returns arrays containing Liveboard filter and runtime filter elements. * Each Liveboard filter includes an optional `applicability` attribute * indicating the scope of the filter. It contains a `level` * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD` * level there is no `targetId`, since the filter applies to the * whole Liveboard. * The `applicability` attribute is available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. * Payload: {@link GetFiltersRequest}. * Response: {@link GetFiltersResponse}. * @example * ```js * const data = await liveboardEmbed.trigger(HostEvent.GetFilters); * console.log('data', data); * ``` * @example * ```js * // Get filters from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard); * console.log('filters', data); * ``` * @returns liveboardFilters - Filters applied on the Liveboard. * @returns runtimeFilters - Runtime filters applied on the Liveboard. * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl */ GetFilters = "getFilters", /** * Update one or several filters applied on a Liveboard. * Payload: {@link UpdateFiltersRequest}. * @param - Includes the following keys: * - `filter`: A single filter object containing column name, filter operator, and * values. * - `filters`: Multiple filter objects with column name, filter operator, * and values for each. * * Each filter object must include the following attributes: * * `column` - Name of the column to filter on. * * `oper` - Filter operator, for example, EQ, IN, CONTAINS. * For information about the supported filter operators, * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation]. * * `values` - An array of one or several values. The value definition on the * data type you choose to filter on. For a complete list of supported data types, * see * link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Supported * data types]. * * `type` - To update filters for date time, specify the date format type. * For more information and examples, see link:https://developers.thoughtspot.com/docs/embed-liveboard#_date_filters[Date filters]. * * `applicability` - Optional. Scopes the filter to a specific target, * for example, a single Liveboard tab. Available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. Includes the following attributes: * * - `level`: The scope of the filter: `LIVEBOARD`, `TAB`, or `GROUP`. * - `targetId`: The GUID of the target, for example, the tab GUID. * Required when `level` is `TAB` or `GROUP`. Do not pass it when * `level` is `LIVEBOARD`, since the filter applies to the whole * Liveboard. * @example * ```js * * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filter: { * column: "item type", * oper: "IN", * values: ["bags","shirts"] * } * }); * ``` * @example * ```js * * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filter: { * column: "date", * oper: "EQ", * values: ["JULY","2023"], * type: "MONTH_YEAR" * } * }); * ``` * @example * * ```js * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filters: [{ * column: "Item Type", * oper: 'IN', * values: ["bags","shirts"] * }, * { * column: "Region", * oper: 'IN', * values: ["West","Midwest"] * }, * { * column: "Date", * oper: 'EQ', * values: ["2023-07-31"], * type: "EXACT_DATE" * }] * }); * ``` * If there are multiple columns with the same name, consider * using `WORKSHEET_NAME::COLUMN_NAME` format. * * @example * * ```js * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filters: [{ * column: "(Sample) Retail - Apparel::city", * oper: 'IN', * values: ["atlanta"] * }, * { * column: "(Sample) Retail - Apparel::Region", * oper: 'IN', * values: ["West","Midwest"] * }] * }); * ``` * @example * ```js * // Update filters from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filter: { * column: "item type", * oper: "IN", * values: ["shoes", "boots"] * } * }, ContextType.Liveboard); * ``` * @example * ```js * // Scope the filter to a specific Liveboard tab * liveboardEmbed.trigger(HostEvent.UpdateFilters, { * filter: { * column: "item type", * oper: "IN", * values: ["bags", "shirts"], * applicability: { * level: "TAB", * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058" * } * } * }); * ``` * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl */ UpdateFilters = "updateFilters", /** * Get tab details for the current Liveboard. * Payload: none. * Response: {@link GetTabsResponse}. * @example * ```js * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => { * console.log( * tabDetails // TabDetails of current Liveboard * ); * }) * ``` * @example * ```js * // Get tabs from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => { * console.log('tabs', tabDetails); * }); * ``` * @returns orderedTabIds - Tab GUIDs in the order they appear. * @returns numberOfTabs - Total number of tabs on the Liveboard. * @returns Tabs - Tab details, each with at least `id` and `name`. * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl */ GetTabs = "getTabs", /** * Get group details for the current Liveboard. * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups. * Payload: none. * Response: {@link GetGroupsResponse}. * @example * ```js * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => { * console.log( * groupDetails // GroupDetails of current Liveboard * ); * }) * ``` * @example * ```js * // Get groups from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.GetGroups, {}, ContextType.Liveboard).then((groupDetails) => { * console.log('groups', groupDetails); * }); * ``` * @returns orderedGroupIds - Group GUIDs in the order they appear. * @returns numberOfGroups - Total number of groups on the Liveboard. * @returns Groups - Group details, each with at least `id` and `name`. * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl */ GetGroups = "getGroups", /** * Set the visible tabs on a Liveboard. * Payload: `string[]`. * @param - an array of ids of tabs to show, the IDs not passed * will be hidden. * @example * ```js * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726']) * ``` * @example * ```js * // Set visible tabs from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726' * ], ContextType.Liveboard); * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw */ SetVisibleTabs = "SetPinboardVisibleTabs", /** * Set the hidden tabs on a Liveboard. * Payload: `string[]`. * @param - an array of the IDs of the tabs to hide. * The IDs not passed will be shown. * @example * ```js * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [ * '630496d6-6903-4601-937e-2c691821af3c', * 'i547ec54-2a37-4516-a222-2b06719af726']) * ``` * @example * ```js * // Set hidden tabs from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [ * '630496d6-6903-4601-937e-2c691821af3c', * 'i547ec54-2a37-4516-a222-2b06719af726' * ], ContextType.Liveboard); * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw */ SetHiddenTabs = "SetPinboardHiddenTabs", /** * Get the Answer session for a Search or * Liveboard visualization. * * Note: This event is not typically used directly. Instead, use the * `getAnswerService()` method on the embed instance to get an AnswerService * object that provides a more convenient interface for working with answers. * * Payload: {@link GetAnswerSessionRequest}. * Response: {@link GetAnswerSessionResponse}. * @example * ```js * // Preferred way to get an AnswerService * const service = await embed.getAnswerService(); * * // Alternative direct usage (not recommended) * const {session} = await embed.trigger( * HostEvent.GetAnswerSession, { * vizId: '123', // For Liveboard Visualization. * }) * ``` * @example * ```js * // Preferred way to get an AnswerService * const service = await embed.getAnswerService(); * * // Alternative direct usage (not recommended) * const {session} = await embed.trigger( HostEvent.GetAnswerSession ) * ``` * @returns session - Session identifier for the Answer, for use with the * `AnswerService`. * @returns embedAnswerData - Data backing the Answer, when available. * @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw */ GetAnswerSession = "getAnswerSession", /** * Trigger the *Ask Sage* action for visualizations * Payload: {@link RequiredVizRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.AskSage, * {vizId:'730496d6-6903-4601-937e-2c691821af3c'}) * ``` * @version SDK: 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl */ AskSage = "AskSage", /** * Trigger cross filter update action on a Liveboard. * * Payload: {@link UpdateCrossFilterRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, { * vizId: 'b535c760-8bbe-4e6f-bb26-af56b4129a1e', * conditions: [ * { columnName: 'Category', values: ['mfgr#12','mfgr#14'] }, * { columnName: 'color', values: ['mint','hot'] }, * ], * }); * ``` * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.0.0.cl, 10.1.0.sw */ UpdateCrossFilter = "UpdateCrossFilter", /** * Trigger reset action for a personalized Liveboard view. * This event is deprecated. * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead. * Payload: none. * @example * ```js * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView); * ``` * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView", /** * Trigger reset action for a personalized Liveboard view. * @example * ```js * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView); * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView", /** * Triggers an action to update Parameter values on embedded * Answers, Liveboard, and Spotter answer in Edit mode. * Payload: {@link RuntimeParameter}[]. * @param - Includes the following keys for each item: * - `name`: Name of the parameter. * - `value`: The value to set for the parameter. * - `isVisibleToUser`: Optional. To control the visibility of the parameter chip. * - `applicability`: Optional. Scopes the parameter to a specific target, * for example, a single Liveboard tab. Available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. Includes the following attributes: * * - `level`: The scope of the parameter: `LIVEBOARD`, `TAB`, or `GROUP`. * - `targetId`: The GUID of the target, for example, the tab GUID. * Required when `level` is `TAB` or `GROUP`. Do not pass it when * `level` is `LIVEBOARD`, since the parameter applies to the whole * Liveboard. * * @example * ```js * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{ * name: "Integer Range Param", * value: 10, * isVisibleToUser: false * }]) * ``` * @example * ```js * // Scope the parameter to a specific Liveboard tab * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{ * name: "Integer Range Param", * value: 10, * applicability: { * level: "TAB", * targetId: "e0836cad-4fdf-42d4-bd97-567a6b2a6058" * } * }]) * ``` * @example * ```js * // Update parameters from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{ * name: "Region Param", * value: "West", * isVisibleToUser: true * }], ContextType.Liveboard); * ``` * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw */ UpdateParameters = "UpdateParameters", /** * Triggers GetParameters to fetch the runtime Parameters. * Each parameter includes an optional `applicability` attribute * indicating the scope of the parameter. It contains a `level` * (`LIVEBOARD`, `TAB`, or `GROUP`) and, when `level` is `TAB` or * `GROUP`, a `targetId` with the GUID of the target. At `LIVEBOARD` * level there is no `targetId`, since the parameter applies to the * whole Liveboard. * The `applicability` attribute is available from SDK: 1.53.0 | * ThoughtSpot: 26.10.0.cl. * Payload: none. * Response: {@link GetParametersResponse}. * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed. * ```js * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => { * console.log('parameters', parameter); * }); * ``` * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId }); *``` * @example * ```js * // Get parameters from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.GetParameters, {}, * ContextType.Liveboard).then((parameters) => { * console.log('parameters', parameters); * }); * ``` * @returns parameters - Parameters currently applied on the Liveboard. * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw */ GetParameters = "GetParameters", /** * Triggers an event to update a personalized view of a Liveboard. * This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead, * which additionally accepts a `viewName`, resets to the original view when * called with an empty payload, and reports an error when a named view * cannot be found. * ```js * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'}) * ``` * Payload: {@link PersonalisedViewRequest} (`viewId` only). * @example * ```js * // Update personalized view from liveboard context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, { * viewId: '1234' * }, ContextType.Liveboard); * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ UpdatePersonalisedView = "UpdatePersonalisedView", /** * Triggers an event to update a personalized view of a Liveboard. * This event is deprecated. Use {@link HostEvent.SelectPersonalizedView} instead, * which additionally accepts a `viewName`, resets to the original view when * called with an empty payload, and reports an error when a named view * cannot be found. * ```js * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'}) * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @deprecated SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl */ UpdatePersonalizedView = "UpdatePersonalisedView", /** * Triggers selection of a specific Personalized View on a * Liveboard without reloading the embed. Pass either a * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence. * If neither is provided, the Liveboard resets to the original/default view. * When a `viewName` is provided and multiple views share * the same name, the first match is selected. * Payload: {@link PersonalisedViewRequest}. * @example * ```js * liveboardEmbed.trigger( * HostEvent.SelectPersonalizedView, * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' }, * ) * ``` * @example * ```js * // Select by name * liveboardEmbed.trigger( * HostEvent.SelectPersonalizedView, * { viewName: 'Dr Smith Cardiology' }, * ) * ``` * @example * ```js * // Reset to default view * liveboardEmbed.trigger( * HostEvent.SelectPersonalizedView, * {}, * ) * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ SelectPersonalizedView = "SelectPersonalisedView", /** * @hidden * Notify when info call is completed successfully * ```js * liveboardEmbed.trigger(HostEvent.InfoSuccess, data); * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl */ InfoSuccess = "InfoSuccess", /** * Trigger the save action for an Answer. * To programmatically save an answer without opening the * *Describe your Answer* modal, define the `name` and `description` * properties. * If no parameters are specified, the save action is * triggered with a modal to prompt users to * add a name and description for the Answer. * Payload: {@link SaveAnswerRequest}. * Response: {@link SaveAnswerResponse}. * @param - Includes the following keys: * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter * embed. * - `name`: Optional. Name string for the Answer. * - `description`: Optional. Description text for the Answer. * @example * ```js * const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, { * name: "Sales by states", * description: "Total sales by states in MidWest" * }); * ``` * @example * ```js * // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event. * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId }); * ``` * @example * ```js * // Using context parameter to save answer from search context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, { * name: "Regional sales analysis", * description: "Sales breakdown by region" * }, ContextType.Search); * ``` * @example * ```js * // Save answer from answer context (explore modal) * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, { * name: "Modified analysis", * description: "Updated from explore view" * }, ContextType.Answer); * ``` * @example * ```js * // Save answer from spotter context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, { * vizId: latestSpotterVizId, * name: "AI insights", * description: "Generated from Spotter" * }, ContextType.Spotter); * ``` * @returns answerId - GUID of the saved Answer. * @returns saveResponse - Raw response from the save operation. * @returns shareResponse - Raw response from the share operation, when the * Answer was also made discoverable. * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl */ SaveAnswer = "saveAnswer", /** * EmbedApi * @hidden */ UIPassthrough = "UiPassthrough", /** * Triggers the table visualization re-render with the updated data. * Includes the following properties: * @param - `columnDataLite` - an array of object containing the * data value modifications retrieved from the `EmbedEvent.TableVizRendered` * payload.For example, { columnDataLite: []}`. * * @example * ```js * searchEmbed.on(EmbedEvent.TableVizRendered, (payload) => { * console.log(payload); * const columnDataLite = payload.data.data.columnDataLite; * columnDataLite[0].dataValue[0]="new fob"; * console.log('>>> new Data', columnDataLite); * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite); * }) * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl */ TransformTableVizData = "TransformTableVizData", /** * Triggers a search operation with the search tokens specified in * the search query string in spotter embed. * Payload: {@link SpotterSearchRequest}. * @param - Includes the following keys: * - `query`: Text string in Natural Language format. * - `executeSearch`: Boolean to execute search and update search query. * @example * ```js * spotterEmbed.trigger(HostEvent.SpotterSearch, { * query: 'revenue per year', * executeSearch: true, * }) * ``` * @example * ```js * // Spotter search from spotter context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * spotterEmbed.trigger(HostEvent.SpotterSearch, { * query: 'sales by region', * executeSearch: true * }, ContextType.Spotter); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ SpotterSearch = "SpotterSearch", /** * Edits the last prompt in spotter embed. * Payload: `string`. * @param - `query`: Text string * @example * ```js * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year"); * ``` * @example * ```js * // Edit last prompt from spotter context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ EditLastPrompt = "EditLastPrompt", /** * Opens the data source preview modal in Spotter Embed. * Payload: none. * @example * ```js * spotterEmbed.trigger(HostEvent.PreviewSpotterData); * ``` * @example * ```js * // Preview spotter data from spotter context * import { ContextType } from '@thoughtspot/visual-embed-sdk'; * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ PreviewSpotterData = "PreviewSpotterData", /** * Opens the Add to Coaching modal from a visualization in Spotter Embed. * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required. * @example * ```js * spotterEmbed.trigger(HostEvent.AddToCoaching, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }); * * ``` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl */ AddToCoaching = "addToCoaching", /** * Opens the data model instructions modal in Spotter Embed. * @example * ```js * spotterEmbed.trigger(HostEvent.DataModelInstructions); * ``` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl */ DataModelInstructions = "DataModelInstructions", /** * Resets the Spotter Embed Conversation. * Payload: none. * @example * ```js * spotterEmbed.trigger(HostEvent.ResetSpotterConversation); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ ResetSpotterConversation = "ResetSpotterConversation", /** * Opens the Spotter share-conversation modal for the given conversation. * `conversationId` is **mandatory** — you must pass the id of the * conversation to share. Also no-op when sharing is disabled * (enableShareConversation off) or when already in the read-only shared view. * Payload: {@link ConversationScopedRequest}. * @example * ```js * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' }); * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ ShareSpotterConversation = "ShareSpotterConversation", /** * Closes the Spotter share-conversation modal. No-op if none is open. * Payload: none. * @example * ```js * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation); * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ CloseSpotterShareConversation = "CloseSpotterShareConversation", /** * Exits the read-only shared-conversation view. * Payload: none. * @example * ```js * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation); * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ ExitSpotterSharedConversation = "ExitSpotterSharedConversation", /** * Deletes the last prompt in spotter embed. * Payload: none. * @example * ```js * spotterEmbed.trigger(HostEvent.DeleteLastPrompt); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ DeleteLastPrompt = "DeleteLastPrompt", /** * Toggle the visualization to chart or table view. * Payload: {@link RequiredVizRequest}. * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required. * @example * ```js * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId }); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ AnswerChartSwitcher = "answerChartSwitcher", /** * @hidden * Trigger exit from presentation mode when user exits fullscreen. * This is automatically triggered by the SDK when fullscreen mode is exited. * ```js * liveboardEmbed.trigger(HostEvent.ExitPresentMode); * ``` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ ExitPresentMode = "exitPresentMode", /** * Triggers the full height lazy load data. * @example * ```js * liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => { * console.log(payload); * }); * ``` * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * * @hidden */ VisibleEmbedCoordinates = "visibleEmbedCoordinates", /** * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes. * Payload: {@link RequiredVizRequest}. * @param - `vizId` refers to the Visualization ID in Spotter embed and is required. * @example * ```js * let latestSpotterVizId = ''; * spotterEmbed.on(EmbedEvent.Data, (payload) => { * latestSpotterVizId = payload.data.id; * }); * * spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId }); * ``` * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl */ AskSpotter = "AskSpotter", /** * @hidden * Triggers the update of the embed params. * * @example * ```js * liveboardEmbed.trigger(HostEvent.UpdateEmbedParams, viewConfig); * ``` */ UpdateEmbedParams = "updateEmbedParams", /** * Notifies the embedded ThoughtSpot app that the embed is being torn down, so that * it can release any resources it holds before the iframe is removed from the DOM. * * This is triggered for you by `embed.destroy()`; you rarely need to trigger it * directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()` * waits for the app to acknowledge this event (up to `cleanupTimeout`) before * removing the iframe. * @example * ```js * liveboardEmbed.trigger(HostEvent.DestroyEmbed); * ``` * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl */ DestroyEmbed = "EmbedDestroyed", /** * Triggers a new conversation in Spotter embed. * * This feature is available only when chat history is enabled on your ThoughtSpot * instance. Contact your admin or ThoughtSpot Support to enable chat history on your * instance. * * @example * ```js * spotterEmbed.trigger(HostEvent.StartNewSpotterConversation); * ``` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl */ StartNewSpotterConversation = "StartNewSpotterConversation", /** * Pins a saved Spotter conversation so it floats to the top of the past * conversations sidebar. The `conversationId` of the conversation to pin is * required. * * This feature is available only when chat history is enabled on your ThoughtSpot * instance. Contact your admin or ThoughtSpot Support to enable chat history on your * instance. * * Payload: {@link ConversationScopedRequest}. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * spotterEmbed.trigger(HostEvent.PinSpotterConversation, { * conversationId: '', * }); * ``` */ PinSpotterConversation = "PinSpotterConversation", /** * Unpins a previously pinned Spotter conversation. The `conversationId` of the * conversation to unpin is required. * * This feature is available only when chat history is enabled on your ThoughtSpot * instance. Contact your admin or ThoughtSpot Support to enable chat history on your * instance. * * Payload: {@link ConversationScopedRequest}. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * spotterEmbed.trigger(HostEvent.UnpinSpotterConversation, { * conversationId: '', * }); * ``` */ UnpinSpotterConversation = "UnpinSpotterConversation", /** * @hidden * Get the current context of the embedded page. * * @example * ```js * const context = await liveboardEmbed.trigger(HostEvent.GetPageContext); * ``` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl */ GetPageContext = "GetPageContext", /** * Trigger the **Send Test Email** action in the Liveboard schedule modal. * Sends a test schedule email to self or all recipients. * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled. * Payload: {@link ScheduleEmailRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, { * sendToSelf: true, * }) * ``` * @example * ```js * // Send to all recipients * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, { * sendToSelf: false, * }) * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SendTestScheduleEmail = "sendTestScheduleEmail", /** * Sends a user message (prompt) to the SpotterViz panel programmatically. * Payload: `{ query: string }`. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @param query - the prompt text to send. * @example * ```js * liveboardEmbed.trigger(HostEvent.SpotterVizSendUserMessage, { * query: 'Show me revenue by region', * }); * ``` */ SpotterVizSendUserMessage = "SpotterVizSendUserMessage", /** * Initializes a new SpotterViz conversation. * Payload: none. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.trigger(HostEvent.InitSpotterVizConversation); * ``` */ InitSpotterVizConversation = "InitSpotterVizConversation", /** * Opens the SpotterViz panel. * Payload: none. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.trigger(HostEvent.OpenSpotterVizPanel); * ``` */ OpenSpotterVizPanel = "OpenSpotterVizPanel", /** * Closes the SpotterViz panel. * Payload: none. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * liveboardEmbed.trigger(HostEvent.CloseSpotterVizPanel); * ``` */ CloseSpotterVizPanel = "CloseSpotterVizPanel", /** * Clears browser cache and fetches new data for liveboard ChartViz Containers. * Requires `enableLiveboardDataCache` to be enabled. * Payload: {@link ScheduleEmailRequest}. * @example * ```js * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache); * ``` * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl */ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache" } /** * The different visual modes that the data sources panel within * search could appear in, such as hidden, collapsed, or expanded. */ export declare enum DataSourceVisualMode { /** * The data source panel is hidden. */ Hidden = "hide", /** * The data source panel is collapsed, but the user can manually expand it. */ Collapsed = "collapse", /** * The data source panel is expanded, but the user can manually collapse it. */ Expanded = "expand" } /** * Configuration for allowed file types in Spotter file upload. * @group Embed components */ export type SpotterFileUploadFileTypes = { types?: string[]; }; /** * ThoughtSpot application pages include actions and menu commands * for various user-initiated operations. These actions are represented * as enumeration members in the SDK. To control actions in the embedded view: * - disabledActions — the action is grayed out and still visible, but non-interactive * (user can see but not click). - hiddenActions — the action is completely removed from * the UI (user cannot see it at all). - visibleActions — allowlist, only these actions * are shown; all others are hidden. * * Use disabledActions to disable (gray out) an action. * Use hiddenActions to hide (fully remove) an action. * Use visibleActions to show only specific actions. * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * visibleActions: [Action.Save, Action.Edit, Action.Present, Action.Explore], * disabledActions: [Action.Download], * //hiddenActions: [], // Set either this or visibleActions * }) * ``` * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * //visibleActions: [], * disabledActions: [Action.Download], * hiddenActions: [Action.Edit, Action.Explore], * }) * ``` * See also link:https://developers.thoughtspot.com/docs/actions[Developer Documentation]. */ export declare enum Action { /** * The **Save** action on an Answer or Liveboard. * Allows users to save the changes. * @example * ```js * disabledActions: [Action.Save] * ``` */ Save = "save", /** * @hidden */ Update = "update", /** * @hidden */ SaveUntitled = "saveUntitled", /** * The **Save as View** action on the Answer * page. Saves an Answer as a View object in the full * application embedding mode. * @example * ```js * disabledActions: [Action.SaveAsView] * ``` */ SaveAsView = "saveAsView", /** * The **EditInputTable** action on a Liveboard * page. Allows users to edit an input table used in an Answer directly from * a Liveboard. * @example * ```js * disabledActions: [Action.EditInputTable] * ``` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ EditInputTable = "editInputTable", /** * The **Make a copy** action on a Liveboard or Answer * page. Creates a copy of the Liveboard. * In LiveboardEmbed, the **Make a copy** action is not available for * visualizations in the embedded Liveboard view. * In AppEmbed, the **Make a copy** action is available on both * Liveboards and visualizations. * @example * ```js * disabledActions: [Action.MakeACopy] * ``` */ MakeACopy = "makeACopy", /** * The **Copy and Edit** action on a Liveboard. * This action is now replaced with `Action.MakeACopy`. * @example * ```js * disabledActions: [Action.EditACopy] * ``` */ EditACopy = "editACopy", /** * The **Copy link** menu action on a Liveboard visualization. * Copies the visualization URL * @example * ```js * disabledActions: [Action.CopyLink] * ``` */ CopyLink = "embedDocument", /** * @hidden */ ResetLayout = "resetLayout", /** * The **Schedule** menu action on a Liveboard. * Allows scheduling a Liveboard job, for example, * sending periodic notifications. * @example * ```js * disabledActions: [Action.Schedule] * ``` */ Schedule = "subscription", /** * The **Manage schedules** menu action on a Liveboard. * Allows users to manage scheduled Liveboard jobs. * @example * ```js * disabledActions: [Action.SchedulesList] * ``` */ SchedulesList = "schedule-list", /** * The **Share** action on a Liveboard, Answer, or Model. * Allows users to share an object with other users and groups. * @example * ```js * disabledActions: [Action.Share] * ``` */ Share = "share", /** * The **Add filter** action on a Liveboard page. * Allows adding filters to visualizations on a Liveboard. * @example * ```js * disabledActions: [Action.AddFilter] * ``` */ AddFilter = "addFilter", /** * The **Add Data Panel Objects** action on the data panel v2. * Allows to show action menu to add different objects (such as * formulas, Parameters) in data panel new experience. * @example * ```js * disabledActions: [Action.AddDataPanelObjects] * ``` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl, 10.1.0.sw */ AddDataPanelObjects = "addDataPanelObjects", /** * The filter configuration options for a Liveboard. * The configuration options are available when adding * filters on a Liveboard. * * @example * ```js * disabledActions: [Action.ConfigureFilter] * ``` */ ConfigureFilter = "configureFilter", /** * The **Collapse data sources** icon on the Search page. * Collapses the panel showing data sources. * * @example * ```js * disabledActions: [Action.CollapseDataPanel] * ``` * @version SDK: 1.1.0 | ThoughtSpot Cloud: ts7.may.cl, 8.4.1.sw */ CollapseDataSources = "collapseDataSources", /** * The **Collapse data panel** icon on the Search page. * Collapses the data panel view. * * @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl * * @example * ```js * disabledActions: [Action.CollapseDataPanel] * ``` */ CollapseDataPanel = "collapseDataPanel", /** * The **Choose sources** button on Search page. * Allows selecting data sources for search queries. * @example * ```js * disabledActions: [Action.ChooseDataSources] * ``` */ ChooseDataSources = "chooseDataSources", /** * The **Create formula** action on a Search or Answer page. * Allows adding formulas to an Answer. * @example * ```js * disabledActions: [Action.AddFormula] * ``` */ AddFormula = "addFormula", /** * The **Add parameter** action on a Liveboard or Answer. * Allows adding Parameters to a Liveboard or Answer. * @example * ```js * disabledActions: [Action.AddParameter] * ``` */ AddParameter = "addParameter", /** * The **Add Column Set** action on a Answer. * Allows adding column sets to a Answer. * @example * ```js * disabledActions: [Action.AddColumnSet] * ``` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl, 10.1.0.sw */ AddColumnSet = "addSimpleCohort", /** * The **Add Query Set** action on a Answer. * Allows adding query sets to a Answer. * @example * ```js * disabledActions: [Action.AddQuerySet] * ``` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl, 10.1.0.sw */ AddQuerySet = "addAdvancedCohort", /** * @hidden */ SearchOnTop = "searchOnTop", /** * The **SpotIQ analyze** menu action on a visualization or * Answer page. * @example * ```js * disabledActions: [Action.SpotIQAnalyze] * ``` */ SpotIQAnalyze = "spotIQAnalyze", /** * @hidden */ ExplainInsight = "explainInsight", /** * @hidden */ SpotIQFollow = "spotIQFollow", /** * The Share action for a Liveboard visualization. */ ShareViz = "shareViz", /** * @hidden */ ReplaySearch = "replaySearch", /** * The **Show underlying data** menu action on a * visualization or Answer page. * Displays detailed information and raw data * for a given visualization. * @example * ```js * disabledActions: [Action.ShowUnderlyingData] * ``` */ ShowUnderlyingData = "showUnderlyingData", /** * The **Download** menu action on Liveboard * visualizations and Answers. * Allows downloading a visualization or Answer. * @example * ```js * disabledActions: [Action.DownloadAsPng] * ``` */ Download = "download", /** * The **Download** > **PNG** menu action for charts on a Liveboard * or Answer page. * Downloads a visualization or Answer as a PNG file. * @example * ```js * disabledActions: [Action.DownloadAsPng] * ``` */ DownloadAsPng = "downloadAsPng", /** * *The **Download PDF** action that downloads a Liveboard, * visualization, or Answer as a PDF file. * * **NOTE**: The **Download** > **PDF** option is available for * tables in visualizations and Answers. * @example * ```js * disabledActions: [Action.DownloadAsPdf] * ``` */ DownloadAsPdf = "downloadAsPdf", /** * The **Download** > **CSV** menu action for tables on a Liveboard * or Answer page. * Downloads a visualization or Answer in the XLSX format. * @example * ```js * disabledActions: [Action.DownloadAsCsv] * ``` */ DownloadAsCsv = "downloadAsCSV", /** * The **Download** > **XLSX** menu action for tables on a Liveboard * or Answer page. * Downloads a visualization or Answer in the XLSX format. * @example * ```js * disabledActions: [Action.DownloadAsXlsx] * ``` */ DownloadAsXlsx = "downloadAsXLSX", /** * The **Download Liveboard** menu action on a Liveboard. * Allows downloading the entire Liveboard. * @example * ```js * disabledActions: [Action.DownloadLiveboard] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DownloadLiveboard = "downloadLiveboard", /** * The **Download Liveboard as Continuous PDF** menu action on a Liveboard. * Allows downloading the entire Liveboard as a continuous PDF. * @example * ```js * disabledActions: [Action.DownloadLiveboardAsContinuousPDF] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF", /** * The Download Liveboard as A4 PDF menu action on a Liveboard. * Allows downloading the entire Liveboard as an A4 PDF. * Requires {@link Action.DownloadLiveboard} as a parent action when * {@link LiveboardViewConfig.isLiveboardXLSXCSVDownloadEnabled} or * {@link LiveboardViewConfig.isContinuousLiveboardPDFEnabled} flags are enabled. * Use this instead of {@link Action.DownloadAsPdf} when either flag is on. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * disabledActions: [Action.DownloadLiveboardAsA4Pdf] * ``` */ DownloadLiveboardAsA4Pdf = "downloadLiveboardAsA4Pdf", /** * The **Download Liveboard as XLSX** menu action on a Liveboard. * Allows downloading the entire Liveboard as an XLSX file. * @example * ```js * disabledActions: [Action.DownloadLiveboardAsXlsx] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DownloadLiveboardAsXlsx = "downloadLiveboardAsXlsx", /** * The **Download Liveboard as CSV** menu action on a Liveboard. * Allows downloading the entire Liveboard as a CSV file. * @example * ```js * disabledActions: [Action.DownloadLiveboardAsCsv] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ DownloadLiveboardAsCsv = "downloadLiveboardAsCsv", /** * @hidden */ DownloadTrace = "downloadTrace", /** * The **Export TML** menu action on a Liveboard, Answer, and * the Data Workspace pages for data objects and connections. * * Allows exporting an object as a TML file. * * @example * ```js * disabledActions: [Action.ExportTML] * ``` */ ExportTML = "exportTSL", /** * The **Import TML** menu action on the * *Data Workspace* > *Utilities* page. * Imports TML representation of ThoughtSpot objects. * @example * ```js * disabledActions: [Action.ImportTML] * ``` */ ImportTML = "importTSL", /** * The **Update TML** menu action for Liveboards and Answers. * Updates TML representation of ThoughtSpot objects. * @example * ```js * disabledActions: [Action.UpdateTML] * ``` */ UpdateTML = "updateTSL", /** * The **Edit TML** menu action for Liveboards and Answers. * Opens the TML editor. * @example * ```js * disabledActions: [Action.EditTML] * ``` */ EditTML = "editTSL", /** * The **Present** menu action for Liveboards and Answers. * Allows presenting a Liveboard or visualization in * slideshow mode. * @example * ```js * disabledActions: [Action.Present] * ``` */ Present = "present", /** * The visualization tile resize option. * Also available via More `...` options menu on a visualization. * Allows resizing visualization tiles and switching * between different preset layout option. * * @example * ```js * disabledActions: [Action.ToggleSize] * ``` */ ToggleSize = "toggleSize", /** * The *Edit* action on the Liveboard page and in the * visualization menu. * Opens a Liveboard or visualization in edit mode. * @example * ```js * disabledActions: [Action.Edit] * ``` */ Edit = "edit", /** * The text edit option for Liveboard and visualization titles. * @example * ```js * disabledActions: [Action.EditTitle] * ``` */ EditTitle = "editTitle", /** * The **Delete** action on a Liveboard, *Liveboards* and * *Answers* list pages in full application embedding. * * @example * ```js * disabledActions: [Action.Remove] * ``` */ Remove = "delete", /** * @hidden */ Ungroup = "ungroup", /** * @hidden */ Describe = "describe", /** * @hidden */ Relate = "relate", /** * @hidden */ CustomizeHeadlines = "customizeHeadlines", /** * @hidden */ PinboardInfo = "pinboardInfo", /** * The **Show Liveboard details** menu action on a Liveboard. * Displays details such as the name, description, and * author of the Liveboard, and timestamp of Liveboard creation * and update. * @example * ```js * disabledActions: [Action.LiveboardInfo] * ``` */ LiveboardInfo = "pinboardInfo", /** * @hidden */ SendAnswerFeedback = "sendFeedback", /** * @hidden */ DownloadEmbraceQueries = "downloadEmbraceQueries", /** * The **Pin** menu action on an Answer or * Search results page. * @example * ```js * disabledActions: [Action.Pin] * ``` */ Pin = "pin", /** * @hidden */ AnalysisInfo = "analysisInfo", /** * The **Schedule** menu action on a Liveboard. * Allows scheduling a Liveboard job. * @example * ```js * disabledActions: [Action.Subscription] * ``` */ Subscription = "subscription", /** * The **Explore** action on Liveboard visualizations * @example * ```js * disabledActions: [Action.Explore] * ``` */ Explore = "explore", /** * The contextual menu action to include a specific data point * when drilling down a table or chart on an Answer. * * @example * ```js * disabledActions: [Action.DrillInclude] * ``` */ DrillInclude = "context-menu-item-include", /** * The contextual menu action to exclude a specific data point * when drilling down a table or chart on an Answer. * @example * ```js * disabledActions: [Action.DrillInclude] * ``` */ DrillExclude = "context-menu-item-exclude", /** * The **Copy to clipboard** menu action on tables in an Answer * or Liveboard. * Copies the selected data point. * @example * ```js * disabledActions: [Action.CopyToClipboard] * ``` */ CopyToClipboard = "context-menu-item-copy-to-clipboard", CopyAndEdit = "context-menu-item-copy-and-edit", /** * @hidden */ DrillEdit = "context-menu-item-edit", EditMeasure = "context-menu-item-edit-measure", Separator = "context-menu-item-separator", /** * The **Drill down** menu action on Answers and Liveboard * visualizations. * Allows drilling down to a specific data point on a chart or table. * @example * ```js * disabledActions: [Action.DrillDown] * ``` */ DrillDown = "DRILL", /** * The request access action on Liveboards. * Allows users with view permissions to request edit access to a Liveboard. * @example * ```js * disabledActions: [Action.RequestAccess] * ``` */ RequestAccess = "requestAccess", /** * Controls the display and availability of the **Query visualizer** and * **Query SQL** buttons in the Query details panel on the Answer page. * * **Query visualizer** - Displays the tables and filters used in the search query. * **Query SQL** - Displays the SQL statements used to retrieve data for the query. * * Note: This action ID only affects the visibility of the buttons within the * Query details panel. It does not control the visibility * of the query details icon on the Answer page. * @example * ```js * disabledActions: [Action.QueryDetailsButtons] * ``` */ QueryDetailsButtons = "queryDetailsButtons", /** * The **Delete** action for Answers in the full application * embedding mode. * @example * ```js * disabledActions: [Action.AnswerDelete] * ``` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw */ AnswerDelete = "onDeleteAnswer", /** * The chart switcher icon on Answer page and * visualizations in edit mode. * Allows switching to the table or chart mode * when editing a visualization. * @example * ```js * disabledActions: [Action.AnswerChartSwitcher] * ``` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw */ AnswerChartSwitcher = "answerChartSwitcher", /** * The Favorites icon (*) for Answers, * Liveboard, and data objects like Model, * Tables and Views. * Allows adding an object to the user's favorites list. * @example * ```js * disabledActions: [Action.AddToFavorites] * ``` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw */ AddToFavorites = "addToFavorites", /** * Remove from Favorites option in home page v3 sidebar. * Allows removing an object from the user's favorites list from home-page v3 sidebar. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * disabledActions: [Action.RemoveFromFavorites] * ``` */ RemoveFromFavorites = "removeFromFavorites", /** * The edit icon on Liveboards (Classic experience). * @example * ```js * disabledActions: [Action.EditDetails] * ``` * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw */ EditDetails = "editDetails", /** * The *Create alert* action for KPI charts. * Allows users to schedule threshold-based alerts * for KPI charts. * @example * ```js * disabledActions: [Action.CreateMonitor] * ``` * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw */ CreateMonitor = "createMonitor", /** * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw * @deprecated This action is deprecated. It was used for reporting errors. * @example * ```js * disabledActions: [Action.ReportError] * ``` */ ReportError = "reportError", /** * The **Sync to sheets** action on Answers and Liveboard visualizations. * Allows sending data to a Google Sheet. * @example * ```js * disabledActions: [Action.SyncToSheets] * ``` * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw */ SyncToSheets = "sync-to-sheets", /** * The **Sync to other apps** action on Answers and Liveboard visualizations. * Allows sending data to third-party apps like Slack, Salesforce, * Microsoft Teams, and so on. * @example * ```js * disabledActions: [Action.SyncToOtherApps] * ``` * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw */ SyncToOtherApps = "sync-to-other-apps", /** * The **Manage pipelines** action on Answers and Liveboard visualizations. * Allows users to manage data sync pipelines to third-party apps. * @example * ```js * disabledActions: [Action.ManagePipelines] * ``` * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw */ ManagePipelines = "manage-pipeline", /** * The **Filter** action on Liveboard visualizations. * Allows users to apply cross-filters on a Liveboard. * @example * ```js * disabledActions: [Action.CrossFilter] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.8.0.sw */ CrossFilter = "context-menu-item-cross-filter", /** * The **Sync to Slack** action on Liveboard visualizations. * Allows sending data to third-party apps like Slack. * @example * ```js * disabledActions: [Action.SyncToSlack] * ``` * @version SDK: 1.32.0 | ThoughtSpot Cloud: 10.1.0.cl */ SyncToSlack = "syncToSlack", /** * The **Sync to Teams** action on Liveboard visualizations. * Allows sending data to third-party apps like Microsoft Teams. * @example * ```js * disabledActions: [Action.SyncToTeams] * ``` * @version SDK: 1.32.0 | ThoughtSpot Cloud: 10.1.0.cl */ SyncToTeams = "syncToTeams", /** * The **Remove** action that appears when cross filters are applied * on a Liveboard. * Removes filters applied to a visualization. * @example * ```js * disabledActions: [Action.RemoveCrossFilter] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ RemoveCrossFilter = "context-menu-item-remove-cross-filter", /** * The **Aggregate** option in the chart axis or the * table column customization menu. * Provides aggregation options to analyze the data on a chart or table. * @example * ```js * disabledActions: [Action.AxisMenuAggregate] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuAggregate = "axisMenuAggregate", /** * The **Time bucket** option in the chart axis or table column * customization menu. * Allows defining time metric for date comparison. * @example * ```js * disabledActions: [Action.AxisMenuTimeBucket] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuTimeBucket = "axisMenuTimeBucket", /** * The **Filter** action in the chart axis or table column * customization menu. * Allows adding, editing, or removing filters. * * @example * ```js * disabledActions: [Action.AxisMenuFilter] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuFilter = "axisMenuFilter", /** * The **Conditional formatting** action on chart or table. * Allows adding rules for conditional formatting of data * points on a chart or table. * @example * ```js * disabledActions: [Action.AxisMenuConditionalFormat] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuConditionalFormat = "axisMenuConditionalFormat", /** * The **Sort** menu action on a table or chart axis * Sorts data in ascending or descending order. * Allows adding, editing, or removing filters. * @example * ```js * disabledActions: [Action.AxisMenuConditionalFormat] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuSort = "axisMenuSort", /** * The **Group** option in the chart axis or table column * customization menu. * Allows grouping data points if the axes use the same * unit of measurement and a similar scale. * @example * ```js * disabledActions: [Action.AxisMenuGroup] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuGroup = "axisMenuGroup", /** * The **Position** option in the axis customization menu. * Allows changing the position of the axis to the * left or right side of the chart. * @example * ```js * disabledActions: [Action.AxisMenuPosition] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuPosition = "axisMenuPosition", /** * The **Rename** option in the chart axis or table column customization menu. * Renames the axis label on a chart or the column header on a table. * @example * ```js * disabledActions: [Action.AxisMenuRename] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuRename = "axisMenuRename", /** * The **Edit** action in the axis customization menu. * Allows editing the axis name, position, minimum and maximum values, * and format of a column. * @example * ```js * disabledActions: [Action.AxisMenuEdit] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuEdit = "axisMenuEdit", /** * The **Number format** action to customize the format of * the data labels on a chart or table. * @example * ```js * disabledActions: [Action.AxisMenuNumberFormat] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuNumberFormat = "axisMenuNumberFormat", /** * The **Text wrapping** action on a table. * Wraps or clips column text on a table. * @example * ```js * disabledActions: [Action.AxisMenuTextWrapping] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuTextWrapping = "axisMenuTextWrapping", /** * The **Remove** action in the chart axis or table column * customization menu. * Removes the data labels from a chart or the column of a * table visualization. * @example * ```js * disabledActions: [Action.AxisMenuRemove] * ``` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw */ AxisMenuRemove = "axisMenuRemove", /** * The **Compare with** action in the chart axis customization menu. * Allows comparing data across dimensions or measures. * @example * ```js * disabledActions: [Action.AxisMenuCompare] * ``` * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl */ AxisMenuCompare = "axisMenuCompare", /** * The **Merge with** action in the chart axis customization menu. * Allows merging data across dimensions or measures. * @example * ```js * disabledActions: [Action.AxisMenuMerge] * ``` * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl */ AxisMenuMerge = "axisMenuMerge", /** * @hidden */ InsertInToSlide = "insertInToSlide", /** * The **Rename** menu action on Liveboards and visualizations. * Allows renaming a Liveboard or visualization. * @example * ```js * disabledActions: [Action.RenameModalTitleDescription] * ``` * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.8.0.sw */ RenameModalTitleDescription = "renameModalTitleDescription", /** * The *Request verification* action on a Liveboard. * Initiates a request for Liveboard verification. * @example * ```js * disabledActions: [Action.RequestVerification] * ``` * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 10.1.0.sw */ RequestVerification = "requestVerification", /** * * Allows users to mark a Liveboard as verified. * @example * ```js * disabledActions: [Action.MarkAsVerified] * ``` * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 10.1.0.sw */ MarkAsVerified = "markAsVerified", /** * The **Add Tab** action on a Liveboard. * Allows adding a new tab to a Liveboard view. * @example * ```js * disabledActions: [Action.AddTab] * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw */ AddTab = "addTab", /** * * Initiates contextual change analysis on KPI charts. * @example * ```js * disabledActions: [Action.EnableContextualChangeAnalysis] * ``` * @version SDK: 1.25.0 | ThoughtSpot Cloud: 9.6.0.cl */ EnableContextualChangeAnalysis = "enableContextualChangeAnalysis", /** * Action ID to hide or disable Iterative Change Analysis option * in the contextual change analysis Insight charts context menu. * * @example * ```js * disabledActions: [Action.EnableIterativeChangeAnalysis] * ``` * @version SDK: 1.41.0 | ThoughtSpot Cloud: 9.12.0.cl */ EnableIterativeChangeAnalysis = "enableIterativeChangeAnalysis", /** * Action ID to hide or disable Natural Language Search query. * * @example * ```js * disabledActions: [Action.ShowSageQuery] * ``` * @version SDK: 1.26.0 | ThoughtSpot Cloud: 9.7.0.cl */ ShowSageQuery = "showSageQuery", /** * * Action ID to hide or disable the edit option for the * results generated from the * Natural Language Search query. * * @example * ```js * disabledActions: [Action.EditSageAnswer] * ``` * @version SDK: 1.26.0 | ThoughtSpot Cloud: 9.7.0.cl */ EditSageAnswer = "editSageAnswer", /** * The feedback widget for AI-generated Answers. * Allows users to send feedback on the Answers generated * from a Natural Language Search query. * * @example * ```js * disabledActions: [Action.SageAnswerFeedback] * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl */ SageAnswerFeedback = "sageAnswerFeedback", /** * * @example * ```js * disabledActions: [Action.ModifySageAnswer] * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl */ ModifySageAnswer = "modifySageAnswer", /** * The **Move to Tab** menu action on visualizations in Liveboard edit mode. * Allows moving a visualization to a different tab. * @example * ```js * disabledActions: [Action.MoveToTab] * ``` */ MoveToTab = "onContainerMove", /** * The **Manage Alerts** menu action on KPI visualizations. * Allows creating, viewing, and editing monitor * alerts for a KPI chart. * * @example * ```js * disabledActions: [Action.ManageMonitor] * ``` */ ManageMonitor = "manageMonitor", /** * The Liveboard Personalised Views dropdown. * Allows navigating to a personalized Liveboard View. * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead. * @example * ```js * disabledActions: [Action.PersonalisedViewsDropdown] * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ PersonalisedViewsDropdown = "personalisedViewsDropdown", /** * The Liveboard Personalized Views dropdown. * Allows navigating to a personalized Liveboard View. * @example * ```js * disabledActions: [Action.PersonalizedViewsDropdown] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ PersonalizedViewsDropdown = "personalisedViewsDropdown", /** * Action ID for show or hide the user details on a * Liveboard (Recently visited / social proof) * @example * ```js * disabledActions: [Action.LiveboardUsers] * ``` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw */ LiveboardUsers = "liveboardUsers", /** * Action ID for the Parent TML action * The parent action **TML** must be included to access TML-related options * within the cascading menu (specific to the Answer page) * @example * ```js * // to include specific TML actions * visibleActions: [Action.TML, Action.ExportTML, Action.EditTML] * * ``` * @example * ```js * hiddenAction: [Action.TML] // hide all TML actions * disabledActions: [Action.TML] // to disable all TML actions * ``` * @version SDK: 1.28.3 | ThoughtSpot: 9.12.0.cl, 10.1.0.sw */ TML = "tml", /** * The **Create Liveboard* action on * the Liveboards page and the Pin modal. * Allows users to create a Liveboard. * * @example * ```js * hiddenAction: [Action.CreateLiveboard] * disabledActions: [Action.CreateLiveboard] * ``` * @version SDK: 1.32.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw */ CreateLiveboard = "createLiveboard", /** * Action ID for to hide or disable the * Verified Liveboard banner. * @example * ```js * hiddenAction: [Action.VerifiedLiveboard] * ``` * @version SDK: 1.29.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw */ VerifiedLiveboard = "verifiedLiveboard", /** * Action ID for the *Ask Sage* In Natural Language Search embed, * *Spotter* in Liveboard, full app, and Spotter embed. * * Allows initiating a conversation with ThoughtSpot AI analyst. * * @example * ```js * hiddenAction: [Action.AskAi] * ``` * @version SDK: 1.29.0 | ThoughtSpot Cloud: 9.12.0.cl */ AskAi = "AskAi", /** * The **Add KPI to Watchlist** action on Home page watchlist. * Adds a KPI chart to the watchlist on the Home page. * @example * ```js * disabledActions: [Action.AddToWatchlist] * ``` * @version SDK: 1.27.9 | ThoughtSpot Cloud: 9.12.5.cl */ AddToWatchlist = "addToWatchlist", /** * The **Remove from watchlist** menu action on KPI watchlist. * Removes a KPI chart from the watchlist on the Home page. * @example * ```js * disabledActions: [Action.RemoveFromWatchlist] * ``` * @version SDK: 1.27.9 | ThoughtSpot: 9.12.5.cl */ RemoveFromWatchlist = "removeFromWatchlist", /** * The **Organize Favourites** action on Homepage * *Favorites* module. * This action is deprecated. Use {@link Action.OrganizeFavorites} instead. * * @example * ```js * disabledActions: [Action.OrganiseFavourites] * ``` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ OrganiseFavourites = "organiseFavourites", /** * The **Organize Favorites** action on Homepage * *Favorites* module. * * @example * ```js * disabledActions: [Action.OrganizeFavorites] * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ OrganizeFavorites = "organiseFavourites", /** * The **AI Highlights** action on a Liveboard. * * @example * ```js * hiddenAction: [Action.AIHighlights] * ``` * @version SDK: 1.27.10 | ThoughtSpot Cloud: 9.12.5.cl */ AIHighlights = "AIHighlights", /** * The *Edit* action on the *Liveboard Schedules* page * (new Homepage experience). * Allows editing Liveboard schedules. * * @example * ```js * disabledActions: [Action.EditScheduleHomepage] * ``` * @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl */ EditScheduleHomepage = "editScheduleHomepage", /** * The *Pause* action on the *Liveboard Schedules* page * Pauses a scheduled Liveboard job. * @example * ```js * disabledActions: [Action.PauseScheduleHomepage] * ``` * @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl */ PauseScheduleHomepage = "pauseScheduleHomepage", /** * The **View run history** action **Liveboard Schedules** page. * Allows viewing schedule run history. * @example * ```js * disabledActions: [Action.ViewScheduleRunHomepage] * ``` * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl */ ViewScheduleRunHomepage = "viewScheduleRunHomepage", /** * Action ID to hide or disable the * unsubscribe option for Liveboard schedules. * @example * ```js * disabledActions: [Action.UnsubscribeScheduleHomepage] * ``` * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl */ UnsubscribeScheduleHomepage = "unsubscribeScheduleHomepage", /** * The **Manage Tags** action on Homepage Favourite Module. * @example * ```js * disabledActions: [Action.ManageTags] * ``` * @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl */ ManageTags = "manageTags", /** * The **Delete** action on the **Liveboard Schedules* page. * Deletes a Liveboard schedule. * @example * ```js * disabledActions: [Action.DeleteScheduleHomepage] * ``` * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl */ DeleteScheduleHomepage = "deleteScheduleHomepage", /** * The **Analyze CTA** action on KPI chart. * @example * ```js * disabledActions: [Action.KPIAnalysisCTA] * ``` * @version SDK: 1.34.0 | ThoughtSpot Cloud: 10.3.0.cl */ KPIAnalysisCTA = "kpiAnalysisCTA", /** * Action ID for disabling chip reorder in Answer and Liveboard * @example * ```js * const disabledActions = [Action.DisableChipReorder] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ DisableChipReorder = "disableChipReorder", /** * Action ID to show, hide, or disable filters * in a Liveboard tab. * * @example * ```js * hiddenAction: [Action.ChangeFilterVisibilityInTab] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ ChangeFilterVisibilityInTab = "changeFilterVisibilityInTab", /** * Action ID to show, hide, or disable all filter surfaces on a Liveboard, * including filter, parameter, and cross-filter chips at the liveboard, * tab, and group levels. Parameter and cross-filter chips are hide-only. * * @example * ```js * hiddenActions: [Action.AllLiveboardFilters] * disabledActions: [Action.AllLiveboardFilters] * ``` * @version SDK: 1.53.0 | ThoughtSpot: 26.10.0.cl */ AllLiveboardFilters = "allLiveboardFilters", /** * The **Data model instructions** button on the Spotter interface. * Allows opening the data model instructions modal. * * @example * ```js * hiddenAction: [Action.DataModelInstructions] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ DataModelInstructions = "DataModelInstructions", /** * The **Preview data** button on the Spotter interface. * Allows previewing the data used for Spotter queries. * * @example * ```js * hiddenAction: [Action.PreviewDataSpotter] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ PreviewDataSpotter = "previewDataSpotter", /** * The **Reset** link on the Spotter interface. * Resets the conversation with Spotter. * * @example * ```js * hiddenAction: [Action.ResetSpotterChat] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ ResetSpotterChat = "resetSpotterChat", /** * Action ID for hide or disable the * Spotter feedback widget. * * @example * ```js * hiddenAction: [Action.SpotterFeedback] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ SpotterFeedback = "spotterFeedback", /** * Action ID for hide or disable * the previous prompt edit option in Spotter. * * @example * ```js * hiddenAction: [Action.EditPreviousPrompt] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ EditPreviousPrompt = "editPreviousPrompt", /** * Action ID for hide or disable * the previous prompt deletion option in Spotter. * * @example * ```js * hiddenAction: [Action.DeletePreviousPrompt] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ DeletePreviousPrompt = "deletePreviousPrompt", /** * Action ID for hide or disable editing tokens generated from * Spotter results. * @example * ```js * hiddenAction: [Action.EditTokens] * ``` * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.6.0.cl */ EditTokens = "editTokens", /** * Action ID for hiding rename option for Column rename * @example * ```js * hiddenAction: [Action.ColumnRename] * ``` * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl */ ColumnRename = "columnRename", /** * Action ID for hide checkboxes for include or exclude * cover and filter pages in the Liveboard PDF * @example * ```js * hiddenAction: [Action.CoverAndFilterOptionInPDF] * ``` * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl */ CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF", /** * Action ID to hide or disable the Coaching workflow in Spotter conversations. * When disabled, users cannot access **Add to Coaching** workflow in conversation. * The **Add to Coaching** feature allows adding reference questions and * business terms to improve Spotter’s responses. This feature is generally available * (GA) from version 26.2.0.cl and enabled by default on embed deployments. * * This action governs both the answer-card **Add to memory** CTA and its * Spotter 3 successor, the response-footer **Remember this** CTA * (they are mutually exclusive). * @example * ```js * hiddenAction: [Action.InConversationTraining] * disabledActions: [Action.InConversationTraining] * * ``` * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl */ InConversationTraining = "InConversationTraining", /** * Action ID to hide the warnings banner in * Spotter results. It's an EA feature and * handled by LD. * @example * ```js * hiddenAction: [Action.SpotterWarningsBanner] * ``` * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl */ SpotterWarningsBanner = "SpotterWarningsBanner", /** * Action ID to hide the warnings border on the knowledge * card in Spotter results. It's an EA feature and * handled by LD. * @example * ```js * hiddenAction: [Action.SpotterWarningsOnTokens] * ``` * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl */ SpotterWarningsOnTokens = "SpotterWarningsOnTokens", /** * Action ID to disable the click event handler on knowledge * card in Spotter results. It's an EA feature and * handled by LD. * @example * ```js * hiddenAction: [Action.SpotterTokenQuickEdit] * ``` * @version SDK: 1.41.0 | ThoughtSpot Cloud: 10.13.0.cl */ SpotterTokenQuickEdit = "SpotterTokenQuickEdit", /** * The **PNG screenshot in email** option in the schedule email dialog. * Includes a PNG screenshot in the notification email body. * @example * ```js * disabledActions: [Action.PngScreenshotInEmail] * ``` * ``` * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl */ PngScreenshotInEmail = "pngScreenshotInEmail", /** * The **Remove attachment** action in the schedule email dialog. * Removes an attachment from the email configuration. * @example * ```js * disabledActions: [Action.RemoveAttachment] * ``` * ``` * ``` * @version SDK: 1.42.0 | ThoughtSpot Cloud: 10.14.0.cl */ RemoveAttachment = "removeAttachment", /** * The **Style panel** on a Liveboard. * Controls the visibility of the Liveboard style panel. * @example * ```js * hiddenActions: [Action.LiveboardStylePanel] * ``` * @version SDK: 1.43.0 | ThoughtSpot Cloud: 10.15.0.cl */ LiveboardStylePanel = "liveboardStylePanel", /** * The **Publish** action for Liveboards, Answers and Models. * Opens the publishing modal. It's a parent action for the * **Manage Publishing** and **Unpublish** actions if the object * is already published, otherwise appears standalone. * @example * ```js * hiddenActions: [Action.Publish] * disabledActions: [Action.Publish] * ``` * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl */ Publish = "publish", /** * The **Manage Publishing** action for Liveboards, Answers and Models. * Opens the same publishing modal as the **Publish** action. * Appears as a child action to the **Publish** action if the * object is already published. * @example * ```js * hiddenActions: [Action.ManagePublishing] * disabledActions: [Action.ManagePublishing] * ``` * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl */ ManagePublishing = "managePublishing", /** * The **Unpublish** action for Liveboards, Answers and Models. * Opens the unpublishing modal. Appears as a child action to * the **Publish** action if the object is already published. * @example * ```js * hiddenActions: [Action.Unpublish] * disabledActions: [Action.Unpublish] * ``` * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl */ Unpublish = "unpublish", /** * The **Parameterize** action for Tables and Connections. * Opens the parameterization modal. * @example * ```js * hiddenActions: [Action.Parameterize] * disabledActions: [Action.Parameterize] * ``` * @version SDK: 1.45.0 | ThoughtSpot Cloud: 26.2.0.cl */ Parameterize = "parameterise", /** * The **Move to Group** menu action on a Liveboard. * Allows moving a visualization to a different group. * @example * ```js * disabledActions: [Action.MoveToGroup] * ``` * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl */ MoveToGroup = "moveToGroup", /** * The **Move out of Group** menu action on a Liveboard. * Allows moving a visualization out of a group. * @example * ```js * disabledActions: [Action.MoveOutOfGroup] * ``` * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl */ MoveOutOfGroup = "moveOutOfGroup", /** * The **Create Group** menu action on a Liveboard. * Allows creating a new group. * @example * ```js * disabledActions: [Action.CreateGroup] * ``` * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl */ CreateGroup = "createGroup", /** * The **Ungroup Liveboard Group** menu action on a Liveboard. * Allows ungrouping a liveboard group. * @example * ```js * disabledActions: [Action.UngroupLiveboardGroup] * ``` * @version SDK: 1.44.0 | ThoughtSpot Cloud: 26.2.0.cl */ UngroupLiveboardGroup = "ungroupLiveboardGroup", /** * Controls visibility of the sidebar header (title and toggle button) * in the Spotter past conversations sidebar. * @example * ```js * hiddenActions: [Action.SpotterSidebarHeader] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterSidebarHeader = "spotterSidebarHeader", /** * Controls visibility of the sidebar footer (documentation link) * in the Spotter past conversations sidebar. * @example * ```js * hiddenActions: [Action.SpotterSidebarFooter] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterSidebarFooter = "spotterSidebarFooter", /** * Controls visibility and disable state of the sidebar toggle/expand button * in the Spotter past conversations sidebar. * @example * ```js * disabledActions: [Action.SpotterSidebarToggle] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterSidebarToggle = "spotterSidebarToggle", /** * Controls visibility and disable state of the "New Chat" button * in the Spotter past conversations sidebar. * @example * ```js * disabledActions: [Action.SpotterNewChat] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterNewChat = "spotterNewChat", /** * Controls visibility of the past conversation banner alert * in the Spotter interface. * @example * ```js * hiddenActions: [Action.SpotterPastChatBanner] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterPastChatBanner = "spotterPastChatBanner", /** * Controls visibility and disable state of the conversation edit menu * (three-dot menu) in the Spotter past conversations sidebar. * @example * ```js * disabledActions: [Action.SpotterChatMenu] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterChatMenu = "spotterChatMenu", /** * Controls visibility and disable state of the rename action * in the Spotter conversation edit menu. * @example * ```js * disabledActions: [Action.SpotterChatRename] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterChatRename = "spotterChatRename", /** * Controls visibility and disable state of the Spotter conversation Share * button in the chat header. Only takes effect once sharing is enabled * (enableShareConversation on). * @example * ```js * disabledActions: [Action.SpotterShareConversationButtonHeader] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareConversationButtonHeader = "spotterShareConversationButtonHeader", /** * Controls visibility and disable state of the Share item in the Spotter * conversation history (sidebar) edit menu. Independent of the header button * above, so a host can show Share in one entry point and hide it in the other. * @example * ```js * disabledActions: [Action.SpotterShareConversationMenuItemSidebar] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareConversationMenuItemSidebar = "spotterShareConversationMenuItemSidebar", /** * Controls visibility of the entire read-only shared-conversation data-access * banner shown when a recipient opens a shared view. Hide-only. * @example * ```js * hiddenActions: [Action.SpotterSharedConversationBanner] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterSharedConversationBanner = "spotterSharedConversationBanner", /** * Controls visibility and disable state of the cross/close button on the * read-only shared-conversation data-access banner (keeps the banner itself). * @example * ```js * hiddenActions: [Action.SpotterSharedConversationBannerDismissButton] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterSharedConversationBannerDismissButton = "spotterSharedConversationBannerDismissButton", /** * Controls visibility and disable state of the Exit button in the read-only * shared-view header. Hiding it does not disable the ExitSpotterSharedConversation * host event. * @example * ```js * hiddenActions: [Action.SpotterSharedConversationExitButton] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterSharedConversationExitButton = "spotterSharedConversationExitButton", /** * Controls visibility of the share-modal footer note ("Chat will be shared up * to the current moment…"). Hide-only. * @example * ```js * hiddenActions: [Action.SpotterShareUpToCurrentInfo] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareUpToCurrentInfo = "spotterShareUpToCurrentInfo", /** * Controls visibility and disable state of the share-modal "include new * messages since last shared version" checkbox. * @example * ```js * disabledActions: [Action.SpotterShareIncludeNewMessagesCheckbox] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareIncludeNewMessagesCheckbox = "spotterShareIncludeNewMessagesCheckbox", /** * Controls visibility and disable state of the cross on the share-modal * stale-snapshot info banner. * @example * ```js * hiddenActions: [Action.SpotterShareStaleInfoBannerDismissButton] * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ SpotterShareStaleInfoBannerDismissButton = "spotterShareStaleInfoBannerDismissButton", /** * Controls visibility and disable state of the delete action * in the Spotter conversation edit menu. * @example * ```js * disabledActions: [Action.SpotterChatDelete] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterChatDelete = "spotterChatDelete", /** * Controls visibility and disable state of the pin/unpin action * in the Spotter conversation edit menu. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * disabledActions: [Action.SpotterChatPin] * ``` */ SpotterChatPin = "spotterChatPin", /** * Controls visibility and disable state of the documentation/best practices * link in the Spotter sidebar footer. * @example * ```js * disabledActions: [Action.SpotterDocs] * ``` * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl */ SpotterDocs = "spotterDocs", /** * Controls visibility and disable state of the connector resources * section in the Spotter chat interface. * @example * ```js * hiddenActions: [Action.SpotterChatConnectorResources] * disabledActions: [Action.SpotterChatConnectorResources] * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SpotterChatConnectorResources = "spotterChatConnectorResources", /** * Controls visibility and disable state of the connectors * in the Spotter chat interface. * @example * ```js * hiddenActions: [Action.SpotterChatConnectors] * disabledActions: [Action.SpotterChatConnectors] * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SpotterChatConnectors = "spotterChatConnectors", /** * Controls visibility and disable state of the mode switcher * in the Spotter chat interface. * @example * ```js * hiddenActions: [Action.SpotterChatModeSwitcher] * disabledActions: [Action.SpotterChatModeSwitcher] * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SpotterChatModeSwitcher = "spotterChatModeSwitcher", /** * The **Basic Search** starter prompt pill. * * Starter prompt pills are the row of category buttons shown above the * Spotter chat input before a conversation starts. They give a new user * ready-made questions to click instead of typing one from scratch, and * disappear once the conversation begins. There are three, one per action * below. * * Clicking this pill opens a card of suggested simple questions; picking one * submits it to Spotter right away. Visible by default, and hidden along * with the other pills when the surface itself is off (see * {@link SpotterChatViewConfig.starterPrompts}). * @example * ```js * hiddenActions: [Action.QuickSearchPill] * ``` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ QuickSearchPill = "quickSearchPill", /** * The **Deep Analysis** starter prompt pill, next to * {@link Action.QuickSearchPill} above the Spotter chat input. * * Clicking it opens a card of suggested investigative questions ("why did * revenue drop?"). Picking one fills the chat input in Deep Analysis mode * rather than submitting immediately, so the user can edit it first. * Visible by default. * @example * ```js * hiddenActions: [Action.DeepAnalysisPill] * ``` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ DeepAnalysisPill = "deepAnalysisPill", /** * The **Data Literacy** starter prompt pill, next to * {@link Action.QuickSearchPill} above the Spotter chat input. * * Unlike the other two pills it opens no card: clicking it submits a prompt * that describes the data the model can answer over, helping a user who does * not yet know what is in the data source. The prompt text always comes from * ThoughtSpot, so only its label is customizable. Visible by default. * @example * ```js * hiddenActions: [Action.DataLiteracyPill] * ``` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ DataLiteracyPill = "dataLiteracyPill", /** * The **Include current period** checkbox for date filters. * Controls the visibility and availability of the option to include * the current time period in filter results. * @example * ```js * hiddenActions: [Action.IncludeCurrentPeriod] * disabledActions: [Action.IncludeCurrentPeriod] * ``` * @version SDK: 1.45.0 | ThoughtSpot: 26.4.0.cl */ IncludeCurrentPeriod = "includeCurrentPeriod", /** * The **Send Test Email** button in the Liveboard schedule modal. * Allows sending a test schedule email to self or all recipients. * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled. * @example * ```js * disabledActions: [Action.SendTestScheduleEmail] * hiddenActions: [Action.SendTestScheduleEmail] * ``` * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl */ SendTestScheduleEmail = "sendTestScheduleEmail", /** * The thumbs up/down feedback buttons in the SpotterViz panel. * Visible by default. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * hiddenActions: [Action.SpotterVizFeedback] * disabledActions: [Action.SpotterVizFeedback] * ``` */ SpotterVizFeedback = "spotterVizFeedback", /** * The version restore button on checkpoint cards in the SpotterViz panel. * Visible by default. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * hiddenActions: [Action.SpotterVizCheckpointRestore] * disabledActions: [Action.SpotterVizCheckpointRestore] * ``` */ SpotterVizCheckpointRestore = "spotterVizCheckpointRestore", /** * The **SpotterViz** button in the top edit header. * Visible by default. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * hiddenActions: [Action.SpotterViz] * disabledActions: [Action.SpotterViz] * ``` */ SpotterViz = "spotterViz", /** * The reference-mode toggle button inside the SpotterViz chat input. * When users enable reference mode, clicking tiles, filters, or * parameters adds them as chat context. Hide this action to remove * the reference-mode capability entirely. * Visible by default. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterVizReferenceMode] * disabledActions: [Action.SpotterVizReferenceMode] * ``` */ SpotterVizReferenceMode = "spotterVizReferenceMode", /** * Clears browser cache and fetches new data for liveboard ChartViz Containers. * Requires `enableLiveboardDataCache` to be enabled. * @example * ```js * disabledActions: [Action.RefreshLiveboardBrowserCache] * hiddenActions: [Action.RefreshLiveboardBrowserCache] * ``` * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl */ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache", /** * Controls visibility and disable state of the share action * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystShare] * disabledActions: [Action.SpotterAnalystShare] * ``` */ SpotterAnalystShare = "spotterAnalystShare", /** * Controls visibility and disable state of the edit action * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystEdit] * disabledActions: [Action.SpotterAnalystEdit] * ``` */ SpotterAnalystEdit = "spotterAnalystEdit", /** * Controls visibility and disable state of the create action * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystCreate] * disabledActions: [Action.SpotterAnalystCreate] * ``` */ SpotterAnalystCreate = "spotterAnalystCreate", /** * Controls visibility and disable state of the delete action * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystDelete] * disabledActions: [Action.SpotterAnalystDelete] * ``` */ SpotterAnalystDelete = "spotterAnalystDelete", /** * Controls visibility and disable state of the make a copy action * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystMakeACopy] * disabledActions: [Action.SpotterAnalystMakeACopy] * ``` */ SpotterAnalystMakeACopy = "spotterAnalystMakeACopy", /** * Controls visibility and disable state of the sidebar * in the Spotter Analyst interface. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystSidebar] * disabledActions: [Action.SpotterAnalystSidebar] * ``` */ SpotterAnalystSidebar = "spotterAnalystSidebar", /** * Controls visibility and disable state of the analyst list * ("Show all") in the Spotter Analyst interface. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * hiddenActions: [Action.SpotterAnalystList] * disabledActions: [Action.SpotterAnalystList] * ``` */ SpotterAnalystList = "spotterAnalystList", /** * Controls visibility and disable state of the default Spotter analyst * entry in the Spotter Analyst interface. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * hiddenActions: [Action.SpotterDefaultAnalyst] * disabledActions: [Action.SpotterDefaultAnalyst] * ``` */ SpotterDefaultAnalyst = "spotterDefaultAnalyst", /** * The **Spotter** button in the Liveboard header. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * hiddenActions: [Action.SpotterOnLiveboard] * disabledActions: [Action.SpotterOnLiveboard] * ``` */ SpotterOnLiveboard = "spotterOnLiveboard", /** * Controls the visibility and disabled state of the "Chart Type" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.ChartTypeSettings], * disabledActions: [Action.ChartTypeSettings], * } * ``` */ ChartTypeSettings = "CHART_TYPE", /** * Controls the visibility and disabled state of the "Layout" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.LayoutSettings], * disabledActions: [Action.LayoutSettings], * } * ``` */ LayoutSettings = "LAYOUT", /** * Controls the visibility and disabled state of the "Column" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.ColumnSettings], * disabledActions: [Action.ColumnSettings], * } * ``` */ ColumnSettings = "COLUMN", /** * Controls the visibility and disabled state of the "Axis" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.AxisSettings], * disabledActions: [Action.AxisSettings], * } * ``` */ AxisSettings = "AXIS", /** * Controls the visibility and disabled state of the "Data Label" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.DataLabelSettings], * disabledActions: [Action.DataLabelSettings], * } * ``` */ DataLabelSettings = "DATA_LABEL", /** * Controls the visibility and disabled state of the "Tooltip" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.TooltipSettings], * disabledActions: [Action.TooltipSettings], * } * ``` */ TooltipSettings = "TOOLTIP", /** * Controls the visibility and disabled state of the "Legend" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.LegendSettings], * disabledActions: [Action.LegendSettings], * } * ``` */ LegendSettings = "LEGEND", /** * Controls the visibility and disabled state of the "Display" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.DisplaySettings], * disabledActions: [Action.DisplaySettings], * } * ``` */ DisplaySettings = "DISPLAY", /** * Controls the visibility and disabled state of the "Query Details" menu * item in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.QuerySettings], * disabledActions: [Action.QuerySettings], * } * ``` */ QuerySettings = "QUERY_DETAILS", /** * Controls the visibility and disabled state of the "Custom Action" menu * item in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.CustomSettings], * disabledActions: [Action.CustomSettings], * } * ``` */ CustomSettings = "CUSTOM_ACTION", /** * Controls the visibility and disabled state of the "Muze AI" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.MuzeAiSettings], * disabledActions: [Action.MuzeAiSettings], * } * ``` */ MuzeAiSettings = "MUZE_AI", /** * Controls the visibility and disabled state of the "R Analysis" menu item * in Chart Settings V2. * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * { * hiddenActions: [Action.RAnalysisSettings], * disabledActions: [Action.RAnalysisSettings], * } * ``` */ RAnalysisSettings = "R_ANALYSIS", /** * Controls the visibility and disabled state of the "Add to Collection" menu item. * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl * @example * ```js * { * hiddenActions: [Action.AddToCollection], * disabledActions: [Action.AddToCollection], * } * ``` */ AddToCollection = "addToCollection", /** * Controls the visibility and disabled state of the "Create Collection" button. * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl * @example * ```js * { * hiddenActions: [Action.CreateCollection], * disabledActions: [Action.CreateCollection], * } * ``` */ CreateCollection = "createCollection", /** * Controls the visibility and disabled state of the "Move" menu item in a * Collection. * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl * @example * ```js * { * hiddenActions: [Action.MoveToCollection], * disabledActions: [Action.MoveToCollection], * } * ``` */ MoveToCollection = "moveToCollection", /** * Controls the visibility and disabled state of the "Remove" menu item in a * Collection. * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl * @example * ```js * { * hiddenActions: [Action.RemoveFromCollection], * disabledActions: [Action.RemoveFromCollection], * } * ``` */ RemoveFromCollection = "removeFromCollection", /** * Controls the visibility and disabled state of the "Delete" menu item for a * Collection. * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl * @example * ```js * { * hiddenActions: [Action.DeleteCollection], * disabledActions: [Action.DeleteCollection], * } * ``` */ DeleteCollection = "deleteCollection" } export declare enum PrefetchFeatures { FullApp = "FullApp", SearchEmbed = "SearchEmbed", LiveboardEmbed = "LiveboardEmbed", VizEmbed = "VizEmbed" } /** * Enum for options to change context trigger. * The `BOTH_CLICKS` option is available from 10.8.0.cl. */ export declare enum ContextMenuTriggerOptions { LEFT_CLICK = "left-click", RIGHT_CLICK = "right-click", BOTH_CLICKS = "both-clicks" } export interface ColumnValue { column: { id: string; name: string; dataType: string; [key: string]: any; }; value: string | number | boolean | { v: { s: number; e: number; }; }; } export interface VizPoint { selectedAttributes: ColumnValue[]; selectedMeasures: ColumnValue[]; } /** * @group Events */ export interface CustomActionPayload { /** * Id of the custom action that was triggered. Matches the `id` you set on * the {@link CustomAction}. Omitted on Liveboard-level code-based actions. */ id?: string; contextMenuPoints?: { clickedPoint: VizPoint; selectedPoints: VizPoint[]; }; embedAnswerData: { name: string; id: string; sources: { header: { guid: string; }; }; columns: any[]; data: any[]; [key: string]: any; }; session: SessionInterface; vizId?: string; } /** * A code-based custom action to inject into the embedded ThoughtSpot UI. * Pass an array of these as `customActions` in the embed view config. When a * user invokes the action, the host emits {@link EmbedEvent.CustomAction} with * a {@link CustomActionPayload} carrying the same `id`. */ export interface CustomAction { /** * Display label shown on the action's button or menu item. */ name: string; /** * Unique identifier for the action. Echoed back as `id` on the * {@link CustomActionPayload} when the action is invoked. */ id: string; /** * Where the action appears: a primary button, the "More" menu, or the * right-click context menu. See {@link CustomActionsPosition}. */ position: CustomActionsPosition; /** * The surface the action applies to (Liveboard, visualization, Answer, or * Spotter). See {@link CustomActionTarget}. The allowed `position` values * and scoping keys depend on the target. */ target: CustomActionTarget; /** * Scope the action to specific objects by GUID. Which keys are allowed * depends on `target` (for example, a `VIZ` action may use `answerIds`, * `liveboardIds`, and `vizIds`). */ metadataIds?: { answerIds?: string[]; liveboardIds?: string[]; vizIds?: string[]; }; /** * Scope the action by data model, using model GUIDs or column names. * Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets. */ dataModelIds?: { modelIds?: string[]; modelColumnNames?: string[]; }; /** * Restrict the action to specific organizations by ID. */ orgIds?: string[]; /** * Restrict the action to specific user groups by ID. */ groupIds?: string[]; } /** * Enum options to show custom actions at different * positions in the application. */ export declare enum CustomActionsPosition { /** * Shows the action as a primary button * in the toolbar area of the embed. */ PRIMARY = "PRIMARY", /** * Shows the action inside the "More" menu * (three-dot overflow menu). */ MENU = "MENU", /** * Shows the action in the right-click * context menu. Only supported for * {@link CustomActionTarget.VIZ}, * {@link CustomActionTarget.ANSWER}, and * {@link CustomActionTarget.SPOTTER} targets. */ CONTEXTMENU = "CONTEXTMENU" } /** * Enum options to mention the target of the code-based custom action. * The target determines which type of ThoughtSpot object the action is * associated with, and also controls which positions and scoping options * are available. */ export declare enum CustomActionTarget { /** * Action applies at the Liveboard level. * Supported positions: * {@link CustomActionsPosition.PRIMARY}, * {@link CustomActionsPosition.MENU}. * Can be scoped with * `metadataIds.liveboardIds`, * `orgIds`, and `groupIds`. */ LIVEBOARD = "LIVEBOARD", /** * Action applies to individual * visualizations (charts/tables). * Supported positions: * {@link CustomActionsPosition.PRIMARY}, * {@link CustomActionsPosition.MENU}, * {@link CustomActionsPosition.CONTEXTMENU}. * Can be scoped with `metadataIds` * (answerIds, liveboardIds, vizIds), * `dataModelIds` (modelIds, * modelColumnNames), `orgIds`, * and `groupIds`. */ VIZ = "VIZ", /** * Action applies to saved or unsaved * Answers. Supported positions: * {@link CustomActionsPosition.PRIMARY}, * {@link CustomActionsPosition.MENU}, * {@link CustomActionsPosition.CONTEXTMENU}. * Can be scoped with * `metadataIds.answerIds`, * `dataModelIds` (modelIds, * modelColumnNames), `orgIds`, * and `groupIds`. */ ANSWER = "ANSWER", /** * Action applies to Spotter * (AI-powered search). * Supported positions: * {@link CustomActionsPosition.MENU}, * {@link CustomActionsPosition.CONTEXTMENU}. * Can be scoped with * `dataModelIds.modelIds`, * `orgIds`, and `groupIds`. */ SPOTTER = "SPOTTER" } /** * Enum options to show or suppress Visual Embed SDK and * ThoughtSpot application logs in the console output. * This attribute doesn't support suppressing * browser warnings or errors. */ export declare enum LogLevel { /** * No application or SDK-related logs will be logged * in the console output. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.SILENT, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ SILENT = "SILENT", /** * Log only errors in the console output. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.ERROR, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ ERROR = "ERROR", /** * Log only warnings and errors in the console output. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.WARN, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ WARN = "WARN", /** * Log only the information alerts, warnings, and errors * in the console output. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.INFO, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ INFO = "INFO", /** * Log debug messages, warnings, information alerts, * and errors in the console output. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.DEBUG, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ DEBUG = "DEBUG", /** * All logs will be logged in the browser console. * @example * ```js * init({ * ... //other embed view config, * logLevel: LogLevel.TRACE, * }) * ``` * @version SDK: 1.26.7 | ThoughtSpot Cloud: 9.10.0.cl */ TRACE = "TRACE" } /** * Error types emitted by embedded components. * * These enum values categorize different types of errors that can occur during * the lifecycle of an embedded ThoughtSpot component. * Use {@link EmbedErrorDetailsEvent} and {@link EmbedErrorCodes} to handle specific errors. * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl * @group Error Handling * * @example * Handle specific error types * ```js * embed.on(EmbedEvent.Error, (error) => { * switch (error.errorType) { * case ErrorDetailsTypes.API: * console.error('API error:', error.message); * break; * case ErrorDetailsTypes.VALIDATION_ERROR: * console.error('Validation error:', error.message); * break; * case ErrorDetailsTypes.NETWORK: * console.error('Network error:', error.message); * break; * default: * console.error('Unknown error:', error); * } * }); * ``` */ export declare enum ErrorDetailsTypes { /** API call failure */ API = "API", /** General validation error */ VALIDATION_ERROR = "VALIDATION_ERROR", /** Network connectivity or request error */ NETWORK = "NETWORK" } /** * Error codes for identifying specific issues in embedded ThoughtSpot components. Use * {@link EmbedErrorDetailsEvent} and {@link ErrorDetailsTypes} codes for precise error * handling and debugging. * * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl * @group Error Handling * @example * Handle specific error codes in the error event handler * ```js * embed.on(EmbedEvent.Error, (error) => { * switch (error.code) { * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND: * console.error('Worksheet ID not found:', error.message); * break; * case EmbedErrorCodes.LIVEBOARD_ID_MISSING: * console.error('Liveboard ID is missing:', error.message); * break; * case EmbedErrorCodes.CONFLICTING_ACTIONS_CONFIG: * console.error('Conflicting actions configuration:', error.message); * break; * case EmbedErrorCodes.CONFLICTING_TABS_CONFIG: * console.error('Conflicting tabs configuration:', error.message); * break; * default: * console.error('Unknown error:', error); * } * }); * ``` * */ export declare enum EmbedErrorCodes { /** Worksheet ID not found or does not exist */ WORKSHEET_ID_NOT_FOUND = "WORKSHEET_ID_NOT_FOUND", /** Required Liveboard ID is missing from configuration */ LIVEBOARD_ID_MISSING = "LIVEBOARD_ID_MISSING", /** Conflicting action configuration detected */ CONFLICTING_ACTIONS_CONFIG = "CONFLICTING_ACTIONS_CONFIG", /** Conflicting tab configuration detected */ CONFLICTING_TABS_CONFIG = "CONFLICTING_TABS_CONFIG", /** Error during component initialization */ INIT_ERROR = "INIT_ERROR", /** Network connectivity or request error */ NETWORK_ERROR = "NETWORK_ERROR", /** Custom action validation failed */ CUSTOM_ACTION_VALIDATION = "CUSTOM_ACTION_VALIDATION", /** Authentication/login failed */ LOGIN_FAILED = "LOGIN_FAILED", /** Render method was not called before attempting to use the component */ RENDER_NOT_CALLED = "RENDER_NOT_CALLED", /** Host event type is undefined or invalid */ HOST_EVENT_TYPE_UNDEFINED = "HOST_EVENT_TYPE_UNDEFINED", /** Error parsing api intercept body */ PARSING_API_INTERCEPT_BODY_ERROR = "PARSING_API_INTERCEPT_BODY_ERROR", /** Failed to update embed parameters during pre-render */ UPDATE_PARAMS_FAILED = "UPDATE_PARAMS_FAILED", /** Invalid URL provided in configuration */ INVALID_URL = "INVALID_URL", /** Host event payload validation failed */ HOST_EVENT_VALIDATION = "HOST_EVENT_VALIDATION", /** UpdateFilters payload is invalid - missing or malformed filter/filters */ UPDATEFILTERS_INVALID_PAYLOAD = "UPDATEFILTERS_INVALID_PAYLOAD", /** DrillDown payload is invalid - missing or malformed points */ DRILLDOWN_INVALID_PAYLOAD = "DRILLDOWN_INVALID_PAYLOAD", /** UpdateParameters payload is invalid - malformed applicability */ UPDATEPARAMETERS_INVALID_PAYLOAD = "UPDATEPARAMETERS_INVALID_PAYLOAD" } /** * Error event object emitted when an error occurs in an embedded component. * * This interface defines the structure of error objects returned by the {@link * EmbedEvent.Error} event. It provides detailed information about what went wrong, * including the error type, a human-readable message, and a machine-readable error code. * * ## Properties * * - **errorType**: One of the predefined {@link ErrorDetailsTypes} values * - **message**: Human-readable error description (string or array of strings for * multiple errors) * - **code**: Machine-readable error identifier {@link EmbedErrorCodes} * values * - **[key: string]**: Additional context-specific for backward compatibility * * ## Usage * * Listen to the {@link EmbedEvent.Error} event to receive instances of this object * and implement appropriate error handling logic based on the `errorType`. * * @version SDK: 1.44.2 | ThoughtSpot: 26.2.0.cl * @group Error Handling * * @example * Handle specific error types * * ```js * embed.on(EmbedEvent.Error, (error) => { * switch (error.code) { * case EmbedErrorCodes.WORKSHEET_ID_NOT_FOUND: * console.error('Worksheet ID not found:', error.message, error.code); * break; * default: * console.error('Unknown error:', error); * } * }); * ``` * @example * Handle multiple error messages * * ```js * embed.on(EmbedEvent.Error, (error) => { * const messages = Array.isArray(error.message) * ? error.message * : [error.message]; * messages.forEach(msg => console.error(msg)); * }); * ``` * */ export interface EmbedErrorDetailsEvent { /** The type of error that occurred */ errorType: ErrorDetailsTypes; /** Human-readable error message(s) describing what went wrong */ message: string | string[]; /** Machine-readable error code for programmatic error handling */ code: EmbedErrorCodes; /** How badly the embed is affected. Defaults to {@link EmbedErrorSeverity.SEV3}. */ severity?: EmbedErrorSeverity; /** Additional context-specific for backward compatibility */ [key: string]: any; } /** * How badly an error affects the embed, so the host can decide whether it is * worth surfacing to the end user. * * Mirrors the severity that ThoughtSpot itself stamps on errors raised inside * the embedded app, so a host can apply one rule to both sources. * * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @group Error Handling * * @example * Only surface errors that took the embed down * * ```js * embed.on(EmbedEvent.Error, (error) => { * if (error.severity === EmbedErrorSeverity.SEV1) { * showBanner(error.message); * } * }); * ``` */ export declare enum EmbedErrorSeverity { /** The embed cannot render. Nothing usable is on screen. */ SEV1 = 1, /** Something is degraded but the embed still works. */ SEV2 = 2, /** Everything else, including validation of the embedder's own input. */ SEV3 = 3 } /** * Context types for specifying the page context when triggering host events. * Used as the third parameter in the `trigger` method to help ThoughtSpot * understand the current page context for better event handling. * * @example * ```js * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk'; * * // Trigger an event with specific context * embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search); * ``` * * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl * @group Events */ export declare enum ContextType { /** * Search answer context for search page or edit viz dialog on liveboard page. */ Search = "search-answer", /** * Liveboard context for liveboard page. */ Liveboard = "liveboard", /** * Answer context for explore modal/page on liveboard page. */ Answer = "answer", /** * Spotter context for spotter modal/page. */ Spotter = "spotter", /** * Other context for any other generic page. */ Other = "other" } export interface DefaultAppInitData { customisations: CustomisationsInterface; authToken: string; runtimeFilterParams: string | null; runtimeParameterParams: string | null; hiddenHomepageModules: HomepageModule[]; reorderedHomepageModules: string[]; hostConfig: Record; hiddenHomeLeftNavItems: string[]; customVariablesForThirdPartyTools: Record; hiddenListColumns: ListPageColumns[]; customActions: CustomAction[]; interceptTimeout: number | undefined; interceptUrls: (string | InterceptedApiType)[]; embedExpiryInAuthToken: boolean; shouldBypassPayloadValidation?: boolean; useHostEventsV2?: boolean; } /** * Named groups of ThoughtSpot APIs that can be intercepted, for use in * `interceptUrls`. Each group expands to the underlying request URLs, so you do * not have to list them individually. */ export declare enum InterceptedApiType { /** * The APIs that fetch the data backing an Answer, including its chart, * table, and headline data. */ AnswerData = "AnswerData", /** * Intercepts every `fetch` request the embedded application makes, not only * the data APIs. This includes authentication, session, and metadata calls, * so the handler must respond to requests it does not recognize by passing * `execute: true`. Listing this alongside other entries in `interceptUrls` * supersedes them. */ ALL = "ALL", /** * The APIs that fetch the data backing a Liveboard. */ LiveboardData = "LiveboardData" } export type ApiInterceptFlags = { /** * Emits `EmbedEvent.OnBeforeGetVizDataIntercept` before the Answer data * APIs are called. This is the earlier, narrower form of interception, kept * for backward compatibility and implemented on top of * `EmbedEvent.ApiIntercept`. Prefer `interceptUrls` with * `InterceptedApiType.AnswerData` in new code. * * Setting this also intercepts the Answer data APIs, so both * `EmbedEvent.OnBeforeGetVizDataIntercept` and `EmbedEvent.ApiIntercept` * are emitted for those requests. * * Can be used for Search and App Embed from SDK 1.29.0 * * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl */ isOnBeforeGetVizDataInterceptEnabled?: boolean; /** * The requests to intercept, given as `InterceptedApiType` groups, absolute * URLs, or paths beginning with `/` that are resolved against the * ThoughtSpot host. Setting this is what turns interception on. * * A URL matches only on exact equality with the request's fully resolved * URL, query string included, so prefer an `InterceptedApiType` group where * one covers the API you need. * * Each intercepted request pauses and emits `EmbedEvent.ApiIntercept`, then * proceeds according to the response passed to that event's responder. * * @example * ```js * const embed = new LiveboardEmbed('#embed', { * ...viewConfig, * interceptUrls: [InterceptedApiType.LiveboardData], * }) * ``` * * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl */ interceptUrls?: (string | InterceptedApiType)[]; /** * How long, in milliseconds, an intercepted request waits for the * `EmbedEvent.ApiIntercept` responder before it is abandoned. Defaults to * 30000. On timeout the request fails and `EmbedEvent.Error` is emitted. * * @example * ```js * const embed = new LiveboardEmbed('#embed', { * ...viewConfig, * interceptUrls: [InterceptedApiType.ALL], * interceptTimeout: 1000, * }) * ``` * * @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl */ interceptTimeout?: number; }; /** * Object IDs for the embedded component. * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl */ export interface ObjectIds { /** * Liveboard ID. */ liveboardId?: string; /** * Answer ID. */ answerId?: string; /** * Viz IDs. */ vizIds?: string[]; /** * Data model IDs. */ dataModelIds?: string[]; /** * Modal title. */ modalTitle?: string; } export interface ContextObject { /** * Stack of context objects. */ stack: Array<{ /** * Name of the context object. */ name: string; /** * Type of the context object. */ type: ContextType; /** * Object IDs of the context object. */ objectIds: ObjectIds; }>; /** * Current context object. */ currentContext: { /** * Name of the current context object. */ name: string; type: ContextType; objectIds: ObjectIds; }; } export interface FontProperties { color?: string; bold?: boolean; italic?: boolean; strikeThrough?: boolean; underline?: boolean; } export interface SolidBackgroundAttrs { color?: string; } export interface GradientBackgroundAttrs { backgroundFormatMidpoint?: number; colors?: string[]; backgroundFormatRange?: number[]; isAutoScaled?: boolean; } /** * Data label filter operators * @group Visual Overrides */ export declare enum DataLabelFilterOperator { /** Greater than */ GreaterThan = "GREATER_THAN", /** Less than */ LessThan = "LESS_THAN", /** Greater than or equal to */ GreaterThanOrEqualTo = "GREATER_THAN_OR_EQUAL_TO", /** Less than or equal to */ LessThanOrEqualTo = "LESS_THAN_OR_EQUAL_TO", /** Equal to */ EqualTo = "EQUAL_TO", /** Not equal to */ NotEqualTo = "NOT_EQUAL_TO" } /** * Conditional formatting operators * @group Visual Overrides */ export declare enum ConditionalFormattingOperator { /** Is equal to */ Is = "IS", /** Is not equal to */ IsNot = "IS_NOT", /** Contains */ Contains = "CONTAINS", /** Does not contain */ DoesNotContain = "DOES_NOT_CONTAIN", /** Starts with */ StartsWith = "STARTS_WITH", /** Ends with */ EndsWith = "ENDS_WITH", /** Greater than */ GreaterThan = "GREATER_THAN", /** Less than */ LessThan = "LESS_THAN", /** Greater than or equal to */ GreaterThanEqualTo = "GREATER_THAN_EQUAL_TO", /** Less than or equal to */ LessThanEqualTo = "LESS_THAN_EQUAL_TO", /** Equal to */ EqualTo = "EQUAL_TO", /** Not equal to */ NotEqualTo = "NOT_EQUAL_TO", /** Is between */ IsBetween = "IS_BETWEEN", /** Is null */ IsNull = "IS_NULL", /** Is not null */ IsNotNull = "IS_NOT_NULL" } /** * Background format types for conditional formatting * @group Visual Overrides */ export declare enum BackgroundFormatType { /** Solid color background */ Solid = "SOLID", /** Gradient background */ Gradient = "GRADIENT" } /** * Comparison types for conditional formatting * @group Visual Overrides */ export declare enum ConditionalFormattingComparisonType { /** Value-based comparison */ ValueBased = "VALUE_BASED", /** Column-based comparison */ ColumnBased = "COLUMN_BASED", /** Parameter-based comparison */ ParameterBased = "PARAMETER_BASED" } /** * A single conditional formatting rule row * @group Visual Overrides */ export interface ConditionalFormattingRow { /** Comparison operator */ operator: ConditionalFormattingOperator | string; /** Value to compare against */ value?: string; /** Range values for range-based comparisons */ rangeValues?: { min: number; max: number; }; /** Plot the formatting as a band/area */ plotAsBand?: boolean; /** Highlight this row if the condition is met */ isHighlightRow?: boolean; /** Type of comparison: value-based, column-based, or parameter-based */ comparisonType?: ConditionalFormattingComparisonType | string; /** Column ID to apply the formatting to (left-hand side) */ lhsColumnId?: string; /** Column name to compare against (right-hand side) */ columnToCompare?: string; /** Parameter ID to compare against */ comparisonParameterId?: string; /** Font properties to apply (color, bold, italic, etc.) */ fontProperties?: FontProperties; /** Background format type: solid color or gradient */ backgroundFormatType?: BackgroundFormatType | string; /** Solid background color attributes */ solidBackgroundAttrs?: SolidBackgroundAttrs; /** Gradient background attributes */ gradientBackgroundAttrs?: GradientBackgroundAttrs; } /** * Conditional formatting configuration * @group Visual Overrides */ export interface ConditionalFormatting { /** Array of conditional formatting rules */ rows?: ConditionalFormattingRow[]; } /** * Color palette for charts * @group Visual Overrides */ export interface ColorPalette { /** Array of color values (hex codes or color names) */ colors?: string[]; } /** * Legend position options * @group Visual Overrides */ export declare enum LegendPosition { /** Position legend at the top */ Top = "top", /** Position legend at the bottom */ Bottom = "bottom", /** Position legend on the left */ Left = "left", /** Position legend on the right */ Right = "right" } /** * Table theme options * @group Visual Overrides */ export declare enum TableTheme { /** Outline theme */ Outline = "OUTLINE", /** Row theme */ Row = "ROW", /** Zebra theme */ Zebra = "ZEBRA" } /** * Table content density options * @group Visual Overrides */ export declare enum TableContentDensity { /** Regular density */ Regular = "REGULAR", /** Compact density */ Compact = "COMPACT" } /** * Chart legend configuration * @group Visual Overrides */ export interface ChartLegend { /** Show or hide the legend */ show?: boolean; /** Position of the legend */ position?: LegendPosition | string; /** Color palette to use for legend colors */ colorPalette?: ColorPalette; } /** * Filter for data labels * @group Visual Overrides */ export interface DataLabelFilter { /** Filter threshold value */ value?: number; /** Filter operator */ operator?: DataLabelFilterOperator | string; } /** * Data label configuration for a specific column * @group Visual Overrides */ export interface ColumnDataLabel { /** Column name to apply data label overrides to */ name: string; /** Show or hide data labels for this column */ visible?: boolean; /** Filter to apply to data labels */ filter?: DataLabelFilter | null; } /** * Chart data label configuration * @group Visual Overrides */ export interface ChartDataLabel { /** Show labels for all data points */ allLabels?: boolean; /** Show labels for stacked values */ stackLabels?: boolean; /** Per-column data label configurations */ columnDataLabel?: ColumnDataLabel[]; } /** * Chart summaries and totals configuration * @group Visual Overrides */ export interface ChartSummaries { /** Show row totals */ showRowTotals?: boolean; /** Show column totals */ showColumnTotals?: boolean; /** Show row grand totals */ showRowGrandTotals?: boolean; /** Show column grand totals */ showColumnGrandTotals?: boolean; } /** * Gridline configuration * @group Visual Overrides */ export interface GridLine { /** Show vertical gridlines */ x?: boolean; /** Show horizontal gridlines */ y?: boolean; } /** * Chart display configuration * @group Visual Overrides */ export interface ChartDisplay { /** Summary and totals configuration */ summaries?: ChartSummaries; /** Show regression line on chart */ regressionLine?: boolean; /** Gridline visibility configuration */ gridLine?: GridLine; } /** * Y-axis range configuration * @group Visual Overrides */ export interface YAxisRange { /** Minimum value for Y-axis */ min?: number; /** Maximum value for Y-axis */ max?: number; } /** * Chart axis configuration * @group Visual Overrides */ export interface ChartAxis { /** Column names to link to this axis */ linkedColumns?: string[]; /** Show the axis name */ showName?: boolean; /** Show the axis label values */ showLabelValue?: boolean; /** Y-axis range configuration */ yAxisRange?: YAxisRange; } /** * Chart column override configuration * @group Visual Overrides */ export interface ChartColumn { /** Column name to apply overrides to */ name: string; /** Color for the column (hex code) */ color?: string; /** Conditional formatting rules to apply to the column */ conditionalFormatting?: ConditionalFormatting; } /** * Chart visualization overrides * @group Visual Overrides */ export interface ChartOverrides { /** Legend configuration */ legend?: ChartLegend; /** Data label configuration */ dataLabel?: ChartDataLabel; /** Display properties (summaries, regression line, gridlines) */ display?: ChartDisplay; /** Per-axis configurations */ axis?: ChartAxis[]; /** Per-column configurations */ columns?: ChartColumn[]; /** Update mask paths for partial updates */ updateMaskPaths?: string[]; } /** * Table column override configuration * @group Visual Overrides */ export interface TableColumn { /** * Name of the column to apply overrides to */ name: string; /** * Enable or disable text wrapping for the column */ wrapText?: boolean; /** * Show or hide the column */ show?: boolean; /** * Conditional formatting rules to apply to the column */ conditionalFormatting?: ConditionalFormatting; } /** * Table display configuration * @group Visual Overrides */ export interface TableDisplay { /** Table theme */ tableTheme?: TableTheme | string; /** Table content density */ tableContentDensity?: TableContentDensity | string; } /** * Column summary visibility configuration * @group Visual Overrides */ export interface ColumnSummaryVisibility { /** Column ID to control summary visibility for */ columnId: string; /** Show or hide summary for this column */ visible: boolean; } /** * Display summary configuration * @group Visual Overrides */ export interface DisplaySummaryConfig { /** Show all column summaries by default */ showAllSummaries?: boolean; /** Per-column summary visibility overrides */ columnVisibility?: ColumnSummaryVisibility[]; } /** * Table visualization overrides * @group Visual Overrides */ export interface TableOverrides { /** Per-column configurations (properties, conditional formatting) */ columns?: TableColumn[]; /** Table display properties (theme, density) */ display?: TableDisplay; /** Summary/headline column visibility configuration */ displaySummaryConfig?: DisplaySummaryConfig; /** Update mask paths for partial updates */ updateMaskPaths?: string[]; } /** * Visualization overrides to customize chart and table rendering * within embedded ThoughtSpot components. * * @group Visual Overrides * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * visualOverrides: { * chart: { * legend: { show: true, position: 'bottom' }, * columns: [{ name: 'Revenue', color: '#1f77b4' }], * }, * table: { * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' }, * }, * }, * }); * ``` */ export interface VisualizationOverrides { /** Chart visualization overrides */ chart?: ChartOverrides; /** Table visualization overrides */ table?: TableOverrides; } /** * The configuration object for the full-height behavior shared by the * Liveboard and app embeds. * * When `fullHeight` is enabled the SDK resizes the embed container to match the * height reported by the ThoughtSpot app, and — when lazy loading is also * enabled — keeps the app informed of the portion of the embed that is * currently visible so that visualizations load on demand. */ export interface FullHeightViewConfig { /** * If set to true, the embedded object container dynamically resizes * according to the height of the Liveboard. * * **Note**: Using fullHeight loads all visualizations on the * Liveboard simultaneously, which results in multiple warehouse * queries and potentially a longer wait for the topmost * visualizations to display on the screen. * Setting `fullHeight` to `false` fetches visualizations * incrementally as users scroll the page to view the charts and tables. * * From SDK 1.52.0, enabling `fullHeight` also turns on * {@link lazyLoadingForFullHeight} and * {@link enableScrollableContainerLazyLoading}, so visualizations load as * they scroll into view. Set either flag to `false` to opt out. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1 * @example * ```js * // Replace with the embed component name. * // For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed', { * ... // other view config * fullHeight: true, * }); * ``` */ fullHeight?: boolean; /** * This is the minimum height (in pixels) for a full-height Liveboard. * Setting this height helps resolve issues with empty Liveboards and * other screens navigable from a Liveboard. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl * @default 500 * @example * ```js * // Replace with the embed component name. * // For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed', { * ... // other view config * fullHeight: true, * minimumHeight: 600, * }); * ``` */ minimumHeight?: number; /** * This is the minimum height (in pixels) for a full-height Liveboard. * Setting this height helps resolve issues with empty Liveboards and * other screens navigable from a Liveboard. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1 * @deprecated Use `minimumHeight` instead. * @default 500 * @example * ```js * // Replace with the embed component name. * // For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed', { * ... // other view config * fullHeight: true, * defaultHeight: 600, * }); * ``` */ defaultHeight?: number; /** * Loads visualizations only as they scroll into the viewport, instead of * loading the whole full-height Liveboard at once. * * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be * set explicitly. Set it to `false` to load every visualization upfront. * The flag has no effect unless `fullHeight` is enabled. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @type {boolean} * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl * @default true when `fullHeight` is enabled, from SDK 1.52.0 * @example * ```js * // Replace with the embed component name. * // For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed-container', { * // ...other options * fullHeight: true, * lazyLoadingForFullHeight: true, * }) * ``` */ lazyLoadingForFullHeight?: boolean; /** * How far outside the viewport a visualization starts loading, when * {@link lazyLoadingForFullHeight} is enabled. * * For example, if the margin is set to '10px', * the visualization will be loaded 10px before its top edge is visible in the * viewport. * * The format is similar to CSS margin, so `'500px 0px'` extends the * prefetch 500px above and below the viewport and not sideways. Accepted * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and * `auto`; an invalid value is logged and ignored. * * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one * visualization ahead of the scroll position, so a chart has usually * finished loading by the time it scrolls into view. Use a smaller margin * to cut warehouse queries further, or `'0px'` to load a visualization * only once it is actually visible. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @type {string} * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0 * @example * ```js * // Replace with the embed component name. * // For example, AppEmbed or LiveboardEmbed * const embed = new ('#embed-container', { * // ...other options * fullHeight: true, * lazyLoadingForFullHeight: true, * // With 0px, the visualization only starts loading once it is * // visible in the viewport. * lazyLoadingMargin: '0px', * }) * ``` */ lazyLoadingMargin?: string; /** * Computes the visible region of the embed against its scrollable and * clipping ancestors, instead of treating the browser window as the only * viewport, and tracks scroll and resize on those ancestors. * * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be * set explicitly. Set it to `false` when the page scrolls with the window * and the embed has no clipping ancestor, to skip the extra ancestor * tracking. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @type {boolean} * @default true when `fullHeight` is enabled, from SDK 1.52.0 */ enableScrollableContainerLazyLoading?: boolean; } /** * Request for host events that MAY target a specific visualization. * Omitting vizId targets the current answer/liveboard as a whole. * (In some contexts, e.g. Spotter, the app requires vizId at runtime.) */ export interface VizScopedRequest { vizId?: string; } /** * Request for host events that MUST target a specific visualization. */ export interface RequiredVizRequest { vizId: string; } /** * Request for Spotter conversation-scoped host events. */ export interface ConversationScopedRequest { conversationId: string; } /** * Request payload for {@link HostEvent.OpenFilter}. Field requirements * vary by context (Search requires columnId/type/dataType/name); the * contract is the cross-context superset — the app validates per context * at runtime. Per-context views: {@link OpenFilterLiveboardRequest}, * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}. */ export interface OpenFilterRequest { column: { columnId?: string; columnName?: string; type?: string; dataType?: string; name?: string; isStrictDateColumn?: boolean; }; applicability?: Applicability; visualizationId?: string; liveboardId?: string; } /** * `OpenFilter` in Liveboard context: full column plus scoping fields. * A per-context view of {@link OpenFilterRequest} (documentation only today; * `trigger()` accepts the superset). */ export interface OpenFilterLiveboardRequest { column: { columnId?: string; columnName?: string; }; applicability?: Applicability; visualizationId?: string; liveboardId?: string; } /** * `OpenFilter` in Spotter context: only the column identity is accepted. */ export interface OpenFilterSpotterRequest { column: { columnId?: string; columnName?: string; }; } /** * `OpenFilter` in Search/Answer context: column identity plus column metadata. */ export interface OpenFilterSearchRequest { column: { columnId?: string; columnName?: string; type?: string; dataType?: string; name?: string; isStrictDateColumn?: boolean; }; } /** * Request payload for {@link HostEvent.DrillDown}. Drills on selected or * clicked points of a visualization. In Liveboard context `vizId` is required * at runtime (documentation only today; `trigger()` is not yet type-enforced). */ export interface DrillDownRequest { points: { clickedPoint?: object; selectedPoints?: object[]; }; columnGuid?: string; autoDrillDown?: boolean; vizId?: string; } /** * Request payload for {@link HostEvent.OpenParameter}. One of parameterId * or parameterName must be provided (validated at runtime). */ export interface OpenParameterRequest { parameter: { parameterId?: string; parameterName?: string; }; applicability?: Applicability; } /** * Request payload for {@link HostEvent.Search}. */ export interface SearchRequest { searchQuery: string; dataSources: string[]; execute?: boolean; } /** * Request payload for {@link HostEvent.SpotterSearch}. */ export interface SpotterSearchRequest { query: string; executeSearch: boolean; } /** * A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}. */ export interface CrossFilterCondition { columnName?: string; operator?: string; values: Array; } /** * Request payload for {@link HostEvent.UpdateCrossFilter}. */ export interface UpdateCrossFilterRequest { vizId: string; conditions: CrossFilterCondition[]; } /** * A single filter entry for {@link HostEvent.UpdateFilters}. Supports both * the current (columnName/operator) and legacy (column/oper) field names. */ export interface HostFilterUpdate { columnName?: string; columnId?: string; operator?: string; values: Array; type?: string; datePeriod?: string; negate?: boolean; /** Legacy field name for columnName. */ column?: string; /** Legacy field name for operator. */ oper?: string; applicability?: Applicability; } /** * Request payload for {@link HostEvent.UpdateFilters} (singular or plural * form). */ export interface UpdateFiltersRequest { filter?: HostFilterUpdate; filters?: HostFilterUpdate[]; /** * Scope the update to a specific visualization on a Liveboard. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ visualizationId?: string; /** * Scope the update to a specific Liveboard. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ liveboardId?: string; } /** * Request payload for personalised-view host events. */ export interface PersonalisedViewRequest { viewId?: string; viewName?: string; } /** * Request payload for schedule-email related host events. */ export interface ScheduleEmailRequest { sendToSelf?: boolean; } /** * Object form of the {@link HostEvent.Navigate} payload. */ export interface NavigateRequest { /** * Route to navigate to, or a history delta such as `1` or `-1`. */ path: string | number; /** * When `true`, replaces the current history entry instead of pushing. */ replace?: boolean; } /** * Request payload for {@link HostEvent.SetActiveTab}. */ export interface SetActiveTabRequest { /** * Id of the liveboard tab to make active. */ tabId: string; } /** * Typed request payloads for host events that do not go through the UI * passthrough pipeline (`HostEvent` member → request type; `void` = no payload). * * Shapes are transcribed from the host's runtime validation schemas * (embed-util HostEventContract) — what the ThoughtSpot app actually enforces — * flattened across contexts to the permissive superset (context-specific * requirements are validated at runtime). * * Responses are typed only for UI-passthrough-backed events today (see * {@link HostEventResponse}). Add a response map alongside this one when the * first explicit response shape is specified; tightening later is additive. * * Deliberately absent (do not add without an audit): * - DrillDown: the runtime schema (object-shaped points) and the UI * passthrough contract (string-shaped points) disagree — resolve the * drift first. * - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough * mapping; their Spotter-context vizId requirement is runtime-only. */ export interface HostEventRequestMap { [HostEvent.UpdateRuntimeFilters]: RuntimeFilter[]; [HostEvent.UpdateParameters]: RuntimeParameter[]; [HostEvent.UpdateFilters]: UpdateFiltersRequest; [HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest; [HostEvent.OpenFilter]: OpenFilterRequest; [HostEvent.OpenParameter]: OpenParameterRequest; [HostEvent.SetVisibleVizs]: string[]; [HostEvent.SetVisibleTabs]: string[]; [HostEvent.SetHiddenTabs]: string[]; [HostEvent.SetActiveTab]: SetActiveTabRequest; [HostEvent.Navigate]: string | number | NavigateRequest; [HostEvent.Search]: SearchRequest; [HostEvent.ResetSearch]: void; [HostEvent.AddColumns]: { columnIds: string[]; }; [HostEvent.RemoveColumn]: { columnId: string; }; [HostEvent.Edit]: VizScopedRequest; [HostEvent.Save]: VizScopedRequest; [HostEvent.Delete]: VizScopedRequest; [HostEvent.Share]: VizScopedRequest; [HostEvent.Present]: VizScopedRequest; [HostEvent.CopyLink]: VizScopedRequest; [HostEvent.ExportTML]: VizScopedRequest; [HostEvent.EditTML]: VizScopedRequest; [HostEvent.UpdateTML]: VizScopedRequest; [HostEvent.SchedulesList]: VizScopedRequest; [HostEvent.Schedule]: VizScopedRequest; [HostEvent.SpotIQAnalyze]: VizScopedRequest; [HostEvent.ShowUnderlyingData]: VizScopedRequest; [HostEvent.CreateMonitor]: VizScopedRequest; [HostEvent.ManageMonitor]: VizScopedRequest; [HostEvent.SyncToSheets]: VizScopedRequest; [HostEvent.SyncToOtherApps]: VizScopedRequest; [HostEvent.ManagePipelines]: VizScopedRequest; [HostEvent.DownloadAsPng]: VizScopedRequest; [HostEvent.DownloadAsCsv]: VizScopedRequest; [HostEvent.DownloadAsXlsx]: VizScopedRequest; [HostEvent.DownloadAsPdf]: VizScopedRequest & { liveboardId?: string; }; [HostEvent.Explore]: RequiredVizRequest; [HostEvent.AskSage]: RequiredVizRequest; [HostEvent.AskSpotter]: RequiredVizRequest; [HostEvent.AnswerChartSwitcher]: RequiredVizRequest; [HostEvent.UpdatePersonalisedView]: Pick; [HostEvent.SelectPersonalizedView]: PersonalisedViewRequest; [HostEvent.ResetLiveboardPersonalisedView]: void; [HostEvent.AIHighlights]: void; [HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest; [HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest; [HostEvent.SpotterSearch]: SpotterSearchRequest; [HostEvent.ResetSpotterConversation]: void; [HostEvent.ShareSpotterConversation]: ConversationScopedRequest; [HostEvent.CloseSpotterShareConversation]: void; [HostEvent.ExitSpotterSharedConversation]: void; [HostEvent.PinSpotterConversation]: ConversationScopedRequest; [HostEvent.UnpinSpotterConversation]: ConversationScopedRequest; [HostEvent.EditLastPrompt]: string; [HostEvent.DeleteLastPrompt]: void; [HostEvent.PreviewSpotterData]: void; [HostEvent.SpotterVizSendUserMessage]: { query: string; }; [HostEvent.InitSpotterVizConversation]: void; [HostEvent.OpenSpotterVizPanel]: void; [HostEvent.CloseSpotterVizPanel]: void; } /** * Per-context request shapes for events whose payload varies by /** * Resolves the typed request payload for a host event. * Resolution order: * 1. Explicitly typed request in {@link HostEventRequestMap} * 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping}) * 3. `any` (event not audited/typed yet — backward compatible) * * Requests are the cross-context superset today. The per-context `*Request` * interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape * narrows by context; a later release may thread the caller's context to * enforce it. */ export type HostEventRequest = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest : any; /** * Resolves the typed response payload for a host event. Only UI passthrough * backed events have typed responses today; everything else resolves to `any`. */ export type HostEventResponse = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse : any; /** * Payload type accepted by `embed.trigger()`. Keeps the historical * `PayloadT` escape hatch so untyped existing call sites keep compiling. */ export type TriggerPayload = PayloadT | HostEventRequest; /** * Deep `Partial` of a request type: every field optional at every depth, with no * index signature — so object literals carrying unknown fields are flagged. */ export type DeepPartial = T extends (infer U)[] ? DeepPartial[] : T extends object ? { [K in keyof T]?: DeepPartial; } : T; /** * `trigger()`'s `data` type: an all-optional view of the event's request type. * See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}. * No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced). */ export type TriggerData = HostEventRequest extends void ? Record : DeepPartial>; /** * Response type returned by `embed.trigger()`. */ export type TriggerResponse = PayloadT extends HostEventRequest ? HostEventResponse : any; /** * Typed `data` field per embed event. Seed with audited events only. */ export interface EmbedEventDataExtension { [EmbedEvent.AuthInit]: { /** * Whether authentication was successful. */ isLoggedIn?: boolean; [key: string]: any; }; [EmbedEvent.EmbedListenerReady]: Record; /** * Fired when a callback-type custom action is triggered. Use * `payload.data.id` to identify which action fired. */ [EmbedEvent.CustomAction]: CustomActionPayload; } /** * Resolves the typed `data` payload for an embed event; `any` when the * event has not been audited/typed yet. */ export type EmbedEventData = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any; /** * Full envelope delivered to `embed.on()` callbacks for a given event: * the wire fields (`type`, `status`) plus the typed `data`. */ export type EmbedEventPayload = Omit & { data: EmbedEventData; }; declare class HostEventClient { iFrame: HTMLIFrameElement; /** Cached list of available UI passthrough keys from the embedded app */ private availablePassthroughKeysCache; /** Host events with custom handlers * (setters or special logic) - * bound to instance for protected method access */ private readonly customHandlers; constructor(iFrame?: HTMLIFrameElement); /** * A wrapper over process trigger to * @param {HostEvent} message Host event to send * @param {any} data Data to send with the host event * @returns {Promise} - the response from the process trigger */ protected processTrigger(message: HostEvent, data: any, context?: ContextType): Promise; handleHostEventWithParam(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest, context?: ContextType): Promise>; hostEventFallback(hostEvent: HostEvent, data: any, context?: ContextType): Promise; /** * For getter events that return data. Tries UI passthrough first; * if the app doesn't support it (no response data), falls back to * the legacy host event channel. Real errors are thrown as-is. */ private getDataWithPassthroughFallback; /** * Setter for the iframe element used for host events * @param {HTMLIFrameElement} iFrame - the iframe element to set */ setIframeElement(iFrame: HTMLIFrameElement): void; /** * Fetches the list of available UI passthrough keys from the embedded app. * Result is cached for the session. Returns empty array on failure. */ private getAvailableUIPassthroughKeys; triggerUIPassthroughApi(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest, context?: ContextType): Promise>; protected handlePinEvent(payload: HostEventRequest, context?: ContextType): Promise>; protected handleSaveAnswerEvent(payload: HostEventRequest, context?: ContextType): Promise; protected handleUpdateFiltersEvent(payload: HostEventRequest, context?: ContextType): Promise; protected handleUpdateParametersEvent(payload: HostEventRequest, context?: ContextType): Promise; protected handleDrillDownEvent(payload: HostEventRequest, context?: ContextType): Promise; /** * Dispatches a host event using the appropriate channel: * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter). * 2. Otherwise fall back to the legacy host event channel. * * @param hostEvent - The host event to trigger * @param payload - Optional payload for the event * @param context - Optional context (e.g. vizId) for scoped operations */ triggerHostEvent, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload, context?: ContextT): Promise>; } declare class TsEmbed { /** * The DOM node which was inserted by the SDK to either * render the iframe or display an error message. * This is useful for removing the DOM node when the * embed instance is destroyed. */ protected insertedDomEl: Node; /** * The DOM node where the ThoughtSpot app is to be embedded. */ protected hostElement: HTMLElement; /** * The key to store the embed instance in the DOM node */ protected embedNodeKey: string; protected embedContainerLoadedKey: string; protected isAppInitialized: boolean; /** * A reference to the iframe within which the ThoughtSpot app * will be rendered. */ protected iFrame: HTMLIFrameElement; /** * Setter for the iframe element * @param {HTMLIFrameElement} iFrame HTMLIFrameElement */ protected setIframeElement(iFrame: HTMLIFrameElement): void; protected viewConfig: AllEmbedViewConfig & { visibleTabs?: string[]; hiddenTabs?: string[]; showAlerts?: boolean; }; protected embedConfig: EmbedConfig; /** * The ThoughtSpot hostname or IP address */ protected thoughtSpotHost: string; protected thoughtSpotV2Base: string; /** * A map of event handlers for particular message types triggered * by the embedded app; multiple event handlers can be registered * against a particular message type. */ private eventHandlerMap; /** * A flag that is set to true post render. */ protected isRendered: boolean; /** * A flag to mark if an error has occurred. */ private isError; /** * A flag that is set to true post preRender. */ private isPreRendered; /** * Should we encode URL Query Params using base64 encoding which ThoughtSpot * will generate for embedding. This provides additional security to * ThoughtSpot clusters against Cross site scripting attacks. * @default false */ private shouldEncodeUrlQueryParams; private defaultHiddenActions; private resizeObserver; private preRenderContainerEl; private containerScrollListener; protected hostEventClient: HostEventClient; protected isReadyForRenderPromise: Promise; protected shouldWaitForRenderPromise: boolean; /** * Handler for fullscreen change events */ private fullscreenChangeHandler; constructor(domSelector: DOMSelector, viewConfig?: AllEmbedViewConfig); /** * Throws error encountered during initialization. */ private throwInitError; /** * Handles errors within the SDK * @param error The error message or object * @param errorDetails The error details */ protected handleError(errorDetails: EmbedErrorDetailsEvent): void; /** * Extracts the type field from the event payload * @param event The window message event */ private getEventType; /** * Extracts the port field from the event payload * @param event The window message event * @returns */ private getEventPort; /** * Checks if preauth cache is enabled * from the view config and embed config * @returns boolean */ private isPreAuthCacheEnabled; /** * Checks if current embed is FullAppEmbed with visible primary navbar * @returns boolean */ private isFullAppEmbedWithVisiblePrimaryNavbar; /** * fix for ts7.sep.cl * will be removed for ts7.oct.cl * @param event * @param eventType * @hidden */ private formatEventData; private subscribedListeners; /** * Subscribe to network events (online/offline) that should * work regardless of auth status */ private subscribeToNetworkEvents; private handleApiInterceptEvent; private messageEventListener; /** * Subscribe to message events that depend on successful iframe setup */ private subscribeToMessageEvents; /** * Adds event listeners for both network and message events. * This maintains backward compatibility with the existing method. * Adds a global event listener to window for "message" events. * ThoughtSpot detects if a particular event is targeted to this * embed instance through an identifier contained in the payload, * and executes the registered callbacks accordingly. */ private subscribeToEvents; private unsubscribeToNetworkEvents; private unsubscribeToMessageEvents; private unsubscribeToEvents; protected getAuthTokenForCookielessInit(): Promise; protected getDefaultAppInitData(): Promise; protected getAppInitData(): Promise; /** * Send Custom style as part of payload of APP_INIT * @param _ * @param responder */ private appInitCb; /** * Helper method to refresh/update auth token for TrustedAuthTokenCookieless auth type * @param responder - Function to send response back * @param eventType - The embed event type to send * @param forceRefresh - Whether to force refresh the token * @returns Promise that resolves if token was refreshed, rejects otherwise */ private refreshAuthTokenForCookieless; private handleAuthFailure; /** * Refresh the auth token if the autoLogin is true and the authType is TrustedAuthTokenCookieless * @param _ * @param responder */ private tokenRefresh; /** * Sends updated auth token to the iFrame to avoid user logout * @param _ * @param responder */ private updateAuthToken; /** * Auto Login and send updated authToken to the iFrame to avoid user session logout * @param _ * @param responder */ private idleSessionTimeout; /** * Register APP_INIT event and sendback init payload */ private registerAppInit; /** * Constructs the base URL string to load the ThoughtSpot app. * @param query */ protected getEmbedBasePath(query: string): string; protected getUpdateEmbedParamsObject(): Promise<{ runtimeFilterParams: string; runtimeParameterParams: string; customisations: CustomisationsInterface; authToken: string; hiddenHomepageModules: HomepageModule[]; reorderedHomepageModules: string[]; hostConfig: Record; hiddenHomeLeftNavItems: string[]; customVariablesForThirdPartyTools: Record; hiddenListColumns: ListPageColumns[]; customActions: CustomAction[]; interceptTimeout: number; interceptUrls: string[]; embedExpiryInAuthToken: boolean; shouldBypassPayloadValidation?: boolean; useHostEventsV2?: boolean; layoutConfig?: LayoutConfig; frameParams?: FrameParams; theme?: string; styleSheet__unstable?: string; disabledActions?: Action[]; disabledActionReason?: string; hiddenActions?: Action[]; visibleActions?: Action[]; locale?: string; additionalFlags?: { [key: string]: string | number | boolean; }; customizations?: CustomisationsInterface; insertAsSibling?: boolean; usePrerenderedIfAvailable?: boolean; preRenderId?: string; doNotTrackPreRenderSize?: boolean; preRenderContainer?: string | HTMLElement; preRenderConfig?: PreRenderConfig; enableV2Shell_experimental?: boolean; embedComponentType?: string; exposeTranslationIDs?: boolean; disableRedirectionLinksInNewTab?: boolean; overrideOrgId?: number; overrideHistoryState?: boolean; linkOverride?: boolean; enableLinkOverridesV2?: boolean; primaryAction?: string; insertInToSlide?: boolean; showAlerts?: boolean; refreshAuthTokenOnNearExpiry?: boolean; isOnBeforeGetVizDataInterceptEnabled?: boolean; runtimeFilters?: RuntimeFilter[]; runtimeParameters?: RuntimeParameter[]; contextMenuTrigger?: ContextMenuTriggerOptions; excludeRuntimeFiltersfromURL?: boolean; excludeRuntimeParametersfromURL?: boolean; collapseSearchBar?: boolean; dataPanelV2?: boolean; enableCustomColumnGroups?: boolean; isThisPeriodInDateFiltersEnabled?: boolean; hideLiveboardHeader?: boolean; showLiveboardTitle?: boolean; showLiveboardDescription?: boolean; isLiveboardHeaderSticky?: boolean; enable2ColumnLayout?: boolean; isLiveboardAlwaysOn12ColLayout?: boolean; isLiveboardCompactHeaderEnabled?: boolean; showLiveboardVerifiedBadge?: boolean; hideIrrelevantChipsInLiveboardTabs?: boolean; showLiveboardReverifyBanner?: boolean; enableAskSage?: boolean; coverAndFilterOptionInPDF?: boolean; liveboardGutter?: number; isCentralizedLiveboardFilterUXEnabled?: boolean; isScopedLiveboardFilteringEnabled?: boolean; isLinkParametersEnabled?: boolean; isEnhancedFilterInteractivityEnabled?: boolean; showMaskedFilterChip?: boolean; isLiveboardMasterpiecesEnabled?: boolean; newChartsLibrary?: boolean; visibleTabs?: string[]; hiddenTabs?: string[]; }>; /** * Common query params set for all the embed modes. * @param queryParams * @returns queryParams */ protected getBaseQueryParams(queryParams?: Record): Record; /** * Constructs the base URL string to load v1 of the ThoughtSpot app. * This is used for embedding Liveboards, visualizations, and full application. * @param queryString The query string to append to the URL. * @param isAppEmbed A Boolean parameter to specify if you are embedding * the full application. */ protected getV1EmbedBasePath(queryString: string): string; protected getEmbedParams(): string; protected getEmbedParamsObject(): Record; protected getRootIframeSrc(): string; protected createIframeEl(frameSrc: string): HTMLIFrameElement; /** * Returns a merged {@link PreRenderConfig} object where each key prefers the * value from `preRenderConfig` over its deprecated top-level `viewConfig` * counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`, * `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility. */ protected getPreRenderConfig(): PreRenderConfig; /** * Returns true if this embed instance is configured for pre-rendering. */ protected isPreRenderEmbed(): boolean; protected handleInsertionIntoDOM(child: string | Node): void; /** * Renders the embedded ThoughtSpot app in an iframe and sets up * event listeners. * @param url - The URL of the embedded ThoughtSpot app. */ protected renderIFrame(url: string): Promise; protected createPreRenderWrapper(): HTMLDivElement; protected preRenderWrapper: HTMLElement; protected preRenderChild: HTMLElement; /** * Checks for an existing pre-rendered component and connects to it. * * If a matching pre-rendered component is found in the DOM, this method * sets the internal properties of the embed object to reference it. * * @returns True if a connection was successfully established, false otherwise. */ protected connectPreRendered(): boolean; protected isPreRenderConnected(): boolean; protected createPreRenderChild(child: string | Node): HTMLElement; /** * Creates the in-flow placeholder div inserted into the host element when * showPreRender() is called. The wrapper observes this element to stay * aligned with the host layout. */ private createPreRenderPlaceholder; /** * Resolves the configured preRenderContainer to a live element, falling * back to `document.body`. A string selector is re-queried on every call so * a remounted container (E.g.: React replacing the node) resolves to the * fresh element; an element passed directly cannot be re-resolved. */ private resolvePreRenderContainerTarget; private inheritPreRenderContainer; private getCustomPreRenderContainer; /** * Makes the resolved container a positioning context for the absolutely * positioned wrapper, stashing the original inline `position` on the element * (once) so destroy() can restore it exactly, leaving no trace. Recording it * on the element rather than per-instance lets the override be reverted even * when embeds share the same container. */ private applyPreRenderContainerPositioning; /** * Re-attaches the wrapper to a live container when the previously resolved * one has been detached or no longer holds the wrapper — e.g. the host app * remounted a custom preRenderContainer, which would otherwise leave a stale * reference and collapse the wrapper. Only string selectors can be * re-resolved; a container passed as an element is left untouched. */ private reconcilePreRenderContainer; protected insertIntoDOMForPreRender(child: string | Node): void; private showPreRenderByDefault; protected insertIntoDOM(child: string | Node): void; /** * Sets the height of the iframe * @param height The height in pixels */ protected setIFrameHeight(height: number | string): void; /** * We can process the customer given payload before sending it to the embed port * Embed event handler -> responder -> createEmbedEventResponder -> send response * @param eventPort The event port for a specific MessageChannel * @param eventType The event type * @returns */ protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void; private shouldSkipEvent; /** * Executes all registered event handlers for a particular event type * @param eventType The event type * @param data The payload invoked with the event handler * @param eventPort The event Port for a specific MessageChannel */ protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void; /** * Returns the ThoughtSpot hostname or IP address. */ protected getThoughtSpotHost(): string; /** * Gets the v1 event type (if applicable) for the EmbedEvent type * @param eventType The v2 event type * @returns The corresponding v1 event type if one exists * or else the v2 event type itself */ protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent; /** * Registers an event listener to trigger an alert when the ThoughtSpot app * sends an event of a particular message type to the host application. * @param messageType The message type * @param callback A callback as a function * @param options The message options * @param isSelf * @param isRegisteredBySDK * @example * ```js * tsEmbed.on(EmbedEvent.Error, (data) => { * console.error(data); * }); * ``` * @example * ```js * tsEmbed.on(EmbedEvent.Save, (data) => { * console.log("Answer save clicked", data); * }, { * start: true // This will trigger the callback on start of save * }); * ``` */ on(messageType: EmbedEventT, callback: (payload: EmbedEventPayload, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype; /** * Removes an event listener for a particular event type. * @param messageType The message type * @param callback The callback to remove * @example * ```js * const errorHandler = (data) => { console.error(data); }; * tsEmbed.on(EmbedEvent.Error, errorHandler); * tsEmbed.off(EmbedEvent.Error, errorHandler); * ``` */ off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype; /** * Triggers an event on specific Port registered against * for the EmbedEvent * @param eventType The message type * @param data The payload to send * @param eventPort * @param payload */ private triggerEventOnPort; /** * @hidden * Internal state to track if the embed container is loaded. * This is used to trigger events after the embed container is loaded. */ isEmbedContainerLoaded: boolean; /** * @hidden * Internal state to track the callbacks to be executed after the embed container * is loaded. * This is used to trigger events after the embed container is loaded. */ private embedContainerReadyCallbacks; protected getPreRenderObj(): T; protected takeOverPreRender(): void; private markEmbedContainerLoaded; private checkEmbedContainerLoaded; private executeEmbedContainerReadyCallbacks; /** * Executes a callback after the embed container is loaded. * @param callback The callback to execute */ protected executeAfterEmbedContainerLoaded(callback: () => void): void; protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void; /** * Triggers an event to the embedded app * * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the * payload is checked strictly against the event contract — update call sites now. * @param {HostEvent} messageType The event type * @param {TriggerData} data The payload, typed against the event's contract * @param {ContextType} context Optional context type to specify the context from which the event is triggered. * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context, * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context. * Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl * @returns A promise that resolves with the response from the embedded app * @example * ```js * // Trigger Pin event with context (SDK: 1.45.2+) * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk'; * embed.trigger(HostEvent.Pin, { * vizId: "123", * liveboardId: "456" * }, ContextType.Search); * ``` * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter) */ trigger, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData, context?: ContextT): Promise>; /** * Triggers an event to the embedded app, skipping the UI flow. * @param {UIPassthroughEvent} apiName - The name of the API to be triggered. * @param {UIPassthroughRequest} parameters - The parameters to be passed to the API. * @returns {Promise} - A promise that resolves with the response * from the embedded app. */ triggerUIPassThrough(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest): Promise>; /** * Marks the ThoughtSpot object to have been rendered * Needs to be overridden by subclasses to do the actual * rendering of the iframe. * @param args */ render(): Promise; getIframeSrc(): string; protected handleRenderForPrerender(): Promise; /** * Context object for the embedded component. * @returns {ContextObject} The current context object containing the page type and object ids. * @example * ```js * const context = await embed.getCurrentContext(); * console.log(context); * * // Example output * { * stack: [ * { * name: 'Liveboard', * type: ContextType.Liveboard, * objectIds: { * liveboardId: '123', * }, * }, * ], * currentContext: { * name: 'Liveboard', * type: ContextType.Liveboard, * objectIds: { * liveboardId: '123', * }, * }, * } * ``` * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl */ getCurrentContext(): Promise; /** * Generates the event name for a "Subscribed" embed event. * * This helper appends the "Subscribed" suffix to a given host or action event, * allowing you to listen for subscription lifecycle events in a consistent format. * * @param eventName - The host or action event to generate the subscribed event name for. * @returns The formatted event name (e.g., "Save Subscribed"). * * @version SDK: 1.47.2 | ThoughtSpot: 26.3.0.cl */ subscribedEvent(eventName: HostEvent | Action): string; /** * Creates the preRender shell * @param showPreRenderByDefault - Show the preRender after render, hidden by default */ preRender(showPreRenderByDefault?: boolean, replaceExistingPreRender?: boolean): Promise; /** * Get the Post Url Params for THOUGHTSPOT from the current * host app URL. * THOUGHTSPOT URL params starts with a prefix "ts-" * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw */ getThoughtSpotPostUrlParams(additionalParams?: { [key: string]: string | number; }): string; /** * Reverts the custom preRenderContainer's `position` to the value it had * before we overrode it to `relative` (see insertIntoDOMForPreRender). * * We restore the original inline value rather than forcing `static`, and we * skip the restore if another preRender wrapper is still mounted inside the * same container — a shared container still needs the positioning context. */ private restorePreRenderContainerPosition; /** * Detaches and clears the container scroll listener, if one is attached. */ private removeContainerScrollListener; /** * Destroys the ThoughtSpot embed, and remove any nodes from the DOM. * @version SDK: 1.19.1 | ThoughtSpot: * */ destroy(): void; getUnderlyingFrameElement(): HTMLIFrameElement; /** * Prerenders a generic instance of the TS component. * This means without the path but with the flags already applied. * This is useful for prerendering the component in the background. * @version SDK: 1.22.0 * @returns */ prerenderGeneric(): Promise; protected preRenderParamsApplied: Promise; protected beforePrerenderVisible(): void; /** * Displays the pre-rendered component inside the host element. * If the component has not been pre-rendered yet, it initiates rendering first. * Inserts a placeholder element into the host and positions the pre-render * wrapper to overlay it. */ showPreRender(): Promise; protected getPreRenderPlaceHolderElement(): HTMLDivElement; /** * Synchronizes the style properties of the PreRender component with the embedding * element. This function adjusts the position, width, and height of the PreRender * component * to match the dimensions and position of the embedding element. * @throws {Error} Throws an error if the embedding element (passed as domSelector) * is not defined or not found. */ syncPreRenderStyle(): void; /** * Hides the PreRender component if it is available. * If the component is not preRendered, it issues a warning. */ hidePreRender(): void; /** * Retrieves unique HTML element IDs for PreRender-related elements. * These IDs are constructed based on the provided 'preRenderId' from 'viewConfig'. * @returns {object} An object containing the IDs for the PreRender elements. * @property {string} wrapper - The HTML element ID for the PreRender wrapper. * @property {string} child - The HTML element ID for the PreRender child. */ getPreRenderIds(): { wrapper: string; child: string; placeHolder: string; }; /** * Returns the answerService which can be used to make arbitrary graphql calls on top * session. * @param vizId [Optional] to get for a specific viz in case of a Liveboard. * @version SDK: 1.25.0 | ThoughtSpot: 9.10.0 */ getAnswerService(vizId?: string): Promise; /** * Set up fullscreen change detection to automatically trigger ExitPresentMode * when user exits fullscreen mode */ private setupFullscreenChangeHandler; /** * Remove fullscreen change handler */ private removeFullscreenChangeHandler; } declare class V1Embed extends TsEmbed { protected viewConfig: AllEmbedViewConfig; constructor(domSelector: DOMSelector, viewConfig: AllEmbedViewConfig); /** * Render the app in an iframe and set up event handlers * @param iframeSrc */ protected renderV1Embed(iframeSrc: string): Promise; protected getRootIframeSrc(): string; /** * @inheritdoc * @example * ```js * tsEmbed.on(EmbedEvent.Error, (data) => { * console.error(data); * }); * ``` * @example * ```js * tsEmbed.on(EmbedEvent.Save, (data) => { * console.log("Answer save clicked", data); * }, { * start: true // This will trigger the callback on start of save * }); * ``` */ on(messageType: EmbedEventT, callback: (payload: EmbedEventPayload, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype; /** * Only for testing purposes. * @hidden */ test__executeCallbacks: (eventType: EmbedEvent, data: any, eventPort?: void | MessagePort) => void; } /** * Configuration for search options */ export interface SearchOptions { /** * The query string to pass to start the Conversation. */ searchQuery: string; } /** * The query mode Spotter uses when answering a question. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ export declare enum SpotterQueryMode { FAST_SEARCH = "fastSearch", RESEARCH = "research" } /** * Configuration for the pin/unpin conversation feature in the Spotter sidebar. * Grouped into one object because pin exposes several related settings * (enable + label overrides), unlike single-item actions like rename or * delete. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ export interface SpotterChatPinConfig { /** * Enables the pin/unpin conversation feature in embedded Spotter. Disabled * by default — hosts must opt in. When off, the Pin/Unpin menu entry and * the pin glyph are hidden and the PinSpotterConversation / * UnpinSpotterConversation host events are no-ops. Native (non-embedded) * Spotter is unaffected and ships pin enabled. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @default false */ enabled?: boolean; /** * Custom label text for the pin action in the conversation edit menu. * Defaults to translated "Pin" text. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ pinLabel?: string; /** * Custom label text for the unpin action in the conversation edit menu. * Defaults to translated "Unpin" text. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ unpinLabel?: string; } /** * Configuration for the Spotter sidebar. * Can be used in SpotterEmbed and AppEmbed. * @group Embed components * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ export interface SpotterSidebarViewConfig { /** * Controls the visibility of the past conversations sidebar. * @default false * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ enablePastConversationsSidebar?: boolean; /** * Custom title text for the sidebar header. * Defaults to translated "Spotter" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterSidebarTitle?: string; /** * Boolean to set the default expanded state of the sidebar. * @default false * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterSidebarDefaultExpanded?: boolean; /** * Custom label text for the rename action in the conversation edit menu. * Defaults to translated "Rename" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterChatRenameLabel?: string; /** * Custom label text for the delete action in the conversation edit menu. * Defaults to translated "DELETE" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterChatDeleteLabel?: string; /** * Pin/unpin conversation feature config (enable + label overrides). * Off by default in embed — hosts opt in via `enabled`. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ spotterChatPinConfig?: SpotterChatPinConfig; /** * Custom title text for the delete conversation confirmation modal. * Defaults to translated "Delete chat" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterDeleteConversationModalTitle?: string; /** * Custom message text for the past conversation banner alert. * Defaults to translated alert message. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterPastConversationAlertMessage?: string; /** * Custom URL for the documentation/best practices link. * Defaults to ThoughtSpot docs URL based on release version. * Note: URL must include the protocol (e.g., `https://www.example.com`). * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterDocumentationUrl?: string; /** * Custom label text for the best practices button in the footer. * Defaults to translated "Best Practices" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterBestPracticesLabel?: string; /** * Number of conversations to fetch per batch when loading conversation history. * @default 30 * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterConversationsBatchSize?: number; /** * Custom title text for the "New Chat" button in the sidebar. * Defaults to translated "New Chat" text. * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl */ spotterNewChatButtonTitle?: string; /** * Custom label text for the Spotter Analyst section in the sidebar. * @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl * @default Analyst */ spotterAnalystLabel?: string; /** * Custom label text for the Spotter Analysts section in the sidebar. * @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl * @default Analysts */ spotterAnalystsLabel?: string; } /** * Configuration for the Spotter conversation sharing feature. * Can be used in SpotterEmbed and AppEmbed. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @group Embed components */ export interface SpotterShareConversationConfig { /** * Enables sharing of the conversation. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false */ enableShareConversation?: boolean; /** * Header Share button + sidebar Share item label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default "Share" */ spotterShareLabel?: string; /** * Share modal title. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareModalTitle?: string; /** * Modal confirm button label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default "Share" */ spotterShareConfirmLabel?: string; /** * Modal cancel button label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default "Cancel" */ spotterShareCancelLabel?: string; /** * "Add users or groups" label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareAddUsersLabel?: string; /** * Empty-state title ("No users added yet"). * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareEmptyTitle?: string; /** * Empty-state subtitle ("Not shared with any user"). * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareEmptySubtitle?: string; /** * "Include new messages since last shared version" checkbox label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareIncludeNewMessagesLabel?: string; /** * Footer note when the snapshot is current ("…up to the current moment…"). * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareUpToCurrentLabel?: string; /** * Stale-snapshot info banner text ("All added users and groups will receive…"). * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterShareStaleInfoLabel?: string; /** * Read-only shared-view data-access banner message. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ spotterSharedConversationBannerMessage?: string; /** * Read-only shared-view Exit button label. * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default "Exit" */ spotterSharedConversationExitLabel?: string; } /** * A single starter prompt question shown under a category pill. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @group Embed components */ export interface StarterPromptQuestion { /** * Short label shown as a clickable suggestion. Falls back to `prompt` when * omitted. ThoughtSpot truncates it beyond 80 characters. */ label?: string; /** * Prompt text sent to Spotter on click. ThoughtSpot truncates it beyond * 300 characters. */ prompt: string; } /** * Configuration for a starter prompt category with questions * (`quick` and `research`). * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @group Embed components */ export interface StarterPromptCategory { /** * Overrides the default category pill label. ThoughtSpot truncates it * beyond 30 characters. */ label?: string; /** * Replaces the backend-generated prompts. ThoughtSpot renders the first 4 * and drops any entry without a `prompt`. */ questions?: StarterPromptQuestion[]; } /** * Configuration for the Data Literacy starter prompt category. * Only the label is customizable; the prompt text comes from the backend. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @group Embed components */ export interface StarterPreviewDataCategory { /** * Overrides the default category pill label. ThoughtSpot truncates it * beyond 30 characters. */ label?: string; } /** * Content configuration for the Spotter starter prompts. * Keys are fixed: `quick` (Basic Search), `research` (Deep Analysis), * `previewData` (Data Literacy) and `liveboard` (Liveboard chat panel). * * Note: this controls the Spotter chat interface only. The starter prompts on * the Liveboard SpotterViz surface are configured separately through * {@link SpotterVizConfig.customStarterPrompts}. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @group Embed components */ export interface StarterPromptsConfig { /** * Turns the starter prompts surface on. Must be set explicitly, an * unset flag leaves the surface off. * * Either this or `enableStarterPrompts` turns the surface on, so `false` * here does not switch it off while `enableStarterPrompts` is `true`. * @default false */ enable?: boolean; /** Basic Search category configuration. */ quick?: StarterPromptCategory; /** Deep Analysis category configuration. */ research?: StarterPromptCategory; /** Data Literacy category configuration. */ previewData?: StarterPreviewDataCategory; /** * Starter prompts for the Spotter chat panel on a Liveboard. * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ liveboard?: StarterPromptQuestion[]; } /** * Configuration for customizing Spotter chat UI branding. * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @group Embed components */ export interface SpotterChatViewConfig { /** * Hides the ThoughtSpot logo/icon in tool response * cards. The branding label prefix is controlled * separately via `toolResponseCardBrandingLabel`. * External MCP tool branding is not affected. * @default false */ hideToolResponseCardBranding?: boolean; /** * Custom label to replace the "ThoughtSpot" prefix * in tool response cards. Set to an empty string * `''` to hide the prefix entirely. Works * independently of `hideToolResponseCardBranding`. * External MCP tool branding is not affected. */ toolResponseCardBrandingLabel?: string; /** * Enables file upload in the Spotter chat interface. * * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl * @default false */ spotterFileUploadEnabled?: boolean; /** * Restricts the allowed file types for Spotter file upload. * * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl */ spotterFileUploadFileTypes?: SpotterFileUploadFileTypes; /** * Enables starter prompts in the Spotter chat interface. * * Either this or `starterPrompts.enable` turns the surface on, so it stays * on while this is `true` even if `starterPrompts.enable` is `false`. * * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.51.0 | ThoughtSpot: 26.8.0.cl * @default false */ enableStarterPrompts?: boolean; /** * Customizes the labels and questions of the Spotter starter prompts. * Individual pills are hidden or shown with `hiddenActions` / * `visibleActions` using `Action.QuickSearchPill`, * `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`. * * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheet-id', * hiddenActions: [Action.DeepAnalysisPill], * spotterChatConfig: { * starterPrompts: { * enable: true, * quick: { * label: 'Quick questions', * questions: [ * { label: 'Top products', prompt: 'What are the top products by revenue?' }, * ], * }, * previewData: { label: 'Explore your data' }, * }, * }, * }) * ``` */ starterPrompts?: StarterPromptsConfig; /** * Opens the Spotter chat panel when the Liveboard loads. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @default true * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * liveboardId: 'liveboard-id', * spotterChatConfig: { * openSpotterOnLiveboardByDefault: false, * }, * }) * ``` */ openSpotterOnLiveboardByDefault?: boolean; } /** * Configuration for the Spotter Analyst experience. * Can be used in SpotterEmbed. * @group Embed components * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * spotterAnalystConfig: { * analystId: 'analyst-id-1234', * }, * }) * ``` */ export interface SpotterAnalystConfig { /** * Pins the embed to a single spotter analyst. Implies no default Spotter * and no "Show all". * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl */ analystId?: string; } /** * The configuration for the embedded spotterEmbed options. * @group Embed components */ export interface SpotterEmbedViewConfig extends Omit { /** * The ID of the data source object. For example, Model, View, or Table. Spotter uses * this object to query data and generate Answers. * This field is optional. If not provided, Spotter loads using the * previously selected user data source. */ worksheetId?: string; /** * The array of data source GUIDs to set on load. Spotter uses * these GUIDs to query data and generate Answers. * dataSources is preferred over worksheetId if both are provided. * The feature is currently behind a feature flag. * * Supported embed types: `SpotterEmbed` * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * // ...other embed view config * dataSources: ['id-2345', 'id-2345'], * }); * ``` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl */ dataSources?: string[]; /** * Configuration for the Spotter Analyst experience. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * spotterAnalystConfig: { * analystId: 'analyst-id-1234', * }, * }) * ``` */ spotterAnalystConfig?: SpotterAnalystConfig; /** * Ability to pass a starting search query to the conversation. */ searchOptions?: SearchOptions; /** * disableSourceSelection : Disables data source selection * but still display the selected data source. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * disableSourceSelection : true, * }) * ``` */ disableSourceSelection?: boolean; /** * hideSourceSelection : Hide data source selection * * Supported embed types: `SpotterEmbed` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * hideSourceSelection : true, * }) * ``` */ hideSourceSelection?: boolean; /** * Flag to control Data panel experience * * Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed` * @deprecated from SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed, or SearchBarEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * dataPanelV2: true, * }) * ``` */ dataPanelV2?: boolean; /** * showSpotterLimitations : show limitation text * of the spotter underneath the chat input. * default is false. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * showSpotterLimitations : true, * }) * ``` */ showSpotterLimitations?: boolean; /** * hideSampleQuestions : Hide sample questions on * the initial screen of the conversation. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * hideSampleQuestions : true, * }) * ``` */ hideSampleQuestions?: boolean; /** * The list of runtime filters to apply to a search Answer, * visualization, or Liveboard. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * // other embed view config * runtimeFilters: [ * { * columnName: 'color', * operator: RuntimeFilterOp.EQ, * values: ['red'], * }, * ], * }) * ``` */ runtimeFilters?: RuntimeFilter[]; /** * Flag to control whether runtime filters should be included in the URL. * If true, filters will be passed via app initialization payload * (default behavior from SDK 1.45.0). * If false/undefined, filters are appended to the iframe URL instead. * (default behavior before SDK 1.45.0). * * Supported embed types: `SpotterEmbed` * @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl * @default true */ excludeRuntimeFiltersfromURL?: boolean; /** * The list of runtime parameters to apply to the conversation. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * // other embed view config * runtimeParameters: [ * { * name: 'Integer Param', * value: 10, * }, * ], * }) * ``` */ runtimeParameters?: RuntimeParameter[]; /** * Flag to control whether runtime parameters should be included in the URL. * If true, parameters will be passed via app * initialization payload (default behavior from SDK 1.45.0). * If false/undefined, parameters are appended to * the iframe URL instead (default behavior before SDK 1.45.0). * * Supported embed types: `SpotterEmbed` * @version SDK: 1.41.0 | ThoughtSpot: 10.13.0.cl * @default true */ excludeRuntimeParametersfromURL?: boolean; /** * updatedSpotterChatPrompt : Controls the updated spotter chat prompt. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl * @default false * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterChatPrompt : true, * }) * ``` */ updatedSpotterChatPrompt?: boolean; /** * showSpotterRadiance : Controls the radiance on the Spotter page. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * showSpotterRadiance : true, * }) * ``` */ showSpotterRadiance?: boolean; /** * Sets the default query mode when Spotter loads — Fast Search or * Research Mode. Applies fresh on every new session for this embed * instance only; it does not persist as a user preference and does * not affect other embeds or native ThoughtSpot usage. * * Supported embed types: `SpotterEmbed`, `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default SpotterQueryMode.FAST_SEARCH * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * defaultQueryMode: SpotterQueryMode.RESEARCH, * }) * ``` */ defaultQueryMode?: SpotterQueryMode; /** * Enables the stop answer generation button in the Spotter embed UI, * allowing users to interrupt an ongoing answer generation. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @default false */ enableStopAnswerGenerationEmbed?: boolean; /** * Controls the visibility of the past conversations sidebar. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @deprecated from SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl * Use `spotterSidebarConfig.enablePastConversationsSidebar`. * @default false */ enablePastConversationsSidebar?: boolean; /** * Configuration for the Spotter sidebar UI customization. * * Supported embed types: `SpotterEmbed`, `AppEmbed` * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheet-id', * // Deprecated standalone flag (backward compatibility) * enablePastConversationsSidebar: false, * // Recommended config; this value takes precedence * spotterSidebarConfig: { * enablePastConversationsSidebar: true, * spotterSidebarTitle: 'My Conversations', * spotterSidebarDefaultExpanded: true, * }, * }) * ``` */ spotterSidebarConfig?: SpotterSidebarViewConfig; /** * Configuration for customizing Spotter chat UI * branding in tool response cards. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * spotterChatConfig: { * hideToolResponseCardBranding: true, * toolResponseCardBrandingLabel: 'MyBrand', * }, * }) * ``` */ spotterChatConfig?: SpotterChatViewConfig; /** * Configuration for the Spotter conversation sharing feature. * * Supported embed types: `SpotterEmbed`, `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * spotterShareConversationConfig: { * enableShareConversation: true, * }, * }) * ``` */ spotterShareConversationConfig?: SpotterShareConversationConfig; /** * The ID of a shared Spotter conversation to open directly in the read-only * reader view. Use this to land a share recipient in the shared conversation * when they open a host-configured `CONVERSATION_URL` share link: read the * `{conversation-id}` from your page URL and pass it here. * * Requires the Spotter conversation-sharing feature to be enabled * (`spotterShareConversationConfig.enableShareConversation`). The recipient * must be an authorized sharee — the server returns access-denied otherwise. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @example * ```js * const convId = new URLSearchParams(window.location.search).get('conversation-id'); * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * sharedConversationId: convId, * }) * ``` */ sharedConversationId?: string; /** * updatedSpotterExperience : Controls the updated Spotter experience. * * Supported embed types: `SpotterEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterExperience : true, * }) * ``` */ updatedSpotterExperience?: boolean; } /** * The configuration for the embedded spotterEmbed options. * Use {@link SpotterEmbedViewConfig} instead * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * @group Embed components */ export interface ConversationViewConfig extends SpotterEmbedViewConfig { } /** * APP_INIT data shape for SpotterEmbed. * @internal */ export interface SpotterAppInitData extends DefaultAppInitData { embedParams?: { spotterSidebarConfig?: SpotterSidebarViewConfig; spotterShareConversationConfig?: SpotterShareConversationConfig; visualOverridesParams?: VisualizationOverrides | null; starterPrompts?: StarterPromptsConfig; }; } /** * Embed ThoughtSpot AI Conversation. * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl * @group Embed components * @example * ```js * const conversation = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheetId', * searchOptions: { * searchQuery: 'searchQuery', * }, * }); * conversation.render(); * ``` */ export declare class SpotterEmbed extends TsEmbed { protected viewConfig: SpotterEmbedViewConfig; constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig); /** * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig` * so the conv-assist app can read sidebar configuration on initialisation. * * Precedence for `enablePastConversationsSidebar`: * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the * deprecated top-level `enablePastConversationsSidebar` flag; if the former * is absent the latter is used as a fallback. * * An invalid `spotterDocumentationUrl` triggers a validation error and is * excluded from the payload rather than forwarded to the app. */ protected getAppInitData(): Promise; protected getEmbedParamsObject(): Record; getIframeSrc(): string; render(): Promise; } /** * Embed ThoughtSpot AI Conversation. * Use {@link SpotterEmbed} instead * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * @group Embed components * @example * ```js * const conversation = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheetId', * searchOptions: { * searchQuery: 'searchQuery', * }, * }); * conversation.render(); * ``` */ export declare class ConversationEmbed extends SpotterEmbed { protected viewConfig: ConversationViewConfig; constructor(container: HTMLElement, viewConfig: ConversationViewConfig); } /** * Defines starter prompts displayed in the SpotterViz interface. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @group Embed components */ export interface SpotterVizStarterPrompt { /** Identifier for the prompt. */ id: string; /** Short label shown to the user as a clickable suggestion. */ displayText: string; /** Full prompt text sent to Spotter when the user clicks the suggestion. */ fullPrompt: string; } /** * Configuration for the SpotterViz interface shown on the Liveboard. * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @group Embed components * @example * ```js * const embed = new AppEmbed('#embed-container', { * ... // other options, * spotterViz: { * brandName: 'MyBrand', * brandHeadline: 'Hi, there! I\'m', * description: 'Ask questions about your data', * inputChatPlaceholder: 'Ask a question...', * hideStarterPrompts: false, * customStarterPrompts: [ * { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' } * ], * // The options below require SDK: 1.51.0 * loaderHeadline: 'Crunching the numbers...', * loaderTips: [ * { label: 'Tip', text: 'try asking about revenue by region' }, * { label: 'Tip', text: 'use natural language' }, * ], * liveboardBrandName: 'Reports', * spotterBrandName: 'Analyst', * insightTileBrandName: 'Insight card', * insightTileViewPlanLabel: 'View plan', * insightTileLoaderText: 'Generating insight', * }, * }) * ``` */ export interface SpotterVizConfig { /** * Rename the default "SpotterViz" label shown in the SpotterViz interface with a custom brand name. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @default '' */ brandName?: string; /** * Custom headline text shown before the brand name in the SpotterViz interface. * Replaces the default greeting prefix (e.g. "Hi, there! I'm"). * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @default '' */ brandHeadline?: string; /** * Hides the starter prompts section entirely in the SpotterViz interface. * When set to `true`, the starter prompts are not displayed. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @default false */ hideStarterPrompts?: boolean; /** * Overrides the starter prompts with a custom list. * Each entry must match the {@link SpotterVizStarterPrompt} shape. * Has no effect when `hideStarterPrompts` is `true`. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl */ customStarterPrompts?: SpotterVizStarterPrompt[]; /** * Custom description text shown in the SpotterViz interface. * Replaces the default SpotterViz description. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl */ description?: string; /** * Custom placeholder text for the chat input in the SpotterViz interface. * Replaces the default chat input placeholder text. * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl */ inputChatPlaceholder?: string; /** * Custom headline text shown in the SpotterViz loading state. * Replaces the default loading headline. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl */ loaderHeadline?: string; /** * Custom tips shown in the SpotterViz loading state. * Replaces the default loading tips with the provided list. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl */ loaderTips?: SpotterVizLoaderTip[]; /** * Custom term used to replace "Liveboard" in the agent's responses. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl * @default '' */ liveboardBrandName?: string; /** * Custom term used to replace "Spotter" in the agent's responses. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl * @default '' */ spotterBrandName?: string; /** * Custom term used to replace "Insight tile" in the UI and in the agent's responses. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl * @default '' */ insightTileBrandName?: string; /** * Custom term used to replace "View plan" in the insight tile menu. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl */ insightTileViewPlanLabel?: string; /** * Custom loader text shown on the insight tile. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl */ insightTileLoaderText?: string; } /** * A single tip shown in the SpotterViz loading state. * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.7.0.cl * @group Embed components */ export interface SpotterVizLoaderTip { /** Short label rendered alongside the tip (e.g. "Tip"). */ label: string; /** Tip body text. */ text: string; } /** * Pages within the ThoughtSpot app that can be embedded. */ export declare enum Page { /** * Home page */ Home = "home", /** * Search page */ Search = "search", /** * Saved answers listing page */ Answers = "answers", /** * Liveboards listing page */ Liveboards = "liveboards", /** * @hidden */ Pinboards = "pinboards", /** * Data management page */ Data = "data", /** * SpotIQ listing page */ SpotIQ = "insights", /** * Monitor Alerts Page */ Monitor = "monitor", /** * Collections listing page */ Collections = "collections", /** * Liveboard schedules listing page */ LiveboardSchedules = "liveboard-schedules" } /** * Define the initial state of column custom group accordions * in data panel v2. */ export declare enum DataPanelCustomColumnGroupsAccordionState { /** * Expand all the accordion initially in data panel v2. */ EXPAND_ALL = "EXPAND_ALL", /** * Collapse all the accordions initially in data panel v2. */ COLLAPSE_ALL = "COLLAPSE_ALL", /** * Expand the first accordion and collapse the rest. */ EXPAND_FIRST = "EXPAND_FIRST" } export declare enum HomePageSearchBarMode { OBJECT_SEARCH = "objectSearch", AI_ANSWER = "aiAnswer", NONE = "none" } /** * Define the version of the primary navbar * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ export declare enum PrimaryNavbarVersion { /** * Sliding (v3) introduces a new left-side navigation hub featuring a tab switcher, * along with updates to the top navigation bar. * It serves as the foundational version of the PrimaryNavBar. */ Sliding = "v3" } /** * Define the version of the home page * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ export declare enum HomePage { /** * Modular (v2) introduces the updated Modular Home Experience. * It serves as the foundational version of the home page. * Use {@link HomePage.ModularWithStylingChanges} (V3) or * {@link HomePage.Focused} (V4) instead. * @deprecated V1 and V2 home page experiences are deprecated. */ Modular = "v2", /** * ModularWithStylingChanges (v3) introduces Modular Home Experience * with styling changes. */ ModularWithStylingChanges = "v3", /** * Focused (v4) introduces the V4 homepage experience * in which Watchlist and recents and incorporated together * to form a more focused homepage. * Pre-requisite : spotter enablement * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl */ Focused = "v4" } /** * Define the version of the list page * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl */ export declare enum ListPage { /** * List (v2) is the traditional List Experience. * It serves as the foundational version of the list page. */ List = "v2", /** * ListWithUXChanges (v3) introduces the new updated list page with UX changes. */ ListWithUXChanges = "v3" } /** * Define the discovery experience * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl */ export interface DiscoveryExperience { /** * primaryNavbarVersion determines the version of the primary navigation bar. */ primaryNavbarVersion?: PrimaryNavbarVersion; /** * homePage determines the version of the home page. */ homePage?: HomePage; /** * listPageVersion determines the version of the list page. */ listPageVersion?: ListPage; } /** * The view configuration for full app embedding. * @group Embed components */ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig { /** * If true, the top navigation bar within the ThoughtSpot app * is displayed. By default, the navigation bar is hidden. * This flag also controls the homepage left navigation bar. * * Supported embed types: `AppEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 8.4.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * showPrimaryNavbar:true, * }) * ``` */ showPrimaryNavbar?: boolean; /** * Control the visibility of the left navigation panel on the home page * in the V3 and V4 navigation and home page experience. * If `showPrimaryNavbar` is true, that is, if the Global and Homepage * navigation bars are visible, this flag will only hide the left navigation bar * on the home page. * The `showPrimaryNavbar` flag takes precedence over the `hideHomepageLeftNav`. * * **Note**: The classic (V1) and Modular (V2) home page experiences are * deprecated. This attribute applies to V3 and V4 home page experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideHomepageLeftNav : true, * }) * ``` */ hideHomepageLeftNav?: boolean; /** * Control the visibility of the help (?) and profile * buttons on the top navigation bar. * These buttons are visible if the * navigation bar is not hidden via `showPrimaryNavbar`. * * Supported embed types: `AppEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 8.4.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * disableProfileAndHelp: true, * }) * ``` */ disableProfileAndHelp?: boolean; /** * Whether the help menu in the top navigation bar should be served * from Pendo or ThoughtSpot's internal help items. * * Supported embed types: `AppEmbed` * @version SDK: 1.36.3 | ThoughtSpot: 10.1.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * enablePendoHelp: false, * }); * ``` */ enablePendoHelp?: boolean; /** * Control the visibility of the hamburger icon on * the top navigation bar in the V3 navigation experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideHamburger : true, * }) * ``` */ hideHamburger?: boolean; /** * Control the visibility of the object search * on the top navigation bar in the V3 navigation experience. * * **Note**: The classic (V1) and V2 navigation experiences are * deprecated. This attribute applies to the V3 navigation experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideObjectSearch: false, * }) * ``` */ hideObjectSearch?: boolean; /** * Control the visibility of the notification icon * on the top navigation bar in V3 navigation experience. * * **Note**: The classic (V1) and V2 experience modes are deprecated. * This attribute applies to the V3 experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideNotification: false, * }) * ``` */ hideNotification?: boolean; /** * Control the visibility of the application selection menu. * In the V3 experience, it shows or hides application selection * icons on the left navigation panel. * By default, the application selection menu and icons are * shown in the UI. * * **Note**: The classic (V1) and V2 experiences are deprecated. * This attribute applies to the V3 experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideApplicationSwitcher : true, * }) * ``` */ hideApplicationSwitcher?: boolean; /** * Control the visibility of the Org switcher button on the nav-bar. * By default, the Org switcher button is shown. * * **Note**: The classic (V1) experience is deprecated. This attribute * applies to V2 (deprecated), V3 and V4 experiences. * * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideOrgSwitcher : true, * }) * ``` */ hideOrgSwitcher?: boolean; /** * A URL path to the embedded application page * If both path and pageId attributes are defined, the path definition * takes precedence. This is the path post the `#/` in the URL of the standalone * ThoughtSpot app. Use this to open the embedded view to a specific path. * * For example, if you want the component to open to a specific Liveboard * you could set the path to `pinboard//tab/`. * * Supported embed types: `AppEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * path:"pinboard/1234/tab/7464", * }) * ``` */ path?: string; /** * The application page to set as the start page * in the embedded view. * * Use this to open to a particular page in the app. To open to a specific * path within the app, use the `path` attribute which is more flexible. * * Supported embed types: `AppEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * pageId: Page.Answers, // or Page.Data * }) * ``` */ pageId?: Page; /** * This puts a filter tag on the application. All metadata lists in the * application, such as Liveboards and answers, would be filtered by this * tag. * * Supported embed types: `AppEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 9.4.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * tag:'value', * }) * ``` */ tag?: string; /** * Hide tag filter chips that appear when content is filtered by tags. * When enabled, this automatically: * - Hides tag filter indicators/chips from the UI * * This provides a clean interface without tag-related UI elements. * * Supported embed types: `AppEmbed` * @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl * @example * ```js * // Simple usage - automatically hides all tag-related UI * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * tag: 'Some Tag', * hideTagFilterChips: true, // This is all you need! * }); * ``` */ hideTagFilterChips?: boolean; /** * The array of GUIDs to be hidden * * Supported embed types: `AppEmbed` * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideObjects: [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726' * ] * }) * ``` */ hideObjects?: string[]; /** * Render liveboards using the new v2 rendering mode * This is a transient flag which is primarily meant for internal use * * Supported embed types: `AppEmbed` * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw * @hidden */ liveboardV2?: boolean; /** * If set to true, the Search Assist feature is enabled. * * Supported embed types: `AppEmbed` * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * enableSearchAssist: true, * }) * ``` */ enableSearchAssist?: boolean; /** * Enables the V2 navigation and modular home page experience. * For more information, * see link:https://developers.thoughtspot.com/docs/full-app-customize[full app embed documentation]. * Supported embed types: `AppEmbed` * @version SDK: 1.28.0 | ThoughtSpot: 9.12.5.cl * @default false * Use the discoveryExperience.homePage option with * {@link HomePage.ModularWithStylingChanges} (V3) or * {@link HomePage.Focused} (V4) instead. * @deprecated The V1 and V2 home page experiences are deprecated. * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * modularHomeExperience : true, * }) * ``` */ modularHomeExperience?: boolean; /** * Configures the V3 navigation and home page experience. * For more information, see * link:https://developers.thoughtspot.com/docs/full-app-customize[full app embed documentation]. * Supported embed types: `AppEmbed` * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * // Enable V3 navigation and home page experience * discoveryExperience : { * primaryNavbarVersion: PrimaryNavbarVersion.Sliding, // Enable V3 navigation * homePage: HomePage.ModularWithStylingChanges, // Enable V3 modular home page * ... // other embed view config * }, * }) * ``` */ discoveryExperience?: DiscoveryExperience; /** * To set the initial state of the search bar in case of saved-answers. Use {@link collapseSearchBar} instead. * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @deprecated This flag is deprecated. * @default false */ collapseSearchBarInitially?: boolean; /** * This controls the initial behaviour of custom column groups accordion. * It takes DataPanelCustomColumnGroupsAccordionState enum values as input. * List of different enum values:- * - EXPAND_ALL: Expand all the accordion initially in data panel v2. * - COLLAPSE_ALL: Collapse all the accordions initially in data panel v2. * - EXPAND_FIRST: Expand the first accordion and collapse the rest. * * Supported embed types: `AppEmbed` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @default DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL * @example * ```js * const embed = new AppEmbed('#embed', { * ... // other app view config * dataPanelCustomGroupsAccordionInitialState: * DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, * }); * ``` */ dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState; /** * Flag to use home page search bar mode * * Supported embed types: `AppEmbed` * @version SDK: 1.33.0 | ThoughtSpot: 10.3.0.cl */ homePageSearchBarMode?: HomePageSearchBarMode; /** * This flag is used to enable unified search experience for full app embed. * * Supported embed types: `AppEmbed` * @version SDK: 1.34.0 | ThoughtSpot: 10.5.0.cl * @default true * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * isUnifiedSearchExperienceEnabled: true, * }) * ``` */ isUnifiedSearchExperienceEnabled?: boolean; /** * This flag is used to enable the new connection experience for AppEmbed. * * Supported embed types: `AppEmbed` * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * newConnectionsExperience: true, * }) * ``` */ newConnectionsExperience?: boolean; /** * This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead. * @deprecated This flag is deprecated. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardStylingAndGroupingEnabled: true, * }) * ``` */ isLiveboardStylingAndGroupingEnabled?: boolean; /** * This flag is used to enable/disable the png embedding of liveboard in scheduled * mails * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isPNGInScheduledEmailsEnabled: true, * }) * ``` */ isPNGInScheduledEmailsEnabled?: boolean; /** * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page * following the exact UI layout, instead of splitting visualizations across multiple A4 pages. * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isContinuousLiveboardPDFEnabled: true, * }) * ``` */ isContinuousLiveboardPDFEnabled?: boolean; /** * This flag is used to enable/disable the XLSX/CSV download option for Liveboards * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardXLSXCSVDownloadEnabled: true, * }) * ``` */ isLiveboardXLSXCSVDownloadEnabled?: boolean; /** * This flag is used to enable/disable the granular XLSX/CSV schedules feature * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isGranularXLSXCSVSchedulesEnabled: true, * }) * ``` */ isGranularXLSXCSVSchedulesEnabled?: boolean; /** * updatedSpotterChatPrompt : Controls the updated spotter chat prompt. * * Supported embed types: `AppEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterChatPrompt : true, * }) * ``` */ updatedSpotterChatPrompt?: boolean; /** * showSpotterRadiance : Controls the radiance on the Spotter page. * * Supported embed types: `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * showSpotterRadiance : true, * }) * ``` */ showSpotterRadiance?: boolean; /** * Sets the default query mode when Spotter loads — Fast Search or * Research Mode. Applies fresh on every new session for this embed * instance only; it does not persist as a user preference and does * not affect other embeds or native ThoughtSpot usage. * Only applicable when navigating to Spotter within the app. * * Supported embed types: `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default SpotterQueryMode.FAST_SEARCH * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * defaultQueryMode: SpotterQueryMode.RESEARCH, * }) * ``` */ defaultQueryMode?: SpotterQueryMode; /** * Controls the visibility of the past conversations sidebar. * * Supported embed types: `AppEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @deprecated from SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl * Use `spotterSidebarConfig.enablePastConversationsSidebar`. * @default false */ enablePastConversationsSidebar?: boolean; /** * Configuration for the Spotter sidebar UI customization. * Only applicable when navigating to Spotter within the app. * * Supported embed types: `AppEmbed` * @version SDK: 1.47.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * // Deprecated standalone flag (backward compatibility) * enablePastConversationsSidebar: false, * // Recommended config; this value takes precedence * spotterSidebarConfig: { * enablePastConversationsSidebar: true, * spotterSidebarTitle: 'My Conversations', * // Opt in to pin/unpin conversations in embedded Spotter * spotterChatPinConfig: { * enabled: true, * }, * }, * }) * ``` */ spotterSidebarConfig?: SpotterSidebarViewConfig; /** * Configuration for customizing Spotter chat UI * branding in tool response cards. * * Supported embed types: `AppEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * spotterChatConfig: { * hideToolResponseCardBranding: true, * toolResponseCardBrandingLabel: 'MyBrand', * }, * }) * ``` */ spotterChatConfig?: SpotterChatViewConfig; /** * Configuration for the Spotter conversation sharing feature. * * Supported embed types: `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * spotterShareConversationConfig: { * enableShareConversation: true, * }, * }) * ``` */ spotterShareConversationConfig?: SpotterShareConversationConfig; /** * Sets the default data sources (Models) for the Spotter experience shown on * the home page of the full app embed. Accepts a list of Model GUIDs to * preselect the data sources available to Spotter, or the literal * `'auto_mode'` sentinel to load Spotter with the "Auto" model selected by * default. This is consistent with how `worksheetId: 'auto_mode'` enables * Auto mode in `SpotterEmbed`. * * **Note**: If `'auto_mode'` is included alongside one or more Model GUIDs, * `'auto_mode'` takes precedence and is selected by default. * * **Note**: `'auto_mode'` requires the Spotter 3 experience with data source * discovery enabled on your instance, and a Spotter-enabled home page (for * example, `discoveryExperience.homePage: HomePage.Focused`). * * Supported embed types: `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.10.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * discoveryExperience: { homePage: HomePage.Focused }, * spotterDataSources: ['model-guid-1', 'model-guid-2'], // or ['auto_mode'] * }) * ``` */ spotterDataSources?: string[]; /** * Configuration for the SpotterViz interface shown on the Liveboard. * Customize the brand name, description, chat input placeholder, * starter prompts, and visibility of starter prompts in the SpotterViz panel. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * const embed = new AppEmbed('#embed-container', { * ... // other options * spotterViz: { * brandName: 'MyBrand', * brandHeadline: 'Hi, there! I\'m', * description: 'Ask questions about your data', * inputChatPlaceholder: 'Ask a question...', * hideStarterPrompts: false, * customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }], * // The options below require SDK: 1.51.0 * loaderHeadline: 'Crunching the numbers...', * loaderTips: [ * { label: 'Tip', text: 'try asking about revenue by region' }, * { label: 'Tip', text: 'use natural language' }, * ], * liveboardBrandName: 'Reports', * spotterBrandName: 'Analyst', * insightTileBrandName: 'Insight card', * insightTileViewPlanLabel: 'View plan', * insightTileLoaderText: 'Generating insight', * }, * }) * ``` */ spotterViz?: SpotterVizConfig; /** * Enables the stop answer generation button in the Spotter embed UI, * allowing users to interrupt an ongoing answer generation. * * Supported embed types: `AppEmbed` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @default false */ enableStopAnswerGenerationEmbed?: boolean; /** * To enable the homepage announcement banner. * Controls the visibility of the announcement section * on the homepage. * * Supported embed types: `AppEmbed` * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * enableHomepageAnnouncement: true, * }) * ``` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl */ enableHomepageAnnouncement?: boolean; /** * If set to true, enables visualization data caching on the Liveboard. * @type {boolean} * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other options * enableLiveboardDataCache: true, * }) * ``` */ enableLiveboardDataCache?: boolean; /** * Visual overrides to customize the chart or table properties. * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl */ visualOverrides?: VisualizationOverrides; /** * updatedSpotterExperience : Controls the updated Spotter experience. * * Supported embed types: `AppEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterExperience : true, * }) * ``` */ updatedSpotterExperience?: boolean; /** * If set to `true`, the answer edit panel is hidden. * * Supported embed types: `AppEmbed` * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * const embed = new AppEmbed('#tsEmbed', { * ... // other embed view config * hideAnswerEditPanel: true, * }) * ``` */ hideAnswerEditPanel?: boolean; } /** * APP_INIT data shape for AppEmbed. * @internal */ export interface AppEmbedAppInitData extends DefaultAppInitData { embedParams?: { spotterSidebarConfig?: SpotterSidebarViewConfig; spotterVizConfig?: SpotterVizConfig; spotterShareConversationConfig?: SpotterShareConversationConfig; starterPrompts?: StarterPromptsConfig; }; } /** * Embeds full ThoughtSpot experience in a host application. * @group Embed components */ export declare class AppEmbed extends V1Embed { protected viewConfig: AppViewConfig; private readonly fullHeightController?; constructor(domSelector: DOMSelector, viewConfig: AppViewConfig); /** * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig` * so the conv-assist app can read sidebar configuration on initialisation. * * Precedence for `enablePastConversationsSidebar`: * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the * deprecated top-level `enablePastConversationsSidebar` flag; if the former * is absent the latter is used as a fallback. * * An invalid `spotterDocumentationUrl` triggers a validation error and is * excluded from the payload rather than forwarded to the app. */ protected getAppInitData(): Promise; /** * Constructs a map of parameters to be passed on to the * embedded Liveboard or visualization. */ protected getEmbedParams(): string; protected getEmbedParamsObject(): any; /** * Constructs the URL of the ThoughtSpot app page to be rendered. * @param pageId The ID of the page to be embedded. */ getIFrameSrc(): string; /** * Gets the ThoughtSpot route of the page for a particular page ID. * @param pageId The identifier for a page in the ThoughtSpot app. * @param modularHomeExperience */ private getPageRoute; /** * Formats the path provided by the user. * @param path The URL path. * @returns The URL path that the embedded app understands. */ private formatPath; /** * Navigate to particular page for app embed. eg:answers/pinboards/home * This is used for embedding answers, pinboards, visualizations and full application * only. * @param path string | number The string, set to iframe src and navigate to new page * eg: appEmbed.navigateToPage('pinboards') * When used with `noReload` (default: true) this can also be a number * like 1/-1 to go forward/back. * @param noReload boolean Trigger the navigation without reloading the page * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw */ navigateToPage(path: string | number, noReload?: boolean): void; /** * Destroys the ThoughtSpot embed, and remove any nodes from the DOM. * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ destroy(): void; private postRender; /** * Renders the embedded application pages in the ThoughtSpot app. * @param renderOptions An object containing the page ID * to be embedded. */ render(): Promise; } /** * Enum for auth failure types. * This value is passed to the listener for {@link AuthStatus.FAILURE}. * @group Authentication / Init */ export declare enum AuthFailureType { /** * Authentication failed in the SDK authentication flow. * * Emitted when `init()` or auto-authentication cannot establish a logged-in session. * For example, this can happen because of an invalid token, an auth request failure, * or an auth promise rejection. */ SDK = "SDK", /** * Browser cookie access is blocked for the embedded app. * * Emitted when the iframe reports that required cookies * cannot be read or sent, commonly due to third-party cookie restrictions. */ NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS", /** * The current authentication token or session has expired. * * Emitted when the embed receives an auth-expiry signal and starts auth refresh * handling. */ EXPIRY = "EXPIRY", /** * A generic authentication failure that does not match a more specific type. * * Emitted as a fallback for app-reported auth failures in standard auth flows. */ OTHER = "OTHER", /** * The user session timed out due to inactivity. * * Emitted when the app reports an idle-session timeout. */ IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT", /** * The app reports that the user is unauthenticated. * * Used primarily to classify unauthenticated failures in Embedded SSO flows. */ UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE" } /** * Enum for auth status emitted by the emitter returned from {@link init}. * @group Authentication / Init */ export declare enum AuthStatus { /** * Emits when the SDK fails to authenticate. */ FAILURE = "FAILURE", /** * Emits when the SDK authentication step completes * successfully (e.g., token exchange, cookie set). * This fires before any iframe is rendered. Use * this to know that auth passed and it is safe to * proceed with rendering. The callback receives no * arguments. * @example * ```js * const authEE = init({ ... }); * authEE.on(AuthStatus.SDK_SUCCESS, () => { * // Auth done, iframe not loaded yet * }); * ``` */ SDK_SUCCESS = "SDK_SUCCESS", /** * @hidden * Emits when iframe is loaded and session * information is available. */ SESSION_INFO_SUCCESS = "SESSION_INFO_SUCCESS", /** * Emits when the ThoughtSpot app inside the * embedded iframe confirms its session is active. * This fires after the iframe loads and sends back an `AuthInit` event. * @param sessionInfo Information about the user session, with details like `userGUID`. * @see EmbedEvent.AuthInit * @example * ```js * const authEE = init({ ... }); * authEE.on(AuthStatus.SUCCESS, (sessionInfo) => { * // App is loaded and authenticated * console.log(sessionInfo.userGUID); * }); * ``` */ SUCCESS = "SUCCESS", /** * Emits when a user logs out */ LOGOUT = "LOGOUT", /** * Emitted when inPopup is true in the SAMLRedirect flow and the * popup is waiting to be triggered either programmatically * or by the trigger button. * @version SDK: 1.19.0 */ WAITING_FOR_POPUP = "WAITING_FOR_POPUP", /** * Emitted when the SAML popup is closed without authentication */ SAML_POPUP_CLOSED_NO_AUTH = "SAML_POPUP_CLOSED_NO_AUTH" } /** * Event emitter returned from {@link init}. * @group Authentication / Init */ export interface AuthEventEmitter { /** * Register a listener on Auth failure. * @param event * @param listener */ on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this; /** * Register a listener on Auth SDK success. * @param event * @param listener */ on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this; on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this; once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this; once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this; once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this; /** * Trigger an event on the emitter returned from init. * @param {@link AuthEvent} */ emit(event: AuthEvent, ...args: any[]): boolean; /** * Remove listener from the emitter returned from init. * @param event * @param listener * @param context * @param once */ off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this; /** * Remove all the event listeners * @param event */ removeAllListeners(event: AuthStatus): this; } /** * Events which can be triggered on the emitter returned from {@link init}. * @group Authentication / Init */ export declare enum AuthEvent { /** * Manually trigger the SSO popup. This is useful when * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true */ TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP" } export interface executeTMLInput { metadata_tmls: string[]; import_policy?: "PARTIAL" | "ALL_OR_NONE" | "VALIDATE_ONLY"; create_new?: boolean; } export interface exportTMLInput { metadata: { identifier: string; type?: "LIVEBOARD" | "ANSWER" | "LOGICAL_TABLE" | "CONNECTION"; }[]; export_associated?: boolean; export_fqn?: boolean; edoc_format?: "YAML" | "JSON"; } /** * Prefetches static resources from the specified URL. Web browsers can then cache the * prefetched resources and serve them from the user's local disk to provide faster access * to your app. * @param url The URL provided for prefetch * @param prefetchFeatures Specify features which needs to be prefetched. * @param additionalFlags This can be used to add any URL flag. * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1 * @group Global methods */ export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[], additionalFlags?: { [key: string]: string | number | boolean; }) => void; /** * Initializes the Visual Embed SDK globally and perform * authentication if applicable. This function needs to be called before any ThoughtSpot * component like Liveboard etc can be embedded. But need not wait for AuthStatus.SUCCESS * to actually embed. That is handled internally. * @param embedConfig The configuration object containing ThoughtSpot host, * authentication mechanism and so on. * @example * ```js * const authStatus = init({ * thoughtSpotHost: 'https://my.thoughtspot.cloud', * authType: AuthType.None, * }); * authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here }); * ``` * @returns {@link AuthEventEmitter} event emitter which emits events on authentication success, * failure and logout. See {@link AuthStatus} * @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1 * @group Authentication / Init */ export declare const init: (embedConfig: EmbedConfig) => AuthEventEmitter | null; /** * Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to * prevent the SDK from automatically logging in again. * * You can call the `init` method again to re login, if autoLogin is set to * true in this second call it will be honored. * @param doNotDisableAutoLogin This flag when passed will not disable autoLogin * @returns Promise which resolves when logout completes. * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw * @group Global methods */ export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise; /** * Imports TML representation of the metadata objects into ThoughtSpot. * @param data * @returns imports TML data into ThoughtSpot * @example * ```js * executeTML({ * //Array of metadata Tmls in string format * metadata_tmls: [ * "'\''{\"guid\":\"9bd202f5-d431-44bf-9a07-b4f7be372125\", * \"liveboard\":{\"name\":\"Parameters Liveboard\"}}'\''" * ], * import_policy: 'PARTIAL', // Specifies the import policy for the TML import. * create_new: false, // If selected, creates TML objects with new GUIDs. * }).then(result => { * console.log(result); * }).catch(error => { * console.error(error); * }); * ``` * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl * @group Global methods */ export declare const executeTML: (data: executeTMLInput) => Promise; /** * Exports TML representation of the metadata objects from ThoughtSpot in JSON or YAML * format. * @param data * @returns exports TML data * @example * ```js * exportTML({ * metadata: [ * { * type: "LIVEBOARD", //Metadata Type * identifier: "9bd202f5-d431-44bf-9a07-b4f7be372125" //Metadata Id * } * ], * export_associated: false,//indicates whether to export associated metadata objects * export_fqn: false, //Adds FQNs of the referenced objects.For example, if you are * //exporting a Liveboard and its associated objects, the API * //returns the Liveboard TML data with the FQNs of the referenced * //worksheet. If the exported TML data includes FQNs, you don't need * //to manually add FQNs of the referenced objects during TML import. * edoc_format: "JSON" //It takes JSON or YAML value * }).then(result => { * console.log(result); * }).catch(error => { * console.error(error); * }); * ``` * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl * @group Global methods */ export declare const exportTML: (data: exportTMLInput) => Promise; /** * Reloads the ThoughtSpot iframe. * @version SDK: 1.43.1 * @param iFrame * @group Global methods */ export declare const reloadIframe: (iFrame: HTMLIFrameElement) => void; /** * APP_INIT data shape for LiveboardEmbed. * @internal */ export interface LiveboardEmbedAppInitData extends DefaultAppInitData { embedParams?: { spotterVizConfig?: SpotterVizConfig; starterPrompts?: StarterPromptsConfig; }; } /** * The configuration for the embedded Liveboard or visualization page view. * @group Embed components */ export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig { /** * If set to true, the context menu in visualizations will be enabled. * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw * @deprecated this option is deprecated. * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * enableVizTransformations:true, * }) * ``` */ enableVizTransformations?: boolean; /** * The Liveboard to display in the embedded view. * Use either liveboardId or pinboardId to reference the Liveboard to embed. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1 * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * liveboardId:'id of liveboard', * }) * ``` */ liveboardId?: string; /** * To support backward compatibility * @hidden */ pinboardId?: string; /** * The visualization within the Liveboard to display. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * vizId:'430496d6-6903-4601-937e-2c691821af3c', * }) * ``` */ vizId?: string; /** * If set to true, all filter chips from a * Liveboard page will be read-only (no X buttons) * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * preventLiveboardFilterRemoval:true, * }) * ``` */ preventLiveboardFilterRemoval?: boolean; /** * Array of visualization IDs which should be visible when the Liveboard * renders. This can be changed by triggering the `SetVisibleVizs` * event. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * visibleVizs: [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726' * ] * }) * ``` */ visibleVizs?: string[]; /** * To support backward compatibility * @hidden */ preventPinboardFilterRemoval?: boolean; /** * Render embedded Liveboards and visualizations in the * new Liveboard experience mode. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * liveboardV2:true, * }) * ``` */ liveboardV2?: boolean; /** * Set a Liveboard tab as an active tab. * Specify the tab ID. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * activeTabId:'id-1234', * }) * ``` */ activeTabId?: string; /** * The GUID of a saved personalized view to load. * A personalized view is a saved configuration of a Liveboard * that includes specific filter selections. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * liveboardId: 'liveboard-guid', * personalizedViewId: 'view-guid', * activeTabId: 'tab-guid', * }) * ``` */ personalizedViewId?: string; /** * Show or hide the tab panel of the embedded Liveboard. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * hideTabPanel:true, * }) * ``` */ hideTabPanel?: boolean; /** * Show a preview image of the visualization before the visualization loads. * Only works for visualizations embeds with a viz id. * * Also, viz snapshot should be enabled in the ThoughtSpot instance. * Contact ThoughtSpot support to enable this feature. * * Since this will show preview images, be careful that it may show * undesired data to the user when using row level security. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * liveboardId: 'liveboard-id', * vizId: 'viz-id', * showPreviewLoader: true, * }); * embed.render(); * ``` */ showPreviewLoader?: boolean; /** * The Liveboard to run on regular intervals to fetch the cdw token. * * Supported embed types: `LiveboardEmbed` * @hidden * @version SDK: 1.35.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * oAuthPollingInterval: 30000, * }) * ``` */ oAuthPollingInterval?: number; /** * The Liveboard is set to force a token fetch during the initial load. * * Supported embed types: `LiveboardEmbed` * @hidden * @version SDK: 1.35.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * isForceRedirect: false, * }) * ``` */ isForceRedirect?: boolean; /** * The source connection ID for authentication. * * Supported embed types: `LiveboardEmbed` * @hidden * @version SDK: 1.35.0 | ThoughtSpot: 10.6.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * dataSourceId: '', * }) * ``` */ dataSourceId?: string; /** * The list of tab IDs to hide from the embedded Liveboard. * These tabs will be hidden from their respective Liveboards. * Use this to hide a tab ID. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed view config * hiddenTabs: [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726' * ] * }); * ``` */ hiddenTabs?: string[]; /** * The list of tab IDs to show in the embedded Liveboard. * Only the tabs specified in the array will be shown in the Liveboard. * * Use either `visibleTabs` or `hiddenTabs`. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... // other embed view config * visibleTabs: [ * '430496d6-6903-4601-937e-2c691821af3c', * 'f547ec54-2a37-4516-a222-2b06719af726' * ] * }) * ``` */ visibleTabs?: string[]; /** * This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead. * @deprecated This flag is deprecated. * * Supported embed types: `LiveboardEmbed`, `AppEmbed` * @type {boolean} * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardStylingAndGroupingEnabled: true, * }) * ``` */ isLiveboardStylingAndGroupingEnabled?: boolean; /** * This flag is used to enable/disable the png embedding of liveboard in scheduled * mails * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.42.0 | ThoughtSpot: 10.14.0.cl * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isPNGInScheduledEmailsEnabled: true, * }) * ``` */ isPNGInScheduledEmailsEnabled?: boolean; /** * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page * following the exact UI layout, instead of splitting visualizations across multiple A4 pages. * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isContinuousLiveboardPDFEnabled: true, * }) * ``` */ isContinuousLiveboardPDFEnabled?: boolean; /** * This flag is used to enable/disable the XLSX/CSV download option for Liveboards * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isLiveboardXLSXCSVDownloadEnabled: true, * }) * ``` */ isLiveboardXLSXCSVDownloadEnabled?: boolean; /** * This flag is used to enable/disable the granular XLSX/CSV schedules feature * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @type {boolean} * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl * @default true * @example * ```js * // Replace with embed component name. For example, AppEmbed or LiveboardEmbed * const embed = new ('#tsEmbed', { * ... // other embed view config * isGranularXLSXCSVSchedulesEnabled: true, * }) * ``` */ isGranularXLSXCSVSchedulesEnabled?: boolean; /** * showSpotterLimitations : show limitation text * of the spotter underneath the chat input. * default is false. * * @type {boolean} * @version SDK: 1.41.1 | ThoughtSpot: 10.5.0.cl * @example * ```js * const embed = new LiveboardEmbed('#embed-container', { * // ...other options * showSpotterLimitations: true, * }) * ``` */ showSpotterLimitations?: boolean; /** * updatedSpotterChatPrompt : Controls the updated spotter chat prompt. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl * @default false * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterChatPrompt : true, * }) * ``` */ updatedSpotterChatPrompt?: boolean; /** * showSpotterRadiance : Controls the radiance on the Spotter page. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * showSpotterRadiance : true, * }) * ``` */ showSpotterRadiance?: boolean; /** * Enables the stop answer generation button in the Spotter embed UI, * allowing users to interrupt an ongoing answer generation. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl * @default false */ enableStopAnswerGenerationEmbed?: boolean; /** * Configuration for customizing Spotter chat UI * branding in tool response cards. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.46.0 | ThoughtSpot: 26.4.0.cl * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * spotterChatConfig: { * hideToolResponseCardBranding: true, * toolResponseCardBrandingLabel: 'MyBrand', * }, * }) * ``` */ spotterChatConfig?: SpotterChatViewConfig; /** * Configuration for the SpotterViz interface shown on the Liveboard. * Customize the brand name, description, chat input placeholder, * starter prompts, and visibility of starter prompts in the SpotterViz panel. * * Supported embed types: `AppEmbed`, `LiveboardEmbed` * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl * @example * ```js * const embed = new LiveboardEmbed('#embed-container', { * ... // other options * spotterViz: { * brandName: 'MyBrand', * brandHeadline: 'Hi, there! I\'m', * description: 'Ask questions about your data', * inputChatPlaceholder: 'Ask a question...', * hideStarterPrompts: false, * customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }], * // The options below require SDK: 1.51.0 * loaderHeadline: 'Crunching the numbers...', * loaderTips: [ * { label: 'Tip', text: 'try asking about revenue by region' }, * { label: 'Tip', text: 'use natural language' }, * ], * liveboardBrandName: 'Reports', * spotterBrandName: 'Analyst', * insightTileBrandName: 'Insight card', * insightTileViewPlanLabel: 'View plan', * insightTileLoaderText: 'Generating insight', * }, * }) * ``` */ spotterViz?: SpotterVizConfig; /** * If set to true, enables visualization data caching on the Liveboard. * @type {boolean} * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl * @example * ```js * const embed = new LiveboardEmbed('#embed-container', { * ... // other options * enableLiveboardDataCache: true, * }) * ``` */ enableLiveboardDataCache?: boolean; /** * updatedSpotterExperience : Controls the updated Spotter experience. * * Supported embed types: `LiveboardEmbed` * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl * @default false * @example * ```js * const embed = new LiveboardEmbed('#tsEmbed', { * ... //other embed view config * updatedSpotterExperience : true, * }) * ``` */ updatedSpotterExperience?: boolean; } /** * Embed a ThoughtSpot Liveboard or visualization. When rendered it already * waits for the authentication to complete, so you need not wait for * `AuthStatus.SUCCESS`. * @group Embed components * @example * ```js * import { .. } from '@thoughtspot/visual-embed-sdk'; * init({ ... }); * const embed = new LiveboardEmbed("#container", { * liveboardId: , * // .. other params here. * }) * ``` */ export declare class LiveboardEmbed extends V1Embed { protected viewConfig: LiveboardViewConfig; private readonly fullHeightController?; constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig); protected getAppInitData(): Promise; /** * Construct a map of params to be passed on to the * embedded Liveboard or visualization. */ protected getEmbedParams(): string; protected getEmbedParamsObject(): any; private getIframeSuffixSrc; /** * Construct the URL of the embedded ThoughtSpot Liveboard or visualization * to be loaded within the iFrame. */ private getIFrameSrc; private setActiveTab; private showPreviewLoader; /** * @hidden * Internal state to track the current liveboard id. * This is used to navigate to the correct liveboard when the prerender is visible. */ currentLiveboardState: { liveboardId: string; vizId: string; activeTabId: string; personalizedViewId: string; }; protected beforePrerenderVisible(): void; private isShowingLiveboardRoute; protected handleRenderForPrerender(): Promise; /** * Triggers an event to the embedded app * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile * from SDK 1.52.0; strict contract checks land in SDK 1.54.0. * @param {HostEvent} messageType The event type * @param {TriggerData} data The payload, typed against the event's contract * @returns A promise that resolves with the response from the embedded app */ trigger, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData, context?: ContextT): Promise>; /** * Destroys the ThoughtSpot embed, and remove any nodes from the DOM. * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl */ destroy(): void; private postRender; /** * Render an embedded ThoughtSpot Liveboard or visualization * @param renderOptions An object specifying the Liveboard ID, * visualization ID and the runtime filters. */ render(): Promise; navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string, personalizedViewId?: string): void; /** * Returns the full url of the Liveboard/visualization which can be used to open * this Liveboard inside the full ThoughtSpot application in a new tab. * @returns url string */ getLiveboardUrl(): string; } /** * @hidden */ export declare class PinboardEmbed extends LiveboardEmbed { } interface SearchOptions$1 { /** * Search tokens to pass in the query. */ searchTokenString: string; /** * Boolean to define if the search should be executed or not. * If it is executed, the focus is placed on the results. * If it’s not executed, the focus is placed at the end of * the token string in the search bar. */ executeSearch?: boolean; } declare enum DataPanelCustomColumnGroupsAccordionState$1 { /** * Expand all the accordion initially in data panel v2. */ EXPAND_ALL = "EXPAND_ALL", /** * Collapse all the accordions initially in data panel v2. */ COLLAPSE_ALL = "COLLAPSE_ALL", /** * Expand the first accordion and collapse the rest. */ EXPAND_FIRST = "EXPAND_FIRST" } /** * The configuration attributes for the embedded search view. * @group Embed components */ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit { /** * If set to true, the data sources panel is collapsed on load, * but can be expanded manually. * * Supported embed types: `SearchEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * collapseDataSources:true, * }) * ``` */ collapseDataSources?: boolean; /** * If set to true, the data panel is collapsed on load, * but can be expanded manually. * * Supported embed types: `SearchEmbed` * @version SDK: 1.34.0 | ThoughtSpot: 10.3.0.cl * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * collapseDataPanel:true, * }) * ``` */ collapseDataPanel?: boolean; /** * Show or hide the data sources panel. * * Supported embed types: `SearchEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * hideDataSources:true, * }) * ``` */ hideDataSources?: boolean; /** * Show or hide the charts and tables in search answers. * This attribute can be used to create a custom visualization * using raw answer data. * * Supported embed types: `SearchEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 9.1.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * hideResults:true, * }) * ``` */ hideResults?: boolean; /** * If set to true, the Search Assist feature is enabled. * * Supported embed types: `SearchEmbed` * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * enableSearchAssist:true, * }) * ``` */ enableSearchAssist?: boolean; /** * If set to true, the tabular view is set as the default * format for presenting search data. * * Supported embed types: `SearchEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * forceTable:true, * }) * ``` */ forceTable?: boolean; /** * The array of data source GUIDs to set on load. * Only a single data source is supported currently. * Use {@link dataSource} instead. * @deprecated Use `dataSource` instead. * * Supported embed types: `SearchEmbed` * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * dataSources:['id-234','id-456'], * }) * ``` */ dataSources?: string[]; /** * The data source GUID to set on load. * * Supported embed types: `SearchEmbed` * @version SDK: 1.19.0 * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * dataSource:'id-234', * }) * ``` */ dataSource?: string; /** * If set to `true`, the answer edit panel is hidden. * * Supported embed types: `SearchEmbed` * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * hideAnswerEditPanel: true, * }) * ``` */ hideAnswerEditPanel?: boolean; /** * The initial search query to load the answer with. * Use {@link searchOptions} instead. * @deprecated * */ searchQuery?: string; /** * Configuration for search options. * Includes the following properties: * * `searchTokenString`: Search tokens to pass in the query. * * `executeSearch`: Boolean to define if the search should be executed or not. * If it is executed, the focus is placed on the results. * If it’s not executed, the focus is placed at the end of * the token string in the search bar. * * Supported embed types: `SearchEmbed` * @example * ```js * searchOptions: { * searchTokenString: '[quantity purchased] [region]', * executeSearch: true, * } * ``` */ searchOptions?: SearchOptions$1; /** * Exclude the search token string from the URL. * If set to true, the search token string is not appended to the URL. * * Supported embed types: `SearchEmbed` * @version SDK: 1.35.7 | ThoughtSpot: 10.8.0.cl * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * searchOptions: { * searchTokenString: '[quantity purchased] [region]', * executeSearch: true, * }, * excludeSearchTokenStringFromURL: true, * }); * ``` */ excludeSearchTokenStringFromURL?: boolean; /** * The GUID of a saved answer to load initially. * * Supported embed types: `SearchEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * answerId:'sed-1234', * }) * ``` */ answerId?: string; /** * If set to true, the search page will render without the Search Bar * The chart/table should still be visible. * * Supported embed types: `SearchEmbed` * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * hideSearchBar:true, * }) * ``` */ hideSearchBar?: boolean; /** * Flag to set if last selected dataSource should be used * * Supported embed types: `SearchEmbed` * @version SDK: 1.24.0 */ useLastSelectedSources?: boolean; /** * To set the initial state of the search bar in case of saved-answers. * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @deprecated Use {@link collapseSearchBar} instead * @default false */ collapseSearchBarInitially?: boolean; /** * This controls the initial behaviour of custom column groups accordion. * It takes DataPanelCustomColumnGroupsAccordionState enum values as input. * List of different enum values:- * - EXPAND_ALL: Expand all the accordion initially in data panel v2. * - COLLAPSE_ALL: Collapse all the accordions initially in data panel v2. * - EXPAND_FIRST: Expand the first accordion and collapse the rest. * * Supported embed types: `SearchEmbed` * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl * @default DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * dataPanelCustomGroupsAccordionInitialState: * DataPanelCustomColumnGroupsAccordionState.EXPAND_ALL, * }); * ``` */ dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState$1; /** * Flag to remove focus from search bar initially when user * lands on search embed page. * * Supported embed types: `SearchEmbed` * @version SDK: 1.32.0 | ThoughtSpot: 10.3.0.cl * @default true * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * focusSearchBarOnRender: false, * }); * ``` */ focusSearchBarOnRender?: boolean; /** * Enable or disable Muze chart phase 1 GA * * Supported embed types: `SearchEmbed` * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl * @default false * @example * ```js * const embed = new SearchEmbed('#tsEmbed', { * ... // other embed view config * newChartsLibrary: true, * }) * ``` */ newChartsLibrary?: boolean; /** * Visual overrides to customize the chart or table properties. * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl */ visualOverrides?: VisualizationOverrides; } export interface SearchAppInitData extends DefaultAppInitData { searchOptions?: SearchOptions$1; embedParams?: { visualOverridesParams?: VisualizationOverrides | null; }; } /** * Embed ThoughtSpot search * @group Embed components */ export declare class SearchEmbed extends TsEmbed { /** * The view configuration for the embedded ThoughtSpot search. */ protected viewConfig: SearchViewConfig; constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig); /** * Get the state of the data sources panel that the embedded * ThoughtSpot search will be initialized with. */ private getDataSourceMode; protected getSearchInitData(): { searchOptions?: { searchTokenString: string; }; }; protected getAppInitData(): Promise; protected getEmbedParamsObject(): Record; protected getEmbedParams(): string; /** * Construct the URL of the embedded ThoughtSpot search to be * loaded in the iframe * @param answerId The GUID of a saved answer * @param dataSources A list of data source GUIDs */ getIFrameSrc(): string; /** * Render the embedded ThoughtSpot search */ render(): Promise; } /** * @group Embed components */ export interface SearchBarViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig { /** * The array of data source GUIDs to set on load. * Only a single data source is supported currently. * * Supported embed types: `SearchBarEmbed` * @version SDK: 1.1.0 | ThoughtSpot: 8.1.1-sw * @deprecated Use `dataSource` instead * @example * ```js * const embed = new SearchBarEmbed('#tsEmbed', { * ... //other embed view config * dataSources:['id-2345','id-2345'], * }) * ``` */ dataSources?: string[]; /** * Pass the ID of the source to be selected. * * Supported embed types: `SearchBarEmbed` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw * @example * ```js * const embed = new SearchBarEmbed('#tsEmbed', { * ... //other embed view config * dataSource:'id-2345', * }) * ``` */ dataSource?: string; /** * Boolean to define if the last selected data source should be used * * Supported embed types: `SearchBarEmbed` * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.0.sw * @example * ```js * const embed = new SearchBarEmbed('#tsEmbed', { * ... //other embed view config * useLastSelectedSources:false, * }) * ``` */ useLastSelectedSources?: boolean; /** * Configuration for search options. * Includes the following properties: * * `searchTokenString`: Search tokens to pass in the query. * * `executeSearch`: Boolean to define if the search should be executed or not. * If it is executed, the focus is placed on the results. * If it’s not executed, the focus is placed at the end of * the token string in the search bar. * * Supported embed types: `SearchBarEmbed` * @version SDK: 1.2.0 | ThoughtSpot: 9.4.0.sw * @example * ```js * const embed = new SearchBarEmbed('#tsEmbed', { * ... //other embed view config * searchOptions: { * searchTokenString: '[quantity purchased] [region]', * executeSearch: true, * } * }) * ``` */ searchOptions?: SearchOptions$1; /** * Exclude the search token string from the URL. * If set to true, the search token string is not appended to the URL. * * Supported embed types: `SearchBarEmbed` * @version SDK: 1.35.7 | ThoughtSpot: 10.8.0.cl * @example * ```js * const embed = new SearchBarEmbed('#tsEmbed', { * searchOptions: { * searchTokenString: '[quantity purchased] [region]', * executeSearch: true, * }, * excludeSearchTokenStringFromURL: true, * }); * ``` */ excludeSearchTokenStringFromURL?: boolean; } interface SearchAppInitData$1 extends DefaultAppInitData { searchOptions: SearchOptions$1; } /** * Embed ThoughtSpot search bar * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw * @group Embed components */ export declare class SearchBarEmbed extends TsEmbed { /** * The view configuration for the embedded ThoughtSpot search bar. */ protected viewConfig: SearchBarViewConfig; protected embedComponentType: string; constructor(domSelector: string, viewConfig: SearchBarViewConfig); protected getEmbedParamsObject(): Record; /** * Construct the URL of the embedded ThoughtSpot search to be * loaded in the iframe * @param dataSources A list of data source GUIDs */ private getIFrameSrc; /** * Render the embedded ThoughtSpot search */ render(): Promise; protected getSearchInitData(): { searchOptions: SearchOptions$1; }; protected getAppInitData(): Promise; } /** * Configuration for bodyless conversation options. * @group Embed components */ export interface SpotterAgentEmbedViewConfig extends Omit { /** * The ID of the Model to use for the conversation. */ worksheetId: string; } /** * Configuration for conversation options. * Use {@link SpotterAgentEmbedViewConfig} instead * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * @group Embed components */ export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig { } export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig { sessionId: string; genNo: number; acSessionId: string; acGenNo: number; convId: string; messageId: string; } declare class ConversationMessage extends TsEmbed { protected viewConfig: SpotterAgentMessageViewConfig; constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig); protected getEmbedParamsObject(): Record; getIframeSrc(): string; render(): Promise; } /** * Create a conversation embed, which can be integrated inside * chatbots or other conversational interfaces. * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl * @group Embed components * @example * ```js * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk'; * * const conversation = new SpotterAgentEmbed({ * worksheetId: 'worksheetId', * }); * * const { container, error } = await conversation.sendMessage('show me sales by region'); * * // append the container to the DOM * document.body.appendChild(container); // or to any other element * ``` */ export declare class SpotterAgentEmbed { private viewConfig; private conversationService; constructor(viewConfig: SpotterAgentEmbedViewConfig); sendMessage(userMessage: string): Promise<{ error: any; container?: undefined; viz?: undefined; } | { container: HTMLDivElement; viz: ConversationMessage; error?: undefined; }>; /** * Send a message to the conversation service and return only the data. * @param userMessage - The message to send to the conversation service. * @returns The data from the conversation service. */ sendMessageData(userMessage: string): Promise<{ error: any; data?: undefined; } | { data: { convId: any; messageId: any; sessionId: any; genNo: any; acSessionId: any; acGenNo: any; }; error?: undefined; }>; } /** * Create a conversation embed, which can be integrated inside * chatbots or other conversational interfaces. * Use {@link SpotterAgentEmbed} instead * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * @group Embed components * @example * ```js * import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk'; * * const conversation = new SpotterAgentEmbed({ * worksheetId: 'worksheetId', * }); * * const { container, error } = await conversation.sendMessage('show me sales by region'); * * // append the container to the DOM * document.body.appendChild(container); // or to any other element * ``` */ export declare class BodylessConversation extends SpotterAgentEmbed { constructor(viewConfig: BodylessConversationViewConfig); } export type SessionInfo = { releaseVersion: string; userGUID: string; currentOrgId: number; privileges: string[]; mixpanelToken: string; isPublicUser: boolean; clusterId: string; clusterName: string; [key: string]: any; }; /** * Returns the cached session info object and caches it for future use. * Once fetched the session info object is cached and returned from the cache on * subsequent calls. * This cache is cleared when inti is called OR resetCachedSessionInfo is called. * @example ```js * const sessionInfo = await getSessionInfo(); * console.log(sessionInfo); * ``` * @version SDK: 1.28.3 | ThoughtSpot: * * @returns {Promise} The session info object. */ export declare function getSessionInfo(): Promise; /** * Gets the embed configuration settings that were used to * initialize the SDK. * @returns {@link EmbedConfig} * * @example * ```js * import { getInitConfig } from '@thoughtspot/visual-embed-sdk'; * // Call the getInitConfig method to retrieve the embed configuration * const config = getInitConfig(); * // Log the configuration settings * console.log(config); * ``` * Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig] * object, which contains the configuration settings used to * initialize the SDK, including the following: * * - `thoughtSpotHost` - ThoughtSpot host URL * - `authType`: The authentication method used. For example, * `AuthServerCookieless` for `AuthType.TrustedAuthTokenCookieless` * - `customizations` - Style, text, and icon customization settings * that were applied during the SDK initialization. * * The following JSON output shows the embed configuration * settings returned from the code in the previous example: * * @example * ```json * { * "thoughtSpotHost": "https://{ThoughtSpot-Host}", * "authType": "AuthServerCookieless", * "customizations": { * "style": { * "customCSS": { * "variables": { * "--ts-var-button--secondary-background": "#7492d5", * "--ts-var-button--secondary--hovers-background": "#aac2f8", * "--ts-var-root-background": "#f1f4f8" * } * } * } * }, * "loginFailedMessage": "Login failed, please try again", * "authTriggerText": "Authorize", * "disableTokenVerification": true, * "authTriggerContainer": "#your-own-div" * } * ``` * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later * @group Global methods */ declare const getEmbedConfig: () => EmbedConfig; /** * Enum of mixpanel events * @hidden */ export declare const MIXPANEL_EVENT: { VISUAL_SDK_RENDER_START: string; VISUAL_SDK_CALLED_INIT: string; VISUAL_SDK_RENDER_COMPLETE: string; VISUAL_SDK_RENDER_FAILED: string; VISUAL_SDK_TRIGGER: string; VISUAL_SDK_ON: string; VISUAL_SDK_IFRAME_LOAD_PERFORMANCE: string; VISUAL_SDK_EMBED_CREATE: string; VERCEL_INTEGRATION_COMPLETED: string; VISUAL_SDK_RENDER_CALLED: string; VISUAL_SDK_PRE_RENDER: string; VISUAL_SDK_SHOW_PRE_RENDER: string; VISUAL_SDK_HIDE_PRE_RENDER: string; }; /** * Pushes the event with its Property key-value map to mixpanel. * @param eventId * @param eventProps */ export declare function uploadMixpanelEvent(eventId: string, eventProps?: {}): void; /** * Fetch wrapper that adds the authentication token to the request. * Use this to call the ThoughtSpot APIs when using the visual embed sdk. * The interface for this method is the same as Web `Fetch`. * @param input * @param init * @example * ```js * tokenizedFetch("/api/rest/2.0/auth/session/user", { * // .. fetch options .. * }); * ``` * @version SDK: 1.28.0 * @group Global methods */ export declare const tokenizedFetch: typeof fetch; /** * Get answer from natural language query * @param query string * @param worksheetId string * @returns AnswerService and the suggestion response. * @version SDK: 1.33.1 | ThoughtSpot: 10.3.0.cl * @example * ```js * const { answer } = await getAnswerFromQuery('revenue', 'worksheetId'); * ``` */ export declare const getAnswerFromQuery: (query: string, worksheetId: string) => Promise<{ answer: AnswerService; suggestion: any; }>; /** * Creates a new Liveboard in ThoughtSpot using the provided AnswerService instances. * * Each answer will be added as a visualization to the newly created Liveboard. * * @param {AnswerService[]} answers - An array of initialized `AnswerService` instances * representing the answers to be added to the Liveboard. * @param {string} name - The name of the Liveboard to create. * @returns result Promise * @version SDK: 1.33.1 | ThoughtSpot: * * @example * ```js * import { EmbedEvent, AnswerService } from "@thoughtspot/visual-embed-sdk"; * * embed.on(EmbedEvent.Data, async () => { * try { * const answerService = await embed.getAnswerService(); * const lb = await createLiveboardWithAnswers( * [answerService], * "My Liveboard" * ); * console.log("Liveboard created:", lb); * } catch (err) { * console.error("Failed to create liveboard:", err); * } * }); * ``` */ export declare const createLiveboardWithAnswers: (answers: AnswerService[], name: string) => Promise; /** * Resets the auth token and a new token will be fetched on the next request. * @example * ```js * resetCachedAuthToken(); * ``` * @version SDK: 1.28.0 | ThoughtSpot: * * @group Authentication / Init */ export declare const resetCachedAuthToken: () => void; /** * Starts an automatic renderer that watches the DOM for iframes containing * the `tsmcp=true` query parameter and replaces them with fully configured * ThoughtSpot embed iframes. The query parameter is automatically added by * the ThoughtSpot MCP server. * * A {@link MutationObserver} is set up on `document.body` to detect both * directly added iframes and iframes nested within added container elements. * Each matching iframe is replaced in-place with a new ThoughtSpot embed * iframe that merges the original iframe's query parameters with the SDK * embed parameters. * * Call {@link MutationObserver.disconnect | observer.disconnect()} on the * returned observer to stop monitoring the DOM. * * @param viewConfig - Optional configuration for the auto-rendered embeds. * Accepts all properties from {@link AutoMCPFrameRendererViewConfig}. * Defaults to an empty config. * @returns A {@link MutationObserver} instance that is actively observing * `document.body`. Disconnect it when monitoring is no longer needed. * * @example * ```js * import { startAutoMCPFrameRenderer } from '@thoughtspot/visual-embed-sdk'; * * // Start watching the DOM for tsmcp iframes * const observer = startAutoMCPFrameRenderer({ * // optional view config overrides * }); * * // Later, stop watching * observer.disconnect(); * ``` * * @example * Detailed example of how to use the auto-frame renderer: * [Python React Agent Simple UI](https://github.com/thoughtspot/developer-examples/tree/main/mcp/python-react-agent-simple-ui) */ export declare function startAutoMCPFrameRenderer(viewConfig?: AutoMCPFrameRendererViewConfig): MutationObserver; export { getEmbedConfig as getInitConfig, }; export {};