import { Request } from '../transport/request.js'; import { HttpResponse, RequestHandler } from '../types.js'; /** * Chain of Responsibility pattern implementation for request handlers. * Manages a linked chain of handlers that process HTTP requests sequentially. */ export declare class RequestHandlerChain { /** Array of handlers in the chain */ private readonly handlers; /** * Adds a handler to the end of the chain. * Links the new handler to the previous one in the chain. * @param handler - The request handler to add */ addHandler(handler: RequestHandler): void; /** * Executes the handler chain for a standard request. * @template T - The expected response data type * @param request - The HTTP request to process * @returns A promise that resolves to the HTTP response * @throws Error if no handlers are added to the chain */ callChain(request: Request): Promise>; /** * Executes the handler chain for a streaming request. * @template T - The expected response data type for each chunk * @param request - The HTTP request to process * @returns An async generator that yields HTTP responses * @throws Error if no handlers are added to the chain */ streamChain(request: Request): AsyncGenerator>; } //# sourceMappingURL=handler-chain.d.ts.map