import { BelticError } from './base.js'; import type { ErrorSeverity } from './codes.js'; /** * Detailed information about a validation error. */ export interface ValidationErrorDetail { /** Formal error code (e.g., RV-D001, RV-F001) */ code?: string; /** JSON pointer path to the invalid field (e.g., /taxIdJurisdiction/country) */ path: string; /** Human-readable error message */ message: string; /** Machine-readable rule ID (e.g., RV-D001) */ rule?: string; /** AJV keyword that triggered the error */ keyword: string; /** Severity level (critical, high, medium, low) */ severity?: ErrorSeverity; /** The actual value that failed validation */ value?: unknown; /** What was expected */ expected?: string; /** Suggestion on how to fix the error */ suggestion?: string; } /** * Warning for non-critical validation issues. */ export interface ValidationWarning { /** Formal error code (e.g., RV-F001) */ code?: string; /** JSON pointer path to the field */ path: string; /** Human-readable warning message */ message: string; /** Rule ID (e.g., RV-F001) */ rule: string; /** Severity level */ severity: 'low' | 'medium' | 'high' | 'warning'; } /** * Error thrown when credential validation fails. */ export declare class ValidationError extends BelticError { /** List of validation issues */ readonly issues: ValidationErrorDetail[]; constructor(issues: ValidationErrorDetail[]); /** * Format errors for terminal/log display. */ format(): string; /** * Group errors by field path. */ byPath(): Map; /** * Get the first error for a specific path. */ getError(path: string): ValidationErrorDetail | undefined; } //# sourceMappingURL=validation.d.ts.map