import type { Text } from '@blockeditor/store';
import { BlockModel } from '@blockeditor/store';
import type { DataViewDataType, DataViewTypes } from './common/data-view.js';
import type { Column } from './table/types.js';
import type { Cell, ColumnUpdater, InsertToPosition } from './types.js';
export type DatabaseBlockProps = {
    views: DataViewDataType[];
    title: Text;
    cells: SerializedCells;
    columns: Array<Column>;
};
export type SerializedCells = {
    [key: string]: {
        [key: string]: Cell;
    };
};
export declare class DatabaseBlockModel extends BlockModel<DatabaseBlockProps> {
    getViewList(): ((import("./table/define.js").TableViewData & {
        id: string;
        name: string;
    } & {
        mode: "table";
    }) | (import("./kanban/define.js").KanbanViewData & {
        id: string;
        name: string;
    } & {
        mode: "kanban";
    }))[];
    initEmpty(viewType: DataViewTypes): void;
    initConvert(viewType: DataViewTypes): void;
    initTemplate(viewType: DataViewTypes): void;
    addView(type: DataViewTypes): (import("./table/define.js").TableViewData & {
        id: string;
        name: string;
    } & {
        mode: "table";
    }) | (import("./kanban/define.js").KanbanViewData & {
        id: string;
        name: string;
    } & {
        mode: "kanban";
    });
    duplicateView(id: string): string;
    deleteView(id: string): void;
    updateView(id: string, update: (data: DataViewDataType) => Partial<DataViewDataType>): void;
    moveViewTo(id: string, position: InsertToPosition): void;
    applyViewsUpdate(): void;
    applyColumnUpdate(): void;
    findColumnIndex(id: Column['id']): number;
    getColumn(id: Column['id']): Column | undefined;
    addColumn(position: InsertToPosition, column: Omit<Column, 'id'> & {
        id?: string;
    }): string;
    updateColumn(id: string, updater: ColumnUpdater): string | undefined;
    deleteColumn(columnId: Column['id']): void;
    getCell(rowId: BlockModel['id'], columnId: Column['id']): Cell | null;
    updateCell(rowId: string, cell: Cell): void;
    copyCellsByColumn(fromId: Column['id'], toId: Column['id']): void;
    updateCells(columnId: string, cells: Record<string, unknown>): void;
}
export declare const DatabaseBlockSchema: {
    version: number;
    model: {
        role: "root" | "hub" | "content";
        props: import("@blockeditor/store").PropsGetter<DatabaseBlockProps>;
        flavour: "affine:database";
    } & {
        role: "hub";
        version: number;
        parent: string[];
        children: string[];
    };
    onUpgrade?: ((data: DatabaseBlockProps, previousVersion: number, latestVersion: number) => void) | undefined;
    transformer?: (() => import("@blockeditor/store").BaseBlockTransformer<DatabaseBlockProps>) | undefined;
};
//# sourceMappingURL=database-model.d.ts.map