UNPKG

zugferd-code-lists

Version:

ZUGFeRD code lists, e.g. languages enum, currencies enum, countries enum, etc.

54 lines (40 loc) 2.05 kB
# zugferd code lists ![NPM Version](https://img.shields.io/npm/v/zugferd-code-lists) ![Crates.io Version](https://img.shields.io/crates/v/zugferd-code-lists) 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](spec/readmd.md) 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.