import type { FilterGroup, ItemData as DashboardItemData } from '@luzmo/dashboard-contents-types'; export type ScreenMode = 'mobile' | 'tablet' | 'desktop' | 'largeScreen' | 'fixed' | 'auto'; export type DashboardDimensions = Record, [ number, number, string ]>; export type CommonReturnType = { dashboardId?: string; dashboardSlug?: string; integrationId?: string; itemId?: string; language?: string; name?: string; requestId?: string; screenMode?: ScreenMode; type?: string; error?: boolean; msg?: string; }; export type ExportDashboard = { type: 'export'; } & CommonReturnType; export type AccessibleDashboard = { accessibleBy?: { model?: 'User' | 'Group' | 'Integration'; id?: string; name?: string; }[]; accessRights?: { flagRead?: boolean; flagUse?: boolean; flagModify?: boolean; flagOwn?: boolean; }; id?: string; modifiedAt?: string; name?: string; slug?: string | null; tags: string[]; }; export type ItemData = DashboardItemData; export type DashboardEditMode = 'editFull' | 'editLimited' | 'view'; export type DashboardEmbedMode = 'webComponent' | 'iframe'; export type SetEditMode = { type?: 'setEditMode'; editMode?: DashboardEditMode; } & CommonReturnType; export type SetSelectedData = { filters?: FilterGroup[]; } & CommonReturnType; export type SetPreview = { type: 'setPreview'; preview?: boolean; } & CommonReturnType; export type AddFilters = { type: 'AddFilters'; origin: 'itemFilter'; item: string; filters: FilterGroup[]; }; export type DashboardPromises = Record) => void; reject: (reason: any) => void; }>; export type BrowserCheckKey = 'svg' | 'flexbox' | 'postMessage'; export interface DashboardInputs { appServer?: string; apiHost?: string; itemId?: string; theme?: string; mainColor?: string; accentColor?: string; language?: string; editorLanguage?: string; qeVersion?: 1 | 2; editMode?: DashboardEditMode; screenMode?: ScreenMode; switchScreenModeOnResize?: boolean; dashboardId?: string; dashboardSlug?: string; itemDimensions?: { width: number | 'auto'; height: number | 'auto'; }; timezoneId?: string; loaderBackground?: string; loaderFontColor?: string; loaderSpinnerColor?: string; loaderSpinnerBackground?: string; authKey?: string; authToken?: string; embedMode?: DashboardEmbedMode; } export interface DashboardContentParams extends Exclude { key?: DashboardInputs['authKey']; token?: DashboardInputs['authToken']; itemEmbedding?: boolean; loaderBackground?: DashboardInputs['loaderBackground']; loaderFontColor?: DashboardInputs['loaderFontColor']; loaderSpinnerColor?: DashboardInputs['loaderSpinnerColor']; loaderSpinnerBackground?: DashboardInputs['loaderSpinnerBackground']; error?: boolean; container?: string; contextId?: string; } export type PartialRecord = Partial>;