import { AxiosError } from "axios";
export interface IFactorioApiParams {
    username?: string;
    token?: string;
    dataPath: string;
}
export interface IFactorioApiVersionMigrateRecord {
    from: string;
    to: string;
}
export interface IFactorioApiVersionMap {
    experimental: IFactorioApiVersionRecord;
    stable: IFactorioApiVersionRecord;
}
export interface IFactorioApiVersionRecord {
    alpha: string;
    experimental: string;
    headless: string;
}
export interface IFactorioApiModListResult {
    pagination: IFactorioApiPagination;
    results: IFactorioApiModShortRecord[];
}
export interface IFactorioApiModReleaseRecord {
    download_url: string;
    file_name: string;
    info_json: {
        factorio_version: string;
    };
    released_at: string;
    version: string;
}
export interface IFactorioApiModShortRecord {
    name: string;
    title: string;
    owner: string;
    summary: string;
    downloads_count: number;
    category: string;
    score: number;
    latest_release?: IFactorioApiModReleaseRecord;
}
export interface IFactorioApiModFullRecord extends IFactorioApiModShortRecord {
    thumbnail: string;
    changelog: string;
    created_at: string;
    description: string;
    source_url: string;
    homepage: string;
    tags: any[];
    license: any;
}
export interface IFactorioApiPagination {
    count: number;
    page: number;
    page_count: number;
    page_size: number;
    links: {
        first: string | null;
        last: string | null;
        next: string | null;
        prev: string | null;
    };
}
export declare class FactorioApi {
    private static username;
    private static token;
    private static dataPath;
    static get downloadFolder(): string;
    static loadUserFile(path: string, dataPath?: string): Promise<void>;
    static saveUserFile(path: string): Promise<void>;
    static cachedModList: IFactorioApiModListResult;
    static isAuthenticated: boolean;
    static authError: AxiosError;
    static versionMap: Map<string, Array<IFactorioApiVersionMigrateRecord>>;
    static latestVersion: IFactorioApiVersionMap;
    static clear(): void;
    static queryApi(url: string, params?: any): Promise<any>;
    static initialize(params: IFactorioApiParams): Promise<void>;
    static listFactorioMods(page?: number, pageSize?: number | 'max', sort?: 'name' | 'created_at' | 'updated_at', sortOrder?: 'asc' | 'desc', namelist?: string[]): Promise<IFactorioApiModListResult>;
    static getModInfo(name: string): Promise<IFactorioApiModFullRecord>;
    static getLatestModVersion(name: string): Promise<string>;
    static downloadMod(name: string, version?: string): Promise<string>;
    private static downloadFile;
    static downloadGame(version: string, build: string, distro: string): Promise<string>;
}
