import { Middleware, MiddlewareContext, MiddlewareNext } from './types.js'; import { TransportResult } from '../types.js'; import { NativeErrorOptions } from '../errors.js'; export declare class MiddlewareException extends Error { constructor(message: string, options?: NativeErrorOptions); } export declare class MiddlewareEngine { private readonly middleware; register(middleware: Middleware): void; /** * Wraps `run` (the request, including all retries) in the `around` handlers as * an onion: highest priority (lowest number) is outermost. Errors propagate as-is. */ run(context: MiddlewareContext, run: MiddlewareNext): Promise; /** * Runs every `onResponse` handler in priority order on each HTTP response * within the retry loop. A handler returning `{ continue: false }` stops the rest. */ executeOnResponse(context: MiddlewareContext, result: TransportResult): void; } //# sourceMappingURL=MiddlewareEngine.d.ts.map