/** * Device catalog validation rules. * * Validates a DeviceCatalog against business rules beyond schema-level * constraints (type correctness, required fields). These rules check for: * * - Duplicate device IDs * - Missing symbol references * - Missing footprint references * - Missing pin maps (for ICs and connectors) * - Incompatible package assignments * - Missing manufacturer part numbers * - Missing assembly availability hints * - Duplicate supplier IDs within a single device * * @module */ import { CatalogValidationError } from './errors.js'; import type { DeviceCatalog, DeviceEntry } from './schema.js'; export interface CatalogValidationResult { valid: boolean; errors: CatalogValidationError[]; warnings: CatalogValidationError[]; } /** * Validate a DeviceCatalog against all business rules. * * Returns both errors (catalog is invalid) and warnings (catalog is valid * but has issues the user should address). * * Schema-level validation (type correctness, required fields) is handled * by `DeviceCatalogSchema.parse()` / `validateDeviceCatalog()`. * This function adds domain-specific cross-field validation. */ export declare function validateCatalog(catalog: DeviceCatalog): CatalogValidationResult; /** * Validate a catalog and throw if any errors are found. * * Returns structured errors+warnings on success. * Throws `CatalogError` with all validation errors if the catalog is invalid. */ export declare function validateCatalogOrThrow(catalog: DeviceCatalog): CatalogValidationResult; /** * Validate a single device entry against common rules. * * This is useful for pre-validation before adding a device to a catalog. */ export declare function validateDeviceEntry(entry: DeviceEntry): CatalogValidationResult;