/** * BRO XML format version detection * * Validates that XML documents match the expected schema versions * supported by this library. Uses graceful degradation for same * major versions with warnings. */ export type DataType = "CPT" | "BHR-GT" | "BHR-G" | "GMW" | "GLD"; /** * Schema version info */ interface SchemaVersionInfo { namespace: string; version: string; majorVersion: number; description: string; } /** * Exported for backward compatibility */ export declare const SUPPORTED_VERSIONS: { readonly CPT: SchemaVersionInfo; readonly "BHR-GT": SchemaVersionInfo; readonly "BHR-G": SchemaVersionInfo; readonly GMW: SchemaVersionInfo; readonly GLD: SchemaVersionInfo; }; /** * Result of version detection */ export interface VersionDetectionResult { dataType: DataType; version: string; namespace: string; warnings: Array; } /** * Detect and validate the BRO schema version from XML document * * Behavior: * - Exact match: returns version info with no warnings * - Same major version: returns version info with warning * - Different major version: throws BROParseError * - Unknown/invalid: throws BROParseError * * @param doc - Parsed XML document * @param expectedType - Expected data type (CPT, BORE, or BHRG) * @returns Version detection result with any warnings * @throws {BROParseError} If version is incompatible or document is invalid */ export declare function detectAndValidateVersion(doc: Document, expectedType: DataType): VersionDetectionResult; /** * Get version information from document (for informational purposes) * * @param doc - Parsed XML document * @returns Version information or null if not detected */ export declare function getVersionInfo(doc: Document): { type: DataType; version: string; namespace: string; } | null; export {}; //# sourceMappingURL=version-detector.d.ts.map