/** * Fastify Handler * * HTTP request handler for Fastify that uses the core handler. * * @module */ import type { FastifyRequest, FastifyReply } from 'fastify'; import type { Bridge } from '@johnhenry/aimatey-core'; import type { HTTPListenerOptions } from '@johnhenry/aimatey-http-core'; /** * Create Fastify route handler for handling AI chat requests * * @param bridge - Bridge instance * @param options - HTTP listener options * @returns Fastify route handler function * * @example * ```typescript * import Fastify from 'fastify'; * import { FastifyHandler } from '@johnhenry/aimatey-http/fastify'; * * const fastify = Fastify(); * const bridge = new Bridge(frontend, backend); * * // Add AI chat route * fastify.post('/v1/messages', FastifyHandler(bridge, { * cors: true, * streaming: true, * })); * * fastify.listen({ port: 3000 }); * ``` */ export declare function FastifyHandler(bridge: Bridge, options?: HTTPListenerOptions): (request: FastifyRequest, reply: FastifyReply) => Promise; //# sourceMappingURL=handler.d.ts.map