import type { RequestHandler } from "express"; import { type SafePublicUrl } from "./ssrf.js"; export { isBlockedIp, assertSafePublicHttpUrl, assertSafePublicHttpUrlPinned, type SafePublicUrl, } from "./ssrf.js"; /** Minimal HTML → Markdown for the paid demo (no heavy parser dependency). */ export declare function htmlToMarkdown(html: string): { markdown: string; title?: string; }; export interface FetchMdHandlerOptions { /** * Override URL safety checks (tests may allow loopback fixture servers). * May return `URL` or `SafePublicUrl`. */ assertSafeUrl?: (raw: string) => Promise; fetchImpl?: typeof fetch; maxBytes?: number; timeoutMs?: number; } /** * Paid demo: GET /v1/fetch-md?url=… — runs after x402 middleware settles. * Fetches a public page and returns Markdown (SSRF-hardened: scheme allowlist, * private IP deny, DNS re-check before fetch, no redirects). */ export declare function createFetchMdHandler(options?: FetchMdHandlerOptions): RequestHandler;