import type { FastifyReply, FastifyRequest, FastifySchema } from 'fastify'; import type { DefinedRoute } from './defineRoute.js'; export type RouteHandler = (request: FastifyRequest, reply: FastifyReply) => Promise; export type RouteSchema = FastifySchema; export type TypedRouteSchema = { querystring?: Query; body?: Body; params?: Params; response?: Headers; }; /** * Route module that supports both the legacy pattern (default + schema) and the new defineRoute pattern (route export) */ export interface RouteModule { /** Legacy pattern: default export handler */ default?: RouteHandler; /** Legacy pattern: optional schema export */ schema?: RouteSchema; /** New pattern: route defined using defineRoute() */ route?: DefinedRoute; } //# sourceMappingURL=types.d.ts.map