import { PropDef, SchemaTypeDef } from '@based/schema/def';
import { DbClient } from './index.js';
import { ModifyState } from './modify/ModifyRes.js';
export declare class ModifyCtx {
    constructor(db: DbClient);
    len: number;
    id: number;
    hasSortField: number;
    hasSortText: number;
    ctx: {
        queue?: Map<(payload: any) => void, ModifyState>;
        offsets?: Record<number, number>;
    };
    payload: Uint8Array;
    max: number;
    buf: Uint8Array;
    field: number;
    prefix0: number;
    prefix1: number;
    lastMain: number;
    mergeMain: (PropDef | any)[] | null;
    mergeMainSize: number;
    db: DbClient;
    dirtyRanges: Set<number>;
    dirtyTypes: Map<number, number>;
    markNodeDirty(schema: SchemaTypeDef, nodeId: number): void;
    markTypeDirty(schema: SchemaTypeDef): void;
    updateMax(): void;
    getData(lastIds: Record<number, number>): Uint8Array;
    reset(): void;
}
export declare const execCtxQueue: (resCtx: ModifyCtx["ctx"], error?: boolean) => void;
export declare const flushBuffer: (db: DbClient) => Promise<void>;
export declare const startDrain: (db: DbClient) => void;
export declare const makeFlushIsReady: (dbClient: DbClient) => void;
