export interface ScreenshotParams { url?: string; html?: string; markdown?: string; format?: "png" | "jpeg" | "webp" | "pdf"; width?: number; height?: number; fullPage?: boolean; quality?: number; delay?: number; darkMode?: boolean; deviceScaleFactor?: number; device?: "desktop" | "iphone_15" | "iphone_se" | "pixel_8" | "ipad" | "ipad_pro"; blockAds?: boolean; blockResourceTypes?: ("font" | "image" | "media" | "stylesheet" | "other")[]; timeout?: number; waitUntil?: "load" | "domcontentloaded" | "networkidle0" | "networkidle2"; waitForSelector?: string; bestAttempt?: boolean; selector?: string; hideSelectors?: string[]; blockCookieBanners?: boolean; resizeWidth?: number; resizeHeight?: number; css?: string; js?: string; cookies?: Array<{ name: string; value: string; domain?: string; path?: string; httpOnly?: boolean; secure?: boolean; sameSite?: "Strict" | "Lax" | "None"; expires?: number; }>; headers?: Record; userAgent?: string; pdfFormat?: "A4" | "Letter" | "Legal" | "Tabloid" | "A3"; pdfLandscape?: boolean; pdfPrintBackground?: boolean; pdfScale?: number; pdfMargin?: { top?: string; right?: string; bottom?: string; left?: string; }; async?: boolean; webhookUrl?: string; cacheTtl?: number; data?: Record; } export interface ExtractParams { url: string; extractFormat?: "markdown" | "json" | "html"; waitUntil?: "load" | "domcontentloaded" | "networkidle0" | "networkidle2"; timeout?: number; device?: "desktop" | "iphone_15" | "iphone_se" | "pixel_8" | "ipad" | "ipad_pro"; blockAds?: boolean; blockCookieBanners?: boolean; hideSelectors?: string[]; } export interface ExtractResponse { url: string; format: "markdown" | "json" | "html"; content: string; title?: string; byline?: string; excerpt?: string; siteName?: string; length?: number; loadTimeMs: number; } export interface ScreenshotResponse { image: string; contentType: string; url: string; width: number; height: number; format: string; bytesSize: number; capturedAt: string; quality: "full" | "degraded" | "best_attempt"; waitStrategy: string; loadTimeMs: number; truncated?: boolean; } export interface RenderLinkResult { url: string; expiresAt: string; format: string; cacheTtl: number; } export interface ArtifactBranding { logo?: string; accentColor?: string; font?: string; header?: string; footer?: string; } export interface ArtifactPageSetup { size?: "A4" | "Letter" | "Legal" | "Tabloid" | "A3"; orientation?: "portrait" | "landscape"; margin?: { top?: string; right?: string; bottom?: string; left?: string; }; scale?: number; width?: number; height?: number; fullPage?: boolean; } export interface ArtifactParams { content: string; inputFormat?: "markdown" | "html"; formats?: ("pdf" | "png")[]; branding?: ArtifactBranding; pageSetup?: ArtifactPageSetup; data?: Record; expiresIn?: number; } export interface ArtifactResult { pdfUrl?: string; pngUrl?: string; shareUrl: string; expiresAt: string; } export interface WatchRenderParams { format?: "png" | "jpeg" | "webp" | "pdf"; width?: number; height?: number; fullPage?: boolean; device?: "desktop" | "iphone_15" | "iphone_se" | "pixel_8" | "ipad" | "ipad_pro"; deviceScaleFactor?: number; darkMode?: boolean; blockAds?: boolean; blockCookieBanners?: boolean; hideSelectors?: string[]; waitUntil?: "load" | "domcontentloaded" | "networkidle0" | "networkidle2"; delay?: number; timeout?: number; geo?: string; geoCity?: string; geoState?: string; selector?: string; ignoreRegions?: Array<{ x: number; y: number; width: number; height: number; }>; ignoreText?: string[]; minTextChars?: number; suppressWhilePresent?: string[]; uaMode?: "auto" | "identify" | "stealth"; } export interface CreateWatchParams { url: string; name?: string; intervalMinutes?: number; diffMode?: "visual" | "text" | "both"; threshold?: number; renderParams?: WatchRenderParams; aiSummary?: boolean; webhookUrl?: string; notifyEmail?: string; paused?: boolean; } export interface UpdateWatchParams { url?: string; name?: string | null; intervalMinutes?: number; diffMode?: "visual" | "text" | "both"; threshold?: number; renderParams?: WatchRenderParams; aiSummary?: boolean; webhookUrl?: string | null; notifyEmail?: string | null; paused?: boolean; } export interface ListWatchesQuery { status?: "active" | "paused" | "all"; cursor?: string; limit?: number; } export interface ListWatchRunsQuery { cursor?: string; limit?: number; } export interface Watch { id: string; url: string; name: string | null; intervalMinutes: number; diffMode: "visual" | "text" | "both"; threshold: number; renderParams: WatchRenderParams; aiSummary: boolean; webhookUrl: string | null; notifyEmail: string | null; status: "active" | "paused"; baselineImageUrl: string | null; baselineCapturedAt: string | null; lastRunAt: string | null; nextRunAt: string | null; lastChangedAt: string | null; lastStatus: string | null; consecutiveFailures: number; uaBlockedAt: string | null; createdAt: string; updatedAt: string; } export interface WatchRun { id: string; watchId: string; status: "queued" | "processing" | "completed" | "failed"; changed: boolean | null; diffScore: number | null; diffPixels: number | null; beforeUrl: string | null; afterUrl: string | null; diffOverlayUrl: string | null; cropUrl: string | null; changedRegion: { x: number; y: number; width: number; height: number; } | null; aiSummary: string | null; textDiff: { added?: string[]; removed?: string[]; summary?: string; } | null; creditsCharged: number; error: string | null; createdAt: string; completedAt: string | null; } export interface WatchTestResult { ok: boolean; reachable: boolean; format?: string; httpStatus?: number | null; usedGeo?: boolean; screenshotUrl?: string | null; extractedText?: string | null; capturedAt?: string; reason?: string; } export interface WatchRunQueued { runId: string; watchId: string; status: "queued"; } export interface WatchList { items: Watch[]; nextCursor: string | null; } export interface WatchRunList { items: WatchRun[]; nextCursor: string | null; } export interface AccountResult { plan: "free" | "starter" | "pro" | "enterprise"; usage: { used: number | null; limit: number | null; remaining: number | null; unlimited: boolean; resetsAt: string | null; }; rateLimitPerMinute: number; upgrade: { recommendedPlan: "starter" | "pro" | "enterprise"; recommendedPlanCredits: number | null; upgradeUrl: string; manageBillingUrl: string; } | null; } export declare class RendexClient { private apiKey; private baseUrl; constructor(apiKey: string, baseUrl?: string); private fetchWithTimeout; screenshot(params: ScreenshotParams): Promise; extract(params: ExtractParams): Promise; renderLink(params: ScreenshotParams & { expiresIn?: number; }): Promise; artifact(params: ArtifactParams): Promise; account(): Promise; watchCreate(params: CreateWatchParams): Promise; watchList(query?: ListWatchesQuery): Promise; watchGet(id: string): Promise; watchRun(id: string): Promise; watchTest(params: CreateWatchParams): Promise; watchRuns(id: string, query?: ListWatchRunsQuery): Promise; watchDelete(id: string): Promise; watchUpdate(id: string, patch: UpdateWatchParams): Promise; private request; private qs; } export declare class RendexApiError extends Error { constructor(message: string); } //# sourceMappingURL=client.d.ts.map