import { NangoError } from './error.js';
import type { Response, Request } from 'express';
export declare enum ErrorSourceEnum {
    PLATFORM = "platform",
    CUSTOMER = "customer"
}
export type ErrorSource = ErrorSourceEnum;
interface ErrorOptionalConfig {
    source: ErrorSource;
    accountId?: number;
    userId?: number;
    environmentId?: number | undefined;
    metadata?: Record<string, unknown>;
    operation?: string;
}
declare class ErrorManager {
    /**
     * TODO: reuse information in res.locals when possible
     */
    report(err: unknown, config?: ErrorOptionalConfig): void;
    errResFromNangoErr(res: Response, err: NangoError | null): void;
    errRes(res: Response, type: string): void;
    handleGenericError(err: any, _: Request, res: Response): void;
}
declare const _default: ErrorManager;
export default _default;
