import { ValidationOptions } from "class-validator"; export interface ModelError { attribute: string; details: string; code?: string | number; } export interface ModelGroups { [key: string]: string[]; } export interface ModelInterface { readonly values: ModelValue[]; get: () => void; validate: (group?: string) => Promise; hasErrors: () => boolean; getError: (attribute: string) => ModelError | undefined; getErrors: () => ModelError[]; removeErrors: (attribute: string) => number; getValue: (attribute: string) => ModelValue | undefined; groups: () => { [key: string]: string[]; }; } export interface ModelValue { attribute: string; value: any; model: Model; error?: string; } export declare abstract class Model implements ModelInterface { defaults: { [i: string]: any; }; protected errors: ModelError[]; constructor(defaults?: Model["defaults"]); get: () => Promise; validate(group?: string, options?: ValidationOptions): Promise; groups(): { [key: string]: string[]; }; attributes(): string[]; get values(): ModelValue[]; getError: (attribute: string) => ModelError | undefined; getErrors: () => ModelError[]; addError: (newError: ModelError) => void; getValue(attribute: string): ModelValue; hasErrors(): boolean; removeErrors(attribute: string): number; reset(): void; clear(): void; }