export interface IColumnData {
    column: string;
    property?: string;
    references?: IModelClass;
    primaryKey?: boolean;
}
export type IColumn = IColumnData | string;
export type IColumns = Array<IColumn> | (() => Array<IColumn>);
export interface IColumnInternalData {
    column: string;
    property: string;
    references?: IModelClass;
    primaryKey: boolean;
}
export type IColumnInternal = IColumnInternalData;
export type IColumnsInternal = Array<IColumnInternal>;
export interface IModel {
    [key: string]: any;
}
export type IModelClass = new (props: any) => IModel;
export interface ICollection<T extends IModel> {
    models: Array<T>;
}
export interface IEntity<T extends IModel> {
    tableName: string;
    displayName?: string;
    collectionDisplayName?: string;
    columns: IColumns;
    Model: new (props: any) => T;
    Collection: new ({ models }: any) => ICollection<T>;
}
export type IEntities<T extends IModel> = Array<IEntity<T>>;
export interface IEntityInternal<T extends IModel> {
    tableName: string;
    displayName: string;
    collectionDisplayName: string;
    columns: IColumnsInternal;
    propertyNames: Array<string>;
    Model: new (props: any) => T;
    Collection: new ({ models }: any) => ICollection<T>;
    columnNames: Array<string>;
    prefixedColumnNames: Array<string>;
    primaryKeys: Array<string>;
    references: object;
    selectColumnsClause: string;
    getPkId: (model: IModel) => string;
}
export type IEntitiesInternal<T extends IModel> = Array<IEntityInternal<T>>;
export interface ICreateCoreOptions {
    entities: IEntities<IModel>;
}
export interface ICore {
    createFromDatabase: <T extends ICollection<IModel>>(rows: any) => T;
    createAnyFromDatabase: <T extends ICollection<IModel>>(rows: any, rootKey: string | IModelClass) => T;
    createOneFromDatabase: <T extends IModel>(rows: any) => T;
    createOneOrNoneFromDatabase: <T extends IModel>(rows: any) => T | void;
    createManyFromDatabase: <T extends ICollection<IModel>>(rows: any) => T;
    tables: {
        [key: string]: {
            columns: string;
        };
    };
    getEntityByModel: (model: IModel) => IEntityInternal<IModel>;
    getEntityByTableName: (tableName: string) => IEntityInternal<IModel>;
}
export declare const createCore: ({ entities: externalEntities }: ICreateCoreOptions) => ICore;
