// Types for virginproxy.mjs (the full answer shapes are in https://docs.virginproxy.com/openapi.json). export declare const VERSION: string; export declare class VirginProxyError extends Error { status: number; code: string; charged?: boolean; credits?: number; retryAfterMs?: number; requestId?: string; details: Record; } export interface ClientOptions { apiKey?: string; baseUrl?: string; timeoutMs?: number; maxRetries?: number; fetch?: typeof fetch } export interface CallOptions { idempotencyKey?: string } export type Json = Record; export declare class VirginProxy { constructor(options?: ClientOptions); call(method: string, path: string, options?: { body?: unknown; query?: Record; headers?: Record; raw?: boolean; timeoutMs?: number }): Promise; request(body: Json, options?: CallOptions): Promise; scrape(url: string, options?: Json, call?: CallOptions): Promise; raw(url: string, query?: Record, options?: { headers?: Record }): Promise<{ status: number; headers: Headers; body: Buffer; credits: number; requestId: string | null }>; screenshot(url: string, query?: Record): Promise<{ image: Buffer; type: string | null; credits: number; requestId: string | null; status: number; test: boolean }>; pdf(url: string, query?: Record): Promise<{ pdf: Buffer; type: string | null; credits: number; requestId: string | null; status: number; test: boolean }>; batch(body: { requests?: Json[]; urls?: string[]; request?: Json; max_credits?: number; tag?: string }): Promise; batchUrls(urls: string[], request?: Json, options?: { maxCredits?: number; tag?: string }): Promise; map(body: string | Json): Promise; /** POST /v1/search: DuckDuckGo (default) or Google results as JSON; `scrape` fetches every result too. */ search(query: string, options?: { engine?: 'duckduckgo' | 'google'; limit?: number; language?: string; country?: string; time_range?: 'day' | 'week' | 'month' | 'year'; include_domains?: string[]; exclude_domains?: string[]; scrape?: boolean | Json; max_credits?: number; tag?: string }): Promise; estimate(body: Json): Promise; solveCaptcha(body: Json): Promise; createJob(body: Json, options?: CallOptions): Promise; crawl(body: string | Json, options?: CallOptions): Promise; listJobs(query?: { limit?: number; before?: string }): Promise; getJob(id: string, options?: { wait?: number }): Promise; jobResults(id: string, query?: { offset?: number; limit?: number; status?: string }): Promise; cancelJob(id: string): Promise; retryJob(id: string): Promise; iterJobResults(id: string, options?: { status?: string }): AsyncGenerator; /** GET /v1/jobs/{id}/stream: finished items as they come, then { type: 'end', job }. */ streamJob(id: string, options?: { includeBody?: boolean }): AsyncGenerator; /** POST /v1/jobs as NDJSON: one request per line (a string is a URL), job options in a first line. */ createJobNdjson(requests: Array, jobOptions?: Json): Promise; exportJob(id: string, options?: { format?: 'ndjson' | 'csv' | 'json'; status?: string; includeBody?: boolean }): Promise; waitForJob(id: string, options?: { intervalMs?: number; timeoutMs?: number }): Promise; account(): Promise; usage(query?: { days?: number; tag?: string }): Promise; usageBreakdown(query?: Record): Promise; listRequests(query?: Record): Promise; getRequest(id: string): Promise; getAnswer(id: string): Promise; errors(): Promise; limits(): Promise; updateSettings(changes: { daily_cap?: number | null; alert_thresholds?: number[] | null; alert_hook_url?: string | null; alert_hook_slack?: boolean }): Promise; listPresets(): Promise; getPreset(name: string): Promise; createPreset(name: string, request: Json, options?: { description?: string }): Promise; updatePreset(name: string, changes: Json): Promise; deletePreset(name: string): Promise; listSchedules(): Promise; getSchedule(id: string): Promise; createSchedule(body: Json): Promise; updateSchedule(id: string, changes: Json): Promise; pauseSchedule(id: string): Promise; resumeSchedule(id: string): Promise; deleteSchedule(id: string): Promise; runSchedule(id: string): Promise; previewSchedule(every: string): Promise; scheduleReports(id: string, query?: { limit?: number }): Promise; listDestinations(): Promise; createDestination(body: { name: string; type?: 's3'; endpoint?: string; region?: string; bucket: string; prefix?: string; access_key_id: string; secret_access_key: string; path_style?: boolean }): Promise; deleteDestination(id: string): Promise; testDestination(id: string): Promise; rollKey(id: string, body?: Json): Promise; listDeliveries(query?: Json): Promise; getDelivery(id: string): Promise; redeliver(id: string): Promise; status(): Promise; listKeys(): Promise; createKey(body: { name: string; mode?: 'live' | 'test'; credit_limit?: number | null; ip_allowlist?: string[] | null }): Promise; updateKey(id: string, body: { name?: string; credit_limit?: number | null; ip_allowlist?: string[] | null }): Promise; revokeKey(id: string, options?: { confirmCurrent?: boolean }): Promise; getWebhooks(query?: { limit?: number }): Promise; rotateWebhookSecret(): Promise; testWebhook(url: string, event?: 'webhook.test' | 'job.done' | 'job.item'): Promise; static verifyWebhook(secret: string, rawBody: string | Buffer, signatureHeader: string, options?: { toleranceSec?: number; now?: number }): boolean; } export default VirginProxy;