/** Typed fetch mock utilities for testing. */
import type { Mock } from 'bun:test';
export interface MockResponseOptions {
    status?: number;
    statusText?: string;
    headers?: HeadersInit;
}
export type MockFetch = Mock<typeof globalThis.fetch>;
export interface InstallMockFetchResult {
    mockFetch: MockFetch;
    restore: () => void;
    getCalls: () => MockFetchCall[];
    clear: () => void;
}
export interface MockFetchCall {
    url: string | URL | Request;
    init?: RequestInit;
    jsonBody?: unknown;
}
export interface CreateMockFetchOptions {
    defaultImpl?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
/** Creates a Response with JSON body. */
export declare function mockJsonResponse(data: unknown, options?: MockResponseOptions): Response;
/** Creates a Response with text body. */
export declare function mockTextResponse(text: string, options?: MockResponseOptions): Response;
/** Creates an error Response with default status text. */
export declare function mockErrorResponse(status: number, body?: string | object, options?: Omit<MockResponseOptions, 'status'>): Response;
/** Creates a mock fetch function. */
export declare function createMockFetch(options?: CreateMockFetchOptions): MockFetch;
/**
 * Installs mock fetch globally. Returns mockFetch for configuration -
 * the wrapper always captures calls before delegating to mockFetch.
 */
export declare function installMockFetch(options?: CreateMockFetchOptions): InstallMockFetchResult;
