/** * The function to fetch a guest token from your Host App's backend server. * The Host App backend must supply an API endpoint * which returns a guest token with appropriate resource access. */ export declare type GuestTokenFetchFn = () => Promise; export declare type UiConfigType = { hideTitle?: boolean; hideTab?: boolean; hideChartControls?: boolean; urlParams?: { [key: string]: any; }; filters?: { [key: string]: boolean | undefined | string; visible?: boolean; expanded?: boolean; native_filters?: string | undefined; }; }; export declare type EmbedDashboardParams = { /** The id provided by the embed configuration UI in Superset */ uuid: string; /** The domain where Superset can be located, with protocol, such as: https://superset.example.com */ supersetDomain: string; /** The html element within which to mount the iframe */ mountPoint: any; /** A function to fetch a guest token from the Host App's backend server */ fetchGuestToken: GuestTokenFetchFn; /** The dashboard UI config: hideTitle, hideTab, hideChartControls, urlParams, filters.visible, filters.expanded **/ dashboardUiConfig?: UiConfigType; /** Are we in debug mode? */ debug?: boolean; }; export declare type Size = { width: number; height: number; }; export declare type EmbeddedDashboard = { getScrollSize: () => Promise; unmount: () => void; getDashboardPermalink: (anchor: string) => Promise; getActiveTabs: () => Promise; getDashboardState: () => Promise; }; /** * Embeds a Superset dashboard into the page using an iframe. */ export declare function embedDashboard({ uuid, supersetDomain, mountPoint, fetchGuestToken, dashboardUiConfig, debug, }: EmbedDashboardParams): Promise;