import type { ChromedriverStorageClientOpts, SyncOptions, ChromedriverDetailsMapping } from '../types';
export declare class ChromedriverStorageClient {
    readonly chromedriverDir: string;
    readonly timeout: number;
    private mapping;
    constructor(args?: ChromedriverStorageClientOpts);
    /**
     * Retrieves chromedriver mapping from the storage
     *
     * @param shouldParseNotes [true] - if set to `true`
     * then additional chromedrivers info is going to be retrieved and
     * parsed from release notes
     * @returns Promise<ChromedriverDetailsMapping>
     */
    retrieveMapping(shouldParseNotes?: boolean): Promise<ChromedriverDetailsMapping>;
    /**
     * Retrieves chromedrivers from the remote storage to the local file system
     *
     * @param opts - Synchronization options (versions, minBrowserVersion, osInfo)
     * @throws {Error} if there was a problem while retrieving the drivers
     * @returns The list of successfully synchronized driver keys
     */
    syncDrivers(opts?: SyncOptions): Promise<string[]>;
    /**
     * Returns the latest chromedriver version for Chrome for Testing
     *
     * @returns The latest stable chromedriver version string
     * @throws {Error} if the version cannot be fetched from the remote API
     */
    getLatestKnownGoodVersion(): Promise<string>;
    /**
     * Filters `this.mapping` to only select matching chromedriver entries
     * by operating system information and/or additional synchronization options
     *
     * @param osInfo - Operating system information to match against
     * @param opts - Synchronization options (versions, minBrowserVersion)
     * @returns The list of filtered chromedriver entry names (version/archive name)
     */
    private selectMatchingDrivers;
    /**
     * Checks whether the given chromedriver matches the operating system to run on
     *
     * @param cdName - The chromedriver entry key in the mapping
     * @param osInfo - Operating system information to match against
     * @returns True if the chromedriver matches the OS info
     */
    private doesMatchForOsInfo;
    /**
     * Retrieves the given chromedriver from the storage
     * and unpacks it into `this.chromedriverDir` folder
     *
     * @param index - The unique driver index
     * @param driverKey - The driver key in `this.mapping`
     * @param archivesRoot - The temporary folder path to extract
     * downloaded archives to
     * @param isStrict [true] - Whether to throw an error (`true`)
     * or return a boolean result if the driver retrieval process fails
     * @throws {Error} if there was a failure while retrieving the driver
     * and `isStrict` is set to `true`
     * @returns if `true` then the chromedriver is successfully
     * downloaded and extracted.
     */
    private retrieveDriver;
    /**
     * Extracts downloaded chromedriver archive
     * into the given destination
     *
     * @param src - The source archive path
     * @param dst - The destination chromedriver path
     */
    private unzipDriver;
}
//# sourceMappingURL=storage-client.d.ts.map