import type { IInvoice, TInvoiceFormat, TInvoiceDirection } from './skr.invoice.entity.js'; /** * Adapter for @fin.cx/einvoice library * Handles parsing, validation, and format conversion of e-invoices */ export declare class InvoiceAdapter { private logger; private readonly einvoiceModuleName; private einvoiceModulePromise?; constructor(); private getEInvoiceModule; private getEInvoiceClass; private readonly MAX_XML_SIZE; private readonly MAX_PDF_SIZE; /** * Parse an invoice from file or buffer */ parseInvoice(file: Buffer | string, direction: TInvoiceDirection): Promise; /** * Validate an invoice using multi-level validation */ private validateInvoice; private validateInvoiceLevel; private formatValidationMessages; private getDetectedFormat; private mapEInvoiceToBusinessTerms; private mapEInvoiceLinesToBusinessTerms; private buildVatBreakdown; private mapEInvoiceContactToBusinessTerms; private mapPaymentOptionsToBusinessTerms; private getDueDate; private getVatCategoryCode; private normalizeCountryCode; private formatStreet; /** * Map EN16931 Business Terms to internal invoice model */ private mapToInternalModel; /** * Map party information */ private mapParty; /** * Map bank account information */ private mapBankAccount; /** * Map invoice lines */ private mapInvoiceLines; /** * Map VAT category */ private mapVATCategory; /** * Get exemption reason for VAT category */ private getExemptionReason; /** * Map VAT breakdown */ private mapVATBreakdown; /** * Map allowances and charges */ private mapAllowancesCharges; /** * Map line-level allowances and charges */ private mapLineAllowancesCharges; /** * Map payment terms */ private mapPaymentTerms; /** * Parse skonto terms from payment terms text */ private parseSkontoTerms; /** * Map payment means */ private mapPaymentMeans; /** * Classify tax scenario based on invoice data */ private classifyTaxScenario; /** * Check if country is in EU */ private isEUCountry; /** * Map e-invoice format from library format */ private mapEInvoiceFormat; /** * Calculate content hash for the invoice */ private calculateContentHash; /** * Convert invoice to different format */ convertFormat(invoice: IInvoice, targetFormat: TInvoiceFormat): Promise; /** * Generate invoice from internal data */ generateInvoice(invoiceData: Partial, format: TInvoiceFormat): Promise<{ xml: string; pdf?: Buffer; }>; /** * Map internal invoice to EN16931 Business Terms */ private mapToEInvoiceData; private mapInvoicePartyToEInvoiceContact; private calculateDueInDays; }