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