import { type Operation } from "effection"; import { type RuntimeServices } from "./runtime-services.js"; /** One live HTTP response plus the controller that can still abort its body. */ export interface HttpResponseHandle { response: Response; controller: AbortController; } interface FetchResponseHandleOptions { services?: RuntimeServices; } interface FetchResponseHandleOrNullOptions extends FetchResponseHandleOptions { timeoutMs?: number; } /** * Fetch one HTTP response under Effection cancellation control. * * This is the shared request-lifecycle seam: * - create one local `AbortController` * - abort when the enclosing operation is canceled * - hand the caller both the `Response` and the controller when body policy * needs later abort access, such as mailbox SSE long-poll reads */ export declare function fetchResponseHandle(url: string, init?: RequestInit, options?: FetchResponseHandleOptions): Operation; /** * Fetch one HTTP response handle with an abort-to-null policy. * * This is for callers such as mailbox polling that treat request timeout as a * normal "no response yet" outcome instead of as an exception. */ export declare function fetchResponseHandleOrNull(url: string, init?: RequestInit, options?: FetchResponseHandleOrNullOptions): Operation; /** * Close one response body under Effection control. * * Callers should use this instead of open-coding `body.cancel()` so response * cleanup policy stays consistent across mailbox, OOBI, auth, and exchange * flows. */ export declare function closeResponseBody(response: Response): Operation; export {}; //# sourceMappingURL=httping.d.ts.map