/** * NestJS Framework Adapter * * Framework adapter for NestJS controllers. * NestJS typically uses Express under the hood, so this adapter handles * the Express-style req/res pattern used in NestJS controllers. * * @example * ```typescript * // In a NestJS controller * @Controller('events') * export class StreamingController { * constructor(@Inject(STREAM_SERVER) private streamServer: StreamServer) {} * * @Get('stream') * async stream(@Req() req: Request, @Res() res: Response) { * const handler = this.streamServer.getHandler('nestjs'); * await handler(req, res); * } * } * ``` */ import type { FrameworkAdapterConfig, FrameworkHandlerOptions, CoreRequestHandler, NestJSRequest, NestJSHandler } from '@plyaz/types/core'; import { BaseFrameworkAdapter } from './BaseFrameworkAdapter'; /** * NestJSFrameworkAdapter - NestJS adapter * * Features: * - Works with NestJS Express-based controllers * - Handles @Req() and @Res() decorated parameters * - Supports both writeHead and setHeader patterns * - Manages SSE streaming to response * * @example * ```typescript * const adapter = new NestJSFrameworkAdapter(); * const handler = adapter.createHandler(streamServer.handleRequest); * * // In controller method: * await handler(req, res); * ``` */ export declare class NestJSFrameworkAdapter extends BaseFrameworkAdapter { readonly framework: "nestjs"; constructor(config?: FrameworkAdapterConfig); /** * Create NestJS controller handler. * * @param handleRequest - Core request handler from StreamServer * @param options - Handler options * @returns NestJS controller handler function */ createHandler(handleRequest: CoreRequestHandler, options?: FrameworkHandlerOptions): NestJSHandler; /** * Convert NestJS request to Web Request. * * @param req - NestJS request object * @returns Web Request object */ convertRequest(req: NestJSRequest): Request; /** * Handle Web Response and stream to NestJS response. * * @param response - Web Response from core handler * @param _req - Original NestJS request (unused) * @param res - NestJS response object */ handleResponse(response: Response, _req: unknown, res: unknown): Promise; } //# sourceMappingURL=NestJSFrameworkAdapter.d.ts.map