import { Browser, Page } from 'playwright'; import { Result, ScraperConfig } from '../../core/types.js'; export interface IScraper { scrape(query: TQuery, signal?: AbortSignal): Promise>; validateQuery(query: unknown): query is TQuery; } /** * A failure that repeating the operation cannot fix — a stale selector will be * just as stale on the third page load. retryOperation surfaces these * immediately instead of spending the full backoff schedule on them. */ export declare class NonRetryableError extends Error { constructor(message: string); } export declare abstract class PlaywrightScraper implements IScraper { protected readonly config: ScraperConfig; protected readonly browser: Browser; constructor(config: ScraperConfig, browser: Browser); abstract scrape(query: TQuery, signal?: AbortSignal): Promise>; abstract validateQuery(query: unknown): query is TQuery; protected withPage(fn: (page: Page) => Promise, signal?: AbortSignal): Promise; protected retryOperation(operation: () => Promise, maxRetries?: number): Promise; } //# sourceMappingURL=scraper.interface.d.ts.map