feat(xml): add FA(3) invoice builder with well-formed XML validation#35
Closed
smekcio wants to merge 6 commits into
Closed
feat(xml): add FA(3) invoice builder with well-formed XML validation#35smekcio wants to merge 6 commits into
smekcio wants to merge 6 commits into
Conversation
Introduce typed FA3Invoice fluent API, bundled reference schemas, and expanded unit tests so FA(3) XML can be built and verified without external fixtures. Co-authored-by: Cursor <cursoragent@cursor.com>
Nested schema includes reference bundled files by relative path instead of remote URLs, keeping the FA(3) schema graph self-contained within the package. Co-authored-by: Cursor <cursoragent@cursor.com>
Validate FA(3) and PEF XML using XMLValidator from fast-xml-parser for well-formedness. Bundled .xsd files remain as schema reference only. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce validateFa3XmlWellFormed/XmlWellFormedError and toXmlWellFormed, omit empty FaWiersz on advance invoices, remove invalid Podmiot3K ordering, and add malformed XML test coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
Normalize calendar dates, validate newTransport and Podmiot1K inputs, merge withRawFa sections per XSD structure, and switch well-formed validation to a synchronous API. Co-authored-by: Cursor <cursoragent@cursor.com>
…a keys. Keep newTransportIntraEu sticky across transport means calls and extend withRawFa merge to DaneFaKorygowanej and Podmiot1K. Co-authored-by: Cursor <cursoragent@cursor.com>
Owner
Author
|
Closing as duplicate — FA(3) builder is already covered by PR #34. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FA3Invoicefluent builder for generating FA(3) XML invoices (basic, correction, advance, settlement, margin, transport, attachments, and more)dist/xml/fa3-schemas/fast-xml-parser(validateFa3XmlWellFormed,toXmlWellFormed)libxmljs2dependency frompackage.jsonand test suitesPodmiot1K/Podmiot2Kcorrection serialization, XSD-awarewithRawFamerge, transport validationTest plan
npm run buildnpm run test:unit— 358 pass, 0 fail (10 skipped: missing FA2 fixture)Made with Cursor