import { type WebFetchArgs, type WebFetchErrorKind, type WebFetchOutcome } from "./types.js"; import { DnsLookupFn, HttpRequestFn, HttpsRequestFn } from "./request-loop.js"; export type { DnsLookupFn, HttpRequestFn, HttpsRequestFn } from "./request-loop.js"; export interface WebFetchCoreOptions { httpsRequest?: HttpsRequestFn; httpRequest?: HttpRequestFn; dnsLookup?: DnsLookupFn; now?: () => number; signal?: AbortSignal; } /** * Run the full `web.fetch` pipeline for the given arguments. * * Returns a typed {@link WebFetchOutcome}. The outcome is never thrown * — argument validation failures, SSRF blocks, network errors, HTTP * errors, and timeouts all surface as `ok=false` with a categorical * `error.kind` and a human-readable message. The `metadata` field is * always populated: pipeline stages that completed before the failure * are surfaced (e.g. `resolvedIp` when DNS succeeded but a 4xx came * back), and stages that did not run carry default zero/empty values. */ export declare function webFetchCore(args: WebFetchArgs, options?: WebFetchCoreOptions): Promise; export type { WebFetchErrorKind };