import { WebError } from "@deepseek-ai/dsh-web"; //#region src/types.d.ts /** * Firecrawl API v2 wire shapes, narrowed to the fields these providers map. * The full response carries more (screenshots, links, audio/video, credit * accounting); anything not mapped into the seam's vocabulary stays out of this * file so an unused field never looks load-bearing. * @module @firecrawl/dsh-firecrawl/types */ /** One `data.web[]` entry of `POST /v2/search`. */ interface FirecrawlWebResult { url?: string; title?: string; description?: string; /** Present only when `scrapeOptions.formats` requested markdown. */ markdown?: string | null; } /** * One `data.news[]` entry of `POST /v2/search`. Distinct from a web result: * the excerpt field is `snippet` (not `description`) and it carries `date`, * the only publication timestamp Firecrawl search returns. */ interface FirecrawlNewsResult { url?: string; title?: string; snippet?: string; date?: string; markdown?: string | null; } /** The `POST /v2/search` response envelope. */ interface FirecrawlSearchResponse { success?: boolean; error?: string; code?: string; data?: { web?: readonly FirecrawlWebResult[]; news?: readonly FirecrawlNewsResult[]; }; } /** The `data.metadata` object of `POST /v2/scrape`. */ interface FirecrawlScrapeMetadata { /** The final URL after redirects Firecrawl followed. */ url?: string; /** The URL as requested, before redirects. */ sourceURL?: string; /** HTTP status of the scraped page — 404/500 included, and not an error. */ statusCode?: number; /** Upstream status text for a non-2xx page (e.g. `Not Found`). */ error?: string | null; } /** The `POST /v2/scrape` response envelope. */ interface FirecrawlScrapeResponse { success?: boolean; error?: string; code?: string; data?: { markdown?: string | null; html?: string | null; metadata?: FirecrawlScrapeMetadata; }; } //#endregion //#region src/http.d.ts /** Default Firecrawl API origin; the versioned path is appended per operation. */ declare const FIRECRAWL_DEFAULT_BASE_URL = "https://api.firecrawl.dev"; /** Stable id both providers register under, one per capability registry. */ declare const FIRECRAWL_PROVIDER_ID = "firecrawl"; //#endregion export { FirecrawlSearchResponse as a, FirecrawlScrapeResponse as i, FIRECRAWL_PROVIDER_ID as n, FirecrawlWebResult as o, FirecrawlNewsResult as r, FIRECRAWL_DEFAULT_BASE_URL as t };