import { BaseDecoder } from '../base/base.decoder.js'; import type { TInvoice, TCreditNote, TDebitNote } from '../../interfaces/common.js'; import { CIIProfile } from './cii.types.js'; import { xpath } from '../../plugins.js'; /** * Base decoder for CII-based invoice formats */ export declare abstract class CIIBaseDecoder extends BaseDecoder { protected doc: Document; protected namespaces: Record; protected select: xpath.XPathSelect; protected profile: CIIProfile; constructor(xml: string); /** * Decodes CII XML into a TInvoice object * @returns Promise resolving to a TInvoice object */ decode(): Promise; /** * Detects the CII profile from the XML */ protected detectProfile(): void; /** * Decodes a CII credit note * @returns Promise resolving to a TCreditNote object */ protected abstract decodeCreditNote(): Promise; /** * Decodes a CII debit note (invoice) * @returns Promise resolving to a TDebitNote object */ protected abstract decodeDebitNote(): Promise; /** * Gets a text value from an XPath expression * @param xpath XPath expression * @param context Optional context node * @returns Text value or empty string if not found */ protected getText(xpathExpr: string, context?: Node): string; /** * Gets a number value from an XPath expression * @param xpath XPath expression * @param context Optional context node * @returns Number value or 0 if not found or not a number */ protected getNumber(xpathExpr: string, context?: Node): number; /** * Gets a date value from an XPath expression * @param xpath XPath expression * @param context Optional context node * @returns Date timestamp or current time if not found or invalid */ protected getDate(xpathExpr: string, context?: Node): number; /** * Checks if a node exists * @param xpath XPath expression * @param context Optional context node * @returns True if node exists */ protected exists(xpathExpr: string, context?: Node): boolean; }