import { Operation } from './operation';
import type { ActionToGenerateType, ChangeModelToGenerateData, CreateModelToGenerateData, RenameModelToGenerateData, ToStringFunctionReturnType } from './types';
import type { DatabaseAdapter } from '../../engine';
import type { ModelFieldsType, ModelOptionsType } from '../../models/types';
import type { Migration } from '../migrate/migration';
import type { State } from '../state';
import type { OriginalOrStateModelsByNameType } from '../types';
/**
 * This operation is used when you create a model in the application.
 * Whenever a new model appears that it does not appear
 * in the state, it will be understood that a new model had been created.
 * We are certain that a new model have been created if the number of models
 * from the state and the original increase in a factor of 1 or more.
 * If the number of models doesn't change we can't be sure.
 */
export declare class CreateModel extends Operation {
    modelName: string;
    fields: ModelFieldsType;
    options: ModelOptionsType;
    constructor(modelName: string, fields: ModelFieldsType, options?: ModelOptionsType);
    stateForwards(state: State, domainName: string, domainPath: string): Promise<void>;
    run(migration: Migration, engineInstance: DatabaseAdapter, _: OriginalOrStateModelsByNameType, toState: OriginalOrStateModelsByNameType, returnOfInit: any): Promise<void>;
    static toGenerate(domainName: string, domainPath: string, modelName: string, data: CreateModelToGenerateData): Promise<ActionToGenerateType<CreateModelToGenerateData>>;
    static toString(engine: DatabaseAdapter, indentation: number | undefined, data: ActionToGenerateType<CreateModelToGenerateData>): Promise<ToStringFunctionReturnType>;
    static describe(data: ActionToGenerateType<CreateModelToGenerateData>): Promise<string>;
}
/**
 * Operation that runs when a model is deleted. Similar to CreateModel, we know that the model
 * was deleted and it is on the previous state and not on the current state. We are certain that it
 * was deleted when the number of models decrease in a factor of 1 or more.
 */
export declare class DeleteModel extends Operation {
    modelName: string;
    constructor(modelName: string);
    stateForwards(state: State, _domainName: string, _domainPath: string): Promise<void>;
    run(migration: Migration, engineInstance: DatabaseAdapter, fromState: OriginalOrStateModelsByNameType, _toState: OriginalOrStateModelsByNameType, returnOfInit: any): Promise<void>;
    static toGenerate(domainName: string, domainPath: string, modelName: string): Promise<ActionToGenerateType<null>>;
    static toString(_engine: DatabaseAdapter, indentation: number | undefined, data: ActionToGenerateType<null>): Promise<ToStringFunctionReturnType>;
    static describe(data: ActionToGenerateType<null>): Promise<string>;
}
/**
 * Operation that runs when the model had changed, not the fields but the options.
 *
 * If any of the custom options of the model had changed we will then create a migration
 * with this operation.
 */
export declare class ChangeModel extends Operation {
    modelName: string;
    optionsBefore: ModelOptionsType;
    optionsAfter: ModelOptionsType;
    constructor(modelName: string, optionsBefore: ModelOptionsType, optionsAfter: ModelOptionsType);
    stateForwards(state: State, domainName: string, domainPath: string): Promise<void>;
    run(migration: Migration, engineInstance: DatabaseAdapter, fromState: OriginalOrStateModelsByNameType, toState: OriginalOrStateModelsByNameType, returnOfInit: any): Promise<void>;
    static toGenerate(domainName: string, domainPath: string, modelName: string, data: ChangeModelToGenerateData): Promise<ActionToGenerateType<ChangeModelToGenerateData>>;
    static toString(engine: DatabaseAdapter, indentation: number | undefined, data: ActionToGenerateType<ChangeModelToGenerateData>): Promise<ToStringFunctionReturnType>;
    static describe(data: ActionToGenerateType<ChangeModelToGenerateData>): Promise<string>;
}
/**
 * Operation used when the name of the model changes, it have any side effects besides
 * changing the name of the model. It's more needed and used for updating the state.
 */
export declare class RenameModel extends Operation {
    oldModelName: string;
    newModelName: string;
    constructor(oldModelName: string, newModelName: string);
    stateForwards(state: State, domainName: string, domainPath: string): Promise<void>;
    static toGenerate(domainName: string, domainPath: string, modelName: string, data: RenameModelToGenerateData): Promise<ActionToGenerateType<RenameModelToGenerateData>>;
    static toString(_engine: DatabaseAdapter, indentation: number | undefined, data: ActionToGenerateType<RenameModelToGenerateData>): Promise<ToStringFunctionReturnType>;
    static describe(data: ActionToGenerateType<RenameModelToGenerateData>): Promise<string>;
}
//# sourceMappingURL=models.d.ts.map