import type { Config } from '@oclif/core/interfaces';
import { HTTP, HTTPError, HTTPRequestOptions } from '@heroku/http-call';
import { CLIError } from '@oclif/core/errors';
import { Login } from './login.js';
import { Mutex } from './mutex.js';
import { ParticleboardClient } from './particleboard-client.js';
export declare const ALLOWED_HEROKU_DOMAINS: readonly string[];
export declare const LOCALHOST_DOMAINS: readonly string[];
export declare namespace APIClient {
    interface Options extends HTTPRequestOptions {
        retryAuth?: boolean;
    }
}
export interface IOptions {
    debug?: boolean;
    debugHeaders?: boolean;
    preauth?: boolean;
    required?: boolean;
}
export interface IHerokuAPIErrorOptions {
    app?: {
        id: string;
        name: string;
    };
    id?: string;
    message?: string;
    resource?: string;
    url?: string;
}
export declare class HerokuAPIError extends CLIError {
    body: IHerokuAPIErrorOptions;
    http: HTTPError;
    constructor(httpError: HTTPError);
}
export declare class APIClient {
    protected config: Config;
    options: IOptions;
    authPromise?: Promise<HTTP<any>>;
    http: typeof HTTP;
    preauthPromises: {
        [k: string]: Promise<HTTP<any>>;
    };
    private _auth?;
    private readonly _login;
    private _particleboard;
    private _twoFactorMutex;
    constructor(config: Config, options?: IOptions);
    get auth(): string | undefined;
    set auth(token: string | undefined);
    get defaults(): typeof HTTP.defaults;
    get particleboard(): ParticleboardClient;
    get twoFactorMutex(): Mutex<string>;
    delete<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    get<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    login(opts?: Login.Options): Promise<void>;
    logout(): Promise<void>;
    patch<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    post<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    preauth(app: string, factor: string): Promise<HTTP<unknown>>;
    put<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    request<T>(url: string, options?: APIClient.Options): Promise<HTTP<T>>;
    stream(url: string, options?: APIClient.Options): Promise<HTTP<unknown>>;
    twoFactorPrompt(): Promise<string>;
}
