/**
 * Typed Error Classes for Vorion
 *
 * Provides structured error types with HTTP status codes for better error handling,
 * observability, and programmatic error discrimination.
 *
 * @packageDocumentation
 */
/**
 * Base error class for all Vorion errors.
 * Extends Error with structured metadata for API responses and logging.
 */
export declare class VorionError extends Error {
    /** Error code for programmatic identification */
    code: string;
    /** HTTP status code for API responses */
    statusCode: number;
    /** Additional error details for debugging */
    details?: Record<string, unknown>;
    constructor(message: string, details?: Record<string, unknown>);
    /**
     * Convert error to a JSON-serializable object for API responses
     */
    toJSON(): Record<string, unknown>;
}
/**
 * Validation error for invalid input data.
 * HTTP 400 Bad Request
 */
export declare class ValidationError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Not found error for missing resources.
 * HTTP 404 Not Found
 */
export declare class NotFoundError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Unauthorized error for authentication failures.
 * HTTP 401 Unauthorized
 */
export declare class UnauthorizedError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Forbidden error for authorization failures.
 * HTTP 403 Forbidden
 */
export declare class ForbiddenError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Conflict error for resource state conflicts.
 * HTTP 409 Conflict
 */
export declare class ConflictError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Rate limit error when request limits are exceeded.
 * HTTP 429 Too Many Requests
 */
export declare class RateLimitError extends VorionError {
    code: string;
    statusCode: number;
    /** Seconds until rate limit resets */
    retryAfter?: number;
    constructor(message: string, retryAfter?: number, details?: Record<string, unknown>);
    toJSON(): Record<string, unknown>;
}
/**
 * Configuration error for invalid or missing configuration.
 * HTTP 500 Internal Server Error
 */
export declare class ConfigurationError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Encryption error for encryption/decryption failures.
 * HTTP 500 Internal Server Error
 */
export declare class EncryptionError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Escalation error for escalation workflow failures.
 * HTTP 400 Bad Request
 */
export declare class EscalationError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Database error for database operation failures.
 * HTTP 500 Internal Server Error
 */
export declare class DatabaseError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * External service error for third-party service failures.
 * HTTP 502 Bad Gateway
 */
export declare class ExternalServiceError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Timeout error for operation timeouts.
 * HTTP 504 Gateway Timeout
 */
export declare class TimeoutError extends VorionError {
    code: string;
    statusCode: number;
    constructor(message: string, details?: Record<string, unknown>);
}
/**
 * Type guard to check if an error is a VorionError
 */
export declare function isVorionError(error: unknown): error is VorionError;
/**
 * Helper to wrap unknown errors in a VorionError
 */
export declare function wrapError(error: unknown, fallbackMessage?: string): VorionError;
/**
 * Repository error for data access layer failures.
 * HTTP 500 Internal Server Error
 */
export declare class RepositoryError extends VorionError {
    readonly operation: string;
    readonly entity?: string;
    code: string;
    statusCode: number;
    constructor(message: string, operation: string, entity?: string, details?: Record<string, unknown>);
}
/**
 * Service error for business logic failures.
 * HTTP 500 Internal Server Error
 */
export declare class ServiceError extends VorionError {
    readonly service: string;
    readonly operation: string;
    code: string;
    statusCode: number;
    constructor(message: string, service: string, operation: string, details?: Record<string, unknown>);
}
/**
 * Integration error for external service failures.
 * HTTP 502 Bad Gateway
 */
export declare class IntegrationError extends VorionError {
    readonly integration: string;
    readonly operation: string;
    code: string;
    statusCode: number;
    constructor(message: string, integration: string, operation: string, details?: Record<string, unknown>);
}
/**
 * Queue error for message queue operations.
 * HTTP 500 Internal Server Error
 */
export declare class QueueError extends VorionError {
    readonly queue: string;
    readonly operation: string;
    code: string;
    statusCode: number;
    constructor(message: string, queue: string, operation: string, details?: Record<string, unknown>);
}
/**
 * Cache error for caching layer failures.
 * HTTP 500 Internal Server Error
 */
export declare class CacheError extends VorionError {
    readonly operation: string;
    code: string;
    statusCode: number;
    constructor(message: string, operation: string, details?: Record<string, unknown>);
}
/**
 * Governance error for policy evaluation failures.
 * HTTP 500 Internal Server Error
 */
export declare class GovernanceError extends VorionError {
    readonly operation: string;
    code: string;
    statusCode: number;
    constructor(message: string, operation: string, details?: Record<string, unknown>);
}
/**
 * Trust engine error for trust calculation failures.
 * HTTP 500 Internal Server Error
 */
export declare class TrustEngineError extends VorionError {
    readonly operation: string;
    readonly entityId?: string;
    code: string;
    statusCode: number;
    constructor(message: string, operation: string, entityId?: string, details?: Record<string, unknown>);
}
/**
 * Wrap an error with operation context for better debugging.
 * Re-throws VorionErrors with additional context, wraps other errors.
 */
export declare function wrapErrorWithContext(error: unknown, context: {
    operation: string;
    component: string;
    details?: Record<string, unknown>;
}): VorionError;
//# sourceMappingURL=errors.d.ts.map