UNPKG

fastest-validator-nestjs

Version:
48 lines (47 loc) 2.35 kB
import 'reflect-metadata'; import { PipeTransform, ArgumentMetadata, ExceptionFilter, ArgumentsHost } from '@nestjs/common'; import { ValidationError as FastestValidatorError } from "fastest-validator"; export declare function helloFvn(): string; export { FastestValidatorError }; export declare function getSchema(target: any): any; export declare function getInnerSchema(target: any): any; export declare function getCompiled(target: any, messages?: {}): any; export declare function ValidationSchema({ strict, messages, condition }?: { strict?: boolean; messages?: {}; condition?: any; }): any; export declare const decoratorFactory: (mandatory?: {}, defaults?: {}) => (options?: any | any[]) => any; export declare const decoratorFactoryArray: (mandatory?: {}, defaults?: {}) => (options?: any | any[]) => any; export declare const Field: (options?: any | any[]) => any; export declare const Alphabet: (options?: any | any[]) => any; export declare const Boolean: (options?: any | any[]) => any; export declare const Numeric: (options?: any | any[]) => any; export declare const UUID: (options?: any | any[]) => any; export declare const ObjectId: (options?: any | any[]) => any; export declare const Email: (options?: any | any[]) => any; export declare const Date: (options?: any | any[]) => any; export declare const Enum: (options?: any | any[]) => any; export declare const ArrayOf: (options?: any | any[]) => any; export declare const Any: (options?: any | any[]) => any; export declare const EqualTo: (options?: any | any[]) => any; export declare function NestedObject(options?: any | any[]): any; export declare class FastestValidationException extends Error { errors: any; status: number; code: number; constructor(errors: any); getStatus(): number; } export declare class FastestValidatorPipe implements PipeTransform { transform(value: any, metadata: ArgumentMetadata): any; formatErrors(errors: FastestValidatorError[], type: ArgumentMetadata["type"]): any; } export interface FastestValidatorExceptionFilterOption { showStack: boolean; } export declare class FastestValidatorExceptionFilter implements ExceptionFilter { private readonly options; constructor(options: FastestValidatorExceptionFilterOption); catch(exception: FastestValidationException, host: ArgumentsHost): any; }