import type { EgressGuardOptions } from './egress-guard.js'; import type { FetchFn } from './types.js'; export declare const DEFAULT_TIMEOUT_MS = 30000; export declare const MAX_TIMEOUT_MS = 120000; export declare const DEFAULT_MAX_RESPONSE_BYTES = 100000; export declare const MAX_RESPONSE_BYTES = 1000000; export type MethodRisk = 'low' | 'medium' | 'high'; export type HttpMethod = 'GET' | 'HEAD' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; export declare function classifyMethodRisk(method: HttpMethod): MethodRisk; export declare function isIdempotentMethod(method: HttpMethod): boolean; export interface WebRequestResult { status: number; headers: Record; body: unknown; truncated: boolean; timing_ms: number; risk: MethodRisk; } export type RecordEffectFn = (entry: { url: string; method: HttpMethod; status: number; risk: MethodRisk; timing_ms: number; }) => void | Promise; export type DomainCheckFn = (url: string) => { allowed: true; } | { allowed: false; reason: string; }; export interface WebRequestOptions { url: string; method: HttpMethod; body?: string | Record | unknown[] | null; headers?: Record; maxResponseBytes?: number; signal: AbortSignal; fetchFn?: FetchFn; lookupFn?: EgressGuardOptions['lookupFn']; domainCheck?: DomainCheckFn; recordEffect?: RecordEffectFn; } export declare function webRequest(opts: WebRequestOptions): Promise; export declare function parseMethod(raw: unknown): HttpMethod | { error: string; };