/** * Copyright (c) 2020 * * TypeScript type definitions for ThoughtSpot Embed UI SDK * * @summary Type definitions for Embed SDK * @author Ayon Ghosh */ /** * The authentication mechanism to be followed * for the embedded app */ export declare enum AuthType { None = "None", SSO = "SSO", AuthServer = "AuthServer" } export declare type DOMSelector = string | HTMLElement; /** * The configuration object for embedding, specifying * the ThoughtSpot host or IP address, the authentication * mechanism and the authentication endpoint if a trusted * auth server is being used */ export interface EmbedConfig { thoughtSpotHost: string; authType: AuthType; authEndpoint?: string; } export declare type MessagePayload = { type: string; data: any; }; export declare type MessageCallback = (payload: MessagePayload) => void; export declare type GenericCallbackFn = (...args: any[]) => any; export declare type QueryParams = { [key: string]: string; }; /** * A map of the supported runtime filter operations */ export declare enum RuntimeFilterOp { EQ = "EQ", NE = "NE", LT = "LT", LE = "LE", GT = "GT", GE = "GE", CONTAINS = "CONTAINS", BEGINS_WITH = "BEGINS_WITH", ENDS_WITH = "ENDS_WITH", BW_INC_MAX = "BW_INC_MAX", BW_INC_MIN = "BW_INC_MIN", BW_INC = "BW_INC", BW = "BW", IN = "IN" } export interface RuntimeFilter { columnName: string; operator: RuntimeFilterOp; values: (number | boolean | string)[]; } /** * Supported message types for communication between * the host app and the embedded app */ export declare enum EventType { RenderInit = "renderInit", Init = "init", Load = "load", Data = "data", FiltersChanged = "filtersChanged", QueryChanged = "queryChanged", Drilldown = "drillDown", DataSourceSelected = "dataSourceSelected", CustomAction = "customAction", Search = "search", Filter = "filter", Reload = "reload" } /** * Message types supported by the v1 of the ThoughtSpot app */ export declare enum EventTypeV1 { Alert = "alert", Data = "data", AuthExpire = "authExpire", EmbedHeight = "EMBED_HEIGHT" } /** * The different visual modes that the data sources panel within * search could appear in, i.e., hidden, collapsed or expanded */ export declare enum DataSourceVisualMode { Hidden = "hide", Collapsed = "collapse", Expanded = "expand" } /** * The query params passed down to the embedded ThoughtSpot app * containing configuration and/or visual info */ export declare enum Param { DataSources = "dataSources", DataSourceMode = "dataSourceMode", DisableActions = "disableAction", DisableActionReason = "disableHint", SearchQuery = "searchQuery", HideActions = "hideAction", EnableVizTransformations = "enableVizTransform" } /** * The list of actions that can be performed on visual ThoughtSpot * entities, i.e., answers and pinboards */ export declare enum Action { Save = "save", Update = "update", SaveUntitled = "saveUntitled", SaveAsView = "saveAsView", MakeACopy = "makeACopy", EditACopy = "editACopy", CopyLink = "embedDocument", PinboardSnapshot = "pinboardSnapshot", ResetLayout = "resetLayout", Schedule = "schedule", SchedulesList = "schedule-list", Share = "share", AddFilter = "addFilter", ConfigureFilter = "configureFilter", AddFormula = "addFormula", SearchOnTop = "searchOnTop", SpotIQAnalyze = "spotIQAnalyze", ExplainInsight = "explainInsight", SpotIQFollow = "spotIQFollow", ShareViz = "shareViz", ReplaySearch = "replaySearch", ShowUnderlyingData = "showUnderlyingData", Download = "download", DownloadAsPdf = "downloadAsPdf", DownloadAsCsv = "downloadAsCSV", DownloadAsXlsx = "downloadAsXLSX", DownloadTrace = "downloadTrace", ExportTSL = "exportTSL", ImportTSL = "importTSL", UpdateTSL = "updateTSL", EditTSL = "editTSL", Presentation = "present", ToggleSize = "toggleSize", Edit = "edit", EditTitle = "editTitle", Remove = "delete", Ungroup = "ungroup", Describe = "describe", Relate = "relate", CustomizeHeadlines = "customizeHeadlines", PinboardInfo = "pinboardInfo", SendAnswerFeedback = "sendFeedback", CustomAction = "customAction", DownloadEmbraceQueries = "downloadEmbraceQueries", Pin = "pin", AnalysisInfo = "analysisInfo", Subscription = "subscription", Explore = "explore" }