import { PropDef, PropDefEdge, SchemaPropTree } from '@based/schema/def';
import { DbClient } from '../index.js';
import { ModifyOpts } from './types.js';
import { LangCode } from '@based/schema';
export type ModifyRes = {
    tmpId: number;
    error?: Error;
} & Promise<number>;
export declare class ModifyError extends Error {
    constructor(prop: PropDef | PropDefEdge | SchemaPropTree, val: any, msg?: string);
}
export declare class ModifyState {
    #private;
    constructor(typeId: number, tmpId: number, db: DbClient, opts: ModifyOpts, update?: boolean);
    update: boolean;
    locale: LangCode;
    tmpId: number;
    error?: ModifyError;
    promises?: Promise<any>[];
    getId(): number;
    then(resolve: any, reject: any): Promise<any>;
    catch(handler: any): this | Promise<unknown>;
}
