import * as hdbErrors from './commonErrors.ts';
/**
 * Custom error class used for better error and log handling.  Caught errors that evaluate to an instanceof HdbError can
 * be handled differently - e.g. in most cases caught HdbError likely would not need to be logged since that should have
 * already been handled when the custom error was constructed.
 */
export declare class HdbError extends Error {
    statusCode: number;
    http_resp_msg: string;
    type: string;
    logLevel: string;
    /**
     * @param {Error} errOrig -  Error to be translated into HdbError. If manually throwing an error, pass `new Error()` to ensure stack trace is maintained
     * @param {String} [httpMsg] - optional -  response message that will be returned via the API
     * @param {Number} [httpCode] - optional -  response status code that will be returned via the API
     * @param {String} [logLevel] - optional -  log level that will be used for logging of this error
     * @param {String} [logMsg] - optional - log message that, if provided, will be logged at the `logLevel` above
     */
    constructor(errOrig: any, httpMsg?: any, httpCode?: number, logLevel?: string, logMsg?: string);
}
export declare class ClientError extends Error {
    statusCode: number;
    constructor(message: string | Error, statusCode?: number);
}
export declare class ServerError extends Error {
    statusCode: number;
    constructor(message: string | Error, statusCode?: number);
}
/**
 * This handler method is used to effectively evaluate caught errors and either translates them into a custom HdbError or,
 * if it is already a HdbError, just returns the error to continue being thrown up the stack
 *
 * See above for params descriptions
 * @param e
 * @param httpMsg
 * @param httpCode
 * @param logLevel
 * @param logMsg
 * @param deleteStack
 * @returns {HdbError|*}
 */
export declare function handleHDBError(e: any, httpMsg?: any, httpCode?: number, logLevel?: string, logMsg?: any, deleteStack?: boolean): any;
/**
 * Represents a general violation of validation/authorization. This is used in situations where we are performing
 * expected verification. Extends Error for TypeScript class compatibility.
 * @param {Object} user - user object that caused the access violation
 * @constructor
 */
export declare class Violation extends Error {
    constructor(message: string);
}
/**
 * Represents an access violation. This is used to return a 403 or 401 response to the client.
 * @param {Object} user - user object that caused the access violation
 * @constructor
 */
export declare class AccessViolation extends Violation {
    statusCode: number;
    constructor(user?: any);
}
export declare function isHDBError(e: any): boolean;
export { hdbErrors };
