import { type EntryData, type ProjectedText, type ProjectionCaps } from "@plurnk/plurnk-schemes"; export declare const DEFAULT_WEB_UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"; export declare const MARKDOWN_ACCEPT = "text/markdown, text/html;q=0.9, */*;q=0.1"; export declare const PROJECTION_ID_HEADER = "x-plurnk-projection-id"; export declare const CACHE_VARIANT_HEADER = "x-plurnk-cache-variant"; export declare const MATERIALIZER_ID_HEADER = "x-plurnk-materializer-id"; export declare const MATERIALIZER_ENV = "PLURNK_SCHEMES_HTTP_MATERIALIZER"; export type CacheVariant = "default" | "bypass"; export declare const classifyCacheVariant: (requestHeaders: ReadonlyArray, responseHeaders: ReadonlyArray) => CacheVariant; export declare const cacheVariantEvidence: (variant: CacheVariant) => string; export declare const rewriteAcquisitionTarget: (url: string) => string; export interface WebResponseBody { readonly chunks: AsyncIterable; text(): Promise; cancel(): Promise; } export interface WebChannelFailure { readonly status: number; readonly code: string; readonly detail: string; readonly retryable: boolean; readonly facts?: Readonly>; } export interface WebChannelOutcome { readonly status: number; readonly failure?: WebChannelFailure; } export interface WebFetchResult { readonly url: string; readonly body: string | WebResponseBody; readonly mimetype: string; readonly status?: number; readonly statusText?: string; readonly responseHeaders?: ReadonlyArray; readonly response?: Response; readonly header?: string; readonly requestHeaders?: ReadonlyArray; readonly html?: { readonly content: string; readonly mimetype: string; }; readonly htmlFailure?: WebChannelFailure; readonly originFailure?: WebChannelFailure; readonly allowConfiguredMaterializer?: boolean; readonly originUnavailable?: boolean; } export interface WebMaterializedResult { readonly body?: { content: string; mimetype: string; }; readonly html?: { content: string; mimetype: string; }; readonly header?: string; readonly bodyOutcome: WebChannelOutcome; readonly htmlOutcome?: WebChannelOutcome; readonly projection?: { sourceMimetype: string; identity: string; }; } export declare class WebMaterializationError extends Error { readonly stage = "projection"; readonly mimetype: string; constructor(mimetype: string, cause: unknown); } export default class WebFetcher { #private; static validateConfiguration(): void; static unavailable(url: string, cause: unknown, allowConfiguredMaterializer: boolean): WebFetchResult; static materializedChannels(materialized: WebMaterializedResult, source?: { readonly url: string; readonly method: string; }): EntryData["channels"]; static materialize(fetched: Pick, projection: ProjectionCaps, signal?: AbortSignal): Promise; static classifyBinary(body: Pick, mimetype: string, projection: ProjectionCaps): Promise; static projectBytes(body: Pick, mimetype: string, projection: ProjectionCaps): Promise; static projectionEvidence(identity: string): string; static materializerEvidence(identity: string): string; static materializerCurrent(storedIdentity: string): boolean; fetch(url: string, opts?: { signal?: AbortSignal; headers?: ReadonlyArray; conditionalHeaders?: ReadonlyArray; guarded?: boolean; acceptHttpErrors?: boolean; preserveUnavailable?: boolean; }): Promise; } //# sourceMappingURL=WebFetcher.d.ts.map