import { ResponseType } from 'axios';
import type { Nullable } from '../utils';
import type { ServiceProvider } from './ServiceProvider';
import type { Users } from './Users';
import { Base, BaseConstructorArgs } from './base';
export declare class File extends Base {
    User: Users;
    ServiceProvider: ServiceProvider;
    constructor(user: Users, serviceProvider: ServiceProvider, ...args: BaseConstructorArgs);
    /**
     * Fetches a file from Discovery Provider with a given CID.
     * @param cid IPFS content identifier
     * @param responseType axios response type
     */
    fetchCIDFromDiscovery(cid: string, responseType?: ResponseType): Promise<unknown>;
    /**
     * Fetches a file from Content Node with a given CID.
     * @param cid IPFS content identifier
     * @param creatorNodeGateways Content Node gateways to fetch content from
     * @param callback callback called on each successful/failed fetch with
     *  [String, Bool](gateway, succeeded)
     *  Can be used for tracking metrics on which gateways were used.
     */
    fetchCID(cid: string, creatorNodeGateways: string[], callback?: Nullable<(url: string) => void>, responseType?: ResponseType, trackId?: null, gatedContentHeaders?: {}): Promise<import("axios").AxiosResponse<any> | undefined>;
    fetchCIDInternal(cid: string, creatorNodeGateways: string[], callback?: Nullable<(url: string) => void>, responseType?: ResponseType, trackId?: null, gatedContentHeaders?: {}, retries?: number): Promise<import("axios").AxiosResponse<any> | undefined>;
    /**
     * Fetches a file from Content Node with a given CID. Follows the same pattern
     * as fetchCID, but resolves with a download of the file rather than
     * returning the response content.
     * @param cid IPFS content identifier
     * @param creatorNodeGateways Content Node gateways to fetch content from
     * @param filename optional filename for the download
     */
    downloadCID(cid: string, creatorNodeGateways: string[], filename: string): Promise<import("axios").AxiosResponse<any> | null>;
    /**
     * Checks if a CID exists on a Content Node.
     * @param cid IPFS content identifier
     * @param creatorNodeGateways Content Node gateways to fetch content from
     * Eg. creatorNodeGateways = ["https://creatornode.audius.co/ipfs/", "https://creatornode2.audius.co/ipfs/"]
     */
    checkIfCidAvailable(cid: string, creatorNodeGateways: string[]): Promise<Record<string, unknown>>;
}
