import type { OpenApiDocument } from "../generate.js";
import { type OpenApiSourceFileSystem } from "../spec-source.js";
export type OnUnmocked = "throw" | "reply404";
export interface MockFixtureEntry {
    status?: number;
    headers?: Record<string, string>;
    body?: unknown;
}
export type MockFetchFixtures = Record<string, MockFixtureEntry> | string;
export interface MockFetchFileSystem extends OpenApiSourceFileSystem {
    readdir?(directory: string): Promise<string[]>;
}
export interface MockFetchOptions {
    spec: OpenApiDocument | string | URL;
    fixtures?: MockFetchFixtures;
    onUnmocked?: OnUnmocked;
    cwd?: string;
    fs?: MockFetchFileSystem;
    fetch?: typeof globalThis.fetch;
}
export interface RequestRecord {
    method: string;
    path: string;
    operationId: string;
    headers: Record<string, string>;
    body: unknown;
    at: Date;
}
export interface MockFetchHandle {
    fetch: typeof globalThis.fetch;
    requests: RequestRecord[];
    reset(): void;
}
export declare function mockFetch(options: MockFetchOptions): Promise<MockFetchHandle>;
export type { OpenApiSourceFileSystem };
