import { RestApi } from '../../../../../infra/api/rest-api'; import { AppSettings } from '../../../../../infra/app/settings/settings'; import { CompleteThemeSettings } from '../../../../../types'; import { UseDashboardModelInternalAction } from './types.js'; export type PersistDashboardModelMiddlewareParams = { /** Dashboard OID, or undefined if not initialized */ dashboardOid: string | undefined; /** Internal dashboard model action to persist */ action: UseDashboardModelInternalAction; /** Sisense REST API instance */ restApi: RestApi; /** Whether the dashboard is in shared mode */ sharedMode: boolean; /** Application settings forwarded to {@link toWidgetDto} (controls widget design feature flag) */ appSettings: AppSettings; /** Theme settings forwarded to {@link toWidgetDto} (used as defaults for widget design) */ themeSettings: CompleteThemeSettings; }; /** * Middleware that persists the dashboard model changes to the Sisense server. * * @returns Promise resolving to the action (possibly transformed, e.g. for ADD_WIDGET) * @internal */ export declare function persistDashboardModelMiddleware({ dashboardOid, action, restApi, sharedMode, appSettings, themeSettings, }: PersistDashboardModelMiddlewareParams): Promise;