File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33### Improvements
44- Update dependencies to address security vulnerabilities
55
6+ # 3.2.1 - 9 December, 2020
7+
8+ ### Fixes
9+
10+ - Add getNewMiddleware to index.d.ts #149
11+
612# 3.2.0 - 26 November, 2020
713
814### Features
Original file line number Diff line number Diff line change @@ -73,3 +73,23 @@ export interface inputValidationOptions {
7373 beautifyErrors ?: boolean ;
7474 firstError ?: boolean ;
7575}
76+
77+ declare class MiddlewareClass {
78+ InputValidationError : InputValidationError ;
79+
80+ init ( schemaPath : string , options ?: ajvValidatorOptions ) : void ;
81+ // eslint-disable-next-line no-dupe-class-members
82+ init ( jsonSchema : Record < string , any > , options ?: ajvValidatorOptions ) : void ;
83+ initAsync ( schemaPath : string , options ?: ajvValidatorOptions ) : Promise < void > ;
84+ // eslint-disable-next-line no-dupe-class-members
85+ initAsync ( jsonSchema : Record < string , any > , options ?: ajvValidatorOptions ) : Promise < void > ;
86+
87+ validate ( ctx : Object , next : Function ) : void ; // koa
88+ // eslint-disable-next-line no-dupe-class-members
89+ validate ( req : Object , res : Object , next : Function ) : void ; // express
90+ // eslint-disable-next-line no-dupe-class-members
91+ validate ( options : FastifyPluginOptions ) : any ; // fastify
92+ }
93+
94+ declare function getNewMiddleware ( schemaPath : string , options ?: ajvValidatorOptions ) : MiddlewareClass ;
95+ export { getNewMiddleware } ;
You can’t perform that action at this time.
0 commit comments