export type SortingEntry = { id: string; desc: boolean; }; export type ColumnPinning = { left?: Array; right?: Array; }; export type TableColumnOptions = { columnOrder?: Array; sorting?: Array; columnVisibility?: Record; columnSizing?: Record; columnPinning?: ColumnPinning; }; export interface TablePersistenceContext { /** * The current persisted table state, or `null` if no state has been persisted yet. */ tableState: TableColumnOptions | null; /** * Whether the table persistence state is still loading. */ isLoading: boolean; } export interface TablePersistenceRuntimeApi { /** * Returns the currently persisted table column state for the active table. */ getTablePersistenceState: () => Promise; /** * Persists a new table column state. * * @param state - The table column options to persist. */ setTablePersistenceState: (state: TableColumnOptions) => Promise; }