import { IConfigurable } from "./Configuration"; export interface INoResultCallback { (err: Error): any; } export interface ISingleResultCallback { (err: Error, model: T): any; } export interface IMultipleResultCallback { (err: Error, models: T[]): any; } export declare class DbQuery { private wQuery; constructor(wQuery: WL.IQuery); where(query: {}): DbQuery; order(query: string): DbQuery; skip(count: number): DbQuery; limit(count: number): DbQuery; done(callback: IMultipleResultCallback): void; } export declare class DbQueryEnd { private query; constructor(query: DbQuery); done(callback: IMultipleResultCallback): void; } export declare class DbQueryUnique { private wQuery; constructor(wQuery: WL.Result); done(callback: ISingleResultCallback): void; } export declare class DbQueryRaw { private wQuery; constructor(wQuery: WL.Result); done(callback: ISingleResultCallback): void; } export declare class Model implements IConfigurable { id: number; createdAt: Date; updatedAt: Date; static collectionName: string; static schema: boolean; static adapter: string; static attributes: any; private static collection; save: (callback: ISingleResultCallback) => void; destroy: (callback: INoResultCallback) => void; static save(model: T, callback: ISingleResultCallback): void; static destroy(model: T, callback: INoResultCallback): void; static all(): DbQueryEnd; static where(query: {}): WL.IQuery; static get(id: number): DbQueryUnique; static first(query: {}): DbQueryUnique; static find(): DbQuery; static query(query: string): DbQueryRaw; static validate(attr: string, options: ModelValidation): any; static validate(attrs: string[], definition: ModelValidation): any; private static extend(from, to); configure(): void; } export interface ModelValidation { type?: string; defaultsTo?: any; empty?: boolean; required?: boolean; notEmpty?: boolean; undefined?: boolean; string?: boolean; alpha?: boolean; numeric?: boolean; alphanumeric?: boolean; email?: boolean; url?: boolean; urlish?: boolean; ip?: boolean; ipv4?: boolean; ipv6?: boolean; creditcard?: boolean; uuid?: boolean; uuidv3?: boolean; uuidv4?: boolean; int?: boolean; integer?: boolean; number?: boolean; finite?: boolean; decimal?: boolean; float?: boolean; falsey?: boolean; truthy?: boolean; null?: boolean; notNull?: boolean; boolean?: boolean; array?: boolean; date?: boolean; hexadecimal?: boolean; hexColor?: boolean; lowercase?: boolean; uppercase?: boolean; after?: any; before?: any; regex?: string; notRegex?: string; equals?: any; contains?: any; notContains?: any; len?: {}; in?: any[]; notIn?: any[]; max?: number; min?: number; minLength?: number; maxLength?: number; }