UNPKG

fastify-mongoose-rest

Version:

Rest API generator tools for fastify and mongoose

23 lines (22 loc) 638 B
import { FastifyReply, FastifyRequest } from 'fastify'; import { Model } from 'mongoose'; import { FastifyMongooseRestOptions } from '../types'; export declare function Modify<T>(basePath: string, model: Model<T>, options: FastifyMongooseRestOptions): { method: 'PATCH'; url: string; schema: { summary: string; tags?: string[]; params: object; body: object; response: object; }; handler: (request: FastifyRequest<{ Params: { id: string; }; Body: { [index: string]: any; }; }>, reply: FastifyReply) => Promise<any>; };