import { type CheerioAPI } from "cheerio";
export interface ILinkPreviewResponse {
    url: string;
    title: string;
    siteName: string | undefined;
    author: string | undefined;
    description: string | undefined;
    mediaType: string;
    contentType: string | undefined;
    images: string[];
    videos: IVideoType[];
    favicons: string[];
}
export interface IVideoType {
    url: string | undefined;
    secureUrl: string | null | undefined;
    type: string | null | undefined;
    width: string | undefined;
    height: string | undefined;
}
/**
 * Options common to every entrypoint (Node, mobile/browser, ...). Platform-specific
 * options (like Node's `resolveDNSHost`) are added on top of this by each entrypoint,
 * since they don't make sense - or aren't implementable - everywhere.
 */
export interface ILinkPreviewBaseOptions {
    headers?: Record<string, string>;
    imagesPropertyType?: string;
    proxyUrl?: string;
    timeout?: number;
    followRedirects?: `follow` | `error` | `manual`;
    handleRedirects?: (baseURL: string, forwardedURL: string) => boolean;
    onResponse?: (response: ILinkPreviewResponse, doc: CheerioAPI, url?: URL) => ILinkPreviewResponse;
}
export interface IPreFetchedResource {
    headers: Record<string, string>;
    status?: number;
    imagesPropertyType?: string;
    proxyUrl?: string;
    url: string;
    data: string;
}
export declare function parseResponse(response: IPreFetchedResource, options?: ILinkPreviewBaseOptions): ILinkPreviewResponse | {
    url: string;
    mediaType: string;
    contentType: string;
    favicons: string[];
    charset: string | null;
} | {
    url: string;
    title: string;
    siteName: string | undefined;
    author: string | undefined;
    description: string | undefined;
    mediaType: string;
    contentType: string | undefined;
    images: string[];
    videos: IVideoType[];
    favicons: string[];
    charset: string | null;
};
/**
 * Skip the library fetching the website for you, instead pass a response object
 * from whatever source you get and use the internal parsing of the HTML to return
 * the necessary information
 * @param response Preview Response
 * @param options IPreviewLinkOptions
 */
export declare function getPreviewFromContent(response: IPreFetchedResource, options?: ILinkPreviewBaseOptions): Promise<ILinkPreviewResponse | {
    url: string;
    mediaType: string;
    contentType: string;
    favicons: string[];
    charset: string | null;
} | {
    url: string;
    title: string;
    siteName: string | undefined;
    author: string | undefined;
    description: string | undefined;
    mediaType: string;
    contentType: string | undefined;
    images: string[];
    videos: IVideoType[];
    favicons: string[];
    charset: string | null;
}>;
