Every published version of @attestwire/en16931, newest
first. The hosted API and the MCP tools run the same engine, so a
release lands on all three doors at once. The full entry for each
version — error codes, migration notes, rule-by-rule detail — is in
the package changelog.
Set invoiceTypeCode to 381 on the invoice you already build and you get a UBL CreditNote or a CII type-code-381 document — generated, parsed and validated, with the whole rule set running unchanged. Four new fixtures took the recorded KoSIT run to 11 documents, all acceptable. The XML reader also stopped accepting two ill-formed shapes it should always have refused: a duplicated attribute, and a comment containing --. Both now raise XmlSyntaxError, so a generator of your own that emitted either will now be told.
Security and arithmetic fixes, and much tighter parser caps
A four-lens adversarial review, with every defect reproduced before it was fixed and most of them checked against KoSIT in both syntaxes. Read the migration note before upgrading: the default XML parser caps dropped 25×, so a document carrying a base64 attachment of about 300 kB is now refused where 0.3.0 read it.
generateCii emits UN/CEFACT CII D16B from the same input model the UBL generator takes, and parseCiiInvoice reads one back. That opened XRechnung CII and the Factur-X EN 16931 payload — the XML, never the PDF container.
No code changed. The published README recorded the conformance run it had said was still pending, and a release gate now fails the build whenever the package and its run log disagree.
Discounts, surcharges, prepayments, periods and attachments
The input model grew the EN 16931 groups it could not previously express, and the rules for those groups shipped in the same release, so nothing is modelled without being checked. Existing 0.1.x input validates and generates identically.
Asking for a CII profile no longer returns UBL wearing a CII customization id, and a credit-note type code is refused rather than generated as an invoice.
JSON in, XRechnung UBL out, with a rule set that explains itself.
Versions and dates on this page are parsed from
the package's own changelog at build
time. @attestwire/en16931 is published, still 0.x, so minor
versions can change behaviour; the entry says when one does.