import { Response } from 'node-fetch';
/**
 * IHumanError is an error that has a nicer, human-readable message output.
 */
export interface IHumanError extends Error {
    getHumanMessage(): string;
}
/**
 * IHttpableError is an error that can be handled as an HTTP response. Exposes
 * a method to return the status code of the error.
 */
export interface IHttpableError extends Error {
    statusCode(): number;
    metadata?(): any;
}
export declare function isHttpableError(err: Error): err is IHttpableError;
export declare function isHumanError(err: Error): err is IHumanError;
/**
 * OAuthError is the error type thrown when anything goes wrong in shortcode oauth.
 */
export declare class ShortCodeError extends Error {
}
/**
 * A subprocess error is thrown when a subprocess exits with an unexpected
 * status code.
 */
export declare class SubprocessError extends Error {
}
/**
 * UnexpectedHttpError is raised when we get an unexpected status code
 * from Mixer.
 */
export declare class UnexpectedHttpError extends Error implements IHumanError {
    readonly res: Response;
    readonly text: string;
    constructor(res: Response, text: string);
    getHumanMessage(): string;
    /**
     * For 400 errors, this returns the Joi validation that failed.
     * Returns undefined if it's not a 400 error or for any reason we can't
     * figure out the error message.
     */
    getValidationError(): {
        message: string;
        path: string;
        type: string;
    } | void;
    /**
     * Tries to parse the response body as JSON, returning undefined if it can't.
     */
    tryJson(): any | void;
}
/**
 * ShortCodeExpireError is raised from waitForAccept() if the shortcode expires
 * before the user accepts it. Callers should handle this error.
 */
export declare class ShortCodeExpireError extends ShortCodeError {
    constructor();
}
/**
 * Exception raised when the user denies access to the client in shortcode OAuth.
 */
export declare class ShortCodeAccessDeniedError extends ShortCodeError {
    constructor();
}
/**
 * MixerPluginError is thrown when there's an error in the webpack MixerPlugin.
 */
export declare class MixerPluginError extends Error {
}
/**
 * A PackageIntegrityError is thrown during the bundling process if something
 * is amiss in the build process.
 */
export declare class PackageIntegrityError extends Error {
    getHumanMessage(): string;
}
/**
 * A WebpackBundlerError is thrown during the bundling process if
 * webpack throws an error.
 */
export declare class WebpackBundlerError extends Error {
}
/**
 * PublishError is thrown during the Publisher's publish or unpublished
 * methods if a bad response code is thrown.
 */
export declare class PublishHttpError extends UnexpectedHttpError {
    getHumanMessage(): string;
}
/**
 * PublishPrivateError is thrown when attempts to run miix publish on
 * a private module.
 */
export declare class PublishPrivateError extends Error implements IHumanError {
    getHumanMessage(): string;
}
/**
 * UploaderHttpError is thrown by the Updater process.
 */
export declare class UploaderHttpError extends PublishHttpError {
    getHumanMessage(): string;
}
/**
 * BundleNameTakenError is thrown when the user tries to upload a
 * control bundle whose name is already in use.
 */
export declare class BundleNameTakenError extends UploaderHttpError {
    getHumanMessage(): string;
    /**
     * @override
     */
    statusCode(): number;
}
/**
 * NotInteractiveError is thrown from the connect-participant call on
 * the dev server if the integration isn't interactive yet.
 */
export declare class NotInteractiveError extends Error implements IHttpableError {
    constructor();
    /**
     * @override
     */
    statusCode(): number;
}
/**
 * NoAuthenticationError is thrown when attempting to execute an action
 * which requires authentication which is not present.
 */
export declare class NoAuthenticationError extends Error implements IHttpableError, IHumanError {
    constructor();
    /**
     * @override
     */
    getHumanMessage(): string;
    /**
     * @override
     */
    statusCode(): number;
}
/**
 * SaveNotFoundError
 */
export declare class SaveNotFoundError extends Error implements IHttpableError, IHumanError {
    constructor();
    /**
     * @override
     */
    getHumanMessage(): string;
    /**
     * @override
     */
    statusCode(): number;
}
