// author: simon-pierre boucher export type Tier = "http" | "webkit" | "safari"; export type TierRequest = Tier | "auto"; export type OutputFormat = | "markdown" | "html" | "rawHtml" | "links" | "screenshot" | "structured" | "extract"; export interface RedirectHop { readonly from: string; readonly to: string; readonly status: number; } export interface FetchTimings { total: number; dns?: number; connect?: number; ttfb?: number; download?: number; render?: number; extract?: number; escalations: EscalationRecord[]; } export interface EscalationRecord { readonly from: Tier; readonly to: Tier; readonly reason: string; } /** Raw output of a fetcher tier, before extraction. */ export interface FetchResult { readonly tier: Tier; readonly status: number; readonly finalUrl: string; readonly contentType: string; readonly body: string; readonly bodyBytes: number; readonly redirects: readonly RedirectHop[]; readonly headers: Readonly>; } export interface PageLink { readonly url: string; readonly text: string; readonly rel: string | null; readonly isInternal: boolean; }