/** * Express Middleware * * HTTP request middleware for Express that uses the core handler. * * @module */ import type { Request, Response, NextFunction } from 'express'; import type { Bridge } from '@johnhenry/aimatey-core'; import type { HTTPListenerOptions } from '@johnhenry/aimatey-http-core'; /** * Create Express middleware for handling AI chat requests * * @param bridge - Bridge instance * @param options - HTTP listener options * @returns Express middleware function * * @example * ```typescript * import express from 'express'; * import { ExpressMiddleware } from '@johnhenry/aimatey-http/express'; * * const app = express(); * const bridge = new Bridge(frontend, backend); * * // Use body parser middleware first * app.use(express.json()); * * // Add AI chat middleware * app.use('/v1/messages', ExpressMiddleware(bridge, { * cors: true, * streaming: true, * })); * * app.listen(3000); * ``` */ export declare function ExpressMiddleware(bridge: Bridge, options?: HTTPListenerOptions): (req: Request, res: Response, next: NextFunction) => Promise; //# sourceMappingURL=middleware.d.ts.map