export interface CapturedRequest { method: string; pathname: string; search: string; query: Record; headers: Record; bodyText: string; jsonBody?: unknown; } export interface StubResponse { status?: number; headers?: Record; body?: string | Record | unknown[] | null; delayMs?: number; } export type RouteHandler = (request: CapturedRequest) => StubResponse | Promise; export declare class RdiStubServer { private readonly routes; private readonly patternRoutes; private originalFetch?; readonly requests: CapturedRequest[]; readonly baseUrl: string; constructor(); route(method: string, pattern: string | RegExp, handler: RouteHandler): void; clearRequests(): void; getRequestLog(): string[]; start(): Promise; close(): Promise; handleFetch(input: RequestInfo | URL, init?: RequestInit): Promise; }