/**
 * Infrastructure Error Base Class
 *
 * This module provides the base error class for all infrastructure-related errors.
 * All specific error types extend from this base class for consistent error handling.
 *
 * @module declarative-api/errors/infrastructure-error
 */
/**
 * Error category for classification and handling.
 */
export type InfrastructureErrorCategory = 'validation' | 'resource' | 'command' | 'di' | 'state' | 'permission' | 'integration' | 'unknown';
/**
 * Error severity level.
 */
export type InfrastructureErrorSeverity = 'error' | 'warning' | 'critical';
/**
 * Error context for debugging and logging.
 */
export interface InfrastructureErrorContext {
    /** The component or module where the error occurred */
    readonly component?: string;
    /** The operation that was being performed */
    readonly operation?: string;
    /** Additional context data */
    readonly data?: Record<string, unknown>;
    /** Timestamp when the error occurred */
    readonly timestamp: Date;
}
/**
 * Base class for all infrastructure-related errors.
 *
 * Provides a consistent error structure with:
 * - Error code for programmatic handling
 * - Category for classification
 * - Severity for prioritization
 * - Context for debugging
 * - Cause for error chaining
 *
 * Validates: Requirements 11.4
 *
 * @example
 * ```typescript
 * try {
 *   // Some operation
 * } catch (error) {
 *   if (isInfrastructureError(error)) {
 *     console.log(`[${error.category}] ${error.code}: ${error.message}`);
 *     if (error.cause) {
 *       console.log(`Caused by: ${error.cause.message}`);
 *     }
 *   }
 * }
 * ```
 */
export declare class InfrastructureError extends Error {
    /** Error name for instanceof checks */
    readonly name: string;
    /** Unique error code for programmatic handling */
    readonly code: string;
    /** Error category for classification */
    readonly category: InfrastructureErrorCategory;
    /** Error severity level */
    readonly severity: InfrastructureErrorSeverity;
    /** Error context for debugging */
    readonly context: InfrastructureErrorContext;
    /** Original error that caused this error */
    readonly originalCause?: Error;
    /**
     * Create a new InfrastructureError.
     *
     * @param message - Human-readable error message
     * @param code - Unique error code
     * @param options - Additional error options
     */
    constructor(message: string, code?: string, options?: {
        category?: InfrastructureErrorCategory;
        severity?: InfrastructureErrorSeverity;
        cause?: Error;
        component?: string;
        operation?: string;
        data?: Record<string, unknown>;
    });
    /**
     * Get a formatted error message including context.
     */
    toDetailedString(): string;
    /**
     * Convert error to a plain object for serialization.
     */
    toJSON(): Record<string, unknown>;
}
/**
 * Type guard to check if an error is an InfrastructureError.
 *
 * @param error - The error to check
 * @returns True if the error is an InfrastructureError
 */
export declare function isInfrastructureError(error: unknown): error is InfrastructureError;
/**
 * Type guard to check if an error has a specific error code.
 *
 * @param error - The error to check
 * @param code - The error code to match
 * @returns True if the error has the specified code
 */
export declare function hasErrorCode(error: unknown, code: string): boolean;
/**
 * Type guard to check if an error belongs to a specific category.
 *
 * @param error - The error to check
 * @param category - The category to match
 * @returns True if the error belongs to the specified category
 */
export declare function hasErrorCategory(error: unknown, category: InfrastructureErrorCategory): boolean;
