/** One request the collector made. */ export interface RecordedRequest { method: string; path: string; /** Parsed JSON body, when there was one. */ body?: unknown; /** When the request arrived, and when this stub finished answering it. * A test that cares about ORDER needs both: two POSTs can arrive in the * right order and still be answered in the wrong one. */ at?: number; doneAt?: number; } export interface ConformantServerOptions { /** * Hold an /api/sync upload open for this many ms before answering. * * A stub that answers instantly cannot distinguish "B was queued after A" * from "B was queued after A LANDED", and the collector's uploads are pooled * and concurrent — so an ordering bug passes against a fast stub every time. * `pick` chooses which uploads to delay from the parsed body. */ delayMs?: number; delayWhen?: (body: Record) => boolean; } export interface ConformantServer { url: string; /** Every request, in order — the record a test asserts against. */ requests: RecordedRequest[]; /** The conversations POSTed to /api/sync across every upload. */ uploaded: () => Array>; close: () => Promise; } export declare function startConformantServer(opts?: ConformantServerOptions): Promise; //# sourceMappingURL=conformant-server.d.ts.map