import type { Tracer } from 'dd-trace';
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;
    metadata?: Record<string, unknown>;
    operation?: string;
}
declare class ErrorManager {
    constructor();
    report(e: unknown, config?: ErrorOptionalConfig, tracer?: Tracer): void;
    errResFromNangoErr(res: Response, err: NangoError | null): void;
    errRes(res: any, type: string): void;
    handleGenericError(err: any, req: Request, res: any, tracer: Tracer): Promise<void>;
    getExpressRequestContext(req: Request): Record<string, unknown>;
}
declare const _default: ErrorManager;
export default _default;
