/**
 * Base Exception Factory for ZinTrust Framework
 * Implemented as plain functions (no classes / no prototype-based constructors).
 */
export interface IZintrustError extends Error {
    statusCode: number;
    code: string;
    details?: unknown;
}
type StackTraceConstructorOpt = ((...args: never[]) => unknown) | (abstract new (...args: never[]) => unknown);
export type ZintrustErrorInit = Readonly<{
    statusCode?: number;
    code?: string;
    details?: unknown;
    name?: string;
    prototype?: object;
    captureStackTraceCtor?: StackTraceConstructorOpt;
}>;
/**
 * Plain initializer for ZinTrust framework errors.
 */
export declare function initZintrustError(target: Error, init?: ZintrustErrorInit): void;
type TypedZintrustError<TCode extends string, TName extends string, TStatus extends number> = IZintrustError & {
    readonly code: TCode;
    name: TName;
    readonly statusCode: TStatus;
};
export type ZintrustError = TypedZintrustError<'INTERNAL_ERROR', 'ZintrustError', 500>;
export type DatabaseError = TypedZintrustError<'DATABASE_ERROR', 'DatabaseError', 500>;
export type WorkerError = TypedZintrustError<'WORKER_ERROR', 'WorkerError', 500>;
export type ValidationError = TypedZintrustError<'VALIDATION_ERROR', 'ValidationError', 400>;
export type NotFoundError = TypedZintrustError<'NOT_FOUND', 'NotFoundError', 404>;
export type UnauthorizedError = TypedZintrustError<'UNAUTHORIZED', 'UnauthorizedError', 401>;
export type ForbiddenError = TypedZintrustError<'FORBIDDEN', 'ForbiddenError', 403>;
export type ConnectionError = TypedZintrustError<'CONNECTION_ERROR', 'ConnectionError', 500>;
export type ConfigError = TypedZintrustError<'CONFIG_ERROR', 'ConfigError', 500>;
export type GeneralError = TypedZintrustError<'GENERAL_ERROR', 'GeneralError', 500>;
export type CliError = TypedZintrustError<'CLI_ERROR', 'CliError', 1>;
export type SecurityError = TypedZintrustError<'SECURITY_ERROR', 'SecurityError', 401>;
export type CatchError = TypedZintrustError<'TRY_CATCH_ERROR', 'CatchError', 500>;
export type SanitizerError = TypedZintrustError<'SANITIZER_ERROR', 'SanitizerError', 400>;
/**
 * Plain error creators.
 */
export declare function ZintrustError(message: string, details?: unknown): ZintrustError;
export declare function createDatabaseError(message: string, details?: unknown): DatabaseError;
export declare function createWorkerError(message: string, details?: unknown): WorkerError;
export declare function createValidationError(message: string, details?: unknown): ValidationError;
export declare function createNotFoundError(message?: string, details?: unknown): NotFoundError;
export declare function createUnauthorizedError(message?: string, details?: unknown): UnauthorizedError;
export declare function createForbiddenError(message?: string, details?: unknown): ForbiddenError;
export declare function createConnectionError(message: string, details?: unknown): ConnectionError;
export declare function createConfigError(message: string, details?: unknown): ConfigError;
export declare function createGeneralError(message: string, details?: unknown): GeneralError;
export declare function createCliError(message: string, details?: unknown): CliError;
export declare function createSecurityError(message: string, details?: unknown): SecurityError;
export declare function createTryCatchError(message: string, details?: unknown): CatchError;
/**
 * Create a sanitizer error with method name, reason, and redacted value
 */
export declare function createSanitizerError(method: string, reason: string, value: unknown): SanitizerError;
/**
 * Backward compatibility Errors object.
 */
export declare const Errors: Readonly<{
    database: (message: string, details?: unknown) => Error;
    notFound: (message?: string, details?: unknown) => Error;
    validation: (message: string, details?: unknown) => Error;
    unauthorized: (message?: string, details?: unknown) => Error;
    forbidden: (message?: string, details?: unknown) => Error;
    connection: (message: string, details?: unknown) => Error;
    config: (message: string, details?: unknown) => Error;
    general: (message: string, details?: unknown) => Error;
    cli: (message: string, details?: unknown) => Error;
    security: (message: string, details?: unknown) => Error;
    catchError: (message: string, details?: unknown) => Error;
    sanitizer: (method: string, reason: string, value: unknown) => Error;
}>;
/**
 * Centralized ErrorFactory for creating standardized errors.
 */
export declare const ErrorFactory: Readonly<{
    createDatabaseError: (message: string, details?: unknown) => DatabaseError;
    createWorkerError: (message: string, details?: unknown) => WorkerError;
    createConnectionError: (message: string, details?: unknown) => ConnectionError;
    createConfigError: (message: string, details?: unknown) => ConfigError;
    createValidationError: (message: string, details?: unknown) => ValidationError;
    createGeneralError: (message: string, details?: unknown) => GeneralError;
    createTryCatchError: (message: string, details?: unknown) => CatchError;
    createCliError: (message: string, details?: unknown) => CliError;
    createSecurityError: (message: string, details?: unknown) => SecurityError;
    createNotFoundError: (message?: string, details?: unknown) => NotFoundError;
    createUnauthorizedError: (message?: string, details?: unknown) => UnauthorizedError;
    createSanitizerError: (method: string, reason: string, value: unknown) => SanitizerError;
    createForbiddenError: (message?: string, details?: unknown) => ForbiddenError;
}>;
export {};
//# sourceMappingURL=ZintrustError.d.ts.map