import { Browser } from "./curl";
export { Curl } from "./curl";
export interface DvRequestOpts {
    headers?: Record<string, any>;
    timeout?: Record<string, any>;
    method?: Record<string, any>;
    body?: Record<string, any>;
    params?: Record<string, any>;
}
export interface DefaultOpts {
    headers?: Record<string, any>;
}
export declare class ScraperRequestError extends Error {
    status: number;
    headers: Record<any, string>;
    data: any;
    constructor({ status, headers, data }: {
        status: any;
        headers: any;
        data: any;
    });
}
export declare class ScraperError extends Error {
}
export interface IScraper {
    proxy?: string;
    get<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    post<T>(url: string, data: Record<string, any>, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    setDefaultOpts(opts: DvRequestOpts): void;
}
export interface IScraperAdapter {
    proxy?: string;
    userAgent?: string;
    fetch<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    get<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    getCurl<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    post<T>(url: string, data: Record<string, any>, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
}
export declare class Scraper implements IScraper {
    private adapter;
    private defaultOpts?;
    proxy?: string;
    constructor(adapter: IScraperAdapter, defaultOpts?: DefaultOpts);
    get<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    getCurl<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    fetch<T>(url: string, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    post<T>(url: string, data: Record<string, any>, opts?: DvRequestOpts): Promise<{
        data: T;
        headers: Record<string, unknown>;
        status: number;
    }>;
    useProxy(proxy: string): void;
    setDefaultOpts(opts: DvRequestOpts): void;
    setCurlBrowser(browser: Browser): void;
    getBrowser(): Browser;
}
