zugferd-code-lists

Crates.iozugferd-code-lists
lib.rszugferd-code-lists
version0.1.19
created_at2025-03-05 01:02:18.342303+00
updated_at2025-12-08 00:24:03.94268+00
descriptionZUGFeRD code lists, e.g. languages enum, currencies enum, countries enum, etc.
homepagehttps://github.com/hydrogen602/zugferd-code-lists
repositoryhttps://github.com/hydrogen602/zugferd-code-lists
max_upload_size
id1577993
size3,693,530
Jonathan Rotter (hydrogen602)

documentation

README

zugferd code lists

NPM Version Crates.io Version

This project takes the many code lists that are part of the ZUGFeRD specification and converts them into rust and typescript enums for use in other projects.

This project is in no way or form affiliated with the official ZUGFeRD project.

Status

Versions supported:

  • ZUGFeRD 2.3.2
  • ZUGFeRD 2.3.3
  • ZUGFeRD 2.4

Changelog

  • v0.1.9: added ZUGFeRD 2.3.3
  • v0.1.10: added VAT CAT list
  • v0.1.11:
    • Added TryFrom impls for conversion to and from the crates iso_currency and iso_country
    • Fixed bug where code NA would be rendered as nan in the generated code
    • Added Fiscal ID list (new in ZUGFeRD 2.3.3)
  • v0.1.12:
    • Added Debug, Display, and Error traits for generated errors for TryFrom for iso_currency and iso_country
  • v0.1.13:
    • Adjusted the traits Code and Description to consider the fact that all code lists are Copy and all strings returned live for 'static. This should make the API more flexible as previously there was a lifetime dependence between a code value and the &str returned by Code::code
  • v0.1.14:
    • Optional serde support
  • v0.1.15
    • Optional specta support
  • v0.1.16
    • Added FromStr and Display trait impls
  • v0.1.17
    • Made error for FromStr more informative with thiserror.
  • v0.1.18
    • Bugfix where 2.3.3 lists were not being exported in ts.
  • v0.1.19
    • Added ZUGFeRD 2.4
    • Reduced code by re-exported duplicate enums instead of having multiple definitions
    • Added TryFrom impls for conversion between a version and its previous version

Future Plans

  • TryFrom impls for conversion between versions - done

Adding a ZUGFeRD version

See the ZUGFeRD spec files readme for instructions on how to add a new ZUGFeRD specification files.

Then add the version to the Version enum in py_generate/common.py and run make gen to generate the definitions.

Commit count: 13

cargo fmt