import { Readable } from 'node:stream'; import type { ProviderReplay } from './provider-replay.mts'; /** The parts of smithy's `HttpRequest` this handler reads. */ type AwsReplayHttpRequest = { method: string; protocol: string; hostname: string; port?: number; path: string; query?: Record; headers: Record; body?: RequestInit['body']; }; type AwsReplayHandlerOptions = { abortSignal?: unknown; }; /** Smithy treats any object with a `handle` function as an `HttpHandler`. */ export type AwsReplayRequestHandler = { handle: (request: AwsReplayHttpRequest, options?: AwsReplayHandlerOptions) => Promise<{ response: { statusCode: number; reason: string; headers: Record; body: Readable; }; }>; destroy: () => void; updateHttpClientConfig: () => void; httpHandlerConfigs: () => Record; }; export declare function createAwsReplayRequestHandler(replay: ProviderReplay): AwsReplayRequestHandler; /** * Subclasses an AWS SDK client so every instance sends through the replay, whatever * `requestHandler` production code configured. Use it inside a `vi.mock` of the SDK package for a * client that production builds itself, so the test never edits production code. */ export declare function replayAwsClient object>(Constructor: Client, replay: ProviderReplay): Client; export {};