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; body?: unknown; } export type MockFetchFixtures = Record | string; export interface MockFetchFileSystem extends OpenApiSourceFileSystem { readdir?(directory: string): Promise; } 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; body: unknown; at: Date; } export interface MockFetchHandle { fetch: typeof globalThis.fetch; requests: RequestRecord[]; reset(): void; } export declare function mockFetch(options: MockFetchOptions): Promise; export type { OpenApiSourceFileSystem };