# Changelog

## 2025-03-20 - 2.0.0 - BREAKING CHANGE(core)
Refactor contact and PDF handling across the library by replacing IContact with TContact and updating PDF processing to use a structured IPdf object. These changes ensure that empty contact objects include registration details, founded/closed dates, and status, and that PDF loading/exporting uniformly wraps buffers in a proper object.

- Updated createEmptyContact (renamed in documentation to reflect TContact) to return a complete TContact object with registrationDetails, foundedDate, closedDate, and status.
- Modified loadPdf and exportPdf in XInvoice to wrap PDF buffers in an IPdf object with name, id, and metadata instead of using a raw Uint8Array.
- Replaced IContact with TContact in FacturXEncoder, FacturXDecoder, and XInvoiceDecoder to standardize contact structure.
- Aligned address and contact data across decoders and encoders for consistency.

## 2025-03-17 - 1.3.3 - fix(commitinfo)
Synchronize commit info version with package.json version

- Updated ts/00_commitinfo_data.ts from version '1.3.1' to '1.3.2' to match package.json

## 2025-03-17 - 1.3.1 - fix(documentation)
Update readme to enhance installation instructions and expand feature documentation for Factur-X/ZUGFeRD, UBL, and FatturaPA support, including details on circular encoding/decoding.

- Added pnpm installation instructions
- Expanded description of supported European e-invoicing standards
- Clarified usage of FacturXEncoder and ZUGFeRDXmlDecoder for XML encoding/decoding
- Included detailed feature summary for PDF integration, encoding/decoding, and format detection

## 2025-03-17 - 1.3.0 - feat(encoder)
Rename encoder class from ZugferdXmlEncoder to FacturXEncoder to better reflect Factur-X compliance. All related imports, exports, and tests have been updated while maintaining backward compatibility.

- Renamed the encoder class to FacturXEncoder and added an alias for backward compatibility (FacturXEncoder as ZugferdXmlEncoder)
- Updated test files and TS index exports to reference the new class name
- Improved XML creation formatting and documentation within the encoder module

## 2025-03-17 - 1.2.0 - feat(core)
Improve XML processing and error handling for PDF invoice attachments

- Update dependency versions and lock file references in package.json
- Add XML declaration validation in addXmlString to prevent invalid XML input
- Enhance XML extraction, format detection, and parsing logic in XInvoice and ZUGFeRDXmlDecoder
- Extend test coverage with additional validations for XML, letter data, and error handling scenarios

## 2025-01-01 - 1.1.2 - fix(core)
Fix file import paths and remove markdown syntax from README

- Corrected import paths for getInvoice utility
- Removed markdown syntax from README
- Fixed function parameter usage in encoder class

## 2024-12-31 - 1.1.1 - fix(documentation)
Updated documentation to reflect accurate module description and usage guidance

- Corrected description in package.json to better reflect the module's functionalities.
- Enhanced README with detailed setup and usage instructions.
- Included examples for embedding XML into PDFs and parsing XML data.

## 2024-12-30 - 1.1.0 - feat(core)
Add EInvoiceCreator class for generating ZUGFeRD/Factur-X XML

- Introduced EInvoiceCreator class to convert invoice data into ZUGFeRD/Factur-X XML.
- Updated development dependencies to enhance TypeScript support.
- Added SmartXML and TSClass plugins for XML handling and business logic.

## 2024-07-02 - 1.0.6 - fix(core)
Project files committed with initial structure and class implementation

- Added package.json with project dependencies and scripts
- Included guide in readme.md on how to install and use the module
- Implemented ts/plugins.ts for exporting native Node.js and third-party modules
- Defined interfaces in ts/interfaces.ts to represent the structure of invoices
- Created ts/index.ts to export interfaces and classes
- Implemented XInvoice class in ts/classes.xinvoice.ts with methods for embedding and extracting XML from PDFs
- Added test/test.ts for basic testing of the embed XML functionality

## 2024-04-22 - 1.0.3 to 1.0.5 - core
Minor updates and bug fixes.

- fix: core update in versions 1.0.3 and 1.0.4